/*
 * Catalog — category sidebar, product grid, product detail.
 * Ported from the Figma Make prototype ("E-commerce website design"):
 * rounded cards, per-type colour chips, sticker sale badges. Reuses the
 * site-wide tokens from dehai-common's main.css (--ink, --paper, --line,
 * --muted, --accent, --radius-*) rather than defining a second palette.
 */

.catalog-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    flex-wrap: wrap;
    font-size: 0.75rem;
    color: var(--muted);
    margin: 0 0 1.5rem;
}

.catalog-breadcrumb a:hover {
    color: var(--ink);
    text-decoration: none;
}

.catalog-breadcrumb__current {
    color: var(--ink);
    font-weight: 500;
}

.catalog-breadcrumb svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}

.catalog-titlebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.catalog-heading {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 1.5rem;
    margin: 0 0 0.125rem;
}

.catalog-count {
    font-size: 0.875rem;
    color: var(--muted);
    margin: 0;
}

.catalog-count__filters {
    margin-left: 0.25rem;
    color: var(--accent);
    font-weight: 600;
}

.catalog {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: start;
}

@media (min-width: 768px) {
    .catalog {
        grid-template-columns: 220px 1fr;
    }
}

/* One sidebar serves both layouts: a grid column from 768px up, a slide-in
   drawer below it. Rendering it twice meant building every category link twice. */
.catalog-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 60;
    width: 300px;
    max-width: 85vw;
    overflow-y: auto;
    padding: 1.25rem;
    background: var(--surface);
    box-shadow: 8px 0 32px rgba(13, 12, 10, 0.18);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.catalog-sidebar.is-open {
    transform: translateX(0);
}

.catalog-sidebar__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.catalog-sidebar__head h2 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 1.125rem;
    margin: 0;
}

@media (min-width: 768px) {
    .catalog-sidebar {
        position: static;
        z-index: auto;
        width: auto;
        max-width: none;
        overflow: visible;
        padding: 0;
        background: none;
        box-shadow: none;
        transform: none;
        transition: none;
    }

    .catalog-sidebar__head {
        display: none;
    }
}

/* Sort control — the design's own dropdown: a trigger that inverts to ink
   while open, and a right-aligned panel whose selected row inverts too.
   The options are real links, not a <select>: changing the order is a page
   load here, exactly as picking a category is. */
.catalog-titlebar__controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.catalog-sort {
    position: relative;
}

.catalog-sort__trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem 0.5rem 0.875rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: var(--surface);
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--ink);
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.catalog-sort__trigger:hover {
    border-color: var(--ink);
}

.catalog-sort__trigger[aria-expanded="true"] {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--paper);
}

.catalog-sort__trigger svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.catalog-sort__value {
    white-space: nowrap;
}

.catalog-sort__chevron {
    transition: transform 0.15s ease;
}

.catalog-sort__trigger[aria-expanded="true"] .catalog-sort__chevron {
    transform: rotate(180deg);
}

.catalog-sort__menu {
    position: absolute;
    top: calc(100% + 0.375rem);
    right: 0;
    z-index: 30;
    width: 220px;
    padding: 0.25rem 0;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
}

.catalog-sort__option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    color: var(--ink);
    text-decoration: none;
    transition: background-color 0.15s ease;
}

.catalog-sort__option:hover {
    background: var(--surface-2);
}

.catalog-sort__option.is-selected {
    background: var(--ink);
    color: var(--paper);
    font-weight: 600;
}

.catalog-sort__option svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.catalog-filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--ink);
}

.catalog-filter-toggle svg {
    width: 16px;
    height: 16px;
}

@media (min-width: 768px) {
    .catalog-filter-toggle {
        display: none;
    }
}

.catalog-filter-backdrop {
    position: fixed;
    inset: 0;
    z-index: 55;
    background: rgba(13, 12, 10, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.catalog-filter-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
}

@media (min-width: 768px) {
    .catalog-filter-backdrop {
        display: none;
    }
}

/* Sidebar */
.catalog-nav__heading {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--muted);
    margin: 0 0 0.75rem;
}

.catalog-nav__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.catalog-nav__link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.5rem;
    border-radius: var(--radius-sm);
    color: var(--ink);
    font-size: 0.875rem;
    font-weight: 500;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.catalog-nav__link:hover {
    background: var(--accent);
    color: #fff;
    text-decoration: none;
}

.catalog-nav__link--active {
    background: var(--ink);
    color: var(--paper);
    font-weight: 600;
}

.catalog-nav__link--active:hover {
    background: var(--ink);
    color: var(--paper);
}

/* Facet counts — how many products the option would leave, given the
   filters other than its own. */
.catalog-facet-count {
    margin-left: auto;
    font-size: 11px;
    font-weight: 500;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.catalog-nav__link:hover .catalog-facet-count,
.catalog-nav__link--active .catalog-facet-count {
    color: rgba(255, 255, 255, 0.7);
}

.catalog-brand-option--empty {
    color: var(--muted);
}

.catalog-nav__row {
    display: flex;
    align-items: center;
}

.catalog-nav__row .catalog-nav__link {
    flex: 1;
}

.catalog-nav__toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem;
    background: none;
    border: none;
    color: var(--muted);
}

.catalog-nav__toggle:hover {
    color: var(--ink);
}

.catalog-nav__chevron {
    width: 14px;
    height: 14px;
    transition: transform 0.2s ease;
}

[data-accordion].is-open .catalog-nav__chevron {
    transform: rotate(90deg);
}

.catalog-nav__children {
    display: none;
    margin: 0.125rem 0 0 0.5rem;
    padding-left: 0.5rem;
    border-left: 1px solid var(--line);
}

[data-accordion].is-open > .catalog-nav__children {
    display: block;
}

.catalog-nav__list--nested .catalog-nav__link {
    font-size: 13px;
}

/* Brand checkboxes */
.catalog-filter-divider {
    height: 1px;
    background: var(--line);
    margin: 1.5rem 0;
}

.catalog-brand-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.catalog-brand-option {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    width: 100%;
    font-size: 0.875rem;
    color: rgba(13, 12, 10, 0.75);
    cursor: pointer;
}

.catalog-brand-option:hover {
    color: var(--ink);
}

.catalog-brand-option input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--ink);
    flex-shrink: 0;
}

/* Price range */
.catalog-price-range {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.catalog-price-input {
    width: 100%;
    min-width: 0;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
}

.catalog-price-input:focus {
    outline: none;
    border-color: var(--accent);
}

.catalog-price-sep {
    color: var(--muted);
    font-size: 0.875rem;
}

/* Sale-only toggle */
.catalog-sale-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--ink);
    cursor: pointer;
}

.catalog-sale-toggle + .catalog-sale-toggle {
    margin-top: 0.75rem;
}

.catalog-sale-switch {
    position: relative;
    flex-shrink: 0;
    width: 40px;
    height: 22px;
}

.catalog-sale-switch input {
    position: absolute;
    inset: 0;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.catalog-sale-switch__track {
    position: absolute;
    inset: 0;
    background: var(--line);
    border-radius: var(--radius-full);
    transition: background-color 0.15s ease;
}

.catalog-sale-switch__track::before {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: var(--surface);
    border-radius: 50%;
    box-shadow: var(--shadow-card);
    transition: transform 0.15s ease;
}

.catalog-sale-switch input:checked + .catalog-sale-switch__track {
    background: var(--accent);
}

.catalog-sale-switch input:checked + .catalog-sale-switch__track::before {
    transform: translateX(18px);
}

/* Apply / reset */
.catalog-filter-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding-top: 0.5rem;
}

/* --radius-lg, not the design's rounded-xl: 8px corners are a standing
   preference of the site owner, deliberately kept over the design's 12px.
   Applies to the reset button below too — leave both as they are. */
.catalog-filter-apply {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.625rem;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--paper);
    background: var(--ink);
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.catalog-filter-apply:hover {
    background: rgba(13, 12, 10, 0.85);
}

.catalog-filter-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    background: var(--accent);
    border-radius: var(--radius-full);
}

/* Bordered and full-width, matching "Застосувати фільтри" above it. When
   there is nothing to reset it is drawn faded rather than removed — a
   control that keeps its place is easier to find again than one that
   appears and disappears. Rendered as a <span> in that state, so it is
   genuinely not activatable, not merely styled to look that way. */
.catalog-filter-reset {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.625rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--ink);
    background: none;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: border-color 0.15s ease, opacity 0.15s ease;
}

.catalog-filter-reset:hover {
    border-color: var(--ink);
}

.catalog-filter-reset.is-disabled {
    opacity: 0.3;
    pointer-events: none;
}

/* Empty state */
.catalog-empty {
    text-align: center;
    padding: 5rem 0;
}

.catalog-empty__icon {
    margin: 0 0 1rem;
    font-size: 2.25rem;
    line-height: 1;
}

.catalog-empty__text {
    margin: 0;
    font-size: 0.875rem;
    color: var(--muted);
}

.catalog-empty__reset {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #fff;
    background: var(--accent);
    border-radius: var(--radius-xl);
    transition: background-color 0.15s ease;
}

.catalog-empty__reset:hover {
    background: var(--accent-dark);
}

/* Pagination */
.catalog-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    margin-top: 2.5rem;
}

.catalog-pagination__item {
    width: 2.25rem;
    height: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    color: var(--ink);
    font-size: 0.875rem;
    font-weight: 600;
    transition: border-color 0.15s ease;
}

.catalog-pagination__item svg {
    width: 1rem;
    height: 1rem;
}

a.catalog-pagination__item:hover {
    border-color: var(--ink);
    text-decoration: none;
}

.catalog-pagination__item--active {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--paper);
}

.catalog-pagination__item--disabled {
    opacity: 0.3;
    pointer-events: none;
}

.catalog-pagination__dots {
    width: 2.25rem;
    text-align: center;
    color: var(--muted);
    font-size: 0.875rem;
    user-select: none;
}

/* Product grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (min-width: 1024px) {
    .product-grid--catalog {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1280px) {
    .product-grid--catalog {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 768px) {
    .product-grid--home {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .product-grid--home {
        grid-template-columns: repeat(4, 1fr);
    }
}

.product-card {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    text-align: left;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.product-card:hover {
    box-shadow: var(--shadow-card);
    transform: translateY(-2px);
    text-decoration: none;
}

.product-card__media {
    position: relative;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.4rem;
    background: var(--paper);
    color: var(--muted);
    overflow: hidden;
}

.product-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* Until the bitmap paints, an image shows its own background — the same icon
   ProductPlaceholder draws for a product with no photo, so a loading card and
   an empty one look alike. The stroke is --muted; an SVG loaded as a
   background cannot read a custom property, so the value is repeated there. */
.responsive-img {
    background-color: var(--surface-2);
    background-image: url("../Images/product-placeholder.svg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 36%;
}

/* Sized in em so it scales with the container's own font-size, same as the
   emoji placeholder it replaced. */
.product-placeholder-icon {
    width: 1em;
    height: 1em;
}

.product-card:hover .product-card__media img {
    transform: scale(1.04);
}

/* Top-category chip — inline by default (product detail meta row);
   .product-type-chip--card overlays it on the card image instead. One
   neutral style for every category now — no more per-type colour set,
   since there's no `type` field driving 4 fixed buckets anymore. */
.product-type-chip {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    padding: 0.125rem 0.5rem;
    border-radius: var(--radius-full);
    background: var(--surface-2);
    color: var(--ink);
}

.product-type-chip--card {
    position: absolute;
    top: 0.625rem;
    left: 0.625rem;
    /* Without this, hovering the card scales the <img> via `transform`,
       which promotes it into a stacking context that — being later in the
       DOM than this chip — paints above it despite both being absolutely
       positioned. */
    z-index: 1;
}

.product-card__badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: var(--accent);
    color: #fff;
    font-size: 10px;
    font-weight: 400;
    padding: 0.125rem 0.5rem;
    /* Same stacking-context reason as .product-type-chip--card above. */
    z-index: 1;
}

.product-card__body {
    padding: 0.875rem;
    display: flex;
    flex-direction: column;
    gap: 0;
    flex: 1;
}

.product-card__brand {
    font-size: 10px;
    font-weight: 500;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0 0 0.125rem;
}

.product-card__title {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--ink);
    line-height: 1.35;
    margin: 0 0 0.625rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card__footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.product-card__price {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.product-card__price-current {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--ink);
}

/* Sizes can cost differently, so the card leads with the cheapest and says
   so — small and muted, since the number is what is being read. */
.product-card__price-from {
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--muted);
}

.product-card__price-old {
    font-size: 0.75rem;
    color: var(--muted);
    text-decoration: line-through;
}

.product-card__buy {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--ink);
    color: var(--paper);
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.product-card__buy:hover:not(:disabled):not(.is-added) {
    background: var(--accent);
}

.product-card__buy:disabled {
    background: var(--line);
    color: var(--muted);
    cursor: not-allowed;
}

.product-card__buy.is-added {
    background: #10b981;
}

.product-card__buy-icon {
    width: 14px;
    height: 14px;
}

.product-card__buy-icon--check {
    display: none;
}

.product-card__buy.is-added .product-card__buy-icon:not(.product-card__buy-icon--check) {
    display: none;
}

.product-card__buy.is-added .product-card__buy-icon--check {
    display: block;
}

/* ── Product detail page ──────────────────────────────────────── */

.product-detail {
    display: grid;
    gap: 2rem;
    margin-bottom: 4rem;
}

/* 40/60 split (gallery/info), proportional so it stretches to fill the
   container instead of pinning both columns to a fixed pixel width. */
@media (min-width: 768px) {
    .product-detail {
        grid-template-columns: 2fr 3fr;
    }
}

.product-gallery__main {
    position: relative;
    aspect-ratio: 1 / 1;
    background: var(--surface-2);
    border-radius: var(--radius-lg);
    overflow: hidden;
    font-size: 5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
}

.product-gallery__main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-gallery__badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--accent);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 700;
    padding: 0.25rem 0.75rem;
}

.product-gallery__thumbs {
    list-style: none;
    margin: 0.75rem 0 0;
    padding: 0;
    display: flex;
    gap: 0.625rem;
    overflow-x: auto;
}

.product-gallery__thumb {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 2px solid transparent;
    padding: 0;
    display: block;
    background: none;
    cursor: pointer;
    transition: border-color 0.15s ease;
}

.product-gallery__thumb:hover {
    border-color: var(--line);
}

.product-gallery__thumb.is-active {
    border-color: var(--ink);
}

.product-gallery__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Info panel */
.product-detail__meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 0.75rem;
    font-size: 0.75rem;
    color: var(--muted);
}

.product-detail__brand {
    font-weight: 500;
}

.product-detail__title {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 1.75rem;
    line-height: 1.2;
    margin: 0 0 1rem;
}

.product-detail__price {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.product-detail__price-current {
    font-family: var(--font-display);
    font-size: 1.75rem;
    color: var(--ink);
}

.product-detail__price-from {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--muted);
}

/* Picking a size replaces the range with that size's own price. */
.product-detail__price .is-hidden {
    display: none;
}

.product-detail__price-old {
    font-size: 1.125rem;
    color: var(--muted);
    text-decoration: line-through;
}

.product-detail__save {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--accent);
}

.product-detail__description {
    font-size: 0.875rem;
    color: rgba(13, 12, 10, 0.75);
    line-height: 1.6;
    margin: 0 0 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--line);
}

/* Size picker — only rendered when the product has a size chart. Selection
   is visual only for now (toggled by catalog.js) — there's a Buy button
   below, but no real cart backend exists yet to actually reserve it. */
.variant-picker {
    margin-bottom: 1.5rem;
}

.variant-picker__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.variant-picker__label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--ink);
}

.variant-picker__hint {
    font-size: 0.75rem;
    color: var(--accent);
}

.variant-picker__hint.is-hidden {
    display: none;
}

.variant-picker__options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.variant-picker__btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--ink);
    background: none;
    border: 2px solid var(--line);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.variant-picker__btn:hover:not(:disabled):not(.is-selected) {
    border-color: rgba(13, 12, 10, 0.5);
}

.variant-picker__btn.is-selected {
    border-color: var(--ink);
    background: var(--ink);
    color: var(--paper);
}

.variant-picker__btn:disabled {
    color: var(--muted);
    border-color: var(--line);
    text-decoration: line-through;
    cursor: not-allowed;
    opacity: 0.5;
}

/* Qty stepper + Buy button. The stepper's ceiling is real stock minus what
   the cart holds — see cart.js; the button stays clickable so it can say so. */
.product-detail__cart {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.product-detail__qty {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.product-detail__qty-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
    background: none;
    border: none;
    color: var(--ink);
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.product-detail__qty-btn:hover {
    background: var(--paper);
}

.product-detail__qty-btn svg {
    width: 16px;
    height: 16px;
}

.product-detail__qty-value {
    width: 2.5rem;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--ink);
}

.product-detail__qty-btn.is-maxed {
    opacity: 0.35;
    cursor: not-allowed;
}

.product-detail__buy {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border: none;
    border-radius: var(--radius-md);
    background: var(--accent);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.product-detail__buy:hover:not(:disabled):not(.is-added) {
    background: var(--accent-dark);
}

.product-detail__buy.is-added {
    background: #10b981;
}

.product-detail__buy--disabled,
.product-detail__buy:disabled {
    background: var(--line);
    color: var(--muted);
    cursor: not-allowed;
}

.product-detail__buy-icon {
    width: 16px;
    height: 16px;
}

.product-detail__buy-icon--check {
    display: none;
}

.product-detail__buy.is-added .product-detail__buy-icon:not(.product-detail__buy-icon--check) {
    display: none;
}

.product-detail__buy.is-added .product-detail__buy-icon--check {
    display: block;
}

.product-detail__trust {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.product-detail__trust-item {
    background: var(--paper);
    border-radius: var(--radius-md);
    padding: 0.625rem;
    text-align: center;
}

.product-detail__trust-icon {
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
}

.product-detail__trust-label {
    font-size: 10px;
    line-height: 1.35;
    color: var(--muted);
    margin: 0;
}

/* Specs block — lives inline in the info column now, not a separate
   full-width section below the two-column grid. */
.product-specs {
    margin-bottom: 1.5rem;
}

.product-specs__heading {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--muted);
    margin: 0 0 1rem;
}

.product-specs__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.product-specs__list li {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.product-specs__label {
    flex-shrink: 0;
    color: var(--muted);
}

.product-specs__value {
    font-size: 0.875rem;
    color: var(--ink);
}

/* Size chart — shared/reusable table, see tx_dehaistore_domain_model_variantset */
.variant-specs {
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-top: 1.25rem;
}

.variant-specs__heading {
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 0.5rem 0.75rem;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
}

.variant-specs__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.75rem;
}

.variant-specs__table th {
    text-align: left;
    padding: 0.5rem 0.75rem;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
    background: var(--surface-2);
    border-bottom: 1px solid var(--line);
}

.variant-specs__table td {
    padding: 0.5rem 0.75rem;
    color: rgba(13, 12, 10, 0.8);
}

.variant-specs__table tbody tr:nth-child(even) {
    background: var(--surface-2);
}

.variant-specs__value {
    font-weight: 600;
    color: var(--ink);
}
