
/* ================================================== */
/* COLLECTION BANNER */
/* ================================================== */
.collection-banner {
    position: relative;
    background: linear-gradient(90deg, #4fbcff 0%, #7ee8fa 100%);

    height: 400px;
    margin-bottom: 32px;
    border-radius: 12px;
    overflow: hidden;
}

/* Background image that takes full width and height */
.collection-banner-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}


.collection-banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.20), rgba(0, 0, 0, 0.06));

    z-index: 2;
}

/* Content container */
.collection-banner-content {
    position: relative;
    z-index: 3;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 3rem;
    color: white;
}

.collection-banner h1 {
    color: white;
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.collection-banner p {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.1rem;
    max-width: 600px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .collection-banner {
        height: 300px;
    }
    
    .collection-banner h1 {
        font-size: 2rem;
    }
    
    .collection-banner p {
        font-size: 1rem;
    }
    
    .collection-banner-content {
        padding: 2rem;
    }
}

@media (max-width: 576px) {
    .collection-banner {
        height: 250px;
    }
    
    .collection-banner h1 {
        font-size: 1.5rem;
    }
    
    .collection-banner-content {
        padding: 1.5rem;
    }
}

/* ================================================== */
/* FILTER SIDEBAR */
/* ================================================== */
.filter-sidebar {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 20px;
    align-self: flex-start;
}

.filter-sidebar h5 {
    font-weight: 700;
    font-size: 1.125rem;
    margin-bottom: 20px;
    color: #111827;
}

.filter-sidebar .form-label {
    font-weight: 600;
    font-size: 0.875rem;
    color: #374151;
    margin-bottom: 8px;
}

.filter-sidebar .form-control {
    border: 2px solid var(--border-color);
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 0.875rem;
    transition: all var(--transition);
}

.filter-sidebar .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.filter-sidebar .form-check-input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    border: 2px solid var(--border-color);
    cursor: pointer;
}

.filter-sidebar .form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.filter-sidebar .form-check-label {
    cursor: pointer;
    font-size: 0.875rem;
    margin-left: 6px;
}

.filter-section {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.filter-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.tag-group-label {
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: block;
}



/* ================================================== */
/* ACCORDION FILTERS */
/* ================================================== */
.accordion-flush .accordion-item {
    border: none;
    border-bottom: 1px solid var(--border-color);
}

.accordion-flush .accordion-item:last-child {
    border-bottom: none;
}

.accordion-button {
    background: transparent;
    color: #374151;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 12px 0;
    box-shadow: none;
}

.accordion-button:not(.collapsed) {
    background: transparent;
    color: var(--primary-color);
    box-shadow: none;
}

.accordion-button:focus {
    border-color: transparent;
    box-shadow: none;
}

.accordion-button::after {
    width: 1rem;
    height: 1rem;
    background-size: 1rem;
}

.accordion-body {
    padding: 12px 0;
}

/* ================================================== */
/* FILTER MODAL (MOBILE) */
/* ================================================== */


#filterModal .modal-header {
    background: linear-gradient(135deg, var(--primary-color), #1e40af);
    color: white;
    border-bottom: none;
}

#filterModal .modal-title {
    font-weight: 700;
    font-size: 1.125rem;
}

#filterModal .btn-close {
    filter: brightness(0) invert(1);
}

#filterModal .modal-body {
    padding: 24px;
}

#filterModal .modal-footer {
    border-top: 1px solid var(--border-color);
    padding: 16px 24px;
}

#filterModal .filter-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
}

#filterModal .accordion-item {
    background: transparent;
}

#filterModal .accordion-button {
    background: var(--bg-light);
    border-radius: 6px;
    margin-bottom: 8px;
}

#filterModal .accordion-button:not(.collapsed) {
    background: #f0f9ff;
    color: var(--primary-color);
}

/* ================================================== */
/* PRODUCT GRID HEADER */
/* ================================================== */
.products-header {
    background: white;
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.products-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.products-count {
    color: var(--text-muted);
    font-size: 0.938rem;
    font-weight: 400;
}

/* ================================================== */
/* SORT DROPDOWN */
/* ================================================== */
.sort-dropdown .btn {
    border: 2px solid var(--border-color);
    border-radius: 6px;
    padding: 8px 16px;
    font-weight: 600;
    font-size: 0.875rem;
    background: white;
    color: #374151;
    transition: all var(--transition);
}

.sort-dropdown .btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: #f0f9ff;
}

.sort-dropdown .dropdown-menu {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 8px;
}

.sort-dropdown .dropdown-item {
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 0.875rem;
    transition: all var(--transition);
}

.sort-dropdown .dropdown-item:hover {
    background: #f0f9ff;
    color: var(--primary-color);
}

.sort-dropdown .dropdown-item.active {
    background: #f0f9ff;
    color: var(--primary-color);
    font-weight: 700;
}

.sort-dropdown .dropdown-item.active::before {
    content: '✓ ';
    margin-right: 4px;
}

/* ================================================== */
/* PRODUCT CARD (LIST VIEW) */
/* ================================================== */
.product-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

.product-card:hover {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.product-image-wrapper {
    position: relative;
    overflow: hidden;
    height: 280px;
    background: var(--bg-light);
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all var(--transition);
}

.product-card:hover .product-image {
    transform: scale(1.08);
}

.product-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
}

/* ================================================== */
/* BADGES */
/* ================================================== */
.badge-sale {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, var(--danger-color), #dc2626);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
    z-index: 2;
}

.badge-featured {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, var(--warning-color), #f59e0b);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
    z-index: 2;
}

.tag-badge {
    display: inline-block;
    padding: 4px 10px;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 500;
    color: #374151;
    transition: all var(--transition);
}

.tag-badge:hover {
    background: #e5e7eb;
    border-color: #d1d5db;
}

/* ================================================== */
/* QUICK VIEW BUTTON */
/* ================================================== */
.quick-view-btn {
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 8px 20px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all var(--transition);
    z-index: 3;
    white-space: nowrap;
}

.product-card:hover .quick-view-btn {
    bottom: 12px;
}

.quick-view-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* ================================================== */
/* PRODUCT CARD BODY */
/* ================================================== */
.product-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-title {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 8px;
    line-height: 1.4;
    min-height: 2.8em;
    
    /* Line clamp */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-description {
    color: var(--text-muted);
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 12px;

    /* Line clamp */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}


.product-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 12px;
    min-height: 24px;
}

/* ================================================== */
/* PRICE SECTION */
/* ================================================== */
.product-price-section {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.product-price {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    line-height: 1;
}

.product-compare-price {
    font-size: 0.938rem;
    color: var(--text-muted);
    text-decoration: line-through;
    line-height: 1;
}

/* ================================================== */
/* STOCK STATUS */
/* ================================================== */
.stock-status {
    font-size: 0.813rem;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.stock-status::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.stock-in {
    color: var(--success-color);
}

.stock-in::before {
    background: var(--success-color);
    animation: pulse 2s infinite;
}

.stock-low {
    color: var(--warning-color);
}

.stock-low::before {
    background: var(--warning-color);
}

.stock-out {
    color: var(--danger-color);
}

.stock-out::before {
    background: var(--danger-color);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}



/* ================================================== */
/* PAGINATION */
/* ================================================== */
.pagination {
    margin-top: 32px;
}

.pagination .page-link {
    border: 2px solid var(--border-color);
    color: #374151;
    padding: 8px 16px;
    margin: 0 4px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all var(--transition);
}

.pagination .page-link:hover {
    background: #f0f9ff;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.pagination .page-item.active .page-link {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.3);
}

/* ================================================== */
/* EMPTY STATE */
/* ================================================== */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.empty-state i {
    font-size: 4rem;
    color: #d1d5db;
    margin-bottom: 20px;
}

.empty-state h4 {
    font-weight: 700;
    color: #111827;
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-muted);
    font-size: 0.938rem;
}

/* ================================================== */
/* QUICK VIEW MODAL */
/* ================================================== */
.quick-view-modal .modal-dialog {
    max-width: 900px;
}

.quick-view-modal .modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.quick-view-modal .modal-header {
    border-bottom: 1px solid var(--border-color);
    padding: 20px 24px;
}

.quick-view-modal .modal-body {
    padding: 24px;
}

.quick-view-image {
    width: 100%;
    height: 400px;
    object-fit: contain;
    background: var(--bg-light);
    border-radius: 8px;
}

.quick-view-modal .table {
    margin-bottom: 0;
    font-size: 0.875rem;
}

.quick-view-modal .table th {
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 8px;
}

.quick-view-modal .table td {
    padding: 10px 8px;
    vertical-align: middle;
}

.quick-view-modal .badge-sm {
    font-size: 0.7rem;
    padding: 4px 8px;
}

/* ================================================== */
/* PRODUCT DETAIL PAGE - GALLERY */
/* ================================================== */
.product-gallery {
    position: sticky;
    top: 100px;
    background: white;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.main-image-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: var(--bg-light);
    margin-bottom: 12px;
}

.main-image {
    width: 100%;
    height: 400px;
    object-fit: contain;
    transition: all var(--transition);
}

.main-image:hover {
    transform: scale(1.02);
}

.thumbnail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 8px;
}

.thumbnail {
    height: 70px;
    width: 100%;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.thumbnail:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.thumbnail.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* ================================================== */
/* PRODUCT DETAIL PAGE - INFO */
/* ================================================== */
.product-info {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.product-info .product-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 12px;
    line-height: 1.3;
    min-height: auto;
}

/* ================================================== */
/* PRICE DISPLAY */
/* ================================================== */
.price-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 16px 0;
}

.current-price {
    font-size: 1.75rem;
    font-weight: 700;
    color: #111827;
    line-height: 1;
}

.compare-price {
    font-size: 1rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

.discount-badge {
    background: linear-gradient(135deg, var(--danger-color), #dc2626);
    color: white;
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
}

/* ================================================== */
/* TAGS WRAPPER */
/* ================================================== */
.tags-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.tags-wrapper .tag-badge {
    color: white !important;
    border: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all var(--transition);
}

.tags-wrapper .tag-badge:hover {
    transform: translateY(-1px);
}

/* ================================================== */
/* SHORT DESCRIPTION */
/* ================================================== */
.short-description {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 16px;
}

/* ================================================== */
/* STOCK WRAPPER */
/* ================================================== */
.stock-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--bg-light);
    border-radius: 6px;
    margin-bottom: 20px;
}

.stock-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.stock-indicator.stock-in {
    background-color: var(--success-color);
}

.stock-indicator.stock-low {
    background-color: var(--warning-color);
}

.stock-indicator.stock-out {
    background-color: var(--danger-color);
}

.stock-text {
    font-weight: 600;
    font-size: 0.875rem;
}

/* ================================================== */
/* VARIANT SELECTION */
/* ================================================== */
.variant-section {
    margin: 24px 0;
    padding: 20px;
    background: var(--bg-light);
    border-radius: 8px;
}

.variant-label {
    font-weight: 600;
    font-size: 0.875rem;
    color: #111827;
    margin-bottom: 10px;
    display: block;
}

.variant-values {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.variant-value {
    padding: 8px 16px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    background: white;
    cursor: pointer;
    transition: all var(--transition);
    font-size: 0.875rem;
    font-weight: 500;
    user-select: none;
    position: relative;
}

.variant-value:hover {
    border-color: var(--primary-color);
    background: #f0f9ff;
}

.variant-value.selected {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.3);
}

.variant-value.selected::after {
    content: '✓';
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--success-color);
    color: white;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}

.variant-value.disabled {
    background: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
    border-color: #e5e7eb;
    opacity: 0.6;
}

/* ================================================== */
/* QUANTITY SELECTOR */
/* ================================================== */
.quantity-selector {
    display: flex;
    align-items: center;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
    background: white;
    height: 44px;
}

.quantity-btn {
    background: var(--bg-light);
    border: none;
    padding: 0 14px;
    cursor: pointer;
    transition: all var(--transition);
    font-weight: 600;
    color: #374151;
    height: 100%;
    font-size: 1.125rem;
}

.quantity-btn:hover {
    background: var(--primary-color);
    color: white;
}

.quantity-input {
    border: none;
    text-align: center;
    width: 50px;
    padding: 0 8px;
    font-weight: 600;
    font-size: 0.938rem;
    height: 100%;
}

.quantity-input:focus {
    outline: none;
}



/* ================================================== */
/* TABS */
/* ================================================== */
.nav-tabs {
    border: none;
    gap: 4px;
}

.nav-tabs .nav-link {
    border: none;
    color: var(--text-muted);
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 6px 6px 0 0;
    transition: all var(--transition);
    font-size: 0.938rem;
}

.nav-tabs .nav-link:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

.nav-tabs .nav-link.active {
    background: white;
    color: var(--primary-color);
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.05);
}

.tab-content {
    background: white;
    border-radius: 0 6px 6px 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    padding: 20px;
    margin-top: -1px;
}

/* ================================================== */
/* RELATED PRODUCTS */
/* ================================================== */
.related-product-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: all var(--transition);
    background: white;
    height: 100%;
}

.related-product-card:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.related-product-image {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.related-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all var(--transition);
}

.related-product-card:hover .related-product-image img {
    transform: scale(1.05);
}

/* ================================================== */
/* MESSAGE ALERT */
/* ================================================== */
.alert-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    min-width: 320px;
    max-width: 450px;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    animation: slideInRight 0.4s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ================================================== */
/* LOADING SPINNER */
/* ================================================== */
.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}



/* ================================================== */
/* STATUS MESSAGES */
/* ================================================== */
.status-message {
    padding: 12px 16px;
    border-radius: 6px;
    margin-top: 12px;
    font-weight: 600;
    font-size: 0.875rem;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.status-message.error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 3px solid var(--danger-color);
}

.status-message.info {
    background: #dbeafe;
    color: #1e40af;
    border-left: 3px solid var(--primary-color);
}

.status-message.hidden {
    display: none;
}

/* ================================================== */
/* RESPONSIVE */
/* ================================================== */
@media (max-width: 768px) {
    .filter-sidebar {
        position: relative;
        top: 0;
        margin-bottom: 24px;
    }

    .products-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .product-image-wrapper {
        height: 220px;
    }

    .quick-view-image {
        height: 300px;
    }

    .product-gallery {
        position: relative;
        top: 0;
    }

    .product-info .product-title {
        font-size: 1.5rem;
    }

    .current-price {
        font-size: 1.5rem;
    }

    .product-info {
        padding: 16px;
    }

    .main-image {
        height: 300px;
    }
}