/*
 * Modern WooCommerce Shop / Category UI v3.11.0
 * Archive-only. Uses existing TT primary colour bridge and card state machine.
 */
:root {
    --tt-shop-bg: #f5f7fb;
    --tt-shop-surface: #fff;
    --tt-shop-text: #111827;
    --tt-shop-muted: #697386;
    --tt-shop-line: #e4e9f1;
    --tt-shop-soft: #f8fafc;
    --tt-shop-radius: 14px;
    --tt-shop-shadow: 0 10px 32px rgba(15, 23, 42, .06);
}

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

.tt-shop {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: clip;
    background: var(--tt-shop-bg);
    color: var(--tt-shop-text);
}

.tt-shop-container {
    margin-inline: auto;
    min-width: 0;
}

.tt-shop-head {
    padding: 15px 0 18px;
    background: #fff;
    border-bottom: 1px solid var(--tt-shop-line);
}

.tt-shop-breadcrumb {
    min-height: 22px;
    margin-bottom: 10px;
    color: #8a93a3;
    font-size: 13px;
}
.tt-shop-breadcrumb .woocommerce-breadcrumb { margin: 0; color: inherit; font-size: inherit; }
.tt-shop-breadcrumb a { color: #667085; text-decoration: none; }
.tt-shop-breadcrumb a:hover { color: var(--tt-primary); }
.tt-shop-breadcrumb__sep { margin: 0 7px; color: #c2c8d0; }

.tt-shop-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
    gap: 20px;
    min-height: 124px;
    padding: 22px 24px;
    overflow: hidden;
    border: 1px solid var(--tt-shop-line);
    border-radius: 18px;
    background:
        radial-gradient(circle at 86% 8%, var(--tt-primary-softer, rgba(220,38,38,.07)) 0, transparent 32%),
        linear-gradient(135deg, #fff 0%, #fbfcff 100%);
    box-shadow: 0 10px 30px rgba(15,23,42,.04);
}
.tt-shop-hero.has-image { grid-template-columns: minmax(0, 1fr) 170px; }
.tt-shop-hero__content { min-width: 0; }
.tt-shop-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    margin-bottom: 7px;
    padding: 4px 9px;
    border-radius: 999px;
    background: var(--tt-primary-soft, #fff1f1);
    color: var(--tt-primary);
    font-size: 13px;
    font-weight: 700;
}
.tt-shop-hero h1 {
    margin: 0 0 9px !important;
    color: var(--tt-shop-text) !important;
    font-size: 18px !important;
    font-weight: 800;
    line-height: 1.28;
}
.tt-shop-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px 16px;
    color: var(--tt-shop-muted);
    font-size: 13px;
}
.tt-shop-hero__meta span { display: inline-flex; align-items: center; gap: 5px; }
.tt-shop-hero__meta span::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--tt-primary);
}
.tt-shop-hero__image {
    display: grid;
    place-items: center;
    align-self: stretch;
    max-height: 126px;
    overflow: hidden;
    border-radius: 13px;
    background: #fff;
}
.tt-shop-hero__image img {
    display: block;
    width: 100%;
    height: 100%;
    max-height: 126px;
    object-fit: contain;
}

.tt-shop-category-rail {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    padding: 2px 1px 4px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}
.tt-shop-category {
    display: grid;
    grid-template-columns: 50px minmax(106px, 1fr);
    align-items: center;
    flex: 0 0 auto;
    min-width: 176px;
    min-height: 62px;
    padding: 6px 10px 6px 6px;
    border: 1px solid var(--tt-shop-line);
    border-radius: 12px;
    background: #fff;
    color: var(--tt-shop-text) !important;
    text-decoration: none !important;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.tt-shop-category:hover,
.tt-shop-category.is-active {
    border-color: var(--tt-primary);
    box-shadow: 0 7px 18px rgba(15,23,42,.07);
    transform: translateY(-1px);
}
.tt-shop-category__media {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    overflow: hidden;
    border-radius: 9px;
    background: #f5f7fa;
}
.tt-shop-category__img { display: block; width: 100%; height: 100%; object-fit: contain; }
.tt-shop-category__fallback { color: var(--tt-primary); font-size: 18px; }
.tt-shop-category__body { display: flex; flex-direction: column; min-width: 0; padding-left: 8px; }
.tt-shop-category__body strong {
    max-width: 140px;
    overflow: hidden;
    color: var(--tt-shop-text);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tt-shop-category__body small { margin-top: 2px; color: #8b95a7; font-size: 13px; }

.tt-shop-body { padding: 18px 0 56px; }
.tt-shop-layout {
    display: grid;
    grid-template-columns: 236px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.tt-shop-filter {
    position: sticky;
    top: 18px;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--tt-shop-line);
    border-radius: var(--tt-shop-radius);
    background: #fff;
    box-shadow: var(--tt-shop-shadow);
}
.tt-shop-filter__mobile-head { display: none; }
.tt-shop-filter__form { padding: 15px; }
.tt-shop-filter__group {
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--tt-shop-line);
}
.tt-shop-filter__title {
    display: block;
    margin-bottom: 9px;
    color: var(--tt-shop-text);
    font-size: 14px;
    font-weight: 750;
}
.tt-shop-filter__search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 38px;
    height: 38px;
    overflow: hidden;
    border: 1px solid #dce2ea;
    border-radius: 10px;
    background: #fff;
}
.tt-shop-filter__search:focus-within { border-color: var(--tt-primary); box-shadow: 0 0 0 3px var(--tt-primary-softer, rgba(220,38,38,.08)); }
.tt-shop-filter__search input {
    min-width: 0;
    height: 36px !important;
    margin: 0 !important;
    padding: 0 10px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    font-size: 13px !important;
}
.tt-shop-filter__search button {
    display: grid !important;
    place-items: center;
    width: 38px !important;
    min-width: 38px !important;
    height: 36px !important;
    min-height: 36px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: var(--tt-shop-text) !important;
    box-shadow: none !important;
    font-size: 18px !important;
    transform: none !important;
}

.tt-shop-radio,
.tt-shop-check {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 31px;
    margin: 0;
    color: #505a6a;
    font-size: 13px;
    cursor: pointer;
}
.tt-shop-radio input,
.tt-shop-check input { width: 15px; height: 15px; margin: 0; accent-color: var(--tt-primary); }
.tt-shop-price-range { display: grid; grid-template-columns: 1fr; gap: 8px; }
.tt-shop-price-range label { display: grid; grid-template-columns: 32px minmax(0,1fr); align-items: center; gap: 6px; color: #7a8493; font-size: 13px; }
.tt-shop-price-range input {
    width: 100%;
    height: 36px !important;
    margin: 0 !important;
    padding: 0 9px !important;
    border: 1px solid #dce2ea !important;
    border-radius: 9px !important;
    background: #fff !important;
    box-shadow: none !important;
    font-size: 13px !important;
}
.tt-shop-filter__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 13px; }
.tt-shop-apply,
.tt-shop-reset {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 38px !important;
    margin: 0 !important;
    padding: 8px 9px !important;
    border-radius: 9px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    transform: none !important;
}
.tt-shop-apply { border: 1px solid var(--tt-primary) !important; background: var(--tt-primary) !important; color: var(--tt-on-primary,#fff) !important; }
.tt-shop-reset { border: 1px solid var(--tt-shop-line) !important; background: #fff !important; color: #596273 !important; }
.tt-shop-reset:hover { border-color: var(--tt-primary) !important; color: var(--tt-primary) !important; }

.tt-shop-content { min-width: 0; }
.tt-shop-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 54px;
    margin-bottom: 13px;
    padding: 8px 12px;
    border: 1px solid var(--tt-shop-line);
    border-radius: 12px;
    background: #fff;
}
.tt-shop-toolbar__result { display: flex; align-items: baseline; gap: 5px; color: #7a8493; font-size: 13px; }
.tt-shop-toolbar__result strong { color: var(--tt-shop-text); font-size: 15px; }
.tt-shop-toolbar__right { display: flex; align-items: center; gap: 7px; }
.tt-shop-sort-label { color: #8b95a7; font-size: 13px; }
.tt-shop .woocommerce-ordering { margin: 0 !important; }
.tt-shop .woocommerce-ordering select {
    min-width: 180px;
    height: 36px !important;
    margin: 0 !important;
    padding: 0 32px 0 10px !important;
    border: 1px solid #dce2ea !important;
    border-radius: 9px !important;
    background-color: #fff !important;
    box-shadow: none !important;
    color: #3e4857;
    font-size: 13px !important;
}

.tt-shop-grid {
    display: grid;
    grid-template-columns: repeat(var(--tt-shop-cols-desktop, 4), minmax(0,1fr));
    gap: 14px;
    min-width: 0;
}
.tt-shop-grid > .tt-card { min-width: 0; box-shadow: 0 5px 18px rgba(15,23,42,.055); }
.tt-shop-grid .tt-card__body { padding: 12px; }
.tt-shop-grid .tt-card__title { font-size: 15px !important; }
.tt-shop-grid .tt-card__summary { font-size: 13px !important; -webkit-line-clamp: 2; }
.tt-shop-grid .tt-card__price-current,
.tt-shop-grid .tt-card__price-current .woocommerce-Price-amount { font-size: 17px !important; }
.tt-shop-grid .tt-card__actions { gap: 7px; }
.tt-shop-grid .tt-card__btn { min-height: 38px; padding: 8px 7px; font-size: 13px; }

.tt-shop-pagination { margin-top: 22px; }
.tt-shop-pagination ul.page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 0;
    border: 0;
    list-style: none;
}
.tt-shop-pagination .page-numbers li { margin: 0; border: 0; }
.tt-shop-pagination a.page-numbers,
.tt-shop-pagination span.page-numbers {
    display: inline-grid;
    place-items: center;
    min-width: 36px;
    height: 36px;
    padding: 0 9px;
    border: 1px solid var(--tt-shop-line);
    border-radius: 9px;
    background: #fff;
    color: #536071;
    font-size: 13px;
    text-decoration: none;
}
.tt-shop-pagination span.current,
.tt-shop-pagination a.page-numbers:hover { border-color: var(--tt-primary); background: var(--tt-primary); color: var(--tt-on-primary,#fff); }

.tt-shop-seo {
    margin-top: 24px;
    overflow: hidden;
    border: 1px solid var(--tt-shop-line);
    border-radius: 13px;
    background: #fff;
}
.tt-shop-seo summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 48px;
    padding: 11px 14px;
    color: var(--tt-shop-text);
    font-size: 14px;
    font-weight: 750;
    cursor: pointer;
    list-style: none;
}
.tt-shop-seo summary::-webkit-details-marker { display: none; }
.tt-shop-seo__plus { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--tt-shop-soft); color: var(--tt-primary); font-size: 18px; transition: transform .18s ease; }
.tt-shop-seo[open] .tt-shop-seo__plus { transform: rotate(45deg); }
.tt-shop-seo__content { padding: 0 14px 15px; border-top: 1px solid var(--tt-shop-line); color: #5f6978; font-size: 14px; line-height: 1.7; }
.tt-shop-seo__content > :last-child { margin-bottom: 0; }
.tt-shop-seo__content img,
.tt-shop-seo__content iframe,
.tt-shop-seo__content table { max-width: 100%; }
.tt-shop-seo__content table { display: block; overflow-x: auto; }

.tt-shop-empty {
    display: grid;
    place-items: center;
    min-height: 330px;
    padding: 30px;
    border: 1px dashed #d8dee8;
    border-radius: 15px;
    background: #fff;
    text-align: center;
}
.tt-shop-empty__icon { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: var(--tt-primary-soft,#fff1f1); color: var(--tt-primary); font-size: 18px; }
.tt-shop-empty h2 { margin: 10px 0 4px !important; font-size: 17px !important; }
.tt-shop-empty p { margin: 0 0 11px; color: var(--tt-shop-muted); font-size: 13px; }
.tt-shop-empty a { display: inline-flex; align-items: center; min-height: 36px; padding: 7px 12px; border: 1px solid var(--tt-primary); border-radius: 9px; color: var(--tt-primary); font-size: 13px; font-weight: 700; text-decoration: none; }

.tt-shop-mobile-tools { display: none; }
.tt-shop-filter-backdrop { display: none; }

@media (max-width: 1079px) and (min-width: 850px) {
    .tt-shop-layout { grid-template-columns: 220px minmax(0,1fr); gap: 14px; }
    .tt-shop-grid { grid-template-columns: repeat(var(--tt-shop-cols-tablet, 3), minmax(0,1fr)); }
}

@media (max-width: 849px) {
    html.tt-shop-filter-opened,
    html.tt-shop-filter-opened body { overflow: hidden !important; }
    .tt-shop-head { padding-top: 10px; }
    .tt-shop-breadcrumb { margin-bottom: 7px; font-size: 12.5px; }
    .tt-shop-hero,
    .tt-shop-hero.has-image { grid-template-columns: minmax(0,1fr); min-height: 0; padding: 15px; border-radius: 14px; }
    .tt-shop-hero__image { display: none; }
    .tt-shop-hero h1 { font-size: 17px !important; }
    .tt-shop-hero__meta { gap: 5px 11px; }
    .tt-shop-category { min-width: 158px; grid-template-columns: 44px minmax(100px,1fr); min-height: 56px; }
    .tt-shop-category__media { width: 40px; height: 40px; }
    .tt-shop-category__body strong { font-size: 13px; max-width: 118px; }
    .tt-shop-category__body small { font-size: 12px; }

    .tt-shop-body { padding: 11px 0 90px; }
    .tt-shop-layout { display: block; }
    .tt-shop-mobile-tools {
        display: grid;
        grid-template-columns: 104px minmax(0,1fr);
        gap: 8px;
        margin-bottom: 10px;
    }
    .tt-shop-filter-open {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        gap: 6px;
        min-height: 38px !important;
        margin: 0 !important;
        padding: 7px 10px !important;
        border: 1px solid var(--tt-shop-line) !important;
        border-radius: 9px !important;
        background: #fff !important;
        color: var(--tt-shop-text) !important;
        box-shadow: none !important;
        font-size: 13px !important;
        font-weight: 700 !important;
        transform: none !important;
    }
    .tt-shop-mobile-sort .woocommerce-ordering { width: 100%; }
    .tt-shop-mobile-sort .woocommerce-ordering select { width: 100%; min-width: 0; height: 38px !important; }
    .tt-shop-toolbar { display: none; }

    .tt-shop-filter {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 100100;
        width: min(330px, 88vw);
        max-width: 88vw;
        overflow-y: auto;
        border: 0;
        border-radius: 0 16px 16px 0;
        box-shadow: 16px 0 50px rgba(15,23,42,.18);
        transform: translateX(-105%);
        transition: transform .24s ease;
    }
    .tt-shop-filter.is-open { transform: translateX(0); }
    .tt-shop-filter__mobile-head {
        position: sticky;
        top: 0;
        z-index: 2;
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-height: 52px;
        padding: 10px 14px;
        border-bottom: 1px solid var(--tt-shop-line);
        background: #fff;
    }
    .tt-shop-filter__mobile-head strong { font-size: 15px; }
    .tt-shop-filter__mobile-head button {
        display: grid !important;
        place-items: center;
        width: 32px !important;
        height: 32px !important;
        min-height: 32px !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 8px !important;
        background: #f4f6f8 !important;
        color: var(--tt-shop-text) !important;
        box-shadow: none !important;
        font-size: 18px !important;
        transform: none !important;
    }
    .tt-shop-filter-backdrop {
        position: fixed;
        inset: 0;
        z-index: 100090;
        display: block;
        background: rgba(15,23,42,.38);
        backdrop-filter: blur(2px);
    }
    .tt-shop-filter-backdrop[hidden] { display: none !important; }

    .tt-shop-grid { grid-template-columns: repeat(var(--tt-shop-cols-mobile, 2), minmax(0,1fr)); gap: 10px; }
    .tt-shop-grid .tt-card__body { padding: 9px; }
    .tt-shop-grid .tt-card__title { font-size: 14px !important; }
    .tt-shop-grid .tt-card__summary { display: none; }
    .tt-shop-grid .tt-card__price-current,
    .tt-shop-grid .tt-card__price-current .woocommerce-Price-amount { font-size: 16px !important; }
    .tt-shop-grid .tt-card__actions { grid-template-columns: 1fr; }
    .tt-shop-grid .tt-card__btn { min-height: 35px; font-size: 12.5px; }
    .tt-shop-grid .tt-card__btn--outline { display: none; }
    .tt-shop-pagination { margin-top: 16px; }
    .tt-shop-seo { margin-top: 16px; }
}

@media (max-width: 380px) {
    .tt-shop-grid { gap: 7px; }
    .tt-shop-grid .tt-card__body { padding: 8px; }
    .tt-shop-grid .tt-card__title { font-size: 13px !important; }
    .tt-shop-grid .tt-card__price-current,
    .tt-shop-grid .tt-card__price-current .woocommerce-Price-amount { font-size: 15px !important; }
}

@media (prefers-reduced-motion: reduce) {
    .tt-shop-category,
    .tt-shop-filter,
    .tt-shop-seo__plus { transition: none !important; transform: none !important; }
}


/* v3.11.2 — clean archive chrome requested by user. */
.tt-shop-breadcrumb,
.tt-shop-mobile-tools,
.tt-shop-toolbar,
.tt-shop .woocommerce-result-count,
.tt-shop .woocommerce-ordering,
body.post-type-archive-product .shop-page-title,
body.tax-product_cat .shop-page-title,
body.tax-product_tag .shop-page-title,
body.post-type-archive-product .category-filtering,
body.tax-product_cat .category-filtering,
body.tax-product_tag .category-filtering,
body.post-type-archive-product .filter-button,
body.tax-product_cat .filter-button,
body.tax-product_tag .filter-button {
    display: none !important;
}

/* Category cards show only image + name, never product counts. */
.tt-shop-category__body small,
.tt-shop-category .count,
.product-category .count,
.woocommerce-loop-category__title .count {
    display: none !important;
}
.tt-shop-category__body {
    justify-content: center;
}
.tt-shop-category__body strong {
    max-width: 160px;
}

/* Remove the space previously reserved for breadcrumb/toolbar. */
.tt-shop-head { padding-top: 12px; }
.tt-shop-content { padding-top: 0; }

@media (max-width: 849px) {
    /* No top filter/sort chrome on mobile. The product grid starts directly below category rail/hero. */
    .tt-shop-mobile-tools,
    .tt-shop-toolbar { display: none !important; }
    .tt-shop-body { padding-top: 10px; }
}

/* Also suppress Flatsome/WooCommerce archive chrome if a legacy hook prints outside .tt-shop. */
body.post-type-archive-product .woocommerce-result-count,
body.tax-product_cat .woocommerce-result-count,
body.tax-product_tag .woocommerce-result-count,
body.post-type-archive-product .woocommerce-ordering,
body.tax-product_cat .woocommerce-ordering,
body.tax-product_tag .woocommerce-ordering,
body.post-type-archive-product .category-filter-row,
body.tax-product_cat .category-filter-row,
body.tax-product_tag .category-filter-row,
body.post-type-archive-product .category-filtering,
body.tax-product_cat .category-filtering,
body.tax-product_tag .category-filtering {
    display: none !important;
}


/* v3.11.4 — inherit Flatsome content width instead of forcing a second container width. */
.tt-shop .tt-shop-container.container {
    min-width: 0;
}
.tt-shop-layout,
.tt-shop-content,
.tt-shop-grid,
.tt-shop-grid > * {
    max-width: 100%;
    min-width: 0;
}
@media (min-width: 1080px) {
    .tt-shop-grid {
        grid-template-columns: repeat(var(--tt-shop-cols-desktop, 4), minmax(0, 1fr));
    }
}


/* v3.11.5 - Shop/category card width safety */
.tt-shop-grid {
    width: 100%;
    max-width: 100%;
    overflow: visible;
}
.tt-shop-grid > .tt-card,
.tt-shop-grid .tt-card__body,
.tt-shop-grid .tt-card__actions {
    min-width: 0 !important;
    max-width: 100% !important;
}
.tt-shop-grid .tt-card__actions > * {
    min-width: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
}
.tt-shop-grid .tt-call-order-button__text strong {
    white-space: normal !important;
    font-size: 12px !important;
}

/* Very dense 5-6 column desktop layouts use slightly smaller CTA spacing. */
@media (min-width: 1180px) {
    .tt-shop-grid .tt-card__actions { gap: 6px; }
    .tt-shop-grid .tt-card__btn,
    .tt-shop-grid .tt-call-order-button.tt-card__btn--call {
        padding-inline: 6px !important;
    }
}
