/*
 * UltraStore — product.css
 * Loaded on single product pages and wherever cart drawer is active.
 * All values via CSS variables.
 *
 * Contents:
 *   1.  Single Product Layout
 *   2.  Product Gallery
 *   3.  Lightbox
 *   4.  Fly-to-Cart
 *   5.  Bundle Box
 *   6.  Cart Drawer
 *   7.  WC Single Product Overrides
 */


/* ── 1. Single Product Layout ────────────────────────────────────────────── */

.single-product-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
    padding-block: 32px;
}

.sp-gallery-col { position: sticky; top: calc( var(--header-height) + 24px ); }
.sp-details-col { display: flex; flex-direction: column; gap: 24px; }

@media (max-width: 900px) {
    .single-product-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .sp-gallery-col { position: static; }
}


/* ── 2. Product Gallery ──────────────────────────────────────────────────── */

.product-gallery { display: flex; flex-direction: column; gap: 12px; }

.pg-main-wrap {
    position: relative;
    border-radius: var(--product-card-radius);
    overflow: hidden;
    background: var(--color-surface);
    cursor: zoom-in;
    aspect-ratio: 1 / 1;
}

.pg-main-image-container { width: 100%; height: 100%; }

.pg-main-image {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: opacity 150ms ease, transform 400ms ease;
    transform-origin: center;
    display: block;
}

.pg-main-wrap:hover .pg-main-image { transform: scale(1.03); }

/* Zoom hint icon */
.pg-zoom-hint {
    position: absolute; bottom: 12px; right: 12px; z-index: 2;
    background: rgba(255,255,255,.85);
    border-radius: 50%; width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    color: var(--color-text); pointer-events: none;
    opacity: 0; transition: opacity 200ms ease;
}

.pg-main-wrap:hover .pg-zoom-hint { opacity: 1; }

/* Prev / Next nav (mobile swipe fallback) */
.pg-nav {
    position: absolute; top: 50%; z-index: 3;
    transform: translateY(-50%);
    background: rgba(255,255,255,.9); border: none;
    width: 36px; height: 36px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: var(--color-text);
    opacity: 0; transition: opacity 200ms ease;
    padding: 0;
}

.pg-main-wrap:hover .pg-nav { opacity: 1; }

.pg-prev { left: 10px; transform: translateY(-50%) rotate(180deg); }
.pg-next { right: 10px; }

/* Thumbnail strip */
.pg-thumbs {
    display: flex; gap: 8px; flex-wrap: wrap;
}

.pg-thumb {
    background: none; border: 2px solid var(--color-border);
    border-radius: 6px; padding: 3px; cursor: pointer;
    width: 72px; height: 72px; overflow: hidden;
    transition: border-color 150ms ease;
    flex-shrink: 0;
}

.pg-thumb:hover   { border-color: var(--color-text-muted); }
.pg-thumb.is-active { border-color: var(--color-primary); }

.pg-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 3px; }

@media (max-width: 480px) {
    .pg-thumb { width: 56px; height: 56px; }
}


/* ── 3. Lightbox ─────────────────────────────────────────────────────────── */

.pg-lightbox {
    position: fixed; inset: 0; z-index: 2000;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none; transition: opacity 250ms ease;
}

.pg-lightbox.is-open { opacity: 1; pointer-events: all; }

.pg-lightbox-backdrop {
    position: absolute; inset: 0;
    background: rgba(0,0,0,.92); cursor: zoom-out;
}

.pg-lightbox-container {
    position: relative; z-index: 1;
    max-width: min(90vw, 1000px); max-height: 90vh;
    display: flex; align-items: center; justify-content: center;
}

.pg-lightbox-image-wrap {
    max-width: 100%; max-height: 90vh;
    display: flex; align-items: center; justify-content: center;
}

.pg-lightbox-image {
    max-width: min(90vw, 1000px);
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
    transition: opacity 120ms ease;
}

.pg-lightbox-close {
    position: fixed; top: 20px; right: 20px; z-index: 3;
    background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.25);
    color: #fff; border-radius: 50%;
    width: 44px; height: 44px; padding: 0;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: background 150ms ease;
}

.pg-lightbox-close:hover { background: rgba(255,255,255,.25); }

.pg-lightbox-nav {
    position: fixed; top: 50%; transform: translateY(-50%);
    z-index: 3; background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.2); color: #fff;
    border-radius: 50%; width: 48px; height: 48px; padding: 0;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: background 150ms ease;
}

.pg-lightbox-nav:hover { background: rgba(255,255,255,.2); }
.pg-lightbox-prev { left: 20px; transform: translateY(-50%) rotate(180deg); }
.pg-lightbox-next { right: 20px; }

.pg-lightbox-counter {
    position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
    color: rgba(255,255,255,.7); font-size: var(--font-size-sm);
    background: rgba(0,0,0,.4); padding: 4px 12px; border-radius: 20px;
}


/* ── 4. Fly-to-Cart ──────────────────────────────────────────────────────── */

.fly-to-cart-clone {
    pointer-events: none;
    border-radius: 8px;
    object-fit: cover;
}

[data-cart-count].pulse {
    animation: cart-pulse 300ms ease;
}

@keyframes cart-pulse {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.4); }
    100% { transform: scale(1); }
}


/* ── 5. Bundle Box ───────────────────────────────────────────────────────── */

.bundle-box {
    border: 2px solid var(--color-badge-bundle);
    border-radius: var(--product-card-radius);
    padding: 20px;
    background: color-mix(in srgb, var(--color-badge-bundle) 6%, var(--color-background));
}

.bundle-box-header {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 16px;
    color: var(--color-badge-bundle);
}

.bundle-box-title { font-weight: 700; font-size: var(--font-size-base); }

.bundle-products {
    display: flex; align-items: center; gap: 8px;
    flex-wrap: wrap; margin-bottom: 16px;
}

.bundle-plus {
    font-size: 20px; font-weight: 700;
    color: var(--color-text-muted); flex-shrink: 0;
}

.bundle-product-item {
    display: flex; flex-direction: column; align-items: center;
    gap: 4px; text-align: center;
    flex: 0 0 auto; width: 90px;
}

.bundle-product-image-link { position: relative; display: block; }

.bundle-product-thumb {
    width: 80px; height: 80px; object-fit: cover;
    border-radius: 6px; border: 1px solid var(--color-border);
}

.bundle-current-badge {
    position: absolute; bottom: -4px; left: 50%;
    transform: translateX(-50%);
    background: var(--color-badge-bundle); color: #fff;
    font-size: 10px; font-weight: 700; padding: 2px 6px;
    border-radius: 3px; white-space: nowrap;
}

.bundle-product-name {
    font-size: 11px; color: var(--color-text-muted);
    line-height: 1.3; max-width: 90px;
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
}

.bundle-product-price { font-size: 12px; font-weight: 700; color: var(--color-text); }

.bundle-pricing { margin-bottom: 16px; }

.bundle-price-row {
    display: flex; justify-content: space-between;
    padding: 4px 0; font-size: var(--font-size-sm);
    border-bottom: 1px dashed var(--color-border);
}

.bundle-price-row:last-child { border-bottom: none; }

.bundle-savings-row .bundle-savings { color: var(--color-sale); font-weight: 700; }

.bundle-total-row {
    font-weight: 700; font-size: var(--font-size-base);
    padding-top: 8px !important;
}

.bundle-total-row .bundle-price-final { color: var(--color-badge-bundle); }

.bundle-add-to-cart {
    width: 100%; gap: 8px; justify-content: center;
    background-color: var(--color-badge-bundle);
}

.bundle-add-to-cart:hover { filter: brightness(0.9); }

.bundle-btn-spinner {
    width: 16px; height: 16px;
    border: 2px solid rgba(255,255,255,.4); border-top-color: #fff;
    border-radius: 50%; animation: bundle-spin 0.6s linear infinite;
}

@keyframes bundle-spin { to { transform: rotate(360deg); } }

@media (max-width: 480px) {
    .bundle-products { gap: 4px; }
    .bundle-product-item { width: 72px; }
    .bundle-product-thumb { width: 64px; height: 64px; }
}


/* ── 6. Cart Drawer ──────────────────────────────────────────────────────── */

.cart-drawer {
    position: fixed; inset: 0; z-index: 500;
    pointer-events: none;
    visibility: hidden;
    overflow: hidden;
}

.cart-drawer.is-open {
    pointer-events: all;
    visibility: visible;
}

.cart-drawer-overlay {
    position: absolute; inset: 0;
    background: rgba(0,0,0,.5);
    opacity: 0; transition: opacity 300ms ease;
}

.cart-drawer.is-open .cart-drawer-overlay { opacity: 1; }

.cart-drawer-panel {
    position: absolute; top: 0; right: 0; bottom: 0;
    width: min(420px, 100vw);
    background: var(--color-background);
    box-shadow: -4px 0 32px rgba(0,0,0,.15);
    display: flex; flex-direction: column;
    transform: translateX(100%);
    transition: transform 300ms cubic-bezier(.4,0,.2,1);
}

.cart-drawer.is-open .cart-drawer-panel { transform: translateX(0); }

.cart-drawer-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 24px; border-bottom: 1px solid var(--color-border);
    flex-shrink: 0;
}

.cart-drawer-title {
    display: flex; align-items: center; gap: 8px;
    font-weight: 700; font-size: var(--font-size-base);
}

.cart-drawer-count {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 22px; height: 22px; padding: 0 5px;
    background: var(--color-primary); color: #fff;
    font-size: 12px; font-weight: 700; border-radius: 999px; line-height: 1;
}

.cart-drawer-close {
    display: flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 50%;
    border: 1px solid var(--color-border); background: none;
    cursor: pointer; color: var(--color-text);
    transition: background 150ms ease; padding: 0;
}

.cart-drawer-close:hover { background: var(--color-surface); }

.cart-drawer-body {
    flex: 1; overflow-y: auto; padding: 16px 24px;
    -webkit-overflow-scrolling: touch;
}

.cart-drawer-empty {
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; height: 100%; gap: 16px;
    color: var(--color-text-muted); text-align: center;
}

.cart-drawer-items { list-style: none; margin: 0; padding: 0; }

.cart-drawer-item {
    display: grid; grid-template-columns: 80px 1fr 24px;
    gap: 12px; align-items: start;
    padding-block: 14px; border-bottom: 1px solid var(--color-border);
}

.cdi-image { width: 80px; height: 80px; border-radius: 6px; overflow: hidden; background: var(--color-surface); }
.cdi-image img { width: 100%; height: 100%; object-fit: cover; }

.cdi-details { display: flex; flex-direction: column; gap: 4px; }

.cdi-name {
    font-size: var(--font-size-sm); font-weight: 600;
    color: var(--color-text); text-decoration: none; line-height: 1.35;
}

.cdi-name:hover { color: var(--color-primary); }

.cdi-variation { font-size: 12px; color: var(--color-text-muted); }

.cdi-price-row { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.cdi-qty  { font-size: 12px; color: var(--color-text-muted); }
.cdi-price { font-size: var(--font-size-sm); font-weight: 700; }

.cdi-remove {
    display: flex; align-items: center; justify-content: center;
    width: 24px; height: 24px; color: var(--color-text-muted);
    transition: color 150ms ease; border-radius: 50%;
}

.cdi-remove:hover { color: var(--color-sale); }

.cart-drawer-footer {
    padding: 16px 24px; border-top: 1px solid var(--color-border); flex-shrink: 0;
}

.cart-drawer-subtotal {
    display: flex; justify-content: space-between; align-items: center;
    font-weight: 700; font-size: var(--font-size-base); margin-bottom: 14px;
}

.cart-drawer-actions { display: flex; gap: 10px; }

.cart-drawer-view-cart,
.cart-drawer-checkout { flex: 1; justify-content: center; }


/* ── 7. WC Single Product Overrides ──────────────────────────────────────── */

.woocommerce div.product .product_title {
    font-size: var(--font-size-xl); margin-bottom: 8px;
}

.woocommerce div.product p.price,
.woocommerce div.product span.price {
    font-size: 26px; font-weight: 700; color: var(--color-text);
}

.woocommerce div.product form.cart { margin-block: 16px; }

.woocommerce div.product form.cart .qty {
    width: 60px; text-align: center; padding: 10px 8px;
    border: 1px solid var(--color-border); border-radius: var(--btn-radius);
}

.woocommerce #respond input#submit,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce div.product form.cart .button {
    background: var(--btn-bg); color: var(--btn-color);
    border-radius: var(--btn-radius); font-weight: var(--btn-font-weight);
    padding: var(--btn-padding); border: var(--btn-border);
    transition: background 150ms ease, color 150ms ease;
}

.woocommerce div.product form.cart .button:hover {
    background: var(--btn-bg-hover); color: var(--btn-color-hover);
}

/* ── Product Tabs — vollbreiter Abschnitt unter dem Produkt-Grid ─────────── */

.sp-tabs-section {
    margin-top: 56px;
    border-top: 1px solid var(--color-border);
    padding-top: 0;
}

/* Reset WC default tab styling */
.sp-tabs-section .woocommerce-tabs {
    float: none;
    width: 100%;
}

/* Tab nav */
.sp-tabs-section .woocommerce-tabs ul.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    list-style: none;
    padding: 0;
    margin: 0;
    border-bottom: 2px solid var(--color-border);
    overflow: hidden;
}

.sp-tabs-section .woocommerce-tabs ul.tabs::before,
.sp-tabs-section .woocommerce-tabs ul.tabs::after { display: none; }

.sp-tabs-section .woocommerce-tabs ul.tabs li {
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 0;
    background: none;
    position: relative;
}

.sp-tabs-section .woocommerce-tabs ul.tabs li::before,
.sp-tabs-section .woocommerce-tabs ul.tabs li::after { display: none; }

.sp-tabs-section .woocommerce-tabs ul.tabs li a {
    display: block;
    padding: 14px 20px;
    font-family: var(--font-primary);
    font-size: var(--font-size-sm);
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    text-decoration: none;
    border: none;
    background: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 150ms ease, border-color 150ms ease;
    white-space: nowrap;
}

.sp-tabs-section .woocommerce-tabs ul.tabs li a:hover {
    color: var(--color-text);
}

.sp-tabs-section .woocommerce-tabs ul.tabs li.active a {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

/* Tab content panels */
.sp-tabs-section .woocommerce-tabs .panel {
    padding: 32px 0 48px;
    max-width: 800px;
}

.sp-tabs-section .woocommerce-tabs .panel h2 {
    display: none; /* WC renders a redundant h2 inside each panel */
}

.sp-tabs-section .woocommerce-tabs .panel p,
.sp-tabs-section .woocommerce-tabs .panel li {
    font-size: var(--font-size-base);
    line-height: 1.7;
    color: var(--color-text);
}

/* Reviews tab */
#tab-reviews { max-width: 680px; }
#reviews .woocommerce-Reviews-title { display: none; }
#reviews #comments { margin-bottom: 32px; }

/* ── Groessentabelle ─────────────────────────────────────────────────────── */

.sp-size-table {
    overflow-x: auto;
}

.size-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--font-size-sm);
}

.size-table th,
.size-table td {
    padding: 10px 16px;
    text-align: center;
    border-bottom: 1px solid var(--color-border);
}

.size-table th {
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    font-size: 11px;
    background: var(--color-surface);
    color: var(--color-text-muted);
}

.size-table td:first-child {
    font-weight: 700;
    color: var(--color-primary);
}

.size-table tr:last-child td { border-bottom: none; }
.size-table tr:hover td { background: var(--color-surface); }

.size-table-note {
    margin-top: 16px;
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    font-style: italic;
}


/* ── Mobile Product Layout Reorder ──────────────────────────────────────── */

/*
 * Desktop: 2-column grid  [gallery | details-top + details-bot]
 * Mobile:  single column, explicit order:
 *            1. sp-details-top  (Title, Price, Add-to-Cart)
 *            2. sp-gallery-col  (Images)
 *            3. sp-details-bot  (Description, Tabs, Bundles)
 *
 * The grid has 2 columns on desktop. On mobile we stack to 1 column
 * and use `order` to control sequence.
 */

.single-product-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto 1fr;
    grid-template-areas:
        "gallery  details-top"
        "gallery  details-bot";
    gap: 40px 48px;
    align-items: start;
    padding-block: 32px;
}

.sp-gallery-col  {
    grid-area: gallery;
    position: sticky;
    top: calc( var(--header-height) + 24px );
}

.sp-details-top { grid-area: details-top; }
.sp-details-bot { grid-area: details-bot; display: flex; flex-direction: column; gap: 24px; }

@media (max-width: 900px) {
    .single-product-layout {
        grid-template-columns: 1fr;
        grid-template-areas: none;   /* reset named areas */
        gap: 20px;
    }

    .sp-gallery-col  { position: static; grid-area: unset; order: 2; }
    .sp-details-top  { grid-area: unset; order: 1; }
    .sp-details-bot  { grid-area: unset; order: 3; }
}


/* ── Variation Swatches ──────────────────────────────────────────────────── */

/*
 * WooCommerce renders variations as <select> dropdowns by default.
 * Our JS (product.js) reads each <select>, hides it, and injects a
 * .us-swatch-group button group directly after it.
 * Selecting a button sets the original <select> value and fires 'change',
 * so WC's own variation logic (price update, stock check, add-to-cart state)
 * keeps working without modification.
 */

/* Hide original WC selects once enhanced */
.variations select.us-enhanced {
    display: none !important;
}

/* Variation table */
.variations {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 16px;
}

.variations td,
.variations th {
    padding: 8px 0;
    vertical-align: middle;
}

.variations th.label {
    font-size: var(--font-size-sm);
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    padding-right: 16px;
    white-space: nowrap;
    width: 1%;
}

.variations td.value {
    width: 100%;
}

.variations .reset_variations {
    display: inline-block;
    font-size: 11px;
    color: var(--color-text-muted);
    text-decoration: underline;
    margin-top: 6px;
    cursor: pointer;
}

/* ── Swatch group ─────────────────────────────────────────────────────────── */

.us-swatch-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding: 4px 0;
}

/* ── Text / Size pills  (XS S M L XL XXL) ───────────────────────────────── */

.us-swatch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 40px;
    padding: 0 14px;
    border: 1.5px solid var(--color-border);
    border-radius: 3px;          /* leicht eckig — passend zum Purrshido-Stil */
    background: var(--color-background);
    color: var(--color-text);
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font-primary);
    letter-spacing: .04em;
    cursor: pointer;
    transition:
        border-color 140ms ease,
        background   140ms ease,
        color        140ms ease,
        box-shadow   140ms ease;
    white-space: nowrap;
    user-select: none;
    line-height: 1;
    -webkit-tap-highlight-color: transparent;
}

.us-swatch:hover:not(.is-disabled) {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.us-swatch.is-selected {
    border-color: var(--color-primary);
    background: var(--color-primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(var(--color-primary-rgb, 200,16,46), .25);
}

.us-swatch.is-disabled {
    opacity: 0.35;
    cursor: not-allowed;
    position: relative;
}

/* Durchgestrichen-Linie für nicht verfügbare Größen */
.us-swatch.is-disabled::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 130%;
    height: 1.5px;
    background: currentColor;
    opacity: 0.5;
    transform: translate(-50%, -50%) rotate(-22deg);
    pointer-events: none;
}

.us-swatch.is-disabled:hover {
    border-color: var(--color-border);
    color: var(--color-text);
    background: var(--color-background);
}

/* ── Colour swatches ─────────────────────────────────────────────────────── */

.us-swatch-color {
    width: 34px;
    height: 34px;
    min-width: 34px;
    padding: 0;
    border-radius: 50%;
    border: 2px solid transparent;
    background: transparent;
    position: relative;
    box-shadow: 0 0 0 1.5px var(--color-border);
    transition:
        box-shadow 140ms ease,
        transform  140ms ease;
}

.us-swatch-color:hover:not(.is-disabled) {
    box-shadow: 0 0 0 2px var(--color-primary);
    transform: scale(1.08);
}

.us-swatch-color.is-selected {
    box-shadow:
        0 0 0 2px var(--color-background),
        0 0 0 4px var(--color-primary);
    transform: scale(1.1);
    background: transparent;
    border-color: transparent;
}

.us-swatch-dot {
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    pointer-events: none;
}

/* Checkmark auf selected Farb-Swatch */
.us-swatch-color.is-selected .us-swatch-dot::after {
    content: '';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    /* SVG-Checkmark als Pseudo-Element via clip-path */
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' fill='none' d='M2 6l3 3 5-5'/%3E%3C/svg%3E") center/60% no-repeat;
}

/* Für dunkle Swatches weißer Check — für helle dunkler */
.us-swatch-color[title*="eiß"].is-selected .us-swatch-dot::after,
.us-swatch-color[title*="ream"].is-selected .us-swatch-dot::after,
.us-swatch-color[title*="old"].is-selected .us-swatch-dot::after,
.us-swatch-color[title*="and"].is-selected .us-swatch-dot::after,
.us-swatch-color[title*="eige"].is-selected .us-swatch-dot::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' fill='none' d='M2 6l3 3 5-5'/%3E%3C/svg%3E");
}

/* ── Image swatches ──────────────────────────────────────────────────────── */

.us-swatch-image {
    width: 48px;
    height: 48px;
    min-width: 48px;
    padding: 2px;
    border-radius: 6px;
    overflow: hidden;
}

.us-swatch-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
    pointer-events: none;
}

/* ── Aktuell gewählte Variante anzeigen ──────────────────────────────────── */

/* Kleines Label neben dem Attributnamen das die Auswahl zeigt */
.us-swatch-selected-label {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    margin-left: 8px;
    font-weight: 400;
}

/* Size guide link (optional) */
.us-size-guide-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--color-text-muted);
    text-decoration: underline;
    margin-top: 6px;
}

/* WC variation stock / price update area */
.single_variation_wrap { margin-top: 8px; }
.woocommerce-variation-price .price { font-size: 22px; font-weight: 700; }

/* WC form — qty + button row */
.variations_form .woocommerce-variation-add-to-cart {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 16px;
}

.variations_form .qty {
    width: 64px;
    text-align: center;
}

@media (max-width: 480px) {
    .us-swatch { min-width: 36px; height: 36px; padding: 0 10px; font-size: 13px; }
    .us-swatch-color { width: 32px; height: 32px; min-width: 32px; }
}


/* ── Related / Upsell Product Strips ─────────────────────────────────────── */

.product-strip {
    margin-top: 48px;
    padding-top: 40px;
    border-top: 1px solid var(--color-border);
}

.product-strip-title {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    margin: 0 0 24px;
    color: var(--color-text);
}

/*
 * Desktop: CSS Grid, up to 4 columns.
 * Mobile: horizontal scroll strip — no JS, pure CSS overflow scroll.
 */

.product-strip-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    /* Hide scrollbar but keep functional */
    scrollbar-width: none;
}

.product-strip-scroll::-webkit-scrollbar { display: none; }

.product-strip-track {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

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

/* Mobile: fixed-width cards in a scrollable row */
@media (max-width: 768px) {
    .product-strip-track {
        display: flex;
        gap: 12px;
        padding-bottom: 8px; /* space for scroll momentum */
    }

    .product-strip-track .product-card {
        flex: 0 0 200px;
        min-width: 0;
    }
}

@media (max-width: 480px) {
    .product-strip-track .product-card {
        flex: 0 0 160px;
    }
}
