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

    height: 400px;
    margin-bottom: 32px;
    border-radius: var(--border-radius-12);
    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: var(--border-radius-12);
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 150px;
    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: var(--heading-color);
    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: #fafafa;
    /* border: 1px solid var(--border-color); */
    border-radius: var(--border-radius-12);
    overflow: hidden;
    transition: all var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}



.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);
}

/* Product Image Hover Effect */

.product-image-wrapper .product-image {
    transition: transform 0.6s ease;
}

.product-image-wrapper .product-image-main {
    transform: translateX(0);
}

.product-image-wrapper .product-image-hover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: translateX(100%);
    transition: transform 0.6s ease;
}


.product-card:hover .has-second-image .product-image-main {
    transform: translateX(-100%);
}

.product-card:hover .product-image-hover {
    transform: translateX(0);
}



/* ================================================== */
/* HORIZONTAL SCROLLABLE SECTION */
/* ================================================== */
.horizontal-scroll-wrapper {
    position: relative;
    margin: 0 -1rem;
    padding: 0 1rem;
}

.horizontal-scroll-container {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    gap: 1.5rem;
    padding: 1rem 0.5rem 1.5rem 0.5rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
}

.horizontal-scroll-container::-webkit-scrollbar {
    height: 8px;
}

.horizontal-scroll-container::-webkit-scrollbar-track {
    background: transparent;
    margin: 0 2rem;
}

.horizontal-scroll-container::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    transition: background-color 0.3s;
}

.horizontal-scroll-container::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0, 0, 0, 0.3);
}

/* Scroll item sizing */
.scroll-item {
    flex: 0 0 auto;
    scroll-snap-align: start;
    scroll-snap-stop: normal;
    min-width: 260px; /* Minimum width to prevent squeezing */
}

/* Large screens: 4 items + partial 5th (20% each with gap consideration) */
@media (min-width: 1200px) {
    .scroll-item {
        width: calc((100% - 4.5rem) / 4.3);
        min-width: 280px;
    }
}

/* Medium-large screens: 3 items + partial 4th */
@media (min-width: 992px) and (max-width: 1199px) {
    .scroll-item {
        width: calc((100% - 3rem) / 3.3);
        min-width: 270px;
    }
}

/* Medium screens: 2 items + partial 3rd */
@media (min-width: 768px) and (max-width: 991px) {
    .scroll-item {
        width: calc((100% - 1.5rem) / 2.3);
        min-width: 260px;
    }
}

/* Small screens: 1.5 items */
@media (min-width: 576px) and (max-width: 767px) {
    .scroll-item {
        width: calc((100% - 1.5rem) / 1.5);
        min-width: 280px;
    }
}

/* Extra small screens: 1 item + partial 2nd */
@media (max-width: 575px) {
    .scroll-item {
        width: calc(100% - 4rem);
        min-width: 260px;
    }
    
    .horizontal-scroll-container {
        gap: 1rem;
    }
}

/* Scroll Navigation Arrows */
.scroll-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: white;
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
}

.horizontal-scroll-wrapper:hover .scroll-nav-btn {
    opacity: 1;
    visibility: visible;
}

.scroll-nav-btn:hover {
    background: var(--heading-color);
    border-color: var(--heading-color);
    color: white;
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.scroll-nav-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.scroll-nav-btn.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.scroll-nav-btn-prev {
    left: -24px;
}

.scroll-nav-btn-next {
    right: -24px;
}

.scroll-nav-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Hide arrows on mobile */
@media (max-width: 991px) {
    .scroll-nav-btn {
        display: none;
    }
    
    .horizontal-scroll-wrapper {
        margin: 0;
        padding: 0;
    }
}

/* Scroll progress indicator (optional) */
.scroll-progress {
    height: 4px;
    background: var(--bg-light);
    border-radius: 2px;
    margin-top: 1rem;
    overflow: hidden;
}

.scroll-progress-bar {
    height: 100%;
    background: var(--primary-color);
    border-radius: 2px;
    transition: width 0.3s ease;
    width: 0;
}



/* ================================================== */
/* 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(--heading-color);  
    border: 2px solid var(--heading-color);
    padding: 8px 20px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all var(--transition);
    z-index: 3;
    white-space: nowrap;
}


.quick-view-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50px;
  background: var(--heading-color);  
  z-index: -1;
  transform: scaleY(0);
  transform-origin: top; 
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.quick-view-btn:hover {
  color: white; 
}

.quick-view-btn:hover::before {
  transform: scaleY(1); 
  transform-origin: bottom; 
}

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


.quick-view-image {
    width: 100%;
    height: auto;
    max-height: 70vh;
    object-fit: contain;
    display: block;
    border-radius: var(--border-radius-12);
}

#quickViewModal .modal-dialog {
    max-width: 900px;
}

#quickViewModal .modal-body {
    overflow-y: auto;
}

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

.product-title {
    font-size: 1.1rem;
    /* font-weight: 600; */
    color: var(--heading-color);
    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-color);
    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-gallery {
    position: sticky;
    top: 100px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* RATIO-BASED RESPONSIVE IMAGE WRAPPER */
.main-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 100%; /* square ratio – you can adjust */
    background: var(--bg-light);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
}

/* Make the main image scale properly */
.main-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform var(--transition);
}

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

/* Placeholder if no image */
.main-image-wrapper.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Thumbnails */

/* sdfaf asfsa f as  */
.thumbnail-grid {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px;
    scrollbar-width: thin;
}

.thumbnail-grid::-webkit-scrollbar {
    height: 6px;
}

.thumbnail {
    flex: 0 0 70px; /* fixed width */
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: 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);
}

/* Optional: Better ratio on mobile */
@media (max-width: 576px) {
    .main-image-wrapper {
        /* taller for mobile */
        /* padding-top: 120%;  */
        /*  perfect square */
        padding-top: 100%; 
        /*  landscape */ 
        /* padding-top: 75%;   */
        /*  taller */
        /* padding-top: 130%;  */
    }
}

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

.product-info .product-title {
    font-size: 1.75rem;
    /* font-weight: 700; */
    color: var(--heading-color);
    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.3rem;
    /* font-weight: 700; */
    color: var(--heading-color);
    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: var(--border-radius-12);
    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: var(--border-radius-12);
}

.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: 50px;
    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;
    justify-content: space-between;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    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(--heading-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;
}

@media (max-width: 768px) {
  .add-to-cart.g-2.mb-3 > .col-4,
  .add-to-cart.g-2.mb-3 > .col-8 {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .quantity-selector {
    width: 100%; /* make it stretch full width */
   margin-bottom: 8px; /* add spacing before Add to Cart */
  }
}


/* ================================================== */
/* 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 12px 12px 12px;
    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;
    }

    .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;
    } */
}


/* ================================================== */
/* CART COMPONENT                                     */
/* Extracted from cart.html inline <style> block       */
/* ================================================== */

/* Individual cart row */
.cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}
.cart-item:last-child {
    border-bottom: none;
}

/* Product thumbnail */
.cart-item-img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}
/* Placeholder when no image is available */
.cart-item-img-placeholder {
    width: 80px;
    height: 80px;
    background: var(--bg-light);       /* was hardcoded #f5f5f5 */
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cart-item-body {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Colour / size variant badge row */
.cart-item-variant {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    color: var(--text-muted);          /* was hardcoded #555 */
    background: var(--bg-light);       /* was hardcoded #f5f5f5 */
    border-radius: 20px;
    padding: 2px 10px;
    margin-top: 4px;
}

/* Controls row: price · qty · total · remove */
.cart-item-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    margin-top: 0.6rem;
}
.cart-item-price {
    font-size: 0.88rem;
    color: var(--text-muted);          /* was hardcoded #555 */
    white-space: nowrap;
}
.cart-item-total {
    font-size: 0.93rem;
    font-weight: 700;
    white-space: nowrap;
}

/* Quantity stepper ± control */
.qty-stepper {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border-color);  /* was hardcoded #dee2e6 */
    border-radius: 6px;
    overflow: hidden;
}
.qty-stepper button {
    background: var(--bg-light);         /* was hardcoded #f8f9fa */
    border: none;
    padding: 4px 10px;
    cursor: pointer;
    font-size: 0.85rem;
    line-height: 1;
    transition: background 0.1s;
}
.qty-stepper button:hover {
    background: #e5e7eb;                /* was hardcoded #e9ecef */
}
.qty-stepper input {
    width: 42px;
    border: none;
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    text-align: center;
    font-size: 0.85rem;
    padding: 4px 2px;
}
.qty-stepper input:focus {
    outline: none;
}

/* Cart item remove button */
.cart-remove-btn {
    background: none;
    border: none;
    color: var(--text-muted);           /* was hardcoded #aaa */
    padding: 4px;
    cursor: pointer;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
}
.cart-remove-btn:hover {
    color: var(--danger-color);         /* was hardcoded #dc3545 */
    background: #fee2e2;
}


/* ================================================== */
/* ORDER CARD – customer order list                   */
/* Extracted from customer_order_list.html inline style*/
/* ================================================== */
.order-card {
    transition: all 0.2s ease;
    border: 1px solid var(--border-color);   /* was hardcoded #dee2e6 */
    border-radius: var(--border-radius-12);
}
.order-card:hover {
    border-color: var(--primary-color);      /* was hardcoded #0d6efd */
    box-shadow: 0 0.25rem 0.5rem rgba(37, 99, 235, 0.1);
}

/* Order item thumbnail – avoids inline style="width:40px;height:40px;" */
.order-item-thumb {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 6px;
}
.order-item-thumb-placeholder {
    width: 40px;
    height: 40px;
    background: var(--bg-light);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}


/* ================================================== */
/* TAG COLOUR PICKER                                  */
/* Extracted from tag_form.html inline <style> block  */
/* ================================================== */
.color-option {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid transparent;
    transition: border-color 0.15s, transform 0.15s;
    display: inline-block;
}
.color-option:hover {
    border-color: var(--primary-color);  /* was hardcoded #007bff */
    transform: scale(1.1);
}
.color-option.selected {
    border-color: var(--primary-color);  /* was hardcoded #007bff */
    box-shadow: 0 0 0 3px rgba(37,99,235,0.2);
}

/* Tag colour indicator dot in the list table */
.tag-color-indicator {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-block;
    border: 2px solid var(--border-color);  /* was hardcoded #dee2e6 */
}

/* ================================================== */
/* PRODUCT ADMIN THUMBNAIL                            */
/* Extracted from product_list.html inline <style>    */
/* ================================================== */
.product-thumbnail {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

/* ================================================== */
/* TAG PREVIEW PILLS                                  */
/* Two contexts:                                      */
/* 1. .tag-preview alone → small inline chip         */
/*    (product_form.html JS-created tag chips)        */
/* 2. .tag-preview.tag-badge → larger card preview   */
/*    (tag_list.html, tag_confirm_delete.html)        */
/* Background colour always set by JS via             */
/* element.style.backgroundColor = data-tag-color    */
/* ================================================== */

/* Small inline chip (product form tag selection) */
.tag-preview {
    display: inline-block;
    margin: 2px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: .8rem;
    color: #fff;               /* JS sets bg – white text always legible */
}

/* Larger card preview pill (tag_list, tag_confirm_delete) */
.tag-preview.tag-badge {
    padding: 8px 12px;
    border-radius: 12px;
    font-weight: 500;
    text-align: center;
    margin-bottom: 10px;
}

.tag-preview-large {
    padding: 12px 20px;
    border-radius: 12px;
    color: #fff;               /* JS sets bg – white text always legible */
    font-weight: 500;
    display: inline-block;
    margin: 10px;
    font-size: 1.1rem;
}

/* ================================================== */
/* TAG TYPE BADGE                                     */
/* Small label displaying the tag's category/type     */
/* ================================================== */
.tag-type-badge {
    font-size: 0.75rem;
    padding: 3px 8px;
}

/* ================================================== */
/* COLOUR PICKER ROW                                  */
/* Flex wrapper for swatch .color-option dots         */
/* ================================================== */
.common-colors {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}


/* ================================================== */
/* PRODUCT IMAGE UPLOAD AREA                          */
/* Extracted from product_form.html inline <style>    */
/* ================================================== */
.image-upload-area {
    border: 2px dashed var(--border-color);  /* was hardcoded #cbd5e0 */
    border-radius: var(--border-radius-12);
    background: var(--bg-light);             /* was hardcoded #f8fafc */
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: border-color var(--transition), background var(--transition);
}
.image-upload-area:hover,
.image-upload-area.dragover {
    border-color: var(--primary-color);      /* was hardcoded #3b82f6 */
    background: #eff6ff;                     /* was hardcoded #e3f2fd */
}
.image-upload-area .upload-icon {
    color: var(--text-muted);               /* was hardcoded #6c757d */
}

/* Variant image chip – badge inside product form */
.variant-img-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--bg-light);            /* was hardcoded #e5e7eb */
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 2px 8px;
    font-size: 0.78rem;
}


/* ================================================== */
/* PRODUCT DETAIL – LIGHTBOX OVERLAY                  */
/* Extracted from product_detail.html inline <style>  */
/* ================================================== */

/* Full-screen image lightbox */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);        /* was hardcoded #000 */
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}
.lightbox-overlay img {
    max-width: 92vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
}
.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: rgba(255, 255, 255, 0.15);  /* was hardcoded */
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition);
}
.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);   /* was hardcoded */
}

/* Colour swatch in variant selection (product detail page) */
.colour-swatch {
    width: 52px;
    height: 52px;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    background: var(--bg-light);           /* was hardcoded #f0f0f0 */
    flex-shrink: 0;
    transition: border-color .15s, transform .1s;
    position: relative;
}
.colour-swatch:hover  { transform: scale(1.06); }
.colour-swatch.selected { border-color: var(--heading-color); }  /* was hardcoded #212529 */
.colour-swatch img    { width: 100%; height: 100%; object-fit: cover; display: block; }

.colour-swatch-label {
    font-size: .7rem;
    text-align: center;
    margin-top: 3px;
    line-height: 1.2;
}

/* Meta strip (colour name, material etc.) */
.product-meta-strip {
    font-size: 0.82rem;
    color: var(--text-muted);              /* was hardcoded #666 */
    border-top: 1px solid var(--border-color); /* was hardcoded #dee2e6 */
    padding-top: 0.75rem;
    margin-top: 0.75rem;
    color: var(--text-color);             /* was hardcoded #444 */
}

/* ================================================== */
/* PRODUCT DETAIL – LIGHTBOX & COLOUR PANEL           */
/* Extracted from product_detail.html inline <style>  */
/* ================================================== */

/* Main image wrapper triggers lightbox on click */
.main-image-wrapper { cursor: zoom-in; }

/* Bootstrap modal overrides for lightbox on product detail */
#lightboxModal .modal-dialog  { max-width: min(90vw, 900px); }
#lightboxModal .modal-content { background: #000; border: none; }
#lightboxModal .modal-body    { padding: 0; position: relative; }

/* Lightbox image with pan/zoom */
#lightboxImg {
    display: block;
    width: 100%; height: auto;
    max-height: 85vh; object-fit: contain;
    transition: transform .25s ease;
    cursor: zoom-in;
}
#lightboxImg.zoomed {
    transform: scale(1.6);
    cursor: zoom-out;
    transform-origin: var(--zoom-x, 50%) var(--zoom-y, 50%);
}

/* Close button inside lightbox */
#lightboxModal .btn-close-light {
    position: absolute; top: 12px; right: 14px;
    background: rgba(255,255,255,.15);
    border: none; border-radius: 50%;
    width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 18px; cursor: pointer; z-index: 10;
    transition: background .15s;
}
#lightboxModal .btn-close-light:hover { background: rgba(255,255,255,.3); }

/* Colour meta strip (displayed below swatch selection) */
.colour-meta-panel {
    font-size: .8rem;
    color: var(--text-muted);              /* was hardcoded #666 */
    border-left: 3px solid var(--border-color); /* was hardcoded #dee2e6 */
    padding-left: .6rem;
    margin-bottom: .75rem;
}
.colour-meta-panel .meta-item  { display: inline-block; margin-right: .9rem; }
.colour-meta-panel .meta-label { font-weight: 600; color: var(--text-color); } /* was #444 */

/* Size / quantity table (bulk ordering interface) */
#sizeQtyTable th { font-size: .78rem; font-weight: 600; }
#sizeQtyTable td { font-size: .82rem; vertical-align: middle; }
.qty-input-cell input { width: 60px; }

/* JS toggle utility (hides/shows sections) */
.hidden { display: none !important; }


/* ================================================== */
/* ORDER ITEM IMAGE THUMBNAIL – larger (60px) variant */
/* Complements .order-item-thumb (40px) above         */
/* ================================================== */
.order-item-thumb-lg {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
}
.order-item-thumb-placeholder-lg {
    width: 60px;
    height: 60px;
    background: var(--bg-light);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ================================================== */
/* PROGRESS HEIGHT VARIANTS                           */
/* Replaces inline style="height: Xpx;" on .progress */
/* ================================================== */
.progress-sm { height: 5px;  }   /* slim progress bar (analytics page) */
.progress-md { height: 10px; }   /* medium progress bar (order detail)  */

/* ================================================== */
/* PRODUCT FORM – CHARACTER COUNT                     */
/* Shows "/" remaining chars; changes colour at limit */
/* Extracted from product_form.html inline <style>    */
/* ================================================== */
.character-count          { font-size: .8rem; color: var(--text-muted); }      /* was #6c757d */
.character-count.warning  { color: var(--warning-color); }                     /* was #ffc107 */
.character-count.danger   { color: var(--danger-color);  }                     /* was #dc3545 */

/* ================================================== */
/* PRODUCT FORM – PRICE CALCULATION PREVIEW           */
/* ================================================== */
.price-calculation { padding: 10px; margin-top: 10px; }

/* ================================================== */
/* PRODUCT FORM – IMAGE UPLOADER (drag-and-drop grid) */
/* ================================================== */
.product-image-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    margin-top: 20px;
}
.product-image-uploader {
    border: 2px dashed var(--border-color);  /* was hardcoded #cbd5e0 */
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    background: var(--bg-light);             /* was hardcoded #f8fafc */
    transition: .25s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 120px;
    height: 120px;
}
.product-image-uploader:hover {
    background: #f1f7ff;
    border-color: var(--primary-color);      /* was hardcoded #3b82f6 */
}
.product-image-uploader.dragover {
    border-color: var(--primary-color);      /* was hardcoded #3b82f6 */
    background: #e3f2fd;
}
.product-image-uploader .upload-zone-text {
    margin: 0; font-size: 12px; line-height: 1.2;
    color: var(--text-muted);               /* was hardcoded #6c757d */
}
.product-image-uploader .upload-zone-subtext { color: #9ca3af; font-size: 11px; }

/* Image preview card (inside drag-and-drop grid) */
.product-image-preview {
    position: relative;
    background: #fff;
    border: 1px solid var(--border-color);  /* was hardcoded #dee2e6 */
    border-radius: 8px;
    overflow: hidden;
    cursor: move;
    transition: .25s;
}
.product-image-preview:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, .10);
}
.product-image-preview img { width: 100%; height: 120px; object-fit: cover; display: block; }
.product-image-preview .remove-btn {
    position: absolute;
    top: 5px; right: 5px;
    background: rgba(220, 53, 69, .9);      /* danger color at 0.9 alpha */
    border: none;
    border-radius: 50%;
    width: 24px; height: 24px;
    color: #fff;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: .2s;
}
.product-image-preview .remove-btn:hover {
    background: var(--danger-color);        /* was hardcoded #dc3545 */
    transform: scale(1.1);
}
.product-image-preview .alt-text-input {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: rgba(0, 0, 0, .7);
    color: #fff;
    border: none;
    padding: 5px;
    font-size: 11px;
}
.product-image-preview .alt-text-input::placeholder { color: #ccc; }

/* Drag ghost – semi-transparent while dragging */
.sortable-ghost { opacity: .4; }

/* Hide the real file input (triggered by the uploader tile) */
#imageFileInput { display: none; }

/* ================================================== */
/* PRODUCT FORM – VARIANT MANAGEMENT                  */
/* ================================================== */

/* Option row (one per product option, e.g. Size) */
.option-row {
    border: 1px solid var(--border-color);  /* was hardcoded #e5e7eb */
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    background: #fff;
}
.option-row-header { align-items: center; gap: 12px; margin-bottom: 12px; }
.option-row-header label { font-weight: 600; font-size: 14px; margin: 0; min-width: 80px; }

/* Variants table (generated rows per option combination) */
.variants-table { width: 100%; margin-top: 16px; }
.variants-table thead th {
    font-size: 11px;
    color: var(--text-muted);               /* was hardcoded #6b7280 */
    text-transform: uppercase;
    font-weight: 600;
    padding: 8px 12px;
    border-bottom: 2px solid var(--border-color); /* was hardcoded #e5e7eb */
    white-space: nowrap;
}
.variants-table tbody td  { padding: 12px; vertical-align: middle; }
.variants-table tbody tr  { border-bottom: 1px solid #f3f4f6; }
.variants-table tbody tr:hover { background: #f9fafb; }
.variants-table input[type="number"],
.variants-table input[type="text"] {
    width: 100%;
    font-size: 13px;
    padding: 6px 10px;
    border: 1px solid var(--border-color);  /* was hardcoded #e5e7eb */
    border-radius: 6px;
}
.variants-table input:focus {
    border-color: var(--primary-color);     /* was hardcoded #3b82f6 */
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1); /* primary-color alpha */
}
.variant-name-cell { font-weight: 500; color: #111827; font-size: 14px; white-space: nowrap; }

/* Option selection cards in "add option" modal */
.option-card {
    padding: 12px;
    border: 2px solid var(--border-color);  /* was hardcoded #e5e7eb */
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 12px;
}
.option-card:hover    { border-color: var(--primary-color); background: #f9fafb; }
.option-card.selected { border-color: var(--primary-color); background: #eff6ff; cursor: not-allowed; }

/* Variant image thumbnail (in variants table) */
.variant-image-wrapper { display: flex; align-items: center; gap: 8px; }
.variant-thumb {
    width: 50px; height: 50px;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid var(--border-color);  /* was hardcoded #e5e7eb */
    flex-shrink: 0;
    cursor: pointer;
    transition: border-color .15s;
}
.variant-thumb:hover { border-color: var(--primary-color); }  /* was hardcoded #3b82f6 */
.variant-thumb.no-image {
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 11px;
    cursor: pointer;
}
.variant-thumb.no-image:hover {
    border-color: var(--primary-color);     /* was hardcoded #3b82f6 */
    background: #eff6ff;
}

/* Accordion colour-group header swatch */
.colour-group-swatch {
    width: 30px; height: 30px;
    object-fit: cover;
    border-radius: 5px;
    border: 1px solid rgba(0,0,0,.1);
    flex-shrink: 0;
}

/* ================================================== */
/* PRODUCT FORM – IMAGE PICKER MODAL                  */
/* Click variant thumb to open; choose product image  */
/* ================================================== */
.img-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
    max-height: 340px;
    overflow-y: auto;
    padding: 4px;
}
.img-picker-item {
    position: relative;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    border: 3px solid transparent;
    transition: border-color .15s;
    aspect-ratio: 1;
}
.img-picker-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-picker-item:hover    { border-color: var(--primary-color); } /* was hardcoded #3b82f6 */
.img-picker-item.selected { border-color: var(--primary-color); } /* was hardcoded #2563eb */
.img-picker-item .picker-check {
    display: none;
    position: absolute;
    top: 4px; right: 4px;
    background: var(--primary-color);       /* was hardcoded #2563eb */
    color: #fff;
    border-radius: 50%;
    width: 20px; height: 20px;
    align-items: center;
    justify-content: center;
    font-size: 11px;
}
.img-picker-item.selected .picker-check { display: flex; }
.img-picker-empty { text-align: center; color: #9ca3af; padding: 32px 0; font-size: 14px; }