/* Ecoestic — reusable form, button, product, cart components. */

.eco-form { display: flex; flex-direction: column; gap: var(--eco-space-4); width: 100%; max-width: 100%; }
.eco-field { display: flex; flex-direction: column; gap: var(--eco-space-2); }
.eco-label { font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--eco-muted); }

.eco-form input[type="text"],
.eco-form input[type="email"],
.eco-form input[type="tel"],
.eco-form input[type="number"],
.eco-form select,
.eco .eco-select {
    border: 1px solid var(--eco-line-strong);
    background: var(--eco-bg);
    color: var(--eco-fg);
    padding: 12px 14px;
    font-size: 16px;
    border-radius: var(--eco-radius);
    width: 100%;
    font-family: inherit;
}

/* Custom select: use SVG caret with extra right padding for breathing room. */
.eco .eco-select,
.eco-form select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' stroke='%23000' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
    background-repeat: no-repeat;
    background-position: right 18px center;
    background-size: 12px 8px;
    padding-right: 44px;
}
.eco-form select:disabled { color: var(--eco-muted); border-color: var(--eco-line); opacity: 0.7; }

.eco-checkbox, .eco-radio {
    display: inline-flex;
    align-items: flex-start;
    gap: var(--eco-space-3);
    font-size: 14px;
    color: var(--eco-fg);
    cursor: pointer;
}
.eco-checkbox input, .eco-radio input { margin-top: 4px; }
/* v1.2.1 — square checkbox, black checked state */
.eco-checkbox input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px; height: 18px;
    border: 1px solid #000;
    border-radius: 0 !important;
    background: #fff;
    cursor: pointer;
    flex: 0 0 18px;
    position: relative;
    margin-top: 2px;
}
.eco-checkbox input[type="checkbox"]:checked {
    background: #000;
    border-color: #000;
}
.eco-checkbox input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    left: 5px; top: 1px;
    width: 5px; height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.eco-checkbox a { color: #000 !important; font-weight: 700; text-decoration: underline; }

.eco-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--eco-line-strong);
    background: var(--eco-bg);
    color: var(--eco-fg);
    padding: 14px 24px;
    font-size: 14px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease, opacity 0.15s ease;
    font-family: inherit;
    border-radius: var(--eco-radius);
}
.eco-btn:hover { background: var(--eco-fg); color: var(--eco-accent-fg); }
.eco-btn--primary { background: var(--eco-fg); color: var(--eco-accent-fg); }
/* Unified primary CTA hover — matches the "Slutför köp via Swish" button (#222). */
.eco-btn--primary:hover { background: #222; }
.eco-cart-checkout.is-disabled,
.eco-btn.is-disabled,
.eco-btn[aria-disabled="true"] {
    background: #bbb !important;
    color: #fff !important;
    border-color: #bbb !important;
    cursor: not-allowed;
    pointer-events: auto;
    opacity: 0.85;
}
.eco-btn--block { width: 100%; }
.eco-btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* Product list */
.eco-product-list { display: flex; flex-direction: column; gap: var(--eco-space-7); }
.eco-product {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    gap: var(--eco-space-6);
    align-items: start;
    padding-bottom: var(--eco-space-7);
    border-bottom: 1px solid var(--eco-line);
}
.eco-product:last-child { border-bottom: 0; }
.eco-product.is-out-of-stock { opacity: 0.65; }

.eco-product__media { display: flex; flex-direction: column; gap: var(--eco-space-3); }

/* Gallery */
.eco-product__gallery { position: relative; }
.eco-product__viewport {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #f4f4f4;
    overflow: hidden;
}
.eco-product__slide {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.eco-product__slide.is-current { opacity: 1; position: relative; }
.eco-product__placeholder { width: 100%; aspect-ratio: 1 / 1; background: #f4f4f4; }
.eco-product__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.95);
    border: 1px solid var(--eco-line);
    width: 36px; height: 36px;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    color: #000;
    display: flex; align-items: center; justify-content: center;
    z-index: 3;
    border-radius: 0;
    padding: 0;
}
.eco-product__nav:hover { background: #fff; }
.eco-product__nav:focus { outline: 2px solid var(--eco-fg); outline-offset: -2px; }
.eco-product__nav--prev { left: 8px; }
.eco-product__nav--next { right: 8px; }
.eco-product__dots {
    display: flex; gap: 6px; justify-content: center;
    margin-top: var(--eco-space-3);
}
.eco-product__dot {
    width: 8px; height: 8px;
    border-radius: 999px;
    border: none;
    background: #ccc;
    cursor: pointer;
    padding: 0;
}
.eco-product__dot.is-current { background: #000; }

/* Product body */
.eco-product__title {
    font-family: var(--eco-font-display);
    font-size: 26px;
    margin: 0 0 var(--eco-space-2);
    font-weight: 500;
    color: #000;
}
.eco-product__price { font-size: 18px; margin: 0 0 var(--eco-space-3); color: #000; display: inline-flex; gap: 10px; align-items: baseline; }
.eco-product__price-sale { color: #000; font-weight: 600; }
.eco-product__price-regular { color: var(--eco-muted); text-decoration: line-through; font-size: 15px; }
.eco-product__stock-out { color: #b00020; font-size: 13px; margin: 0 0 var(--eco-space-3); text-transform: uppercase; letter-spacing: 0.06em; }
.eco-product__stock-low { color: #b06000; font-size: 13px; margin: 0 0 var(--eco-space-3); }
.eco-product__short { color: var(--eco-muted); margin: 0 0 var(--eco-space-4); }

/* "No student selected" support note + inline call-to-action link.
   The intro sentence stays muted, the CTA link is bold black underlined
   so it reads as the primary action of the message. */
.eco-support--no-student { display: block; }
.eco-support__link {
    color: #000;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.eco-support__link:hover,
.eco-support__link:focus { color: #000; text-decoration: underline; }

/* When no student is selected, the entire add-to-cart form on each product
   card is greyed out as a UX safeguard. The native :disabled state on the
   inputs/buttons handles interaction blocking; this only adjusts visuals so
   the user immediately sees the controls are inactive. */
.eco-product.is-no-student .eco-product__form { opacity: 0.5; }
.eco-product.is-no-student .eco-qty__controls,
.eco-product.is-no-student .eco-btn--primary { cursor: not-allowed; }

/* Read more (smooth animation via grid-template-rows trick) */
.eco-product__more {
    border-top: 1px solid var(--eco-line);
    border-bottom: 1px solid var(--eco-line);
    margin: 0 0 var(--eco-space-5);
}
.eco-product__more-toggle {
    background: none;
    border: none;
    cursor: pointer;
    width: 100%;
    text-align: left;
    padding: var(--eco-space-3) 0;
    font-family: inherit;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #000;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.eco-product__more-toggle::after {
    content: '+';
    font-size: 18px;
    line-height: 1;
    transition: transform 0.3s ease;
}
.eco-product__more-toggle[aria-expanded="true"]::after {
    content: '−';
}
.eco-product__more-panel {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.35s ease;
}
.eco-product__more-panel > * { overflow: hidden; }
.eco-product__more.is-open .eco-product__more-panel { grid-template-rows: 1fr; }
.eco-product__long {
    padding: var(--eco-space-3) 0 var(--eco-space-4);
    color: #000;
}

/* Add to cart row: align qty stepper baseline with button */
.eco-product__form {
    display: flex;
    gap: var(--eco-space-4);
    align-items: flex-end;
    flex-wrap: wrap;
    margin-top: var(--eco-space-5);
}

/* Quantity stepper */
.eco-qty { display: flex; flex-direction: column; gap: var(--eco-space-2); }
.eco-qty__controls {
    display: inline-flex;
    align-items: stretch;
    border: 1px solid var(--eco-line-strong);
    height: 50px;
    border-radius: 0;
    overflow: hidden;
}
.eco-qty__btn {
    width: 40px;
    background: #fff;
    border: none;
    border-right: 1px solid var(--eco-line-strong);
    font-size: 18px;
    cursor: pointer;
    color: #000;
    line-height: 1;
    padding: 0;
    transition: background 0.15s ease, color 0.15s ease;
    /* Prevent the browser from triggering double-tap-to-zoom when the
       user rapidly increments / decrements the quantity on mobile. */
    touch-action: manipulation;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}
.eco-qty__input {
    /* Same: stop double-tap zoom when the user taps the input twice. */
    touch-action: manipulation;
}
.eco-qty__btn:last-child { border-right: none; border-left: 1px solid var(--eco-line-strong); }
.eco-qty__btn:hover { background: #000; color: #fff; }
.eco-qty__input {
    width: 60px;
    border: none !important;
    background: #fff;
    text-align: center;
    font-size: 16px;
    color: #000;
    padding: 0 !important;
    border-radius: 0 !important;
    -moz-appearance: textfield;
}
.eco-qty__input::-webkit-outer-spin-button,
.eco-qty__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Match button height to stepper height for alignment */
.eco-product__form .eco-btn { height: 50px; padding: 0 28px; }

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

    /* Inline (-) [input] (+) [Lägg i varukorg] on mobile so the user
       can adjust quantity and add to cart in one row. The "Antal"
       label is hidden on mobile (icons + button are self-explanatory)
       to save horizontal space. Tap targets stay 44px+ tall. */
    .eco-product__form {
        display: flex;
        flex-direction: row;
        align-items: stretch;
        gap: var(--eco-space-3);
        flex-wrap: nowrap;
    }
    .eco-product__form .eco-qty { flex: 0 0 auto; gap: 0; }
    .eco-product__form .eco-qty .eco-label { display: none; }
    .eco-product__form .eco-qty__controls { height: 44px; }
    .eco-product__form .eco-qty__btn { width: 38px; min-width: 38px; }
    .eco-product__form .eco-qty__input { width: 44px; font-size: 15px; }
    .eco-product__form .eco-btn {
        flex: 1 1 auto;
        height: 44px;
        padding: 0 16px;
        font-size: 13px;
        white-space: nowrap;
    }
}

@media (max-width: 380px) {
    /* Tighten further on very small phones without going under 38px tap targets. */
    .eco-product__form .eco-qty__btn { width: 36px; min-width: 36px; }
    .eco-product__form .eco-qty__input { width: 38px; }
    .eco-product__form .eco-btn { padding: 0 10px; font-size: 12px; letter-spacing: 0.04em; }
}

/* Cart toggle (floating + inline variants) */
.eco-cart-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--eco-fg);
    color: var(--eco-accent-fg);
    border: none;
    padding: 12px 18px;
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 0;
    font-family: inherit;
    line-height: 1;
}
.eco-cart-toggle__icon { display: inline-flex; align-items: center; }
.eco-cart-toggle__count {
    background: #fff;
    color: var(--eco-fg);
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    border-radius: 999px;
}

.eco-cart-toggle--floating {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 9998;
    box-shadow: var(--eco-shadow);
}

@media (max-width: 720px) {
    /* Mobile: icon + counter only */
    .eco-cart-toggle__label { display: none; }
    .eco-cart-toggle { padding: 10px 12px; gap: 8px; }
}

.eco-cart-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 9998;
}
.eco-cart-drawer {
    position: fixed; top: 0; right: 0; bottom: 0;
    width: min(400px, 100vw);
    background: var(--eco-bg);
    z-index: 9999;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    display: flex;
    flex-direction: column;
    box-shadow: var(--eco-shadow);
    font-family: var(--eco-font);
    color: var(--eco-fg);
}
.eco-cart-drawer.is-open { transform: translateX(0); }

.eco-cart-drawer__header {
    display: flex; justify-content: space-between; align-items: center;
    padding: var(--eco-space-5);
    border-bottom: 1px solid var(--eco-line);
}
.eco-cart-drawer__header h3 {
    margin: 0;
    font-family: var(--eco-font-display);
    font-weight: 500;
    color: #000;
}
.eco-cart-close {
    background: none; border: none; font-size: 28px; line-height: 1; cursor: pointer; color: #000;
}
.eco-cart-drawer__body { flex: 1; overflow: auto; padding: var(--eco-space-5); }
.eco-cart-empty { color: var(--eco-muted); text-align: center; }

/* Cart line in drawer */
.eco-cart-line {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--eco-space-3);
    padding: var(--eco-space-4) 0;
    border-bottom: 1px solid var(--eco-line);
}
.eco-cart-line__name {
    font-weight: 500;
    color: #000;
    margin-bottom: var(--eco-space-3);
}
.eco-cart-line__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--eco-space-3);
}
.eco-cart-line__qty-controls {
    display: inline-flex;
    align-items: stretch;
    border: 1px solid var(--eco-line-strong);
    height: 36px;
}
.eco-cart-line__qty-btn {
    width: 32px;
    background: #fff;
    border: none;
    border-right: 1px solid var(--eco-line-strong);
    cursor: pointer;
    font-size: 16px;
    color: #000;
    line-height: 1;
    padding: 0;
}
.eco-cart-line__qty-btn:last-child { border-right: none; border-left: 1px solid var(--eco-line-strong); }
.eco-cart-line__qty-btn:hover { background: #000; color: #fff; }
.eco-cart-line__qty-input {
    width: 44px;
    border: none;
    background: #fff;
    text-align: center;
    font-family: inherit;
    color: #000;
    -moz-appearance: textfield;
}
.eco-cart-line__qty-input::-webkit-outer-spin-button,
.eco-cart-line__qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.eco-cart-line__total { font-weight: 600; color: #000; }
.eco-cart-line__remove {
    background: none;
    border: none;
    color: var(--eco-muted);
    cursor: pointer;
    font-size: 12px;
    text-decoration: underline;
    padding: 0;
}

.eco-cart-drawer__footer {
    border-top: 1px solid var(--eco-line);
    padding: var(--eco-space-5);
    display: flex; flex-direction: column; gap: var(--eco-space-4);
}
.eco-cart-totals { display: flex; justify-content: space-between; font-size: 16px; color: #000; }

/* Checkout grid */
.eco-checkout-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: var(--eco-space-7);
}
@media (max-width: 720px) { .eco-checkout-grid { grid-template-columns: 1fr; } }

.eco-summary {
    border: 1px solid var(--eco-line);
    padding: var(--eco-space-5);
    background: #fafafa;
    align-self: start;
    color: #000;
}
.eco-summary__items { list-style: none; margin: 0 0 var(--eco-space-4); padding: 0; }
.eco-summary__items li { display: flex; justify-content: space-between; padding: var(--eco-space-2) 0; border-bottom: 1px dashed var(--eco-line); }
.eco-summary__totals { display: grid; grid-template-columns: 1fr auto; gap: var(--eco-space-2); margin: 0; }
.eco-summary__totals dt { color: var(--eco-muted); }
.eco-summary__totals dd { margin: 0; text-align: right; }
.eco-summary__totals .is-total { font-size: 18px; font-weight: 600; color: #000; padding-top: var(--eco-space-3); border-top: 1px solid var(--eco-line); }

/* Thank you */
.eco-thankyou__items { width: 100%; border-collapse: collapse; margin: var(--eco-space-5) 0; }
.eco-thankyou__items th, .eco-thankyou__items td { text-align: left; padding: var(--eco-space-3) 0; border-bottom: 1px solid var(--eco-line); color: #000; }
.eco-payment-status { margin-top: var(--eco-space-4); color: #000; }

/* v1.2.0 additions */

/* Body scroll lock when cart drawer is open */
.eco-scroll-lock { overflow: hidden !important; touch-action: none; }

/* Cart toggle uses same Jost font as the rest */
.eco-cart-toggle, .eco-cart-toggle__label, .eco-cart-toggle__count {
    font-family: 'Jost', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* Cart line — thumbnail */
.eco-cart-line__head {
    display: flex; align-items: center; gap: var(--eco-space-3);
    margin-bottom: var(--eco-space-3);
}
.eco-cart-line__thumb {
    width: 56px; height: 56px; object-fit: cover; flex: 0 0 56px;
    border: 1px solid var(--eco-line);
    background: #f5f5f5;
    display: block;
}
.eco-cart-line__thumb--placeholder { background: repeating-linear-gradient(45deg,#f0f0f0 0 8px,#fafafa 8px 16px); }
.eco-cart-line__name { margin-bottom: 0; }

/* Summary thumbnails */
.eco-summary__items { padding: 0; }
.eco-summary__item {
    display: grid !important;
    grid-template-columns: 44px 1fr auto;
    gap: var(--eco-space-3);
    align-items: center;
    padding: var(--eco-space-2) 0;
    border-bottom: 1px dashed var(--eco-line);
}
.eco-summary__thumb { width: 44px; height: 44px; object-fit: cover; border: 1px solid var(--eco-line); display: block; }
.eco-summary__thumb--placeholder { background: repeating-linear-gradient(45deg,#f0f0f0 0 8px,#fafafa 8px 16px); }
.eco-summary__name { color: #000; font-size: 14px; }
.eco-summary__amount { font-weight: 500; color: #000; }
.eco-summary__totals .is-discount { color: #b00020; }
.eco-summary--top { margin-bottom: var(--eco-space-6); }

/* Empty-cart row inside the checkout summary list */
.eco-summary__empty {
    display: block !important;
    grid-template-columns: none !important;
    color: #000;
    font-size: 14px;
    line-height: 1.5;
    padding: var(--eco-space-3) 0 !important;
    border-bottom: 1px dashed var(--eco-line);
}
.eco-summary__empty-link {
    color: #000;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.eco-summary__empty-link:hover,
.eco-summary__empty-link:focus { color: #000; text-decoration: underline; }

/* Disabled checkout form — when the cart becomes empty while the user
   is on /kassan, grey out every input and the Swish submit button. */
.eco-checkout-form--disabled { opacity: 0.55; }
.eco-checkout-form--disabled input,
.eco-checkout-form--disabled select,
.eco-checkout-form--disabled textarea,
.eco-checkout-form--disabled button {
    cursor: not-allowed !important;
    background-color: #f2f2f2 !important;
    color: #777 !important;
    border-color: #ddd !important;
}
.eco-checkout-form--disabled .eco-btn--primary,
.eco-checkout-form--disabled .eco-btn--swish {
    background-color: #bbb !important;
    border-color: #bbb !important;
    color: #fff !important;
}
.eco-checkout-form--disabled label { color: #777; }

/* Checkout v1.2.1 — full width stack, Jost everywhere */
.eco-checkout, .eco-checkout * { font-family: 'Jost', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.eco-checkout-stack { display: flex; flex-direction: column; gap: var(--eco-space-6); width: 100%; max-width: 100%; }
.eco-checkout-form { width: 100%; max-width: 100%; }
.eco-checkout-form .eco-h2 { margin-top: var(--eco-space-5); }
.eco-checkout-seo { color: var(--eco-muted); margin: 0 0 var(--eco-space-5); max-width: 100%; }
.eco-checkout .eco-summary { width: 100%; align-self: stretch; }
.eco-checkout .eco-form input { width: 100%; }
.eco-checkout-customer-help { color: var(--eco-muted); margin: 0 0 var(--eco-space-4); font-size: 14px; }
.eco-btn--swish { background: #000; color: #fff; border-color: #000; }
.eco-btn--swish:hover { background: #222; border-color: #222; }

/* Discount input */
.eco-discount__row { display: flex; gap: var(--eco-space-3); align-items: stretch; }
.eco-discount__input {
    flex: 1;
    border: 1px solid var(--eco-line-strong);
    background: #fff;
    padding: 12px 14px;
    font-size: 15px;
    font-family: inherit;
    border-radius: var(--eco-radius);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.eco-discount__apply { white-space: nowrap; }
.eco-discount__msg { margin-top: var(--eco-space-2); font-size: 13px; color: var(--eco-muted); }
.eco-discount__msg.is-error { color: #b00020; }

/* Thank you grid + thumbs */
.eco-thankyou-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: var(--eco-space-6);
    align-items: start;
}
@media (max-width: 720px) { .eco-thankyou-grid { grid-template-columns: 1fr; } }
.eco-thankyou__thumb { width: 56px; height: 56px; object-fit: cover; border: 1px solid var(--eco-line); display: block; }
.eco-thankyou__thumb--placeholder { width: 56px; height: 56px; background: repeating-linear-gradient(45deg,#f0f0f0 0 8px,#fafafa 8px 16px); }
.eco-thankyou__thumb-cell { width: 64px; padding-right: var(--eco-space-3) !important; }
.eco-thankyou__info { background: #fafafa; border: 1px solid var(--eco-line); padding: var(--eco-space-5); }
.eco-status { padding: 2px 8px; font-weight: 600; }
.eco-status--paid { color: #1a7f1a; }
.eco-status--pending { color: #b08400; }
.eco-status--failed { color: #b00020; }
.eco-status--cancelled { color: #555; }
.eco-status--refunded { color: #555; }

/* Read more — remove bottom border when collapsed (avoid extra gap) */
.eco-product__more { border-top: 1px solid var(--eco-line); margin-top: var(--eco-space-3); }
.eco-product__more-panel { display: none; }
.eco-product__more[data-eco-readmore].is-open .eco-product__more-panel { display: block; }

/* v1.2.1 — Disabled qty controls when out of stock */
.eco-qty__controls.is-disabled { opacity: 0.4; pointer-events: none; }
.eco-qty__btn:disabled, .eco-qty__input:disabled { cursor: not-allowed; background: #f5f5f5; color: #999; }
.eco-qty__input { outline: none !important; box-shadow: none !important; }

/* v1.2.1 — Thank-you single column stack */
.eco-thankyou-grid { display: flex; flex-direction: column; gap: var(--eco-space-6); }
.eco-thankyou__items, .eco-thankyou__info { width: 100%; }

/* ============================================================
 * Responsive sticky header (v1.3.3) — replaces the floating cart button.
 * ============================================================ */
.eco-header {
    position: sticky;
    top: 0;
    z-index: 9990;
    background: var(--eco-bg, #fff);
    border-bottom: 1px solid var(--eco-line);
    font-family: var(--eco-font);
}
.eco-header__inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 16px;
    /* Refinement 1: responsive percentage width instead of a fixed max-width
       so the header breathes on large displays (desktop 80% / tablet 90% / mobile 93%). */
    width: 80%;
    margin: 0 auto;
    padding: 12px 0;
    min-height: 64px;
    box-sizing: border-box;
}
/* Logo (custom logo image or text brand). */
.eco-header__logo { grid-column: 1; justify-self: start; display: flex; align-items: center; }
.eco-header__logo img,
.eco-header__logo .custom-logo { max-height: 44px; width: auto; height: auto; display: block; }
.eco-header__brand {
    font-family: var(--eco-font-display, var(--eco-font));
    font-weight: 600;
    font-size: 20px;
    letter-spacing: 0.02em;
    color: var(--eco-fg);
    text-decoration: none;
}
/* Desktop horizontal nav (centered). */
.eco-header__nav { grid-column: 2; justify-self: center; }
.eco-header__menu {
    display: flex;
    align-items: center;
    gap: 24px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.eco-header__menu li { margin: 0; }
.eco-header__menu a {
    color: var(--eco-fg);
    text-decoration: none;
    font-size: 14px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 8px 0;
    display: inline-block;
    border-bottom: 2px solid transparent;
}
.eco-header__menu a:hover,
.eco-header__menu .current-menu-item > a { border-bottom-color: #000; }
/* Cart slot. */
.eco-header__cart { grid-column: 3; justify-self: end; }
/* Hamburger (mobile/tablet only). */
.eco-header__burger {
    display: none;
    grid-column: 1;
    justify-self: start;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    color: #000;
}
.eco-header__burger-bars { display: inline-block; width: 24px; height: 16px; position: relative; }
.eco-header__burger-bars span {
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: #000;
    transition: transform 0.2s ease, opacity 0.2s ease;
}
.eco-header__burger-bars span:nth-child(1) { top: 0; }
.eco-header__burger-bars span:nth-child(2) { top: 7px; }
.eco-header__burger-bars span:nth-child(3) { top: 14px; }

@media (max-width: 1024px) {
    /* Refinement 1: tablet width 90%. */
    .eco-header__inner { grid-template-columns: 1fr auto 1fr; width: 90%; }
    .eco-header__nav { display: none; }
    .eco-header__burger { display: inline-flex; }
    .eco-header__logo { grid-column: 2; justify-self: center; }
    .eco-header__cart { grid-column: 3; justify-self: end; }
}

@media (max-width: 720px) {
    /* Refinement 1: mobile width 93%. */
    .eco-header__inner { width: 93%; }

    /* Refinement 4: configurable mobile logo max-height (CSS var set inline on
       the header from the "Mobil logotyphöjd" setting; falls back to 40px). */
    .eco-header__logo img,
    .eco-header__logo .custom-logo { max-height: var(--eco-mobile-logo-height, 40px); }

    /* Refinement 2: mobile cart becomes a classic icon-only button with a small
       quantity badge at the top-right corner (no heavy black background). */
    .eco-header__cart .eco-cart-toggle {
        background: transparent;
        color: var(--eco-fg);
        padding: 4px;
        gap: 0;
        position: relative;
    }
    .eco-header__cart .eco-cart-toggle__count {
        position: absolute;
        top: -4px;
        right: -6px;
        min-width: 16px;
        height: 16px;
        padding: 0 4px;
        font-size: 10px;
        background: var(--eco-fg);
        color: #fff;
        border: 1px solid #fff;
        border-radius: 999px;
    }
    /* Hide the badge entirely when the cart is empty (count = 0). */
    .eco-header__cart .eco-cart-toggle__count[data-eco-cart-count="0"] { display: none; }
}

/* Refinement 3: remove the iOS Safari / Edge tap-highlight flash on the header's
   interactive controls without losing keyboard focus visibility (:focus-visible). */
.eco-header__burger,
.eco-nav-drawer__close,
.eco-cart-toggle {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
}
.eco-header__burger:focus:not(:focus-visible),
.eco-nav-drawer__close:focus:not(:focus-visible),
.eco-cart-toggle:focus:not(:focus-visible) {
    outline: none;
}
.eco-header__burger:focus-visible,
.eco-nav-drawer__close:focus-visible,
.eco-cart-toggle:focus-visible {
    outline: 2px solid #000;
    outline-offset: 2px;
}

/* Off-canvas mobile navigation (slides from the left). */
.eco-nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 10000;
}
.eco-nav-drawer {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(320px, 85vw);
    background: var(--eco-bg, #fff);
    z-index: 10001;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    display: flex;
    flex-direction: column;
    box-shadow: var(--eco-shadow);
    font-family: var(--eco-font);
    color: var(--eco-fg);
}
.eco-nav-drawer.is-open { transform: translateX(0); }
.eco-nav-drawer__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--eco-space-5, 20px);
    border-bottom: 1px solid var(--eco-line);
}
.eco-nav-drawer__title {
    font-family: var(--eco-font-display, var(--eco-font));
    font-weight: 500;
    font-size: 16px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.eco-nav-drawer__close {
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #000;
    width: 44px;
    height: 44px;
}
.eco-nav-drawer__nav { overflow-y: auto; padding: 8px 0; }
.eco-nav-drawer__menu { list-style: none; margin: 0; padding: 0; }
.eco-nav-drawer__menu li { margin: 0; border-bottom: 1px solid var(--eco-line); }
.eco-nav-drawer__menu a {
    display: block;
    padding: 16px 20px;
    color: var(--eco-fg);
    text-decoration: none;
    font-size: 16px;
}
.eco-nav-drawer__menu a:hover,
.eco-nav-drawer__menu .current-menu-item > a { background: #000; color: #fff; }

/* ============================================================
 * Searchable select (v1.3.3) — combobox enhancement for large dropdowns.
 * ============================================================ */
.eco-ss { position: relative; }
/* Visually hide the native select but keep it submittable/validatable. */
.eco-ss__native {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}
.eco-ss__input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--eco-line-strong, #000);
    background: #fff;
    padding: 12px 14px;
    font-size: 15px;
    font-family: inherit;
    border-radius: 0;
    color: var(--eco-fg);
}
.eco-ss__input:focus { outline: none; border-color: #000; }
.eco-ss.is-disabled { opacity: 0.5; }
.eco-ss.is-disabled .eco-ss__input { cursor: not-allowed; }
.eco-ss__list {
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    right: 0;
    z-index: 60;
    max-height: 260px;
    overflow-y: auto;
    margin: 0;
    padding: 0;
    list-style: none;
    background: #fff;
    border: 1px solid var(--eco-line-strong, #000);
    box-shadow: var(--eco-shadow);
}
.eco-ss__option {
    padding: 12px 14px;
    cursor: pointer;
    font-size: 15px;
    line-height: 1.3;
}
.eco-ss__option.is-active,
.eco-ss__option:hover { background: #000; color: #fff; }
.eco-ss__option.is-selected { font-weight: 600; }
.eco-ss__empty { padding: 12px 14px; color: var(--eco-muted); font-size: 14px; }
