﻿/* Selected Product Info Styles */
.selected-product-info {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 15px;
    margin: 8px 0;
    border-left: 4px solid #28a745;
}

.selected-product-name {
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 1rem;
}

.selected-product-details {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
    font-size: 0.85rem;
    flex-wrap: wrap;
}

    .selected-product-details span {
        padding: 2px 8px;
        border-radius: 4px;
        font-weight: 600;
    }

.warranty {
    background: #fff3cd;
    color: #856404;
}

.stock-status {
    background: #d4edda;
    color: #155724;
}

.product-code {
    background: #d1ecf1;
    color: #0c5460;
}

.selected-product-features {
    margin-top: 8px;
}

.feature-item {
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 3px;
    line-height: 1.3;
}

.component-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: #dc3545;
    margin-top: 8px;
    padding: 4px 8px;
    background: rgba(220,53,69,0.1);
    border-radius: 4px;
    display: inline-block;
}

.component-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.btn-select {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,123,255,0.3);
}

    .btn-select:hover {
        background: linear-gradient(135deg, #0056b3, #004085);
        transform: translateY(-2px);
        box-shadow: 0 4px 15px rgba(0,123,255,0.4);
    }

.btn-remove {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .btn-remove:hover {
        background: linear-gradient(135deg, #c82333, #bd2130);
        transform: scale(1.1);
        box-shadow: 0 3px 12px rgba(220,53,69,0.4);
    }

/* Summary Section */
.build-summary {
    flex: 1;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow: auto;
    border: 1px solid #e9ecef;
}

.summary-header {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 25px;
    font-size: 1.4rem;
    font-weight: 700;
    text-align: center;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.summary-content {
    padding: 25px;
    max-height: 400px;
    overflow-y: auto;
}

    .summary-content::-webkit-scrollbar {
        width: 6px;
    }

    .summary-content::-webkit-scrollbar-track {
        background: #f1f1f1;
    }

    .summary-content::-webkit-scrollbar-thumb {
        background: #c1c1c1;
        border-radius: 3px;
    }

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 15px 0;
    border-bottom: 1px solid #f1f3f4;
    font-size: 0.95rem;
}

    .summary-item:last-child {
        border-bottom: none;
    }

.summary-item-info {
    flex: 1;
    margin-right: 15px;
}

.summary-item-name {
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 4px;
}

.summary-item-product {
    font-size: 0.85rem;
    color: #6c757d;
    line-height: 1.3;
}

.summary-item-price {
    font-weight: 700;
    color: #dc3545;
    font-size: 1rem;
    white-space: nowrap;
}

.summary-total {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 20px 25px;
    border-top: 3px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.total-label {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2c3e50;
}

.total-amount {
    font-size: 1.6rem;
    font-weight: 700;
    color: #dc3545;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.summary-actions {
    padding: 25px;
    background: #f8f9fa;
}

.btn-summary {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    margin-bottom: 12px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.btn-add-cart {
    background: linear-gradient(135deg, #ff6b35, #f9ca24);
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.btn-add-cart:hover {
    background: linear-gradient(135deg, #e55a2b, #f39c12);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255,107,53,0.4);
}

.btn-save {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.btn-save:hover {
    background: linear-gradient(135deg, #218838, #17a2b8);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40,167,69,0.4);
}

.btn-reset {
    background: linear-gradient(135deg, #6c757d, #495057);
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

    .btn-reset:hover {
        background: linear-gradient(135deg, #5a6268, #343a40);
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(108,117,125,0.4);
    }

/* Product Selection Modal */
.product-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    width: 95%;
    max-width: 1300px;
    margin: 30px auto;
    border-radius: 12px;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 50px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    padding: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.btn-close {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 50%;
    transition: all 0.3s ease;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .btn-close:hover {
        background: rgba(255,255,255,0.3);
        transform: rotate(90deg);
    }

.modal-search {
    padding: 25px;
    border-bottom: 1px solid #e9ecef;
    background: #f8f9fa;
}

.search-input {
    width: 100%;
    padding: 2px;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    background: white;
}

    .search-input:focus {
        outline: none;
        border-color: #007bff;
        box-shadow: 0 0 0 3px rgba(0,123,255,0.25);
    }

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 25px;
    background: #f8f9fa;
}

/* Product List Styles (List format like reference image) */
.product-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.product-item {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    padding: 15px;
}

    .product-item:hover {
        border-color: #007bff;
        box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    }

.product-image {
    width: 120px;
    height: 120px;
    object-fit: cover;
    background: #f8f9fa;
    border-radius: 6px;
    margin-right: 20px;
    flex-shrink: 0;
}

.product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.product-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1.4;
    margin-bottom: 5px;
}

.product-details {
    display: flex;
    gap: 20px;
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 8px;
}

.product-detail-item {
    display: flex;
    flex-direction: column;
}

.product-detail-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 2px;
}

.product-stock {
    color: #28a745;
    font-weight: 600;
}

    .product-stock.out-of-stock {
        color: #dc3545;
    }

.product-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: #dc3545;
    margin: 10px 0;
}

.product-specs {
    font-size: 0.9rem;
    color: #6c757d;
    line-height: 1.4;
}

.product-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: 20px;
}

.btn-add-to-build {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 200px;
}

    .btn-add-to-build:hover {
        background: linear-gradient(135deg, #0056b3, #004085);
        transform: translateY(-2px);
        box-shadow: 0 4px 15px rgba(0,123,255,0.4);
    }

.loading {
    text-align: center;
    /*padding: 60px;*/
    color: #6c757d;
}

    .loading i {
        font-size: 3rem;
        margin-bottom: 20px;
        color: #007bff;
    }

/* Responsive Design */
@media (max-width: 1200px) {
    .build-main {
        gap: 20px;
    }
}

@media (max-width: 992px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }

    .build-main {
        flex-direction: column;
        gap: 20px;
    }

    .build-summary {
        order: -1;
        position: static;
        max-height: none;
    }

    .buildpc-header {
        margin-bottom: 20px;
        padding: 30px 20px;
    }

    .build-actions {
        flex-direction: column;
        gap: 15px;
        text-align: center;
        padding: 15px;
    }

    .cost-estimate {
        order: 2;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .buildpc-title {
        font-size: 2rem;
    }

    .buildpc-subtitle {
        font-size: 1.1rem;
    }

    .product-item {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .product-image {
        margin-right: 0;
        margin-bottom: 10px;
    }

    .product-actions {
        margin-left: 0;
    }

    .btn-add-to-build {
        min-width: auto;
        width: 100%;
    }

    .component-item {
        padding: 20px 15px;
    }

    .component-number {
        width: 45px;
        height: 45px;
        font-size: 1rem;
        margin-right: 15px;
    }

    .component-name {
        font-size: 1.1rem;
    }

    .component-actions {
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
    }

    .btn-select {
        width: 100%;
    }

    .modal-content {
        width: 98%;
        margin: 10px auto;
        max-height: 95vh;
    }

    .modal-header {
        padding: 20px;
    }

    .modal-search,
    .modal-body {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .buildpc-title {
        font-size: 1.6rem;
    }

    .component-number {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        margin-bottom: 10px;
    }

    .component-name {
        font-size: 1rem;
    }

    .btn-select,
    .btn-summary {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
}

fadeInUp {
    from

{
    opacity: 0;
    transform: translateY(30px);
}

to {
    opacity: 1;
    transform: translateY(0);
}

}

.component-item {
    animation: fadeInUp 0.5s ease-out;
}

    .component-item:nth-child(1) {
        animation-delay: 0.1s;
    }

    .component-item:nth-child(2) {
        animation-delay: 0.2s;
    }

    .component-item:nth-child(3) {
        animation-delay: 0.3s;
    }

    .component-item:nth-child(4) {
        animation-delay: 0.4s;
    }

    .component-item:nth-child(5) {
        animation-delay: 0.5s;
    }

    .component-item:nth-child(6) {
        animation-delay: 0.6s;
    }

    .component-item:nth-child(7) {
        animation-delay: 0.7s;
    }

    .component-item:nth-child(8) {
        animation-delay: 0.8s;
    }

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-muted {
    color: #6c757d !important;
}

.font-weight-bold {
    font-weight: 700 !important;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.mt-2 {
    margin-top: 0.5rem !important;
}

.p-3 {
    padding: 1rem !important;
}
/* Build PC Specific Styles */
.buildpc-page {
    background: #f8f9fa;
    min-height: 100vh;
}

.buildpc-container {
    padding: 20px 0;
}

/* Header Styles */
.buildpc-header {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: white;
    padding: 40px 0;
    margin-bottom: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.buildpc-title {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.buildpc-subtitle {
    font-size: 1.3rem;
    opacity: 0.9;
    font-weight: 300;
}

/* Actions Bar */
.build-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding: 15px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.cost-estimate {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 12px 20px;
    color: #856404;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.btn-action {
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-refresh {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

    .btn-refresh:hover {
        background: #0056b3;
        border-color: #0056b3;
        color: white;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0,123,255,0.3);
    }

/* Main Layout */
.build-main {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

/* Components Section */
.build-components {
    flex: 2;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
    border: 1px solid #e9ecef;
}

.component-item {
    display: flex;
    align-items: center;
    padding: 25px;
    border-bottom: 1px solid #f1f3f4;
    transition: all 0.3s ease;
    position: relative;
}

    .component-item:hover {
        background: #f8f9fa;
        transform: translateX(5px);
    }

    .component-item:last-child {
        border-bottom: none;
    }

    .component-item.component-selected {
        background: linear-gradient(135deg, #e8f5e8, #f0f8f0);
        border-left: 5px solid #28a745;
        box-shadow: 0 3px 15px rgba(40,167,69,0.2);
    }

.component-number {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    margin-right: 25px;
    flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(0,123,255,0.3);
}

.component-info {
    flex: 1;
    margin-right: 20px;
}

.component-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.component-selected {
    font-size: 1rem;
    color: #6c757d;
    margin: 5px 0;
    line-height: 1.4;
}

.component-selected span {
    font-style: italic;
    color: #adb5bd;
}


.modal-dialog {
    position: relative;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    width: 900px;
    max-width: 98vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-header {
    display: flex;
    align-items: center;
    background: #007bff;
    color: #fff;
    padding: 12px 20px;
    font-size: 1.1rem;
    position: relative;
}

.modal-title {
    font-weight: bold;
    font-size: 1.1rem;
    flex: 1;
}

.modal-search {
    margin-left: 16px;
    padding: 2px;
    border-radius: 4px;
    border: none;
    width: 70%;
    font-size: 1rem;
}

.modal-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.6rem;
    margin-left: 16px;
    cursor: pointer;
}

.modal-body {
    display: flex;
    flex: 1;
    min-height: 0;
}

.modal-sidebar {
    width: 260px;
    background: #f7f7f7;
    padding: 16px 12px;
    overflow-y: auto;
    border-right: 1px solid #eee;
}

.filter-group {
    margin-bottom: 18px;
}

    .filter-group strong {
        display: block;
        margin-bottom: 6px;
        color: #007bff;
        font-size: 1rem;
    }

    .filter-group label {
        display: block;
        margin-bottom: 4px;
        font-size: 0.98rem;
        cursor: pointer;
    }

.modal-main {
    flex: 1;
    padding: 16px 18px;
    overflow-y: auto;
    min-width: 0;
    background: #fff;
}

.modal-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

#sortOption {
    min-width: 160px;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #ccc;
    font-size: 1rem;
}

#pagination button {
    margin: 0 2px;
    padding: 4px 10px;
    border: none;
    border-radius: 3px;
    background: #eee;
    color: #333;
    cursor: pointer;
}

    #pagination button.active,
    #pagination button:focus {
        background: #007bff;
        color: #fff;
    }

.product-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.product-item {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 12px;
    padding-top: 8px;
}

    .product-item img {
        width: 80px;
        height: 80px;
        object-fit: contain;
        margin-right: 18px;
        border-radius: 6px;
        background: #fafafa;
        border: 1px solid #eee;
    }

.product-info {
    flex: 1;
}

.product-name {
    font-weight: bold;
    font-size: 1.05rem;
    margin-bottom: 2px;
}

.product-details {
    font-size: 0.98rem;
    color: #555;
    margin-bottom: 2px;
}

.product-price {
    color: #dc3545;
    font-size: 1.15rem;
    font-weight: bold;
    margin-top: 2px;
}

.btn-add-to-build {
    background: #007bff;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s;
}

    .btn-add-to-build:hover {
        background: #0056b3;
    }

@media (max-width: 1100px) {
    .modal-dialog {
        width: 98vw;
    }

    .modal-sidebar {
        width: 180px;
        padding: 8px 4px;
    }

    .modal-main {
        padding: 8px 4px;
    }

    .modal-search {
        width: 120px;
    }
}

@media (max-width: 700px) {
    .modal-dialog {
        flex-direction: column;
        width: 100vw;
        height: 100vh;
        border-radius: 0;
    }

    .modal-body {
        flex-direction: column;
    }

    .modal-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #eee;
    }

    .modal-main {
        width: 100%;
    }
}

.modal-sidebar,
.filter-group,
#specFilters {
    text-align: left !important;
}