/* Trira - Shop Page Styles */

/* ============================================
   Shop Layout
   ============================================ */
.shop-page {
    padding-top: 170px;
    min-height: 100vh;
    transition: padding-top 0.3s ease;
}

body.scrolled .shop-page {
    padding-top: 130px;
}

@media (max-width: 768px) {
    .shop-page {
        padding-top: var(--mobile-page-top);
    }

    body.scrolled .shop-page {
        padding-top: var(--mobile-page-top-compact);
    }
}

.shop-container {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 20px var(--page-gutter);
}

.shop-header {
    text-align: center;
    margin-bottom: 40px;
}

.shop-header h1 {
    font-size: 2.5rem;
    color: var(--dark-color);
    margin-bottom: 10px;
}

.shop-header p {
    color: var(--body-color);
    font-size: 1.1rem;
}

/* Shop Grid Layout */
.shop-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 30px;
}

.shop-main {
    min-width: 0;
}

/* ============================================
   Filter Sidebar
   ============================================ */
.filter-sidebar {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow);
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    transition: top 0.3s ease;
}

body.scrolled .filter-sidebar {
    top: 70px;
    max-height: calc(100vh - 90px);
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.filter-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-close-btn {
    display: none;
    width: 32px;
    height: 32px;
    border: none;
    background: #f0f0f0;
    border-radius: 50%;
    font-size: 1.3rem;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    color: var(--body-color);
    line-height: 1;
}

.filter-close-btn:hover {
    background: #e0e0e0;
    color: #333;
}

.filter-header h3 {
    font-size: 1.2rem;
    color: var(--dark-color);
}

.clear-filters-btn {
    background: none;
    border: none;
    color: var(--button-danger-bg);
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: underline;
}

.clear-filters-btn:hover {
    color: var(--button-danger-hover-bg);
}

/* Filter Groups */
.filter-groups {
    display: flex;
    flex-direction: column;
}

.filter-group {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid #eee;
}

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

.filter-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 15px;
    cursor: pointer;
}

.filter-toggle {
    position: relative;
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
}

.filter-toggle::before,
.filter-toggle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 1.5px;
    background: currentColor;
    transform: translate(-50%, -50%);
    transition: transform .2s ease, opacity .2s ease;
}

.filter-toggle::after {
    transform: translate(-50%, -50%) rotate(90deg);
}

.filter-group:not(.collapsed) .filter-toggle::after {
    opacity: 0;
}

.filter-group.collapsed .filter-options {
    display: none;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--body-color);
}

.filter-option:hover {
    color: var(--primary-color);
}

.filter-option input[type="radio"],
.filter-option input[type="checkbox"] {
    accent-color: var(--primary-color);
    width: 16px;
    height: 16px;
}

.price-range-control {
    --price-start: 0%;
    --price-end: 100%;
    display: grid;
    gap: 14px;
    width: 100%;
    color: var(--body-color);
}

.price-range-slider {
    position: relative;
    height: 44px;
    margin-inline: 2px;
}

.price-range-track,
.price-range-fill {
    position: absolute;
    top: 50%;
    height: 3px;
    border-radius: 999px;
    transform: translateY(-50%);
}

.price-range-track {
    inset-inline: 0;
    background: color-mix(in srgb, var(--body-color) 24%, white);
}

.price-range-fill {
    left: var(--price-start);
    right: calc(100% - var(--price-end));
    background: var(--primary-color);
}

.price-range-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 44px;
    margin: 0;
    appearance: none;
    background: transparent;
    pointer-events: none;
}

.price-range-input::-webkit-slider-runnable-track {
    height: 3px;
    background: transparent;
}

.price-range-input::-webkit-slider-thumb {
    width: 22px;
    height: 22px;
    margin-top: -9.5px;
    appearance: none;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    background: white;
    box-shadow: 0 2px 7px rgba(115, 20, 20, 0.18);
    cursor: grab;
    pointer-events: auto;
}

.price-range-input::-moz-range-track {
    height: 3px;
    background: transparent;
}

.price-range-input::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    background: white;
    box-shadow: 0 2px 7px rgba(115, 20, 20, 0.18);
    cursor: grab;
    pointer-events: auto;
}

.price-range-input:focus-visible::-webkit-slider-thumb {
    outline: 3px solid color-mix(in srgb, var(--primary-color) 28%, transparent);
    outline-offset: 3px;
}

.price-range-fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 8px;
    align-items: end;
}

.price-range-fields label {
    display: grid;
    gap: 5px;
    min-width: 0;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--dark-color);
}

.price-field-shell {
    display: flex;
    align-items: center;
    min-width: 0;
    height: 42px;
    padding-inline-start: 10px;
    border: 1px solid color-mix(in srgb, var(--body-color) 35%, white);
    border-radius: 12px;
    background: white;
}

.price-field-shell:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color) 14%, transparent);
}

.price-field-shell input {
    width: 100%;
    min-width: 0;
    height: 40px;
    border: 0;
    outline: 0;
    padding: 0 6px;
    color: var(--dark-color);
    background: transparent;
    font: inherit;
    font-variant-numeric: tabular-nums;
}

.price-range-separator {
    padding-bottom: 11px;
    font-size: 0.72rem;
}

.price-range-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 32px;
    font-size: 0.78rem;
    font-variant-numeric: tabular-nums;
}

.price-range-summary button {
    min-height: 32px;
    border: 0;
    color: var(--primary-color);
    background: transparent;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.pill-dropdown-price {
    width: min(310px, calc(100vw - 24px));
    padding: 18px;
}

.filter-count {
    margin-left: auto;
    color: #999;
    font-size: 0.85rem;
}

/* ============================================
   Shop Toolbar
   ============================================ */
.shop-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.product-count {
    color: var(--body-color);
    font-size: 0.95rem;
}

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

/* View Toggle */
.view-toggle {
    display: flex;
    gap: 5px;
}

.view-btn {
    width: 36px;
    height: 36px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--body-color);
    transition: all 0.2s;
}

.view-btn:hover,
.view-btn.active {
    border-color: var(--button-primary-hover-bg);
    color: var(--button-primary-hover-bg);
}

/* Sort Dropdown */
.sort-dropdown {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-dropdown label {
    color: var(--body-color);
    font-size: 0.95rem;
    white-space: nowrap;
}

.sort-dropdown select {
    padding: 8px 35px 8px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.95rem;
    background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E") no-repeat right 12px center;
    appearance: none;
    cursor: pointer;
    min-width: 160px;
}

.sort-dropdown select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Mobile Filter Button */
.mobile-filter-btn {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.95rem;
    cursor: pointer;
}

.mobile-filter-btn:hover {
    border-color: var(--button-primary-hover-bg);
}

/* ============================================
   Active Filters
   ============================================ */
.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.active-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--light-color);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--body-color);
}

.active-filter-tag button {
    background: none;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    color: #999;
    line-height: 1;
}

.active-filter-tag button:hover {
    color: var(--button-danger-hover-bg);
}

/* ============================================
   Category Video Card (in-grid)
   ============================================ */
.video-product-card .video-card-wrapper {
    position: relative;
    background: #000;
    cursor: pointer;
    flex: 1;
    aspect-ratio: auto;
}

.video-card-player {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
}

.video-card-youtube {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    border: none;
}

.video-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.25);
    transition: background 0.3s;
    z-index: 1;
}

.video-play-overlay:hover {
    background: rgba(0, 0, 0, 0.15);
}

.video-play-overlay.playing {
    background: transparent;
    pointer-events: none;
}

.video-play-overlay.playing .video-play-btn {
    opacity: 0;
}

/* Custom video controls bar */
.video-controls-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.6));
    z-index: 2;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.video-product-card:hover .video-controls-bar.visible,
.video-controls-bar.visible.always-show {
    opacity: 1;
    pointer-events: auto;
}

.video-control-btn {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    padding: 0;
    line-height: 1;
}

.video-control-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.video-controls-bar .video-fullscreen-btn {
    display: none;
}

@media (max-width: 768px) {
    .video-controls-bar .video-fullscreen-btn {
        display: flex;
        margin-left: auto;
    }

    .video-controls-bar.visible {
        opacity: 1;
        pointer-events: auto;
    }
}

.video-play-btn {
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--dark-color);
    transition: transform 0.3s, opacity 0.3s;
    padding-left: 4px;
}

.video-play-overlay:hover .video-play-btn {
    transform: scale(1.1);
}

.video-product-card .product-info {
    text-align: center;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px 13px;
}

.video-product-card .product-info .product-name {
    margin: 0;
    font-size: 0.95rem;
}

.video-product-card .product-info .product-description {
    display: none;
}

/* ============================================
   Products Grid
   ============================================ */
.shop-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 25px;
}

.shop-products-grid.list-view {
    grid-template-columns: 1fr;
}

.shop-products-grid.list-view .product-card {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 20px;
}

.shop-products-grid.list-view .product-image-wrapper {
    aspect-ratio: 1 / 1;
}

.shop-products-grid.list-view .product-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Product Card Enhancements */
.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Scroll-reveal entrance animation */
.product-card.scroll-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.5s ease, transform 0.5s ease, box-shadow 0.3s;
}

.product-card.scroll-reveal.scroll-visible {
    opacity: 1;
    transform: translateY(0);
}

.product-card.scroll-reveal.scroll-visible:hover {
    transform: translateY(-5px);
}

@media (prefers-reduced-motion: reduce) {
    .product-card.scroll-reveal {
        opacity: 1;
        transform: none;
        transition: box-shadow 0.3s;
    }
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.product-image-wrapper {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.product-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

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

/* Product Actions Overlay */
.product-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s;
}

.product-card:hover .product-actions {
    opacity: 1;
    transform: translateX(0);
}

.action-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.2s;
}

.action-btn:hover {
    background: var(--button-primary-hover-bg);
    color: white;
}

.wishlist-btn.active {
    color: var(--button-danger-bg);
}

.wishlist-btn.active:hover {
    background: var(--button-danger-hover-bg);
    color: white;
}

/* Product Info */
.product-info {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-name-link {
    text-decoration: none;
    color: inherit;
}

.product-name {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--dark-color);
    font-weight: 600;
    transition: color 0.2s;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.5em;
}

.product-name-link:hover .product-name {
    color: var(--heading-color);
}

.product-description {
    font-size: 0.9rem;
    color: var(--body-color);
    margin-bottom: 12px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.7em;
}

.product-price-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    margin-top: auto;
}

.product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

.product-original-price {
    font-size: 1rem;
    color: #999;
    text-decoration: line-through;
}

.add-to-cart-btn {
    width: 100%;
    padding: 12px;
    background: var(--button-primary-bg);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.add-to-cart-btn:hover {
    background: var(--button-primary-hover-bg);
}

/* Card Quantity Controls */
.card-cart-action {
    width: 100%;
}

.card-qty-control {
    display: flex;
    width: 100%;
    border: 2px solid var(--button-primary-bg);
    border-radius: 8px;
    overflow: hidden;
}

.card-qty-btn {
    width: 40px;
    min-width: 40px;
    height: 40px;
    border: none;
    background: var(--button-primary-bg);
    color: white;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.card-qty-btn:hover:not(:disabled) {
    background: var(--button-primary-hover-bg);
}

.card-qty-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.card-qty-count {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark-color);
    background: white;
}

.detail-cart-action {
    flex: 1;
}

.proceed-to-buy-btn {
    display: block;
    width: 100%;
    margin-top: 10px;
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    color: var(--button-primary-bg);
    background: transparent;
    border: 2px solid var(--button-primary-bg);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    box-sizing: border-box;
}

.proceed-to-buy-btn:hover {
    border-color: var(--button-primary-hover-bg);
    background: var(--button-primary-hover-bg);
    color: white;
}

.card-proceed-btn {
    padding: 8px 12px;
    font-size: 0.85rem;
    margin-top: 8px;
}

/* No Products */
.no-products {
    text-align: center;
    padding: 60px 20px;
    grid-column: 1 / -1;
}

.no-products p {
    color: var(--body-color);
    margin-bottom: 20px;
    font-size: 1.1rem;
}

/* ============================================
   Pagination
   ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
}

.pagination-btn {
    min-width: 40px;
    height: 40px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.pagination-btn:hover:not(:disabled) {
    border-color: var(--button-primary-hover-bg);
    color: var(--button-primary-hover-bg);
}

.pagination-btn.active {
    background: var(--button-primary-bg);
    color: white;
    border-color: var(--button-primary-bg);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================
   Filter Pills (Mobile Inline Filters)
   ============================================ */
.filter-pills-container {
    display: none;
}

@media (max-width: 992px) {
    .filter-pills-container {
        display: block;
        margin-bottom: 15px;
    }

    .filter-pills-scroll {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding: 4px 0;
        scrollbar-width: none;
    }

    .filter-pills-scroll::-webkit-scrollbar {
        display: none;
    }

    .filter-pill-wrapper {
        position: relative;
        flex-shrink: 0;
    }

    .filter-pill {
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 8px 16px;
        background: white;
        border: 1.5px solid #ddd;
        border-radius: 20px;
        font-size: 0.85rem;
        font-family: 'Montserrat', sans-serif;
        white-space: nowrap;
        cursor: pointer;
        transition: all 0.2s;
        color: var(--body-color);
    }

    .filter-pill:hover {
        border-color: var(--button-primary-hover-bg);
    }

    .filter-pill.active {
        background: var(--button-primary-bg);
        color: white;
        border-color: var(--button-primary-bg);
    }

    .filter-pill.active .pill-chevron {
        color: white;
    }

    .filter-pill.dropdown-open {
        border-color: var(--button-primary-bg);
    }

    .pill-chevron {
        font-size: 0.7rem;
        transition: transform 0.2s;
        color: #999;
    }

    .filter-pill.dropdown-open .pill-chevron {
        transform: rotate(180deg);
    }

    .filter-pill.clear-pill {
        background: none;
        border-color: var(--button-danger-bg);
        color: var(--button-danger-bg);
        font-size: 0.8rem;
    }

    .filter-pill.clear-pill:hover {
        border-color: var(--button-danger-hover-bg);
        background: var(--button-danger-hover-bg);
        color: white;
    }

    /* Pill Dropdown */
    .pill-dropdown {
        display: none;
        position: fixed;
        min-width: 200px;
        max-height: 250px;
        overflow-y: auto;
        background: white;
        border-radius: 12px;
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
        z-index: 1001;
        padding: 8px 0;
    }

    .pill-dropdown.open {
        display: block;
    }

    .pill-dropdown-option {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 10px 16px;
        cursor: pointer;
        font-size: 0.9rem;
        color: var(--body-color);
        transition: background 0.15s;
    }

    .pill-dropdown-option:hover {
        background: #f5f5f5;
    }

    .pill-dropdown-option input[type="radio"] {
        accent-color: var(--primary-color);
        width: 16px;
        height: 16px;
    }

    .pill-dropdown-count {
        margin-left: auto;
        color: #999;
        font-size: 0.8rem;
    }
}

/* ============================================
   Mobile Responsive
   ============================================ */
@media (max-width: 992px) {
    .shop-layout {
        grid-template-columns: 1fr;
    }

    .filter-sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 300px;
        height: 100vh;
        border-radius: 0;
        z-index: 1000;
        transition: left 0.3s ease;
        overflow-y: auto;
    }

    .filter-sidebar.active {
        left: 0;
    }

    .filter-sidebar .filter-header {
        position: sticky;
        top: 0;
        background: white;
        z-index: 1;
        margin: -25px -25px 25px -25px;
        padding: 25px 25px 15px 25px;
    }
}

/* Filter Overlay - hidden by default, shown on mobile */
.filter-overlay {
    display: none;
}

@media (max-width: 992px) {
    .filter-overlay {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s;
    }

    .filter-overlay.active {
        opacity: 1;
        visibility: visible;
    }

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

    body.filters-open {
        overflow: hidden;
    }
}

@media (max-width: 768px) {
    .shop-header h1 {
        font-size: 2rem;
    }

    .shop-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .toolbar-right {
        justify-content: space-between;
    }

    .shop-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .product-card {
        border-radius: 8px;
    }

    .product-image-wrapper {
        aspect-ratio: 1 / 1;
    }

    .product-info {
        padding: 8px 10px;
    }

    .product-info .product-name {
        font-size: 0.75rem;
        margin-bottom: 2px;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .product-info .product-description {
        font-size: 0.65rem;
        line-height: 1.35;
        margin-bottom: 4px;
        -webkit-line-clamp: 2;
    }

    .product-price-row {
        gap: 6px;
        margin-bottom: 6px;
    }

    .product-info .product-price {
        font-size: 0.9rem;
    }

    .product-info .product-original-price {
        font-size: 0.75rem;
    }

    .add-to-cart-btn {
        padding: 7px;
        font-size: 0.78rem;
        border-radius: 6px;
    }

    .card-qty-control {
        border-radius: 6px;
    }

    .card-qty-btn {
        width: 32px;
        min-width: 32px;
        height: 32px;
        font-size: 1rem;
    }

    .card-qty-count {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .toolbar-right {
        gap: 8px;
    }

    .toolbar-right > #sortDropdown {
        flex: 1 1 auto;
        min-width: 0;
    }

    .sort-dropdown {
        width: 100%;
        min-width: 0;
        gap: 6px;
    }

    .sort-dropdown label {
        font-size: 0.82rem;
    }

    .sort-dropdown select {
        width: 100%;
        min-width: 0;
        padding-inline: 10px 30px;
    }

    .view-btn {
        width: 44px;
        height: 44px;
        flex: 0 0 44px;
    }

    .shop-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .product-image-wrapper {
        aspect-ratio: 1 / 1;
    }

    .product-info {
        padding: 6px 8px;
    }

    .product-info .product-name {
        font-size: 0.7rem;
        margin-bottom: 2px;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .product-info .product-description {
        font-size: 0.6rem;
        line-height: 1.35;
        margin-bottom: 3px;
        -webkit-line-clamp: 2;
    }

    .product-info .product-price {
        font-size: 0.85rem;
    }

    .product-info .product-original-price {
        font-size: 0.7rem;
    }

    .product-price-row {
        margin-bottom: 5px;
    }

    .add-to-cart-btn {
        padding: 6px;
        font-size: 0.75rem;
    }

    .card-qty-btn {
        width: 28px;
        min-width: 28px;
        height: 28px;
        font-size: 0.9rem;
    }

    .card-qty-count {
        font-size: 0.78rem;
    }
}

/* Refreshed catalog cards and page-scrolling desktop filters */
@media (min-width: 993px) {
    .filter-sidebar {
        background: transparent;
        box-shadow: none;
        border-radius: 0;
        max-height: none;
        overflow: visible;
        padding: 0 12px 30px 0;
    }

    body.scrolled .filter-sidebar {
        max-height: none;
    }
}

.product-card {
    box-shadow: none;
    border-radius: 0;
    background: transparent;
}

.product-card:hover {
    transform: none;
    box-shadow: none;
}

.product-image-wrapper,
.shop-products-grid.list-view .product-image-wrapper {
    aspect-ratio: 3 / 4;
    background: #FBE5D6;
}

.product-card:hover .product-image-wrapper img {
    transform: scale(1.02);
}

.product-labels {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.product-labels .product-badge {
    position: static;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: .68rem;
}

.product-image-wrapper > .wishlist-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    opacity: 1;
    transform: none;
}

.quick-shop-btn {
    position: absolute;
    left: 50%;
    bottom: 18px;
    transform: translate(-50%, 8px);
    opacity: 0;
    min-height: 36px;
    border: 0;
    padding: 8px 18px;
    background: rgba(255, 255, 255, .94);
    color: var(--button-secondary-bg);
    box-shadow: 0 5px 22px rgba(0, 0, 0, .13);
    font-size: .74rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: opacity .2s ease, transform .2s ease;
}

.quick-shop-btn:hover,
.quick-shop-btn:focus-visible {
    color: #fff;
    background: var(--button-secondary-hover-bg);
    outline: none;
}

.product-card:hover .quick-shop-btn,
.product-card:focus-within .quick-shop-btn {
    opacity: 1;
    transform: translate(-50%, 0);
}

.product-info {
    padding: 13px 2px 22px;
}

.product-name {
    min-height: 0;
    font-size: clamp(.9rem, 1.3vw, 1.08rem);
    font-weight: 500;
    margin: 0 0 5px;
    color: #731414;
}

.product-price {
    color: var(--body-color);
    font-size: .88rem;
    font-weight: 500;
}

@media (hover: none), (pointer: coarse) {
    .quick-shop-btn {
        opacity: 1;
        transform: translate(-50%, 0);
        min-height: 40px;
        padding: 8px 14px;
        font-size: .7rem;
        bottom: 12px;
    }
}

@media (max-width: 992px) {
    .filter-sidebar {
        background: #fff;
        box-shadow: var(--shadow);
        max-height: 100vh;
        overflow-y: auto;
    }
}

@media (max-width: 480px) {
    .product-image-wrapper { aspect-ratio: 3 / 4; }
    .product-info { padding: 9px 1px 16px; }
    .product-info .product-name { font-size: .86rem; }
    .product-info .product-price { font-size: .74rem; }
}
