/*
 * Boutique Tizara — expérience shopping mobile-first.
 * Chargé uniquement sur templates/shop-page.php.
 */

.tizara-shop-main,
.tizara-shop-main * { box-sizing: border-box; }

.tizara-shop-main {
    min-height: 75vh;
    padding-top: var(--header-h, 52px);
    padding-bottom: 28px;
    background: #f5f7f6;
    color: #173e38;
}

.tizara-shop-hero {
    position: relative;
    overflow: hidden;
    padding: 15px 0 22px;
    background:
        radial-gradient(circle at 93% 5%, rgba(255, 255, 255, .18) 0 78px, transparent 79px),
        linear-gradient(135deg, #073f39 0%, #08695e 58%, #0b8172 100%);
    color: #fff;
}
.tizara-shop-breadcrumb {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 15px;
    color: rgba(255, 255, 255, .72);
    font-size: .69rem;
    font-weight: 700;
}
.tizara-shop-breadcrumb a { color: #fff; text-decoration: none; }
.tizara-shop-hero-copy {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
}
.tizara-shop-eyebrow {
    display: block;
    margin-bottom: 5px;
    color: #9ce2d5;
    font-size: .66rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.tizara-shop-hero h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(1.55rem, 6.3vw, 2.6rem);
    font-weight: 850;
    line-height: 1.08;
    letter-spacing: -.035em;
}
.tizara-shop-hero p {
    max-width: 680px;
    margin: 8px 0 0;
    color: rgba(255, 255, 255, .81);
    font-size: clamp(.77rem, 2.8vw, .93rem);
    line-height: 1.5;
}
.tizara-shop-total {
    min-width: 76px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    color: rgba(255, 255, 255, .72);
    font-size: .65rem;
    font-weight: 700;
    white-space: nowrap;
}
.tizara-shop-total strong {
    color: #fff;
    font-size: 1.45rem;
    line-height: 1;
}

.tizara-shop-category-shell {
    position: sticky;
    z-index: 60;
    top: var(--header-h, 52px);
    border-bottom: 1px solid #dfe8e5;
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 5px 16px rgba(6, 70, 61, .055);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.tizara-shop-categories {
    display: flex;
    align-items: stretch;
    gap: 3px;
    margin-inline: -8px;
    padding: 7px 8px 5px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.tizara-shop-categories::-webkit-scrollbar { display: none; }
.tizara-shop-category {
    min-width: 68px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 5px 7px 7px;
    scroll-snap-align: start;
    border-bottom: 2px solid transparent;
    color: #45645f;
    font-size: .66rem;
    font-weight: 750;
    line-height: 1.1;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    transition: color .18s ease, border-color .18s ease;
}
.tizara-shop-category-icon {
    width: 35px;
    height: 35px;
    display: grid;
    place-items: center;
    border: 1px solid #dfeae7;
    border-radius: 50%;
    background: #f1f7f5;
    font-size: 1rem;
    transition: transform .18s ease, background .18s ease;
}
.tizara-shop-category:hover,
.tizara-shop-category.active { color: #075d53; border-bottom-color: #087a68; }
.tizara-shop-category:hover .tizara-shop-category-icon,
.tizara-shop-category.active .tizara-shop-category-icon {
    border-color: #087a68;
    background: #e5f6f1;
    transform: translateY(-1px);
}

.tizara-shop-products-section { padding-top: 13px; }
.tizara-shop-toolbar {
    min-height: 46px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    padding: 8px 10px;
    border: 1px solid #e1e9e7;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(7, 76, 66, .045);
}
.tizara-shop-results {
    min-width: 0;
    display: flex;
    align-items: baseline;
    gap: 5px;
    color: #71837f;
    font-size: .69rem;
    font-weight: 650;
}
.tizara-shop-results strong { color: #173e38; font-size: .9rem; }
.tizara-shop-filter-toggle {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 10px;
    border: 1px solid #c8ddd8;
    border-radius: 9px;
    background: #fff;
    color: #075d53;
    font: inherit;
    font-size: .7rem;
    font-weight: 800;
    cursor: pointer;
}
.tizara-shop-filter-toggle svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
}
.tizara-shop-filter-toggle b {
    min-width: 19px;
    height: 19px;
    display: grid;
    place-items: center;
    padding-inline: 5px;
    border-radius: 999px;
    background: #087a68;
    color: #fff;
    font-size: .62rem;
}
.tizara-shop-filter-toggle:focus-visible,
.tizara-shop-filter-close:focus-visible,
.tizara-shop-filter-footer a:focus-visible,
.tizara-shop-filter-footer button:focus-visible {
    outline: 3px solid rgba(8, 122, 104, .28);
    outline-offset: 2px;
}

.tizara-shop-grid.products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding-bottom: 0;
}
.tizara-shop-grid .product-card {
    min-width: 0;
    display: flex;
    flex-direction: column;
    border: 1px solid #e3eae8;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 3px 12px rgba(8, 65, 57, .045);
}
.tizara-shop-grid .product-card .product-image { padding-top: 128%; }
.tizara-shop-grid .product-card .product-info {
    flex: 1;
    padding: 8px 8px 9px;
}
.tizara-shop-grid .product-card .product-title {
    min-height: 2.55em;
    margin: 0 0 5px;
    color: #203e39;
    font-size: .72rem;
    font-weight: 550;
}
.tizara-shop-grid .product-card .product-title a { color: inherit; text-decoration: none; }
.tizara-shop-grid .product-card .product-price,
.tizara-shop-grid .product-card .product-price .amount {
    color: #087a68;
    font-size: .83rem;
    font-weight: 850;
}
.tizara-shop-grid .product-card .product-price del,
.tizara-shop-grid .product-card .product-price del .amount {
    color: #96a49f;
    font-size: .65rem;
    font-weight: 600;
}
.tizara-shop-grid .product-card .add-cart-btn {
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 7px 6px;
    border-radius: 0;
    background: #08544c;
    color: #fff;
    font-size: .67rem;
    font-weight: 800;
    line-height: 1.2;
    text-decoration: none;
}
.tizara-shop-grid .product-card .wishlist-btn {
    width: 31px;
    height: 31px;
    top: 7px;
    right: 7px;
    border: 1px solid rgba(8, 84, 76, .08);
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 3px 10px rgba(0, 0, 0, .1);
    font-size: .97rem;
}

.tizara-shop-pagination { margin-top: 25px; }
.tizara-shop-pagination ul {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.tizara-shop-pagination a,
.tizara-shop-pagination span.page-numbers {
    min-width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    padding: 0 9px;
    border: 1px solid #dce7e4;
    border-radius: 9px;
    background: #fff;
    color: #385852;
    font-size: .76rem;
    font-weight: 800;
    text-decoration: none;
}
.tizara-shop-pagination span.current {
    border-color: #08544c;
    background: #08544c;
    color: #fff;
}

.tizara-shop-empty,
.tizara-shop-unavailable {
    min-height: 330px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 42px 22px;
    color: #687d78;
    text-align: center;
}
.tizara-shop-empty > span {
    width: 62px;
    height: 62px;
    display: grid;
    place-items: center;
    margin-bottom: 12px;
    border-radius: 50%;
    background: #e5f3ef;
    color: #087a68;
    font-size: 2rem;
}
.tizara-shop-empty h2,
.tizara-shop-unavailable h1 { margin: 0 0 7px; color: #173e38; font-size: 1.2rem; }
.tizara-shop-empty p,
.tizara-shop-unavailable p { max-width: 420px; margin: 0 0 17px; font-size: .82rem; line-height: 1.5; }
.tizara-shop-empty a {
    display: inline-flex;
    padding: 10px 16px;
    border-radius: 9px;
    background: #08544c;
    color: #fff;
    font-size: .76rem;
    font-weight: 800;
    text-decoration: none;
}

/* Panneau de filtres plein écran */
body.tizara-shop-filter-open { overflow: hidden; }
body.tizara-shop-filter-open .mobile-nav { visibility: hidden; pointer-events: none; }
.tizara-shop-filter-overlay {
    position: fixed;
    inset: 0;
    z-index: 28000;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s ease, visibility .22s ease;
}
.tizara-shop-filter-overlay.active {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}
.tizara-shop-filter-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 22, 19, .68);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}
.tizara-shop-filter-panel {
    position: absolute;
    z-index: 1;
    inset: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #f6f8f7;
    transform: translateY(28px);
    transition: transform .28s cubic-bezier(.2, .75, .3, 1);
}
.tizara-shop-filter-overlay.active .tizara-shop-filter-panel { transform: translateY(0); }
.tizara-shop-filter-header {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: max(13px, env(safe-area-inset-top)) max(18px, calc((100vw - 980px) / 2 + 18px)) 13px;
    border-bottom: 1px solid #dfe7e5;
    background: #fff;
}
.tizara-shop-filter-header span {
    display: block;
    margin-bottom: 2px;
    color: #70847f;
    font-size: .65rem;
    font-weight: 700;
}
.tizara-shop-filter-header h2 {
    margin: 0;
    color: #143d36;
    font-size: 1.15rem;
    font-weight: 850;
}
.tizara-shop-filter-close {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    padding: 0;
    border: 1px solid #d9e4e1;
    border-radius: 50%;
    background: #f7faf9;
    color: #224841;
    font: inherit;
    font-size: 1.7rem;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
}
.tizara-shop-filter-form {
    min-height: 0;
    display: flex;
    flex: 1;
    flex-direction: column;
}
.tizara-shop-filter-content {
    width: 100%;
    max-width: 980px;
    min-height: 0;
    flex: 1;
    margin-inline: auto;
    padding: 18px;
    overflow-y: auto;
    overscroll-behavior: contain;
}
.tizara-filter-group {
    margin: 0 0 14px;
    padding: 16px;
    border: 1px solid #dfe8e5;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(8, 69, 61, .035);
}
.tizara-filter-group legend,
.tizara-filter-select-label {
    display: block;
    margin: 0 0 12px;
    padding: 0;
    color: #173e38;
    font-size: .84rem;
    font-weight: 850;
}
.tizara-filter-category-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}
.tizara-filter-category-grid label,
.tizara-segmented-options label { position: relative; cursor: pointer; }
.tizara-filter-category-grid input,
.tizara-segmented-options input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}
.tizara-filter-category-grid label > span {
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    overflow: hidden;
    border: 1px solid #dce7e4;
    border-radius: 9px;
    background: #fbfcfc;
    color: #47645f;
    font-size: .7rem;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tizara-filter-category-grid i {
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #edf5f3;
    font-style: normal;
}
.tizara-filter-category-grid input:checked + span,
.tizara-filter-category-grid input:focus-visible + span {
    border-color: #087a68;
    background: #eaf7f3;
    color: #075d53;
    box-shadow: 0 0 0 2px rgba(8, 122, 104, .08);
}
.tizara-price-inputs {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: end;
    gap: 9px;
}
.tizara-price-inputs label > span {
    display: block;
    margin-bottom: 5px;
    color: #6c817c;
    font-size: .65rem;
    font-weight: 700;
}
.tizara-price-inputs input,
.tizara-filter-select-wrap select {
    width: 100%;
    min-height: 43px;
    padding: 9px 11px;
    border: 1px solid #cfddda;
    border-radius: 9px;
    outline: 0;
    background: #fff;
    color: #173e38;
    font: inherit;
    font-size: .78rem;
}
.tizara-price-inputs input:focus,
.tizara-filter-select-wrap select:focus { border-color: #087a68; box-shadow: 0 0 0 3px rgba(8, 122, 104, .1); }
.tizara-segmented-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
}
.tizara-segmented-options span {
    min-height: 40px;
    display: grid;
    place-items: center;
    padding: 7px;
    border: 1px solid #dce7e4;
    border-radius: 9px;
    background: #fbfcfc;
    color: #4c6964;
    font-size: .68rem;
    font-weight: 800;
    text-align: center;
}
.tizara-segmented-options input:checked + span,
.tizara-segmented-options input:focus-visible + span {
    border-color: #087a68;
    background: #087a68;
    color: #fff;
}
.tizara-filter-select-wrap { position: relative; }
.tizara-filter-select-wrap select { appearance: none; -webkit-appearance: none; padding-inline-end: 40px; }
.tizara-filter-select-wrap svg {
    position: absolute;
    top: 50%;
    inset-inline-end: 13px;
    width: 18px;
    height: 18px;
    transform: translateY(-50%);
    fill: none;
    stroke: #52706a;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
}
.tizara-shop-filter-footer {
    min-height: 72px;
    display: grid;
    grid-template-columns: minmax(120px, .35fr) minmax(180px, .65fr);
    gap: 10px;
    padding: 12px max(18px, calc((100vw - 980px) / 2 + 18px)) max(12px, env(safe-area-inset-bottom));
    border-top: 1px solid #dfe7e5;
    background: #fff;
    box-shadow: 0 -8px 24px rgba(6, 60, 53, .065);
}
.tizara-shop-filter-footer a,
.tizara-shop-filter-footer button {
    min-height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 10px;
    font: inherit;
    font-size: .77rem;
    font-weight: 850;
    text-decoration: none;
    cursor: pointer;
}
.tizara-shop-filter-footer a {
    border: 1px solid #bed3ce;
    background: #fff;
    color: #075d53;
}
.tizara-shop-filter-footer button {
    border: 1px solid #08544c;
    background: #08544c;
    color: #fff;
    box-shadow: 0 7px 18px rgba(8, 84, 76, .18);
}

[dir="rtl"] .tizara-shop-grid .product-card .wishlist-btn { right: auto; left: 7px; }

@media (min-width: 600px) {
    .tizara-shop-grid.products-grid { grid-template-columns: repeat(var(--tizara-shop-columns, 4), minmax(0, 1fr)); gap: 13px; }
    .tizara-filter-category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
    .tizara-shop-hero { padding-block: 22px 34px; }
    .tizara-shop-category { min-width: 83px; }
    .tizara-shop-category-icon { width: 42px; height: 42px; }
    .tizara-shop-products-section { padding-top: 19px; }
    .tizara-shop-toolbar { padding-inline: 14px; }
    .tizara-filter-category-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .tizara-shop-filter-content {
        display: grid;
        grid-template-columns: 1.1fr .9fr;
        align-content: start;
        gap: 14px;
        padding-top: 28px;
    }
    .tizara-filter-group { margin: 0; }
    .tizara-filter-group:first-child { grid-row: span 3; }
}
@media (max-width: 480px) {
    .tizara-shop-hero-copy { align-items: flex-start; }
    .tizara-shop-total { min-width: 58px; }
    .tizara-shop-total strong { font-size: 1.1rem; }
    .tizara-shop-results span { display: none; }
    .tizara-shop-toolbar { margin-inline: -2px; }
    .tizara-shop-grid.products-grid { margin-inline: -4px; }
    .tizara-shop-filter-content { padding: 12px; }
    .tizara-filter-group { padding: 13px; }
    .tizara-shop-filter-footer { grid-template-columns: .4fr .6fr; padding-inline: 12px; }
}
@media (prefers-reduced-motion: reduce) {
    .tizara-shop-filter-overlay,
    .tizara-shop-filter-panel,
    .tizara-shop-category,
    .tizara-shop-category-icon { transition: none !important; }
}
