/* Anti Horizontal Overflow & Mobile Container Bounds */
html, body {
    max-width: 100vw !important;
    overflow-x: hidden !important;
}

.depurarte-catalog-page {
    background: #F8F5F0;
    color: #2A1806;
    font-family: var(--font-body, 'Montserrat', sans-serif);
    padding: 40px 0 80px 0;
    min-height: 80vh;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    overflow-x: hidden;
}

.depurarte-container {
    width: 100%;
    max-width: 1120px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
    box-sizing: border-box;
}

/* Breadcrumbs */
.depurarte-breadcrumbs {
    font-size: 12px;
    color: rgba(42, 24, 6, 0.55);
    margin-bottom: 20px;
}

.depurarte-breadcrumbs a {
    color: rgba(42, 24, 6, 0.55);
    text-decoration: none;
    transition: color 0.16s ease;
}

.depurarte-breadcrumbs a:hover {
    color: var(--oro-antiguo, #D0A761);
}

.depurarte-crumb-sep {
    margin: 0 6px;
    color: rgba(42, 24, 6, 0.35);
}

.depurarte-crumb-current {
    color: rgba(42, 24, 6, 0.85);
    font-weight: 500;
}

/* Header Title */
.depurarte-catalog-header {
    margin-bottom: 36px;
}

.depurarte-catalog-title {
    font-family: var(--font-h1, 'Cinzel Decorative', 'Cormorant Garamond', serif);
    font-size: 38px;
    font-weight: 700;
    color: var(--violeta-profundo, #340E49);
    margin: 0 0 8px 0;
    line-height: 1.15;
}

.depurarte-catalog-desc {
    font-size: 14px;
    color: rgba(42, 24, 6, 0.68);
    margin: 0;
}

/* Main Layout Grid */
.depurarte-catalog-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 32px;
    align-items: start;
}

/* Left Sidebar Filter Card */
.depurarte-filter-card {
    background: #FFFFFF;
    border-radius: 18px;
    border: 1px solid rgba(208, 167, 97, 0.28);
    padding: 24px;
    box-shadow: 0 2px 10px rgba(18, 3, 27, 0.04);
    display: flex;
    flex-direction: column;
    gap: 28px;
}

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

.depurarte-filter-heading {
    font-family: var(--font-body, 'Montserrat', sans-serif);
    font-size: 11px;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--violeta-profundo, #340E49);
    margin: 0;
    font-weight: 600;
}

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

/* Custom Checkbox */
.depurarte-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: rgba(42, 24, 6, 0.78);
    cursor: pointer;
    user-select: none;
    transition: color 0.16s ease;
}

.depurarte-checkbox-label:hover {
    color: var(--violeta-profundo, #340E49);
}

.depurarte-checkbox-label input[type="checkbox"] {
    display: none;
}

.depurarte-cb-custom {
    width: 16px;
    height: 16px;
    border: 1px solid rgba(208, 167, 97, 0.5);
    border-radius: 4px;
    background: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.16s ease;
    flex-shrink: 0;
}

.depurarte-checkbox-label input[type="checkbox"]:checked + .depurarte-cb-custom {
    background: var(--violeta-profundo, #340E49);
    border-color: var(--violeta-profundo, #340E49);
}

.depurarte-checkbox-label input[type="checkbox"]:checked + .depurarte-cb-custom::after {
    content: '';
    width: 4px;
    height: 8px;
    border: solid #FFFFFF;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) translate(-1px, -1px);
}

/* Price Range Slider */
.depurarte-price-slider-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.depurarte-range-input {
    width: 100%;
    accent-color: var(--violeta-profundo, #340E49);
    cursor: pointer;
}

.depurarte-price-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: rgba(42, 24, 6, 0.65);
    font-weight: 500;
}

/* Right Results Column */
.depurarte-results-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 16px;
}

.depurarte-product-counter {
    font-size: 13px;
    color: rgba(42, 24, 6, 0.6);
}

.depurarte-sort-dropdown {
    border: 1px solid rgba(208, 167, 97, 0.35);
    border-radius: 12px;
    padding: 8px 16px;
    font-family: var(--font-body, 'Montserrat', sans-serif);
    font-size: 13px;
    color: #2A1806;
    background: #FFFFFF;
    cursor: pointer;
    outline: none;
    box-shadow: 0 2px 6px rgba(18, 3, 27, 0.03);
}

/* 3-Column Catalog Grid */
.depurarte-catalog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    width: 100%;
}

/* Catalog Product Card */
.depurarte-catalog-card {
    background: #FFFFFF;
    border-radius: 18px;
    border: 1px solid rgba(208, 167, 97, 0.18);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 10px rgba(18, 3, 27, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.depurarte-catalog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(18, 3, 27, 0.10);
}

.depurarte-catalog-media {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #FFFFFF;
}

.depurarte-catalog-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    background: var(--oro-claro, #EAD095);
    color: #2A1806;
    font-family: var(--font-body, 'Montserrat', sans-serif);
    font-size: 9px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.depurarte-catalog-badge.badge-nuevo {
    background: #D5E5D5;
    color: #1B401B;
}

.depurarte-catalog-badge.badge-exclusivo {
    background: #340E49;
    color: #F8F3E8;
}

.depurarte-catalog-badge.badge-proteccion {
    background: #FF8A65;
    color: #FFFFFF;
}

.depurarte-catalog-badge.badge-agotado {
    background: #8B8B8B;
    color: #FFFFFF;
}

.depurarte-catalog-badge.badge-mas-elegido,
.depurarte-catalog-badge.badge-mas.elegido {
    background: var(--oro-claro, #EAD095);
    color: #2A1806;
}

.depurarte-catalog-img-link {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
}

.depurarte-catalog-img {
    width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    transition: transform 0.35s ease;
}

.depurarte-catalog-card:hover .depurarte-catalog-img {
    transform: scale(1.04);
}

.depurarte-catalog-body {
    padding: 12px 18px 16px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: 0;
}

.depurarte-catalog-family {
    font-family: var(--font-body, 'Montserrat', sans-serif);
    font-size: 10px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: rgba(42, 24, 6, 0.50);
    font-weight: 600;
    margin-bottom: 4px;
    line-height: 1;
}

.depurarte-catalog-item-title {
    font-family: 'Cormorant Garamond', 'Georgia', serif;
    font-size: 17px;
    font-weight: 600;
    margin: 0 0 12px 0;
    line-height: 1.3;
}

.depurarte-catalog-item-title a {
    color: #2A1806;
    text-decoration: none;
    transition: color 0.16s ease;
}

.depurarte-catalog-item-title a:hover {
    color: var(--oro-antiguo, #D0A761);
}

.depurarte-catalog-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

.depurarte-catalog-price {
    font-family: var(--font-body, 'Montserrat', sans-serif);
    font-size: 15px;
    font-weight: 700;
    color: #2A1806;
}

.depurarte-catalog-view-link {
    font-family: var(--font-body, 'Montserrat', sans-serif);
    font-size: 12px;
    color: var(--oro-antiguo, #D0A761);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.16s ease;
}

.depurarte-catalog-view-link:hover {
    color: var(--violeta-profundo, #340E49);
    text-decoration: underline;
}

/* Mobile Filter Trigger Button & Backdrop */
.depurarte-results-left-controls {
    display: flex;
    align-items: center;
    gap: 14px;
}

.depurarte-mobile-filter-btn {
    display: none;
    align-items: center;
    gap: 8px;
    background: #FFFFFF;
    border: 1px solid rgba(208, 167, 97, 0.4);
    color: var(--violeta-profundo, #340E49);
    padding: 8px 16px;
    border-radius: 999px;
    font-family: var(--font-body, 'Montserrat', sans-serif);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(18, 3, 27, 0.05);
    transition: all 0.16s ease;
}

.depurarte-mobile-filter-btn:hover {
    background: var(--violeta-profundo, #340E49);
    color: #FFFFFF;
    border-color: var(--violeta-profundo, #340E49);
}

.depurarte-filter-close {
    display: none;
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(208, 167, 97, 0.15);
    border: 1px solid rgba(208, 167, 97, 0.3);
    color: var(--violeta-profundo, #340E49);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    line-height: 1;
}

.depurarte-filter-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(18, 3, 27, 0.55);
    backdrop-filter: blur(4px);
    z-index: 99998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.depurarte-filter-backdrop.is-open {
    opacity: 1;
    visibility: visible;
}

/* Grid View Switcher Controls */
.depurarte-grid-view-switcher {
    display: flex;
    align-items: center;
    gap: 3px;
    background: #FFFFFF;
    border: 1px solid rgba(208, 167, 97, 0.35);
    border-radius: 999px;
    padding: 3px;
    box-shadow: 0 2px 6px rgba(18, 3, 27, 0.04);
}

.depurarte-view-btn {
    background: transparent;
    border: none;
    color: rgba(42, 24, 6, 0.45);
    padding: 5px 8px;
    border-radius: 999px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.16s ease;
}

.depurarte-view-btn.is-active,
.depurarte-view-btn:hover {
    background: var(--berenjena-noche, #12071B);
    color: var(--oro-claro, #EAD095);
}

/* Desktop & Mobile View Switcher Visibility */
@media (min-width: 1025px) {
    .depurarte-view-btn.mobile-only {
        display: none !important;
    }
    .depurarte-view-btn.desktop-only {
        display: flex !important;
    }
}

@media (max-width: 1024px) {
    .depurarte-view-btn.desktop-only {
        display: none !important;
    }
    .depurarte-view-btn.mobile-only {
        display: flex !important;
    }
}

/* List View Layout Styles (.cols-list & [data-view="list"]) */
.depurarte-catalog-grid.cols-list,
.depurarte-catalog-grid[data-view="list"] {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
    grid-template-columns: 1fr !important;
}

.depurarte-catalog-grid.cols-list .depurarte-catalog-card,
.depurarte-catalog-grid[data-view="list"] .depurarte-catalog-card {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    padding: 16px 24px !important;
    gap: 24px !important;
    border-radius: 18px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.depurarte-catalog-grid.cols-list .depurarte-catalog-media,
.depurarte-catalog-grid[data-view="list"] .depurarte-catalog-media {
    width: 140px !important;
    height: 140px !important;
    min-width: 140px !important;
    aspect-ratio: 1 / 1 !important;
    border-radius: 14px !important;
    flex-shrink: 0 !important;
}

.depurarte-catalog-grid.cols-list .depurarte-catalog-body,
.depurarte-catalog-grid[data-view="list"] .depurarte-catalog-body {
    flex: 1 !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0 !important;
    gap: 24px !important;
    width: auto !important;
}

.depurarte-catalog-grid.cols-list .depurarte-catalog-card-footer,
.depurarte-catalog-grid[data-view="list"] .depurarte-catalog-card-footer {
    flex-direction: column !important;
    align-items: flex-end !important;
    gap: 8px !important;
    margin-top: 0 !important;
    flex-shrink: 0 !important;
}

/* Force 1-column or 2-column via JS class */
.depurarte-catalog-grid.cols-1 {
    grid-template-columns: 1fr !important;
}

.depurarte-catalog-grid.cols-2 {
    grid-template-columns: repeat(2, 1fr) !important;
}

.depurarte-catalog-card.is-hidden {
    display: none !important;
}

/* Responsive Layout */
@media (max-width: 1024px) {
    .depurarte-catalog-layout {
        grid-template-columns: 1fr !important;
    }

    .depurarte-catalog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    /* Optimized Card Sizing for Mobile 2-Column Grid */
    .depurarte-catalog-grid .depurarte-catalog-card {
        border-radius: 14px;
        overflow: hidden;
    }

    .depurarte-catalog-grid .depurarte-catalog-body {
        padding: 12px 10px 14px 10px;
        box-sizing: border-box;
    }

    .depurarte-catalog-grid .depurarte-catalog-family {
        font-size: 9px;
        letter-spacing: .06em;
        margin-bottom: 3px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .depurarte-catalog-grid .depurarte-catalog-item-title {
        font-size: 13px;
        line-height: 1.25;
        margin: 0 0 8px 0;
        overflow-wrap: break-word;
        word-break: break-word;
        hyphens: auto;
    }

    .depurarte-catalog-grid .depurarte-catalog-item-title a {
        font-size: 13px;
        line-height: 1.25;
    }

    .depurarte-catalog-grid .depurarte-catalog-price {
        font-size: 13px;
        font-weight: 700;
    }

    .depurarte-catalog-grid .depurarte-catalog-view-link {
        font-size: 10px;
    }

    .depurarte-catalog-grid .depurarte-catalog-badge {
        font-size: 8px;
        padding: 3px 7px;
        top: 6px;
        left: 6px;
        letter-spacing: .04em;
    }

    .depurarte-mobile-filter-btn {
        display: inline-flex !important;
    }

    .depurarte-filter-close {
        display: flex !important;
    }

    .depurarte-catalog-sidebar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        bottom: 0 !important;
        width: 85vw !important;
        max-width: 320px !important;
        height: 100vh !important;
        z-index: 99999 !important;
        visibility: hidden !important;
        transform: translateX(-100%) !important;
        transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.32s ease !important;
        pointer-events: none;
    }

    .depurarte-catalog-sidebar.is-open {
        visibility: visible !important;
        transform: translateX(0) !important;
        pointer-events: auto !important;
    }

    .depurarte-filter-card {
        height: 100%;
        border-radius: 0 20px 20px 0;
        border-left: none;
        overflow-y: auto;
        padding: 24px 20px;
        position: relative;
    }

    .depurarte-results-bar {
        flex-wrap: wrap;
        gap: 10px;
    }

    .depurarte-sorting-wrap {
        max-width: 100%;
    }
}

@media (max-width: 600px) {
    .depurarte-container {
        padding-left: 12px;
        padding-right: 12px;
    }

    .depurarte-catalog-title {
        font-size: 26px;
    }

    .depurarte-results-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .depurarte-results-left-controls {
        justify-content: space-between;
        width: 100%;
    }

    .depurarte-sorting-wrap {
        width: 100%;
    }

    .depurarte-sort-dropdown {
        width: 100%;
        box-sizing: border-box;
    }
}

/* ── Empty Category State ── */
.depurarte-empty-category {
    text-align: center;
    padding: 60px 20px 40px;
    max-width: 640px;
    margin: 0 auto;
}

.depurarte-empty-icon {
    margin-bottom: 24px;
    opacity: 0.7;
}

.depurarte-empty-title {
    font-family: 'Cormorant Garamond', 'Georgia', serif;
    font-size: 26px;
    font-weight: 600;
    color: var(--violeta-profundo, #340E49);
    margin: 0 0 12px;
    line-height: 1.3;
}

.depurarte-empty-desc {
    font-family: var(--font-body, 'Montserrat', sans-serif);
    font-size: 14px;
    color: rgba(42, 24, 6, 0.6);
    line-height: 1.65;
    margin: 0 0 40px;
}

/* ── Recommended Products Section ── */
.depurarte-recommended-section {
    max-width: 100%;
    margin: 0 auto;
    text-align: left;
}

.depurarte-recommended-heading {
    font-family: 'Cormorant Garamond', 'Georgia', serif;
    font-size: 22px;
    font-weight: 600;
    color: var(--violeta-profundo, #340E49);
    margin: 0 0 24px;
    text-align: center;
    letter-spacing: 0.01em;
}

.depurarte-recommended-grid {
    grid-template-columns: repeat(3, 1fr) !important;
}

@media (max-width: 1024px) {
    .depurarte-recommended-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 480px) {
    .depurarte-empty-title {
        font-size: 21px;
    }

    .depurarte-empty-desc {
        font-size: 13px;
    }

    .depurarte-recommended-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }
}
