/* ═══════════════════════════════════════════
   JOY AMBIENT SRL — Shop / Catalog
   ═══════════════════════════════════════════ */

/* ─── ASTRA RESET ─── */
body.joy-dark-shop .site-content,
body.joy-dark-shop #primary,
body.joy-dark-shop #content,
body.joy-dark-shop .ast-container {
    background-color: var(--joy-bg-main) !important;
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
}

body.joy-dark-shop .woocommerce-result-count,
body.joy-dark-shop .woocommerce-ordering,
body.joy-dark-shop .woocommerce-breadcrumb,
body.joy-dark-shop .ast-woocommerce-container,
body.joy-dark-shop .woocommerce-products-header {
    display: none !important;
}

/* ─── WRAPPER ─── */
#joy-shop-page {
    padding-top: 140px;
    min-height: 100vh;
    background: var(--joy-bg-main);
}

.joy-shop-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 clamp(24px, 5vw, 80px) clamp(60px, 8vw, 120px);
}


/* ═══════════════════════════════════════════
   SHOP HERO
   ═══════════════════════════════════════════ */

.joy-shop-hero {
    margin-bottom: clamp(36px, 5vw, 56px);
}

.joy-shop-hero .sec-h {
    color: var(--joy-ink);
}


/* ═══════════════════════════════════════════
   LAYOUT: sidebar + main
   ═══════════════════════════════════════════ */

.joy-shop-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: clamp(28px, 3vw, 48px);
    align-items: flex-start;
}


/* ═══════════════════════════════════════════
   SIDEBAR
   ═══════════════════════════════════════════ */

.joy-shop-sidebar {
    position: sticky;
    top: 160px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.joy-sidebar-block {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.joy-sidebar-label {
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .14em;
    color: var(--joy-muted);
}

/* Search */
.joy-search-wrap {
    position: relative;
}

.joy-search-ico {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--joy-muted);
    pointer-events: none;
}

.joy-search-input {
    width: 100%;
    padding: 12px 14px 12px 42px;
    border: 1.5px solid var(--joy-v100);
    border-radius: 12px;
    background: var(--joy-bg-white);
    font-family: var(--joy-font-main);
    font-size: .85rem;
    color: var(--joy-ink);
    transition: border-color var(--joy-transition);
    outline: none;
}

.joy-search-input::placeholder {
    color: var(--joy-muted);
    opacity: .6;
}

.joy-search-input:focus {
    border-color: var(--joy-v400);
}

/* Category Filters */
.joy-filter-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.joy-filter-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border: none;
    border-radius: 10px;
    background: transparent;
    font-family: var(--joy-font-main);
    font-size: .84rem;
    font-weight: 500;
    color: var(--joy-muted);
    cursor: pointer;
    transition: all var(--joy-transition);
    text-align: left;
    width: 100%;
}

.joy-filter-btn:hover {
    background: var(--joy-v50);
    color: var(--joy-ink);
}

.joy-filter-btn.is-active {
    background: var(--joy-v100);
    color: var(--joy-v600);
    font-weight: 600;
}


/* ═══════════════════════════════════════════
   TOOLBAR
   ═══════════════════════════════════════════ */

.joy-shop-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.joy-shop-count {
    font-size: .82rem;
    color: var(--joy-muted);
    font-weight: 400;
}

.joy-sort-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.joy-sort-label {
    font-size: .78rem;
    color: var(--joy-muted);
    font-weight: 500;
}

.joy-sort-select {
    padding: 8px 14px;
    border: 1.5px solid var(--joy-v100);
    border-radius: 10px;
    background: var(--joy-bg-white);
    font-family: var(--joy-font-main);
    font-size: .82rem;
    color: var(--joy-ink);
    cursor: pointer;
    outline: none;
    transition: border-color var(--joy-transition);
}

.joy-sort-select:focus {
    border-color: var(--joy-v400);
}


/* ═══════════════════════════════════════════
   PRODUCT GRID
   ═══════════════════════════════════════════ */

.joy-shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

/* ─── Product Card ─── */
.joy-product-card {
    display: flex;
    flex-direction: column;
    background: var(--joy-bg-white);
    border-radius: 20px;
    border: 1.5px solid transparent;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: all .45s cubic-bezier(.76, 0, .24, 1);
}

.joy-product-card:hover {
    transform: translateY(-5px);
    border-color: var(--joy-v200);
    box-shadow: 0 20px 50px rgba(13, 148, 136, .08);
}

/* Thumbnail */
.joy-card-thumb {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--joy-v50);
}

.joy-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s cubic-bezier(.76, 0, .24, 1);
}

.joy-product-card:hover .joy-card-thumb img {
    transform: scale(1.05);
}

.joy-card-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--joy-v300);
}

/* Card Body */
.joy-card-body {
    padding: 20px 22px 0;
    flex: 1;
}

.joy-card-cat {
    display: inline-block;
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--joy-v500);
    margin-bottom: 8px;
}

.joy-card-title {
    font-family: var(--joy-font-serif);
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--joy-ink);
    margin-bottom: 6px;
}

.joy-card-desc {
    font-size: .82rem;
    color: var(--joy-muted);
    line-height: 1.6;
    font-weight: 300;
}

/* Card Footer */
.joy-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 22px 20px;
}

.joy-card-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 14px;
    border-radius: 50px;
    font-size: .76rem;
    font-weight: 600;
}

.joy-badge-price {
    background: var(--joy-v100);
    color: var(--joy-v600);
}

.joy-badge-config {
    background: rgba(13, 148, 136, .08);
    color: var(--joy-v500);
}

.joy-badge-quote {
    background: var(--joy-v50);
    color: var(--joy-muted);
}

.joy-card-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--joy-v50);
    color: var(--joy-v400);
    transition: all .35s;
}

.joy-product-card:hover .joy-card-arrow {
    background: var(--joy-v600);
    color: #fff;
}


/* ═══════════════════════════════════════════
   EMPTY STATE
   ═══════════════════════════════════════════ */

.joy-shop-empty {
    text-align: center;
    padding: clamp(60px, 8vw, 100px) 24px;
}

.joy-empty-ico {
    color: var(--joy-v300);
    margin-bottom: 20px;
}

.joy-empty-title {
    font-family: var(--joy-font-serif);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--joy-ink);
    margin-bottom: 8px;
}

.joy-empty-desc {
    font-size: .9rem;
    color: var(--joy-muted);
    font-weight: 300;
    margin-bottom: 24px;
}

.joy-empty-reset {
    display: inline-flex;
    align-items: center;
    padding: 12px 28px;
    border-radius: 60px;
    border: 1.5px solid var(--joy-v200);
    background: transparent;
    font-family: var(--joy-font-main);
    font-size: .86rem;
    font-weight: 600;
    color: var(--joy-v600);
    cursor: pointer;
    transition: all .35s;
}

.joy-empty-reset:hover {
    background: var(--joy-v600);
    color: #fff;
    border-color: var(--joy-v600);
}


/* ═══ MOBILE ═══ */
@media (max-width: 921px) {
    .joy-shop-layout {
        grid-template-columns: 1fr;
    }

    .joy-shop-sidebar {
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 16px;
    }

    .joy-sidebar-block {
        flex: 1;
        min-width: 200px;
    }

    .joy-filter-list {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px;
    }

    .joy-filter-btn {
        padding: 8px 14px;
        border-radius: 50px;
        font-size: .78rem;
        width: auto;
    }
}

@media (max-width: 768px) {
    #joy-shop-page {
        padding-top: 120px;
    }

    .joy-shop-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .joy-shop-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ═══ DESKTOP MARE ═══ */
@media (min-width: 1400px) {
    .joy-shop-container {
        max-width: 1400px;
    }

    .joy-shop-layout {
        grid-template-columns: 280px 1fr;
    }
}
