/**
 * Meridian storefront: template-owned EasyCommerce pages (shop, category,
 * product, cart). Loaded lazily by the com_easycommerce overrides.
 *
 * Warm editorial commerce: rounded surfaces on hairline borders, soft warm
 * shadows and pill controls over an image-forward product grid. Everything
 * derives from the token layer; the grid density comes straight from
 * --ec-grid.
 */

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

/* 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);
}

/* Badges: accent-soft pills, 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: 4px 10px;
    border-radius: 999px;
    font-family: var(--ec-font-body);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    white-space: nowrap;
    background: var(--ec-accent-soft);
    color: var(--ec-accent);
}

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

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

/* ------------------------------------------------------------------ */
/* Hero: copy column plus a framed image or a large product card       */

.ts-hero {
    display: grid;
    /* minmax(0,...) floors the tracks so a wide configured hero image (or
       the product mosaic) cannot push its column past its share. */
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: clamp(2.5rem, 5vw, 4rem);
    align-items: center;
    padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(2.5rem, 6vw, 4.5rem);
    border-bottom: 1px solid var(--ec-border);
}

/* No image and no featured product: the copy stands alone and the
   configured alignment applies. */
.ts-hero--bare {
    grid-template-columns: 1fr;
}

.ts-hero--bare.ts-hero--center {
    text-align: center;
}

.ts-hero--bare.ts-hero--center .ts-hero__eyebrow,
.ts-hero--bare.ts-hero--center .ts-hero__ctas {
    justify-content: center;
}

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

.ts-hero__eyebrow {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 22px;
    font-family: var(--ec-font-body);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ec-accent);
}

.ts-hero__eyebrow::before {
    content: '';
    width: 24px;
    height: 1px;
    background: var(--ec-accent);
}

.ts-hero__title {
    margin: 0 0 24px;
    font-family: var(--ec-font-display);
    font-size: clamp(46px, 6vw, 88px);
    font-weight: var(--ec-disp-weight);
    line-height: 1.02;
    letter-spacing: -0.03em;
}

.ts-hero__desc {
    margin: 0 0 36px;
    max-width: 480px;
    font-size: 18px;
    line-height: 1.6;
    color: var(--ec-fg-2);
}

.ts-hero__ctas {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
}

/* Configured hero image: framed in a rounded panel. */
.ts-hero__frame {
    margin: 0;
    overflow: hidden;
    background: var(--ec-surface-2);
    border: 1px solid var(--ec-border);
    border-radius: var(--ec-radius);
    box-shadow: var(--ec-shadow);
}

.ts-hero__bg {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: 0;
}

/* Featured products drawn as a landscape-friendly mosaic: a wide lead tile
   plus two supporting tiles. Product artwork is composed for cards, so this
   layout preserves that shape instead of forcing a portrait crop. */
.ts-hero__mosaic {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    align-content: center;
}

.ts-hero__tile {
    position: relative;
    display: block;
    /* Grid items default to min-width auto; a wide product image would
       otherwise force its column past 1fr and overflow the page. */
    min-width: 0;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 18px;
    background: var(--ec-surface-2);
    border: 1px solid var(--ec-border);
}

.ts-hero__tile--lead {
    grid-column: 1 / -1;
}

/* A lone lead tile should still fill both columns rather than sit in half. */
.ts-hero__tile--lead:only-child {
    grid-column: span 2;
}

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

.ts-hero__tile img.ts-store-image--contain {
    object-fit: contain;
    object-position: center;
}

/* Anchor the lead artwork at the requested top-left when its proportions
   leave any breathing room inside the landscape tile. */
.ts-hero__tile--lead img,
.ts-hero__tile--lead img.ts-store-image--contain {
    object-position: left top;
}

.ts-hero__tile:hover img {
    transform: scale(1.025);
}

.ts-hero__tile-cap {
    position: absolute;
    left: 14px;
    bottom: 14px;
    padding: 7px 14px;
    border-radius: 999px;
    background: color-mix(in oklab, var(--ec-surface) 90%, transparent);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    font-size: 12px;
    font-weight: 600;
    color: var(--ec-fg);
}

/* ------------------------------------------------------------------ */
/* Trust bar: looping marquee ticker band                              */

.ts-trustbar--ticker {
    margin-top: var(--ec-sect-y);
    padding-block: 14px;
    background: var(--ec-surface);
    border-top: 1px solid var(--ec-border);
    border-bottom: 1px solid var(--ec-border);
    overflow: hidden;
}

.ts-trustbar__track {
    display: flex;
    width: max-content;
    animation: ts-ticker 28s linear infinite;
}

.ts-trustbar--ticker:hover .ts-trustbar__track {
    animation-play-state: paused;
}

@keyframes ts-ticker {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

.ts-trustbar__set {
    display: flex;
    align-items: center;
    gap: 64px;
    list-style: none;
    margin: 0;
    /* The trailing padding IS the inter-set spacing: putting it inside the
       set keeps both track halves exactly equal, which the translateX(-50%)
       keyframe needs for a seamless loop (a flex gap on the track would add
       width the keyframe never travels). */
    padding: 0 64px 0 0;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ec-fg-2);
    white-space: nowrap;
}

.ts-trustbar__dot {
    color: var(--ec-accent);
    font-size: 9px;
    letter-spacing: 0;
}

@media (prefers-reduced-motion: reduce) {
    .ts-trustbar__track {
        animation: none;
        flex-wrap: wrap;
        width: auto;
        justify-content: center;
    }

    .ts-trustbar__set {
        flex-wrap: wrap;
        justify-content: center;
    }

    .ts-trustbar__set[aria-hidden="true"],
    .ts-trustbar__pad {
        display: none;
    }

    .ts-trustbar__set {
        padding-right: 0;
    }
}

@media (max-width: 767.98px) {
    .ts-trustbar__set {
        gap: 40px;
        padding-right: 40px;
    }
}

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

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

.ts-store-section__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem 1.5rem;
    margin-bottom: 36px;
}

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

.ts-store-section__meta {
    font-family: var(--ec-font-body);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ec-fg-2);
}

.ts-store-section__link {
    font-size: 14px;
    font-weight: 600;
    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: 2.5rem;
}

.ts-store-header__eyebrow {
    margin: 0 0 14px;
    font-family: var(--ec-font-body);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    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(34px, 4.5vw, 56px);
    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;
    line-height: 1.65;
}

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

/* ------------------------------------------------------------------ */
/* Product grid: density 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(2, minmax(0, 1fr));
    }
}

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

/* ------------------------------------------------------------------ */
/* Product card: rounded, image-forward, clipping to the top radius   */

.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: retain a consistent 3:2 card while showing the complete product
   artwork. Product images often contain text or UI screenshots that cannot
   be safely cropped like photography. */
.ts-pcard__media {
    position: relative;
    display: block;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    background: var(--ec-surface-2);
    border-radius: 0;
}

.ts-pcard__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    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;
    object-position: center;
}

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

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

/* 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;
    padding: 18px;
}

.ts-pcard__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0 0 10px;
    font-family: var(--ec-font-body);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ec-fg-2);
}

.ts-pcard__code {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ts-pcard__flags {
    display: inline-flex;
    gap: 6px;
    flex: none;
}

.ts-pcard__title {
    margin: 0 0 8px;
    font-family: var(--ec-font-display);
    font-weight: var(--ec-disp-weight);
    font-size: 18px;
    line-height: 1.25;
    letter-spacing: -0.01em;
    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 0 12px;
    font-size: 13px;
    line-height: 1.6;
    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 0 14px;
    font-family: var(--ec-font-body);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--ec-fg-2);
}

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

/* Foot above a hairline: serif price plus a round accent add button. */
.ts-pcard__foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--ec-border);
}

.ts-pcard__price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin: 0;
    font-family: var(--ec-font-display);
    font-weight: 700;
    font-size: 20px;
    color: var(--ec-fg);
}

.ts-pcard__compare {
    font-family: var(--ec-font-body);
    font-weight: 400;
    font-size: 13px;
    color: var(--ec-fg-2);
}

.ts-pcard__add {
    flex: none;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    font-size: 20px;
    line-height: 1;
    color: var(--ec-accent-fg);
    background: var(--ec-accent);
    border: none;
    border-radius: 999px;
    cursor: pointer;
    transition:
        filter var(--ec-dur-1) var(--ec-ease),
        transform var(--ec-dur-1) var(--ec-ease);
}

.ts-pcard__add:hover {
    filter: brightness(0.92);
}

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

/* ------------------------------------------------------------------ */
/* Category tiles                                                     */

.ts-cat-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
    gap: var(--ec-grid-gap);
}

.ts-cat-tile {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--ec-surface);
    border: 1px solid var(--ec-border);
    border-radius: var(--ec-radius);
    color: var(--ec-fg);
    text-decoration: none;
    transition:
        box-shadow var(--ec-dur-2) var(--ec-ease),
        transform var(--ec-dur-2) var(--ec-ease);
}

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

.ts-cat-tile__media {
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--ec-surface-2);
}

.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);
}

.ts-cat-tile__media--placeholder span {
    font-family: var(--ec-font-display);
    font-weight: var(--ec-disp-weight);
    font-size: clamp(36px, 4vw, 52px);
    color: var(--ec-accent);
}

.ts-cat-tile__info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
}

.ts-cat-tile__text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.ts-cat-tile__name {
    font-family: var(--ec-font-display);
    font-weight: var(--ec-disp-weight);
    font-size: 17px;
    line-height: 1.2;
}

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

.ts-cat-tile__arrow {
    flex: none;
    color: var(--ec-accent);
    transition: transform var(--ec-dur-2) var(--ec-ease);
}

.ts-cat-tile:hover .ts-cat-tile__arrow {
    transform: translateX(3px);
}

/* ------------------------------------------------------------------ */
/* Story: a soft feature panel (no ink slab, no watermark)            */

.ts-story {
    margin-top: var(--ec-sect-y);
    padding: clamp(36px, 5vw, 72px);
    background: var(--ec-surface-2);
    border-radius: var(--ec-radius);
    box-shadow: var(--ec-shadow);
}

.ts-story__inner {
    max-width: 640px;
}

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

.ts-story__body {
    margin-bottom: 28px;
    font-size: 15px;
    line-height: 1.7;
    color: var(--ec-fg-2);
}

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

.ts-story__cta {
    margin: 0;
}

/* ------------------------------------------------------------------ */
/* Newsletter: rounded soft band, pill controls                       */

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

.ts-newsletter__title {
    margin: 0 0 12px;
    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-newsletter__body {
    max-width: 440px;
    margin-inline: auto;
    font-size: 15px;
    line-height: 1.6;
    color: var(--ec-fg-2);
}

.ts-newsletter__form {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    max-width: 440px;
    margin: 28px 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;
    color: var(--ec-fg);
    background: var(--ec-surface);
    border: 1px solid var(--ec-border);
    border-radius: 999px;
    transition: border-color var(--ec-dur-1) var(--ec-ease);
}

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

.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: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ec-accent);
}

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

/* ------------------------------------------------------------------ */
/* Product page                                                       */

.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.05fr) minmax(0, 1fr);
    gap: clamp(2rem, 5vw, 3.5rem);
    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 the 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: 1px solid var(--ec-border);
    border-radius: var(--ec-radius);
}

.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: 1px solid var(--ec-border);
    border-radius: 10px;
    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.25rem;
}

.ts-product__title {
    margin: 0;
    font-family: var(--ec-font-display);
    font-size: clamp(30px, 3.4vw, 44px);
    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: 700;
    font-size: clamp(26px, 3vw, 34px);
    line-height: 1;
    color: var(--ec-fg);
}

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

.ts-product__stock {
    margin: 0;
    font-family: var(--ec-font-body);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
}

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

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

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

/* Spec grid: hairline-gapped cells on a rounded surface card. Available
   to the product override when it grows meta cells. */
.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: 10px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ec-fg-2);
}

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

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

/* Buy row above a hairline: pill qty plus the accent CTA. */
.ts-product__buy {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: stretch;
    margin-top: 0.25rem;
    padding-top: 24px;
    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-body);
    font-size: 14px;
    color: var(--ec-fg);
    background: var(--ec-surface);
    border: 1px solid var(--ec-border);
    border-radius: 10px;
    transition: border-color var(--ec-dur-1) var(--ec-ease);
}

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

/* 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;
}

/* 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);
    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 tablet width                         */

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

    /* Cap at the available width, not a fixed rem, so the mosaic never
       widens the page past a narrow viewport. */
    .ts-hero__side {
        max-width: min(26rem, 100%);
    }

    .ts-hero__title {
        font-size: clamp(38px, 11vw, 64px);
    }
}
