/**
 * Basket storefront: template-owned EasyCommerce pages (shop, category,
 * product, cart). Loaded lazily by the com_easycommerce overrides.
 *
 * Bold big-box retail: a white canvas on hairline borders, rounded 16px
 * cards, pill controls, a red accent, a yellow deal chip and a green
 * savings colour. Gabarito display over a Nunito Sans body. Everything
 * derives from the token layer; the product-grid density comes straight
 * from --ec-grid.
 */

.ts-store {
    padding-block: calc(var(--ec-sect-y) / 2) var(--ec-sect-y);
}

/* Big rounded promo/story bands sit one step above the 16px card radius. */

/* Tertiary pill: sits between the accent .ts-btn and the outline variant. */
.ts-btn--soft {
    background: var(--ec-surface-2);
    color: var(--ec-fg);
    border: 1px solid transparent;
}

.ts-btn--soft:hover {
    background: var(--ec-border);
    color: var(--ec-fg);
}

/* Deal pill: the bright yellow call-to-action used on dark bands. */
.ts-btn--deal {
    background: var(--ec-deal);
    color: var(--ec-deal-fg);
    border: 1px solid transparent;
    font-weight: 800;
}

.ts-btn--deal:hover {
    filter: brightness(1.05);
    color: var(--ec-deal-fg);
}

/* ------------------------------------------------------------------ */
/* Badges: pill chips scoped to the store so the article-page badge     */
/* reuse in components.css is untouched.                                */

.ts-store .ts-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    font-family: var(--ec-font-body);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.02em;
    white-space: nowrap;
    background: var(--ec-surface-2);
    color: var(--ec-fg-2);
}

/* Flash-deal chip: the yellow discount flag. */
.ts-store .ts-badge--sale {
    background: var(--ec-deal);
    color: var(--ec-deal-fg);
}

/* Savings affirmative. */
.ts-store .ts-badge--save {
    background: var(--ec-save-soft);
    color: var(--ec-save);
}

.ts-store .ts-badge--type {
    background: var(--ec-accent-soft);
    color: var(--ec-accent);
}

.ts-store .ts-badge--stock {
    background: var(--ec-surface-2);
    color: var(--ec-fg-2);
}

/* ------------------------------------------------------------------ */
/* Hero: a red split promo band plus a deal card and a pickup card      */

.ts-hero {
    display: grid;
    /* minmax(0,...) floors the tracks so a wide promo image or the deal
       card art cannot push its column past its share. */
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: 16px;
    align-items: stretch;
    padding: clamp(1.25rem, 3vw, 1.5rem) 0 0;
}

/* No side content: the promo spans the full width on its own. */
.ts-hero--bare {
    grid-template-columns: 1fr;
}

/* The red promo panel. */
.ts-hero__promo {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    min-height: 340px;
    overflow: hidden;
    background: var(--ec-accent);
    color: var(--ec-accent-fg);
    border-radius: calc(var(--ec-radius) + 8px);
}

/* A configured hero image opens a second column for the artwork. */
.ts-hero--image .ts-hero__promo {
    grid-template-columns: 1.1fr 1fr;
}

.ts-hero__inner {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
    padding: clamp(28px, 3.5vw, 52px);
}

.ts-hero--center .ts-hero__inner {
    text-align: center;
    align-items: center;
}

/* Eyebrow drawn as a deal-yellow chip. */
.ts-hero__eyebrow {
    align-self: flex-start;
    margin: 0;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--ec-deal);
    color: var(--ec-deal-fg);
    font-family: var(--ec-font-body);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.ts-hero--center .ts-hero__eyebrow {
    align-self: center;
}

.ts-hero__title {
    margin: 0;
    font-family: var(--ec-font-display);
    font-size: clamp(30px, 3.6vw, 52px);
    font-weight: var(--ec-disp-weight);
    line-height: 1.02;
    letter-spacing: var(--ec-disp-tracking);
}

.ts-hero__desc {
    margin: 0;
    max-width: 360px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.55;
    color: color-mix(in oklab, var(--ec-accent-fg) 88%, transparent);
}

.ts-hero--center .ts-hero__desc {
    margin-inline: auto;
}

.ts-hero__ctas {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}

/* CTA on the red band: a white pill that warms to deal-yellow on hover. */
.ts-hero__cta.ts-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--ec-surface);
    color: var(--ec-accent);
    border: 1px solid transparent;
    font-weight: 800;
}

.ts-hero__cta.ts-btn:hover {
    background: var(--ec-deal);
    color: var(--ec-deal-fg);
    filter: none;
}

.ts-hero__cta svg {
    width: 16px;
    height: 16px;
    flex: none;
}

/* Promo artwork column. */
.ts-hero__media {
    position: relative;
}

.ts-hero__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}

/* The side stack: a deal card over a pickup card, equal height. */
.ts-hero__side {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.ts-hero__deal,
.ts-hero__pickup {
    display: flex;
    align-items: center;
    gap: 18px;
    flex: 1;
    min-width: 0;
    padding: 20px 24px;
    border-radius: calc(var(--ec-radius) + 4px);
    text-decoration: none;
    color: var(--ec-fg);
    transition: filter var(--ec-dur-2) var(--ec-ease), background var(--ec-dur-2) var(--ec-ease);
}

.ts-hero__deal {
    background: var(--ec-surface-2);
}

.ts-hero__deal:hover {
    background: var(--ec-accent-soft);
    color: var(--ec-fg);
}

.ts-hero__deal-media {
    width: 96px;
    height: 96px;
    flex: none;
    object-fit: cover;
    border-radius: var(--ec-img-radius);
    background: var(--ec-surface);
}

.ts-hero__deal-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.ts-hero__deal-name {
    font-family: var(--ec-font-display);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--ec-fg);
}

.ts-hero__deal-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.ts-hero__deal-amount {
    font-family: var(--ec-font-display);
    font-size: 19px;
    font-weight: var(--ec-disp-weight);
    color: var(--ec-accent);
}

.ts-hero__deal-price s {
    font-size: 13px;
    color: var(--ec-fg-2);
}

.ts-hero__pickup {
    background: var(--ec-save-soft);
    cursor: default;
}

.ts-hero__pickup-icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    flex: none;
    border-radius: 999px;
    background: var(--ec-save);
    color: #fff;
}

.ts-hero__pickup-icon svg {
    width: 24px;
    height: 24px;
}

.ts-hero__pickup-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.ts-hero__pickup-title {
    font-family: var(--ec-font-display);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--ec-fg);
}

.ts-hero__pickup-note {
    font-size: 13px;
    font-weight: 600;
    color: var(--ec-fg-2);
}

/* ------------------------------------------------------------------ */
/* Trust bar: a clean retail USP row of soft cards                      */

.ts-trustbar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: var(--ec-sect-y);
}

.ts-trustbar__item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 22px;
    background: var(--ec-surface-2);
    border-radius: var(--ec-radius);
}

.ts-trustbar__icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    flex: none;
    border-radius: 999px;
    background: var(--ec-surface);
    border: 1px solid var(--ec-border);
    color: var(--ec-accent);
}

.ts-trustbar__icon svg {
    width: 21px;
    height: 21px;
}

.ts-trustbar__text {
    font-family: var(--ec-font-body);
    font-size: 14px;
    font-weight: 800;
    line-height: 1.3;
    color: var(--ec-fg);
}

@media (max-width: 919.98px) {
    .ts-trustbar {
        grid-template-columns: 1fr;
    }
}

/* ------------------------------------------------------------------ */
/* Section rhythm and heads                                           */

.ts-store-section {
    margin-top: var(--ec-sect-y);
}

.ts-store-section__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1.25rem;
    margin-bottom: 28px;
}

.ts-store-section__heading {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    min-width: 0;
}

.ts-store-section__title {
    margin: 0;
    font-family: var(--ec-font-display);
    font-size: clamp(24px, 2.8vw, 34px);
    font-weight: var(--ec-disp-weight);
    letter-spacing: -0.02em;
    line-height: 1.1;
}

/* An "ends soon" flag beside the flash-deals title. */
.ts-store-section__deal {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 999px;
    background: var(--ec-deal);
    color: var(--ec-deal-fg);
    font-family: var(--ec-font-body);
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.ts-store-section__meta {
    font-family: var(--ec-font-body);
    font-size: 12px;
    font-weight: 700;
    color: var(--ec-fg-2);
}

.ts-store-section__link {
    font-size: 14px;
    font-weight: 800;
    color: var(--ec-accent);
    white-space: nowrap;
    transition: opacity var(--ec-dur-1) var(--ec-ease);
}

.ts-store-section__link:hover {
    opacity: 0.8;
}

/* Category and cart page heads */
.ts-store-header {
    margin-bottom: 2rem;
}

.ts-store-header__eyebrow {
    margin: 0 0 12px;
    font-family: var(--ec-font-body);
    font-size: 13px;
    font-weight: 700;
    color: var(--ec-fg-2);
}

.ts-store-header__eyebrow a {
    color: inherit;
    text-decoration: none;
    transition: color var(--ec-dur-1) var(--ec-ease);
}

.ts-store-header__eyebrow a:hover {
    color: var(--ec-accent);
}

.ts-store-header__title {
    margin: 0 0 0.75rem;
    font-family: var(--ec-font-display);
    font-size: clamp(28px, 3.4vw, 42px);
    font-weight: var(--ec-disp-weight);
    line-height: 1.05;
    letter-spacing: -0.02em;
}

.ts-store-header__desc {
    color: var(--ec-fg-2);
    max-width: 60ch;
    font-weight: 600;
    line-height: 1.65;
}

.ts-store-empty {
    padding: 72px 24px;
    text-align: center;
    background: var(--ec-surface-2);
    border-radius: var(--ec-radius);
    font-family: var(--ec-font-display);
    font-weight: var(--ec-disp-weight);
    font-size: clamp(22px, 3vw, 32px);
    line-height: 1.1;
    color: var(--ec-fg);
}

/* ------------------------------------------------------------------ */
/* Product grid: dense retail columns from the token layer            */

.ts-products {
    display: grid;
    grid-template-columns: repeat(var(--ec-grid), minmax(0, 1fr));
    gap: var(--ec-grid-gap);
}

@media (max-width: 1023.98px) {
    .ts-products {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 639.98px) {
    .ts-products {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ------------------------------------------------------------------ */
/* Product card: rounded, image-forward, a deal chip on the media      */

.ts-pcard {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--ec-surface);
    border: 1px solid var(--ec-border);
    border-radius: var(--ec-radius);
    transition:
        box-shadow var(--ec-dur-2) var(--ec-ease),
        transform var(--ec-dur-2) var(--ec-ease);
}

.ts-pcard:hover {
    box-shadow: var(--ec-shadow);
    transform: translateY(-3px);
}

/* Media: a square cover; product art that carries text opts into contain. */
.ts-pcard__media {
    position: relative;
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--ec-surface-2);
    border-radius: 0;
}

.ts-pcard__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: 0;
    transition: transform var(--ec-dur-3) var(--ec-ease);
}

.ts-pcard__media img.ts-store-image--contain {
    object-fit: contain;
}

.ts-pcard:hover .ts-pcard__media img {
    transform: scale(1.05);
}

.ts-pcard:hover .ts-pcard__media img.ts-store-image--contain {
    transform: none;
}

/* Deal / type / stock chips float on the media, stacking top-left. */
.ts-pcard__media .ts-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 1;
}

.ts-pcard__media .ts-badge--stock {
    top: auto;
    bottom: 12px;
}

/* No image: an accent-soft block with a large display initial. */
.ts-pcard__media--placeholder {
    display: grid;
    place-items: center;
    background: var(--ec-accent-soft);
    text-decoration: none;
}

.ts-pcard__placeholder {
    font-family: var(--ec-font-display);
    font-weight: var(--ec-disp-weight);
    font-size: clamp(40px, 5vw, 64px);
    line-height: 1;
    color: var(--ec-accent);
}

.ts-pcard__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    gap: 6px;
    padding: 16px 18px 18px;
}

/* Price row leads the card: Gabarito accent amount, struck compare, save. */
.ts-pcard__price {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
    margin: 0;
}

.ts-pcard__amount {
    font-family: var(--ec-font-display);
    font-weight: var(--ec-disp-weight);
    font-size: 22px;
    line-height: 1;
    color: var(--ec-accent);
}

.ts-pcard__compare {
    font-family: var(--ec-font-body);
    font-weight: 600;
    font-size: 13px;
    color: var(--ec-fg-2);
    text-decoration: line-through;
}

.ts-pcard__save {
    padding: 3px 8px;
    border-radius: 999px;
    background: var(--ec-save-soft);
    color: var(--ec-save);
    font-family: var(--ec-font-body);
    font-size: 11px;
    font-weight: 800;
}

.ts-pcard__title {
    margin: 0;
    font-family: var(--ec-font-body);
    font-weight: 700;
    font-size: 14px;
    line-height: 1.35;
    letter-spacing: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ts-pcard__title a {
    color: var(--ec-fg);
    text-decoration: none;
    transition: color var(--ec-dur-1) var(--ec-ease);
}

.ts-pcard__title a:hover {
    color: var(--ec-accent);
}

.ts-pcard__notes {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: var(--ec-fg-2);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ts-pcard__stock {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    font-family: var(--ec-font-body);
    font-size: 12px;
    font-weight: 800;
    color: var(--ec-save);
}

.ts-pcard__stock-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--ec-save);
}

/* Add-to-cart: a full-width pill with a cart glyph. */
.ts-pcard__add {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 6px;
    padding: 11px 14px;
    font-family: var(--ec-font-body);
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    color: var(--ec-accent);
    background: var(--ec-accent-soft);
    border: none;
    border-radius: var(--ec-btn-radius);
    cursor: pointer;
    transition:
        background var(--ec-dur-1) var(--ec-ease),
        color var(--ec-dur-1) var(--ec-ease),
        transform var(--ec-dur-1) var(--ec-ease);
}

.ts-pcard__add svg {
    width: 16px;
    height: 16px;
    flex: none;
}

.ts-pcard__add:hover {
    background: var(--ec-accent);
    color: var(--ec-accent-fg);
}

.ts-pcard__add:active {
    transform: scale(0.97);
}

/* ------------------------------------------------------------------ */
/* Department circles                                                  */

.ts-cat-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
}

.ts-cat-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 16px 8px;
    border-radius: var(--ec-radius);
    color: var(--ec-fg);
    text-decoration: none;
    text-align: center;
    transition: background var(--ec-dur-2) var(--ec-ease);
}

.ts-cat-tile:hover {
    background: var(--ec-surface-2);
}

.ts-cat-tile__media {
    display: block;
    width: 84px;
    height: 84px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--ec-surface-2);
    border: 2px solid var(--ec-border);
}

.ts-cat-tile__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
    transition: transform var(--ec-dur-3) var(--ec-ease);
}

.ts-cat-tile:hover .ts-cat-tile__media img {
    transform: scale(1.05);
}

.ts-cat-tile__media--placeholder {
    display: grid;
    place-items: center;
    background: var(--ec-accent-soft);
    border-color: transparent;
}

.ts-cat-tile__media--placeholder span {
    font-family: var(--ec-font-display);
    font-weight: var(--ec-disp-weight);
    font-size: 32px;
    color: var(--ec-accent);
}

.ts-cat-tile__name {
    font-family: var(--ec-font-body);
    font-weight: 800;
    font-size: 13px;
    line-height: 1.25;
    color: var(--ec-fg);
}

.ts-cat-tile__count {
    font-family: var(--ec-font-body);
    font-size: 11px;
    font-weight: 700;
    color: var(--ec-fg-2);
}

/* ------------------------------------------------------------------ */
/* Story: a dark retail feature band (rewards / weekly ad)            */

.ts-story {
    padding: 0;
    background: transparent;
    box-shadow: none;
}

.ts-story__inner {
    display: flex;
    align-items: center;
    gap: 36px;
    padding: clamp(28px, 4vw, 48px);
    background: var(--ec-fg);
    color: var(--ec-bg);
    border-radius: calc(var(--ec-radius) + 8px);
}

.ts-story__badge {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    flex: none;
    border-radius: 999px;
    background: var(--ec-deal);
    color: var(--ec-deal-fg);
}

.ts-story__badge svg {
    width: 30px;
    height: 30px;
}

.ts-story__text {
    flex: 1;
    min-width: 0;
}

.ts-story__title {
    margin: 0;
    font-family: var(--ec-font-display);
    font-size: clamp(22px, 2.6vw, 32px);
    font-weight: var(--ec-disp-weight);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.ts-story__body {
    margin: 6px 0 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.6;
    color: color-mix(in oklab, var(--ec-bg) 75%, transparent);
}

.ts-story__body > :last-child {
    margin-bottom: 0;
}

.ts-story__cta {
    margin: 0;
    flex: none;
}

@media (max-width: 767.98px) {
    .ts-story__inner {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
}

/* ------------------------------------------------------------------ */
/* Newsletter: a rounded soft band with pill controls                 */

.ts-newsletter {
    max-width: 44rem;
    margin-top: var(--ec-sect-y);
    margin-inline: auto;
    padding: clamp(32px, 5vw, 64px);
    background: var(--ec-surface-2);
    border-radius: calc(var(--ec-radius) + 8px);
    text-align: center;
}

.ts-newsletter__title {
    margin: 0 0 12px;
    font-family: var(--ec-font-display);
    font-size: clamp(24px, 3vw, 36px);
    font-weight: var(--ec-disp-weight);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.ts-newsletter__body {
    max-width: 440px;
    margin-inline: auto;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.6;
    color: var(--ec-fg-2);
}

.ts-newsletter__form {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    max-width: 460px;
    margin: 24px auto 0;
}

.ts-newsletter__form input:not([type="submit"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]) {
    flex: 1;
    min-width: 220px;
    min-height: 50px;
    padding: 0 20px;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--ec-fg);
    background: var(--ec-surface);
    border: 2px solid transparent;
    border-radius: var(--ec-btn-radius);
    transition: border-color var(--ec-dur-1) var(--ec-ease);
}

.ts-newsletter__form input:focus {
    border-color: var(--ec-accent);
    outline: none;
}

.ts-newsletter__form input::placeholder {
    color: var(--ec-fg-2);
    opacity: 0.7;
}

.ts-newsletter__done {
    margin-top: 1rem;
    font-family: var(--ec-font-body);
    font-size: 12px;
    font-weight: 800;
    color: var(--ec-accent);
}

@media (max-width: 479.98px) {
    .ts-newsletter__form {
        flex-direction: column;
    }
}

/* ------------------------------------------------------------------ */
/* Product page (PHP fallback when the SPA does not own the product)   */

.ts-product {
    display: grid;
    /* minmax(0,...) floors the tracks so a wide gallery image cannot push
       its column past its share and overflow the page. */
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: clamp(2rem, 5vw, 3rem);
    align-items: start;
    margin-top: 1.5rem;
}

@media (max-width: 899.98px) {
    .ts-product {
        grid-template-columns: 1fr;
    }
}

/* Gallery: sticky column; the main image is a rounded framed panel. */
.ts-product__gallery {
    position: sticky;
    top: 6rem;
}

@media (max-width: 899.98px) {
    .ts-product__gallery {
        position: static;
    }
}

.ts-product__image {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    background: var(--ec-surface-2);
    border-radius: calc(var(--ec-radius) + 8px);
}

.ts-product__thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 14px;
}

.ts-product__thumb {
    appearance: none;
    width: 72px;
    height: 72px;
    padding: 0;
    overflow: hidden;
    background: var(--ec-surface-2);
    border: 2px solid var(--ec-border);
    border-radius: var(--ec-img-radius);
    cursor: pointer;
    transition: border-color var(--ec-dur-1) var(--ec-ease);
}

.ts-product__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}

.ts-product__thumb.is-active {
    border-color: var(--ec-accent);
}

/* Info column */
.ts-product__info {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
}

.ts-product__title {
    margin: 0;
    font-family: var(--ec-font-display);
    font-size: clamp(26px, 3vw, 38px);
    font-weight: var(--ec-disp-weight);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.ts-product__price {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 12px;
    margin: 0;
    font-family: var(--ec-font-display);
    font-weight: var(--ec-disp-weight);
    font-size: clamp(30px, 3.4vw, 38px);
    line-height: 1;
    color: var(--ec-accent);
}

.ts-product__price .ts-pcard__compare {
    font-size: 17px;
}

.ts-product__price .ts-badge--sale {
    align-self: center;
    font-size: 13px;
}

.ts-product__stock {
    margin: 0;
    font-family: var(--ec-font-body);
    font-size: 13px;
    font-weight: 800;
}

.ts-product__stock.is-in {
    color: var(--ec-save);
}

.ts-product__stock.is-out {
    color: var(--ec-fg-2);
}

.ts-product__summary {
    margin: 0;
    max-width: 520px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.7;
    color: var(--ec-fg-2);
}

/* Spec grid: hairline-gapped cells on a rounded surface card. */
.ts-product__meta {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    overflow: hidden;
    background: var(--ec-border);
    border: 1px solid var(--ec-border);
    border-radius: var(--ec-radius);
}

.ts-product__meta > div {
    padding: 14px 16px;
    background: var(--ec-surface);
}

.ts-product__meta .k {
    display: block;
    margin-bottom: 4px;
    font-family: var(--ec-font-body);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ec-fg-2);
}

.ts-product__meta .v {
    font-size: 14px;
    font-weight: 800;
}

@media (max-width: 639.98px) {
    .ts-product__meta {
        grid-template-columns: 1fr;
    }
}

/* Buy row: a pill qty next to the accent CTA. */
.ts-product__buy {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: stretch;
    margin-top: 0.25rem;
    padding-top: 22px;
    border-top: 1px solid var(--ec-border);
}

/* Fixed-width qty; the two-class selector out-ranks the global
   input[type="number"] { width: 100% } baseline. */
.ts-product__buy .ts-product__qty {
    flex: 0 0 auto;
    width: 5.5rem;
    min-height: 48px;
    text-align: center;
    font-family: var(--ec-font-display);
    font-size: 15px;
    font-weight: 800;
    color: var(--ec-fg);
    background: var(--ec-surface-2);
    border: 2px solid transparent;
    border-radius: var(--ec-img-radius);
    transition: border-color var(--ec-dur-1) var(--ec-ease);
}

.ts-product__buy .ts-product__qty:focus {
    border-color: var(--ec-accent);
    outline: none;
}

/* Add-to-cart fills the rest of the row and never wraps its label. */
.ts-product__buy .ts-btn {
    flex: 1 1 auto;
    min-width: 11rem;
    white-space: nowrap;
    font-weight: 800;
}

/* Description as a rounded surface card. */
.ts-product__description {
    max-width: 72ch;
    padding: 24px;
    background: var(--ec-surface);
    border: 1px solid var(--ec-border);
    border-radius: var(--ec-radius);
    font-weight: 600;
    line-height: 1.75;
    color: var(--ec-fg);
}

.ts-product__description > :last-child {
    margin-bottom: 0;
}

/* No-image fallback keeps the gallery panel from collapsing. */
.ts-pcard__placeholder.ts-product__image {
    display: grid;
    place-items: center;
    aspect-ratio: 1 / 1;
    background: var(--ec-accent-soft);
    color: var(--ec-accent);
}

/* ------------------------------------------------------------------ */
/* Responsive: hero stacks below the design's 920px reflow             */

@media (max-width: 919.98px) {
    .ts-hero {
        grid-template-columns: 1fr;
    }

    /* Drop the promo artwork on narrow widths so the copy owns the panel. */
    .ts-hero--image .ts-hero__promo {
        grid-template-columns: 1fr;
    }

    .ts-hero__media {
        display: none;
    }
}

@media (max-width: 559.98px) {
    .ts-cat-tiles {
        grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    }

    .ts-cat-tile__media {
        width: 68px;
        height: 68px;
    }
}
