/* ===== Shop Page Styles ===== */

/* Background — warm tone, NOT white */
body {
    background: #f0ede8;
}

/* Hero */
.shop-hero {
    padding: 110px 0 40px;
    background: linear-gradient(135deg, #1a2e23 0%, #2d5a3f 40%, #3a7a55 70%, #1a3a2a 100%);
    color: var(--white);
    position: relative;
    overflow: hidden;
}
.shop-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
    pointer-events: none;
}
.shop-hero::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to top, #f0ede8, transparent);
    pointer-events: none;
}

.shop-breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.75);
    margin-bottom: 16px;
}
.shop-breadcrumb-nav a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: color 0.2s;
}
.shop-breadcrumb-nav a:hover { color: var(--sand-300); }
.shop-breadcrumb-nav span { color: var(--white); font-weight: 500; }

.shop-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.shop-subtitle {
    color: rgba(255,255,255,0.8);
    font-size: 0.95rem;
    margin-bottom: 24px;
}

.shop-search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-md);
    padding: 12px 18px;
    max-width: 480px;
    transition: all 0.2s;
    backdrop-filter: blur(8px);
}
.shop-search-bar:focus-within {
    background: rgba(255,255,255,0.18);
    border-color: rgba(255,255,255,0.4);
    box-shadow: 0 0 0 3px rgba(255,255,255,0.08);
}
.shop-search-bar svg { color: rgba(255,255,255,0.7); flex-shrink: 0; }
.shop-search-bar input {
    border: none;
    outline: none;
    width: 100%;
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--white);
    background: transparent;
}
.shop-search-bar input::placeholder { color: rgba(255,255,255,0.6); }

/* Layout */
.shop-section {
    padding: 32px 0 80px;
    background: #f0ede8;
}

.shop-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 28px;
    align-items: start;
}

/* Sidebar */
.shop-sidebar {
    position: sticky;
    top: 90px;
    background: var(--white);
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: var(--radius-lg, 12px);
    padding: 22px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--gray-100);
}
.sidebar-header h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--gray-900);
}

.clear-filters {
    background: none;
    border: none;
    color: var(--green-700);
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0;
}
.clear-filters:hover { text-decoration: underline; }

/* Active filter chips */
.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}
.active-filters:empty { margin-bottom: 0; }

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: var(--green-50);
    color: var(--green-800);
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}
.filter-chip:hover { background: var(--green-100); }
.filter-chip .chip-x {
    font-size: 0.85rem;
    line-height: 1;
    margin-left: 2px;
}

/* Filter groups */
.filter-group {
    border-bottom: 1px solid var(--gray-100);
    padding-bottom: 14px;
    margin-bottom: 14px;
}
.filter-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.filter-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    background: none;
    border: none;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--gray-800);
    cursor: pointer;
    padding: 0;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.filter-title svg { transition: transform 0.2s; }
.filter-title.collapsed svg { transform: rotate(-90deg); }
.filter-title.collapsed + .filter-options { display: none; }

/* Category items */
.filter-cat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 8px;
    margin: 0 -8px;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--gray-600);
    transition: all 0.15s;
    background: none;
    border: none;
    border-radius: var(--radius-sm);
    width: calc(100% + 16px);
    text-align: left;
}
.filter-cat-item:hover {
    background: var(--gray-50);
    color: var(--green-700);
}
.filter-cat-item.active {
    background: var(--green-50);
    color: var(--green-800);
    font-weight: 600;
}
.filter-cat-count {
    font-size: 0.72rem;
    color: var(--gray-400);
    background: var(--gray-100);
    padding: 2px 8px;
    border-radius: 10px;
    min-width: 22px;
    text-align: center;
}
.filter-cat-item.active .filter-cat-count {
    background: rgba(45,90,63,0.12);
    color: var(--green-700);
}

/* Price range slider — two-handle, pure CSS/JS */
.price-slider-wrap {
    margin-bottom: 14px;
}
.price-slider-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--green-800);
    margin-bottom: 10px;
    min-height: 1.2em;
}
.price-slider-track {
    position: relative;
    height: 4px;
    background: var(--gray-200);
    border-radius: 2px;
    margin: 14px 0 8px;
}
.price-slider-range {
    position: absolute;
    height: 100%;
    background: var(--green-700);
    border-radius: 2px;
    pointer-events: none;
}
/* Both range inputs overlap on the same track */
.price-slider-input {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    pointer-events: none;
    outline: none;
    margin: 0;
    padding: 0;
}
/* Thumb styles — identical for min and max */
.price-slider-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--white);
    border: 2px solid var(--green-700);
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
    cursor: pointer;
    pointer-events: all;
    transition: border-color 0.15s, box-shadow 0.15s;
}
@media (hover: none) {
    .price-slider-input::-webkit-slider-thumb { width: 28px; height: 28px; }
    .price-slider-input::-moz-range-thumb { width: 28px; height: 28px; }
}
.price-slider-input::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--white);
    border: 2px solid var(--green-700);
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
    cursor: pointer;
    pointer-events: all;
}
.price-slider-input::-webkit-slider-thumb:hover,
.price-slider-input::-webkit-slider-thumb:active {
    border-color: var(--green-800);
    box-shadow: 0 0 0 4px rgba(45,90,63,0.12);
}
/* Track fill — hide default track on both inputs */
.price-slider-input::-webkit-slider-runnable-track { background: transparent; }
.price-slider-input::-moz-range-track { background: transparent; }

/* Price filter */
.price-range {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}
.price-input-wrap {
    display: flex;
    align-items: center;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex: 1;
    transition: border-color 0.2s;
}
.price-input-wrap:focus-within { border-color: var(--green-700); }
.price-prefix {
    padding: 0 0 0 8px;
    color: var(--gray-400);
    font-size: 0.8rem;
    user-select: none;
}
.price-range input {
    width: 100%;
    padding: 7px 8px;
    border: none;
    font-size: 0.8rem;
    font-family: inherit;
    outline: none;
    background: transparent;
}
.price-sep {
    color: var(--gray-300);
    flex-shrink: 0;
    font-size: 0.75rem;
}

.price-presets {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.price-preset {
    background: none;
    border: none;
    text-align: left;
    padding: 6px 8px;
    margin: 0 -8px;
    width: calc(100% + 16px);
    font-size: 0.8rem;
    color: var(--gray-500);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.15s;
}
.price-preset:hover { background: var(--gray-50); color: var(--green-700); }
.price-preset.active {
    background: var(--green-50);
    color: var(--green-800);
    font-weight: 600;
}

/* Size filter */
.size-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.size-btn {
    min-width: 42px;
    padding: 7px 12px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    background: var(--white);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.15s;
    text-align: center;
}
.size-btn:hover {
    border-color: var(--green-700);
    color: var(--green-700);
}
.size-btn.active {
    background: var(--green-700);
    border-color: var(--green-700);
    color: var(--white);
}

/* Color filter */
.color-filter-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.color-filter-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px;
    margin: 0 -8px;
    width: calc(100% + 16px);
    cursor: pointer;
    font-size: 0.8rem;
    color: var(--gray-600);
    background: none;
    border: none;
    text-align: left;
    border-radius: var(--radius-sm);
    transition: all 0.15s;
}
.color-filter-item:hover { background: var(--gray-50); color: var(--green-700); }
.color-filter-item.active {
    background: var(--green-50);
    color: var(--green-800);
    font-weight: 600;
}
.color-filter-swatch {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--gray-200);
    flex-shrink: 0;
}
.color-filter-swatch[style*="#ffffff"] {
    border-color: var(--gray-300);
}
.color-filter-item.active .color-filter-swatch {
    border-color: var(--green-700);
    box-shadow: 0 0 0 2px rgba(45,90,63,0.15);
}

/* Mobile apply button */
.sidebar-apply-btn {
    display: none;
    width: 100%;
    margin-top: 16px;
}

/* Toolbar */
.shop-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    background: var(--white);
    padding: 12px 18px;
    border-radius: var(--radius-lg, 12px);
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.shop-results {
    font-size: 0.85rem;
    color: var(--gray-500);
}
.shop-results strong { color: var(--gray-800); }

.results-skeleton {
    width: 120px;
    height: 16px;
    background: var(--gray-100);
    border-radius: 4px;
    animation: shimmer 1.5s infinite;
}

.shop-toolbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-mobile-btn {
    display: none;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    background: var(--white);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--gray-700);
    cursor: pointer;
    position: relative;
}
.filter-badge {
    background: var(--green-700);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
}

.shop-sort {
    padding: 8px 12px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-family: inherit;
    color: var(--gray-700);
    background: var(--white);
    cursor: pointer;
}
.shop-sort:focus { outline: none; border-color: var(--green-700); }

/* Products grid */
.shop-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

/* Product cards in shop — enhanced */
.shop-grid .product-card {
    background: var(--white);
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: transform 0.3s cubic-bezier(0.25,0.46,0.45,0.94), box-shadow 0.3s ease;
    border-radius: var(--radius-lg, 12px);
    overflow: hidden;
}
.shop-grid .product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.12);
    border-color: transparent;
}

/* Image area polish */
.shop-grid .product-card .product-img {
    aspect-ratio: 4/5;
    position: relative;
    overflow: hidden;
}
.shop-grid .product-card .product-img::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(to top, rgba(0,0,0,0.06), transparent);
    pointer-events: none;
    transition: opacity 0.3s;
}
.shop-grid .product-card:hover .product-img::after {
    opacity: 0;
}

/* Info area polish */
.shop-grid .product-card .product-info {
    padding: 16px 18px 18px;
}
.shop-grid .product-card .product-name {
    font-size: 0.95rem;
    line-height: 1.3;
}
.shop-grid .product-card .product-price {
    font-size: 1.15rem;
}

/* Quick add button — slides up on hover */
.shop-grid .product-card .quick-add {
    margin-top: 14px;
    padding: 11px;
    border-radius: var(--radius-md);
    font-size: 0.78rem;
    letter-spacing: 0.8px;
    transition: background 0.2s, transform 0.2s;
}
.shop-grid .product-card .quick-add:hover {
    background: var(--green-800);
    transform: scale(1.02);
}

/* Loading skeleton */
.product-skeleton {
    border-radius: var(--radius-lg, 12px);
    overflow: hidden;
    background: var(--white);
    border: 1px solid rgba(0,0,0,0.06);
}
.skel-img {
    aspect-ratio: 4/5;
    background: linear-gradient(135deg, #e8e6e2, #ddd8d0);
    animation: shimmer 1.5s infinite;
}
.skel-text {
    height: 14px;
    background: var(--gray-100);
    border-radius: 4px;
    margin: 12px 18px 0;
    animation: shimmer 1.5s infinite;
}
.skel-text.short { width: 60%; margin-bottom: 0; }
.skel-price {
    height: 18px;
    width: 80px;
    background: var(--gray-100);
    border-radius: 4px;
    margin: 10px 18px 18px;
    animation: shimmer 1.5s infinite;
}

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

/* Discount badge */
.product-discount-pct {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #e74c3c;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    z-index: 2;
    letter-spacing: 0.3px;
}

/* Empty state */
.shop-empty {
    text-align: center;
    padding: 80px 20px;
    color: var(--gray-400);
    background: var(--white);
    border-radius: var(--radius-lg, 12px);
    border: 1px solid rgba(0,0,0,0.06);
}
.shop-empty svg { margin-bottom: 16px; }
.shop-empty h3 {
    font-size: 1.1rem;
    color: var(--gray-700);
    margin-bottom: 8px;
}
.shop-empty p { font-size: 0.9rem; }
.link-btn {
    background: none;
    border: none;
    color: var(--green-700);
    font-weight: 600;
    cursor: pointer;
    font-size: inherit;
    text-decoration: underline;
}

/* Shop footer override */
.shop-section ~ .footer {
    background: var(--green-900);
}

/* Mobile sidebar overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 999;
    backdrop-filter: blur(2px);
}
.sidebar-overlay.active { display: block; }

.sidebar-close-mobile {
    display: none;
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-500);
    line-height: 1;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .shop-grid { grid-template-columns: repeat(2, 1fr); }
    .shop-layout { grid-template-columns: 240px 1fr; gap: 24px; }
    .shop-title { font-size: 1.8rem; }
}

@media (max-width: 768px) {
    .shop-hero { padding: 90px 0 28px; }
    .shop-title { font-size: 1.5rem; }
    .shop-subtitle { font-size: 0.85rem; }
    .shop-layout { grid-template-columns: 1fr; }

    .filter-mobile-btn { display: flex; }

    .shop-sidebar {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 300px;
        max-width: 85vw;
        z-index: 1000;
        border-radius: 0;
        overflow-y: auto;
        padding: 60px 20px 20px;
        border: none;
        box-shadow: var(--shadow-xl);
    }
    .shop-sidebar.mobile-open { display: block; }
    .shop-sidebar.mobile-open .sidebar-close-mobile { display: block; }
    .shop-sidebar.mobile-open .sidebar-apply-btn { display: block; }

    .shop-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .shop-toolbar { flex-wrap: wrap; gap: 10px; padding: 10px 14px; }

    .shop-grid .product-card .product-img { aspect-ratio: 3/4; }
}

@media (max-width: 480px) {
    .shop-grid { grid-template-columns: 1fr; }
    .shop-search-bar { max-width: 100%; }
    .shop-grid .product-card .product-img { aspect-ratio: 4/5; }
}

@media (max-width: 390px) {
    .shop-hero { padding: 70px 0 20px; }
    .shop-title { font-size: 1.3rem; }
    .shop-subtitle { font-size: 0.8rem; margin-bottom: 16px; }
    .shop-search-bar { padding: 10px 14px; }
    .shop-search-bar input { font-size: 0.85rem; }
    .shop-sidebar { width: 100vw; max-width: 100vw; }
    .shop-toolbar { padding: 8px 10px; }
    .shop-sort { font-size: 0.75rem; padding: 6px 8px; }
    .filter-mobile-btn { font-size: 0.8rem; padding: 6px 10px; }
    .product-name { font-size: 0.85rem; }
    .product-price { font-size: 0.9rem; }
}

/* ===== Quick View Button on product cards ===== */
/* Positioned absolutely inside .product-img (which already has position:relative and overflow:hidden) */
.quick-view-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    /* Right side so it doesn't overlap the product-badge (top-left) or product-discount-pct (top-right at 12px).
       We use top:10px / right:10px and keep it small so discount badge still reads clearly. */
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.92);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-700);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    cursor: pointer;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.2s ease, transform 0.2s ease, background 0.15s;
    z-index: 3;
}
/* Show button on card hover */
.shop-grid .product-card:hover .quick-view-btn {
    opacity: 1;
    transform: translateY(0);
}
.quick-view-btn:hover {
    background: var(--white);
    color: var(--green-700);
}
/* Always show on touch devices since hover doesn't exist */
@media (hover: none) {
    .quick-view-btn {
        opacity: 1;
        transform: none;
    }
}

/* ===== Quick View Modal ===== */
.quick-view-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(3px);
    z-index: 1000;
    overscroll-behavior: contain;
}
.quick-view-overlay.active {
    display: block;
}

.quick-view-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) translateY(16px);
    width: min(800px, calc(100vw - 32px));
    max-height: calc(100vh - 48px);
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.2);
    z-index: 1001;
    overflow: hidden;
    display: none;
    flex-direction: column;
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.34,1.56,0.64,1);
}
.quick-view-modal.active {
    display: flex;
    opacity: 1;
    transform: translate(-50%, -50%) translateY(0);
}

/* Close button */
.qv-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gray-100);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-600);
    cursor: pointer;
    z-index: 10;
    transition: background 0.15s, color 0.15s;
}
@media (hover: none) {
    .qv-close { width: 44px; height: 44px; top: 10px; right: 10px; }
}
.qv-close:hover {
    background: var(--gray-200);
    color: var(--gray-900);
}

/* Two-column layout */
.qv-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: auto;
    max-height: calc(100vh - 48px);
}

/* Left: images */
.qv-gallery {
    background: var(--gray-50);
    position: relative;
    min-height: 300px;
}
.qv-main-img {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--gray-100);
}
.qv-main-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.qv-main-img .qv-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e8e6e2, #ddd8d0);
    color: var(--gray-300);
}
.qv-thumbs {
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    overflow-x: auto;
    background: var(--gray-50);
}
.qv-thumb {
    width: 56px;
    height: 56px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    flex-shrink: 0;
    transition: border-color 0.15s;
}
.qv-thumb.active,
.qv-thumb:hover {
    border-color: var(--green-700);
}
.qv-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Right: info */
.qv-info {
    padding: 28px 24px 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.qv-badge {
    display: inline-block;
    background: var(--green-700);
    color: var(--white);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: 0.3px;
    width: fit-content;
}
.qv-name {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 600;
    line-height: 1.25;
    color: var(--gray-900);
    margin-bottom: 0;
}
.qv-price-block {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.qv-price {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--green-900);
}
.qv-compare-price {
    font-size: 1rem;
    text-decoration: line-through;
    color: var(--gray-400);
}
.qv-desc {
    font-size: 0.88rem;
    color: var(--gray-500);
    line-height: 1.55;
}
.qv-option-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--gray-700);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 8px;
}
.qv-colors {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.qv-color-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}
.qv-color-btn.active {
    border-color: var(--green-700);
    box-shadow: 0 0 0 2px var(--white), 0 0 0 4px var(--green-700);
}
.qv-color-btn:hover {
    transform: scale(1.1);
}
.qv-sizes {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.qv-size-btn {
    padding: 7px 14px;
    border: 1.5px solid var(--gray-200);
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    background: var(--white);
    color: var(--gray-700);
}
.qv-size-btn:hover {
    border-color: var(--green-700);
    color: var(--green-700);
}
.qv-size-btn.active {
    background: var(--green-700);
    border-color: var(--green-700);
    color: var(--white);
}
.qv-size-btn.disabled {
    opacity: 0.35;
    cursor: not-allowed;
    text-decoration: line-through;
}

/* Quantity */
.qv-qty-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.qv-qty {
    display: flex;
    align-items: center;
    border: 1.5px solid var(--gray-200);
    border-radius: 8px;
    overflow: hidden;
}
.qv-qty button {
    width: 36px;
    height: 40px;
    border: none;
    background: var(--gray-50);
    font-size: 1rem;
    cursor: pointer;
    color: var(--gray-700);
    transition: background 0.15s;
}
.qv-qty button:hover {
    background: var(--gray-200);
}
.qv-qty span {
    width: 40px;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Add to cart */
.qv-add-btn {
    width: 100%;
    padding: 12px 20px;
    background: var(--green-700);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s, transform 0.15s;
}
.qv-add-btn:hover:not(:disabled) {
    background: var(--green-800);
    transform: translateY(-1px);
}
.qv-add-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Detail link */
.qv-detail-link {
    display: block;
    text-align: center;
    font-size: 0.82rem;
    color: var(--green-700);
    font-weight: 500;
    text-decoration: underline;
    margin-top: 4px;
}
.qv-detail-link:hover {
    color: var(--green-800);
}

/* Loading state */
.qv-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    gap: 12px;
    color: var(--gray-400);
    font-size: 0.9rem;
    grid-column: 1 / -1;
}
.qv-spinner {
    width: 28px;
    height: 28px;
    border: 2.5px solid var(--gray-200);
    border-top-color: var(--green-700);
    border-radius: 50%;
    animation: qvSpin 0.7s linear infinite;
    flex-shrink: 0;
}
@keyframes qvSpin {
    to { transform: rotate(360deg); }
}

/* Mobile: single column */
@media (max-width: 600px) {
    .quick-view-modal {
        width: 100vw;
        max-height: 95vh;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        transform: translateY(100%);
        border-radius: 16px 16px 0 0;
    }
    .quick-view-modal.active {
        transform: translateY(0);
    }
    .qv-body {
        grid-template-columns: 1fr;
        max-height: 95vh;
    }
    .qv-main-img {
        /* Shorter on mobile to leave room for info */
        aspect-ratio: 3/2;
    }
    .qv-info {
        padding: 20px 16px 32px;
    }
}

/* ===== Filtros de atributos dinámicos ===== */
.attr-filter-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 4px 0;
}
.attr-filter-option {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--gray-600);
    cursor: pointer;
    padding: 4px 2px;
    border-radius: var(--radius-sm);
    transition: color 0.15s;
    user-select: none;
}
.attr-filter-option:hover { color: var(--green-700); }
.attr-filter-option input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: var(--green-700);
    cursor: pointer;
    flex-shrink: 0;
}

/* ===== Infinite Scroll / Load More ===== */
.load-more-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 32px auto 0;
    padding: 14px 36px;
    background: white;
    color: var(--green-700);
    border: 2px solid var(--green-700);
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, transform 0.15s;
}
.load-more-btn:hover:not(:disabled) {
    background: var(--green-700);
    color: white;
    transform: translateY(-1px);
}
.load-more-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.load-more-spinner {
    display: inline-flex;
    align-items: center;
}
.spinning {
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
.shop-loaded-count {
    text-align: center;
    margin: 16px 0;
    font-size: 0.85rem;
    color: var(--gray-400);
    font-style: italic;
    display: none;
}

/* ===== Flash Sale Banner ===== */
.flash-banner {
    position: sticky;
    top: 0;
    z-index: 200;
    width: 100%;
    padding: 10px 16px;
    font-size: 0.85rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.flash-banner-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.flash-banner-text {
    flex: 1;
    min-width: 0;
}
.flash-banner-countdown {
    font-size: 0.82rem;
    opacity: 0.92;
    white-space: nowrap;
}
.flash-banner-link {
    color: inherit;
    font-weight: 600;
    padding: 5px 14px;
    border: 1.5px solid currentColor;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.8rem;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}
.flash-banner-link:hover {
    background: rgba(255,255,255,0.2);
}
.flash-banner-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 1.2rem;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
    opacity: 0.8;
    margin-left: auto;
}
.flash-banner-close:hover { opacity: 1; }

/* Flash badge on product cards */
.product-badge.flash-badge {
    background: #e53e3e;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.68rem;
    letter-spacing: 0.5px;
}

@media (max-width: 480px) {
    .flash-banner-countdown { display: none; }
    .flash-banner-inner { gap: 8px; }
}

/* ===== Low Stock Badge on product cards ===== */
/* Positioned bottom-left inside .product-img, above the quick-view button area */
.product-low-stock-badge {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: #c05621;
    color: #fff;
    font-size: 0.63rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    padding: 3px 7px;
    border-radius: 4px;
    pointer-events: none;
    z-index: 2;
    line-height: 1.4;
}

/* ===== Search Autocomplete Dropdown ===== */
.search-autocomplete {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    overflow: hidden;
    z-index: 200;
    border: 1px solid rgba(0,0,0,0.07);
}
.search-autocomplete.open { display: block; }

.autocomplete-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    text-decoration: none;
    color: var(--gray-800, #2d3748);
    transition: background 0.15s;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}
.autocomplete-item:last-child { border-bottom: none; }
.autocomplete-item:hover, .autocomplete-item:focus {
    background: #f7f4ef;
    outline: none;
}

.autocomplete-thumb {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
    background: #eee;
}
.autocomplete-thumb-placeholder {
    width: 44px;
    height: 44px;
    border-radius: 6px;
    flex-shrink: 0;
    background: #e2ddd8;
}

.autocomplete-item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.autocomplete-item-name {
    font-size: 0.88rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--gray-800, #2d3748);
}
.autocomplete-item-price {
    font-size: 0.8rem;
    color: var(--green-700, #2d5a3f);
    font-weight: 500;
}
