/**
 * FEWSET — Cart Page (inc/cart-page.php)
 *
 * Width model (site convention, e.g. css/contact-page.css): .fewset-cp breaks
 * out of the page container to the viewport, .fewset-cp__frame caps at 1920px,
 * content pads by --cp-gutter (56px desktop / 10px mobile).
 */

/* ============================================================
   FRAME
   ============================================================ */
.fewset-cp {
    --cp-gutter: 56px;
    --cp-hair: rgba(10, 10, 10, 0.12);

    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    background: var(--background);
    color: var(--on-surface);
    font-family: var(--font-primary);
}
.fewset-cp *,
.fewset-cp *::before,
.fewset-cp *::after { box-sizing: border-box; }

.fewset-cp__frame {
    max-width: 1920px;
    margin: 0 auto;
    padding: 40px var(--cp-gutter) 88px;
}

/* GP prints its own entry title on the page — ours lives in the template */
.woocommerce-cart .entry-header,
.woocommerce-cart .page-header { display: none; }

.fewset-cp__title {
    font-family: var(--font-heading);
    font-size: var(--headline-lg);
    font-weight: 500;
    letter-spacing: -0.02em;
    margin: 0 0 28px;
}

/* ============================================================
   LAYOUT — grid areas so the summary (with banners) follows the
   items directly on mobile, rails flow below:
     desktop: items|side / xsell|side / recent(full)
     mobile:  items → side → xsell → recent
   ============================================================ */
.fewset-cp__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 400px;
    grid-template-areas:
        "items  side"
        "xsell  side"
        "recent recent";
    gap: 32px;
    align-items: start;
}
.fewset-cp__area-items  { grid-area: items; }
.fewset-cp__area-side   {
    grid-area: side;
    /* the grid's align-items:start collapsed this cell to its content
       height, so the inner sticky had no room to travel — stretch it */
    align-self: stretch;
}
.fewset-cp__area-xsell  { grid-area: xsell; min-width: 0; }
.fewset-cp__area-recent { grid-area: recent; min-width: 0; }

.fewset-cp__sticky {
    position: sticky;
    top: 96px;
}

/* ============================================================
   ITEMS CARD + DELIVERY HEADER
   ============================================================ */
.fewset-cp__card {
    border: 1px solid var(--cp-hair);
    background: var(--surface);
}

.fewset-cp__ship {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px 16px;
    padding: 18px 22px;
    border-bottom: 1px solid var(--cp-hair);
}
.fewset-cp__ship-main { display: flex; align-items: baseline; gap: 14px; }
.fewset-cp__ship-label {
    font-size: 10px; font-weight: 500;
    letter-spacing: 0.22em; text-transform: uppercase;
    color: var(--on-surface-variant);
}
.fewset-cp__ship-dates {
    font-family: var(--font-heading);
    font-size: var(--title-md);
    font-weight: 600;
    letter-spacing: 0.01em;
}
.fewset-cp__ship-note {
    font-size: var(--body-sm);
    color: var(--on-surface-variant);
}

/* ---- rows ---- */
.fewset-cp__row {
    display: flex;
    gap: 18px;
    padding: 20px 22px;
    position: relative;
    transition: opacity var(--duration-base) var(--ease-luxe);
}
/* rows AND size-doubt strips both live in the items container */
.fewset-cp__items > * + * { border-top: 1px solid var(--cp-hair); }
.fewset-cp__row.is-busy { opacity: 0.45; pointer-events: none; }
.fewset-cp__row.is-removing { opacity: 0; }

.fewset-cp__img {
    flex: 0 0 96px;
    display: block;
    background: var(--surface-dim);
    aspect-ratio: 3 / 4;          /* product imagery is ALWAYS 3:4, never square */
    align-self: flex-start;
    overflow: hidden;
}
.fewset-cp__img img { display: block; width: 100%; height: 100%; object-fit: cover; }

.fewset-cp__mid { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.fewset-cp__name {
    font-size: var(--body-md);
    font-weight: 500;
    color: var(--on-surface);
    text-decoration: none;
    line-height: 1.35;
}
.fewset-cp__name:hover { text-decoration: underline; text-underline-offset: 3px; }
.fewset-cp__vars { font-size: 12px; line-height: 1.5; color: var(--on-surface-variant); }
.fewset-cp__vars dt,
.fewset-cp__vars dd,
.fewset-cp__vars p,
.fewset-cp__vars span {
    margin: 0; padding: 0;
    font-weight: 400;
    /* Woo/GP variation styles inflate dt/dd — pin everything to ours */
    font-size: inherit !important;
    line-height: inherit !important;
    color: inherit;
}
/* each attribute (size, colour, …) on its OWN row: label | value grid */
.fewset-cp__vars dl {
    display: grid;
    grid-template-columns: max-content auto;
    gap: 2px 6px;
    margin: 0;
}
.fewset-cp__vars dt { font-weight: 400; }
.fewset-cp__vars dd { min-width: 0; }
.fewset-cp__vars dd p { display: inline; }

.fewset-cp__unit { display: flex; align-items: baseline; gap: 8px; font-size: var(--body-sm); }
.fewset-cp__unit-old { text-decoration: line-through; color: var(--on-surface-variant); }
.fewset-cp__unit-now.is-sale { color: var(--error); }

/* qty stepper */
.fewset-cp__qty {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--cp-hair);
    width: max-content;
    margin-top: 2px;
}
.fewset-cp__qbtn {
    appearance: none;
    border: none;
    background: transparent;
    width: 32px; height: 32px;
    padding: 0;                    /* GP button padding shoves the glyph off-center */
    display: inline-flex;          /* true centering — baseline alignment sat the − low / + high */
    align-items: center;
    justify-content: center;
    font-size: 15px; line-height: 1;
    color: var(--on-surface);
    cursor: pointer;
    transition: background var(--duration-base) var(--ease-luxe);
}
.fewset-cp__qbtn:hover { background: var(--surface-dim); color: var(--on-surface); }
.fewset-cp__qval {
    min-width: 30px;
    text-align: center;
    font-size: var(--body-sm);
    font-weight: 500;
    line-height: 1;
}

/* right rail of a row: trash on top, line total below */
.fewset-cp__end {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
}
.fewset-cp__remove {
    appearance: none;
    border: none;
    background: transparent;
    padding: 4px;
    color: var(--on-surface-variant);
    cursor: pointer;
    transition: color var(--duration-base) var(--ease-luxe);
}
.fewset-cp__remove:hover { color: var(--on-surface); background: transparent; }
.fewset-cp__line {
    font-family: var(--font-heading);
    font-size: var(--title-md);
    font-weight: 600;
}

/* ---- inline remove confirmation (several rows can be pending at once) ---- */
.fewset-cp__row.is-pending .fewset-cp__confirm {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px 20px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(2px);
}
.fewset-cp__confirm-q {
    font-size: var(--body-sm);
    font-weight: 500;
    text-align: center;
}
.fewset-cp__confirm-btns { display: flex; gap: 10px; }
.fewset-cp__confirm-yes,
.fewset-cp__confirm-no {
    appearance: none;
    padding: 10px 18px;
    font-family: var(--font-primary);
    font-size: 10px; font-weight: 500;
    letter-spacing: 0.16em; text-transform: uppercase;
    cursor: pointer;
    transition: opacity var(--duration-base) var(--ease-luxe);
}
.fewset-cp__confirm-yes { background: var(--primary); color: var(--on-primary); border: 1px solid var(--primary); }
.fewset-cp__confirm-no  { background: transparent; color: var(--on-surface); border: 1px solid var(--cp-hair); }
/* GP's button:hover paints text white + strips backgrounds — pin BOTH */
.fewset-cp__confirm-yes:hover { opacity: 0.75; background: var(--primary); color: var(--on-primary); }
.fewset-cp__confirm-no:hover  { opacity: 0.75; background: transparent; color: var(--on-surface); }
.fewset-cp__confirm-swap {
    appearance: none;
    border: none;
    background: transparent;
    padding: 0;
    font-family: var(--font-primary);
    font-size: 11px; font-weight: 500;
    letter-spacing: 0.06em;
    color: var(--on-surface);
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
    flex-basis: 100%;
    text-align: center;
}
.fewset-cp__confirm-swap:hover { opacity: 0.6; background: transparent; color: var(--on-surface); }

/* ---- same product in several sizes: the whole group is accented ---- */
.fewset-cp__row--doubt,
.fewset-cp__sizedoubt { box-shadow: inset 3px 0 0 var(--on-surface); }

/* ---- "Dvejoji dėl dydžio?" strip (same product, several sizes) ---- */
.fewset-cp__sizedoubt {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
    padding: 12px 22px;
    background: var(--surface-dim);
    font-size: 12px;
}
.fewset-cp__sizedoubt-q { font-weight: 500; }
.fewset-cp__sizedoubt-btn {
    appearance: none;
    border: none;
    background: transparent;
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-primary);
    font-size: 12px; font-weight: 400;
    color: var(--on-surface);
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}
.fewset-cp__sizedoubt-btn:hover { opacity: 0.6; background: transparent; color: var(--on-surface); }

/* the size-guide drawer must clear the cart overlay (10040) + product
   modal (10050) when opened from the cart */
.wsgp-overlay { z-index: 10052 !important; }
.wsgp-drawer  { z-index: 10053 !important; }

/* ============================================================
   PRODUCT RAILS — cross-sell + recently viewed
   The <ul> carries the "products" class so the theme's card CSS
   (shop.css: 3:4 image, 12px title, price, heart) applies; the
   grid layout is overridden to a flex scroller, same pattern as
   the product rails (.kr-track).
   ============================================================ */
.fewset-cp__xsell { margin: 0; }
.fewset-cp__xsell-head { margin-bottom: 20px; }
.fewset-cp__xsell-eyebrow {
    display: block;
    font-size: 10px; font-weight: 500;
    letter-spacing: 0.22em; text-transform: uppercase;
    color: var(--on-surface-variant);
    margin-bottom: 6px;
}
.fewset-cp__xsell-title {
    font-family: var(--font-heading);
    font-size: var(--headline-sm);
    font-weight: 500;
    letter-spacing: -0.01em;
    margin: 0;
}

ul.products.fewset-cpx__track {
    list-style: none;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;             /* overrides shop.css grid !important */
    grid-template-columns: none !important;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
}
.fewset-cpx__track::-webkit-scrollbar { display: none; }

ul.products.fewset-cpx__track li.product.fewset-cpx__item {
    width: 205px !important;              /* overrides shop.css width:100% !important */
    flex: 0 0 205px;
    margin: 0 !important;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
}

/* (the rail cards have no add button — tapping the card image opens the
   theme product modal, same as everywhere else on the site) */

/* ============================================================
   RECENTLY VIEWED — the PDP's product-rail engine, embedded in the
   cart frame: kill its section margins + side insets (the frame's
   56/10px gutter already provides them; !important beats the rail's
   inline admin-config style vars).
   ============================================================ */
.fewset-cp__recentrail .fewset-rail {
    margin: 0 !important;
    --kr-l: 0px !important;
    --kr-r: 0px !important;
    --kr-head-l: 0px !important;
    --kr-head-r: 0px !important;
}

/* ============================================================
   PROMO BANNERS (admin: FEWSET » Krepšelis) — above the summary
   ============================================================ */
.fewset-cp__banners {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}
.fewset-cp__banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 15px 18px;
    text-decoration: none;
    font-size: var(--body-sm);
    font-weight: 500;
    line-height: 1.4;
}
a.fewset-cp__banner { transition: opacity var(--duration-base) var(--ease-luxe); }
a.fewset-cp__banner:hover { opacity: 0.88; }

/* with a background photo the strip grows and the text gets a soft scrim */
.fewset-cp__banner--img {
    min-height: 104px;
    align-items: flex-end;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.45);
}
.fewset-cp__banner--img .fewset-cp__banner-cta {
    background: rgba(0, 0, 0, 0.35);
    text-shadow: none;
    backdrop-filter: blur(2px);
}
.fewset-cp__banner-cta {
    flex: 0 0 auto;
    padding: 7px 14px;
    border: 1px solid currentColor;
    font-size: 10px; font-weight: 500;
    letter-spacing: 0.16em; text-transform: uppercase;
    white-space: nowrap;
}

/* ============================================================
   FREE-SHIPPING BAR — compact inside the cart summary and the
   checkout shipping step (the module's own inline styles size it
   for the PDP; here it's a supporting row, not a hero)
   ============================================================ */
.fewset-cp__sumcard .fewset-fpp-box,
.fewset-co__step-b .fewset-fpp-box {
    padding: 10px 12px !important;
    margin: 0 0 14px !important;
}
.fewset-cp__sumcard .fewset-fpp-final,
.fewset-co__step-b .fewset-fpp-final { gap: 10px !important; align-items: center !important; }
.fewset-cp__sumcard .fewset-fpp-final-check,
.fewset-co__step-b .fewset-fpp-final-check {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    flex: 0 0 24px !important;
}
.fewset-cp__sumcard .fewset-fpp-final-check svg,
.fewset-co__step-b .fewset-fpp-final-check svg { width: 11px !important; height: 11px !important; }
.fewset-cp__sumcard .fewset-fpp-msg,
.fewset-co__step-b .fewset-fpp-msg { font-size: 12px !important; line-height: 1.4 !important; }
.fewset-cp__sumcard .fewset-fpp-subtitle,
.fewset-co__step-b .fewset-fpp-subtitle { font-size: 9.5px !important; }

/* ============================================================
   SUMMARY (sticky right card)
   ============================================================ */
.fewset-cp__sumcard {
    border: 1px solid var(--cp-hair);
    background: var(--surface);
    padding: 22px;
}

.fewset-cp__sumrows { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.fewset-cp__sumcard > .fewset-cp__sumrows:first-child { margin-top: 0; }

.fewset-cp__sumrow {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    font-size: var(--body-sm);
    color: var(--on-surface);
}
.fewset-cp__sumrow--disc { color: var(--error); }
.fewset-cp__sum-muted { color: var(--on-surface-variant); }

/* discount-source chip on the Nuolaida row: coupon code (with ×) or the
   plugin fee name (e.g. Komplektas) */
.fewset-cp__sumsrc { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.fewset-cp__sumchip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 7px;
    border: 1px solid currentColor;
    font-size: 10px; font-weight: 500;
    letter-spacing: 0.08em; text-transform: uppercase;
    line-height: 1.3;
}
.fewset-cp__sumchip button {
    appearance: none; border: none; background: transparent;
    padding: 0; margin: 0;
    font-size: 12px; line-height: 1;
    color: inherit; cursor: pointer;
}
.fewset-cp__sumchip button:hover { opacity: 0.6; background: transparent; color: inherit; }

.fewset-cp__sumrow--total {
    border-top: 1px solid var(--cp-hair);
    padding-top: 14px;
    margin-top: 4px;
    font-size: var(--body-md);
    font-weight: 600;
}
.fewset-cp__sumrow--total small {
    font-size: var(--label-md);
    font-weight: 400;
    color: var(--on-surface-variant);
    margin-left: 4px;
}
.fewset-cp__grand {
    font-family: var(--font-heading);
    font-size: var(--title-lg);
    font-weight: 600;
}

.fewset-cp__checkout {
    display: block;
    width: 100%;
    margin-top: 20px;
    padding: 15px 0;
    background: var(--primary);
    color: var(--on-primary);
    text-align: center;
    text-decoration: none;
    font-size: 11px; font-weight: 500;
    letter-spacing: 0.2em; text-transform: uppercase;
    border: 1px solid var(--primary);
    transition: background var(--duration-base) var(--ease-luxe);
}
.fewset-cp__checkout:hover { background: var(--primary-hover); color: var(--on-primary); }

/* ---- coupon (always-visible form; applied codes live as chips on the
        Nuolaida summary row) ---- */
.fewset-cp__coupon-form { display: flex; gap: 8px; margin-top: 14px; }
.fewset-cp__coupon-form input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid var(--cp-hair);
    font-family: var(--font-primary);
    font-size: var(--body-sm);
    background: var(--surface);
    color: var(--on-surface);
}
.fewset-cp__coupon-form input:focus { outline: none; border-color: var(--outline); }
.fewset-cp__coupon-form button {
    appearance: none;
    padding: 0 16px;
    border: 1px solid var(--outline);
    background: transparent;
    color: var(--on-surface);
    font-size: 10px; font-weight: 500;
    letter-spacing: 0.16em; text-transform: uppercase;
    cursor: pointer;
    transition: background var(--duration-base) var(--ease-luxe),
                color var(--duration-base) var(--ease-luxe);
}
.fewset-cp__coupon-form button:hover { background: var(--primary); color: var(--on-primary); }

/* ============================================================
   EMPTY STATE — editorial hero: mono eyebrow, oversized display
   type with a light accent, CTA pair, banners + recent rail below
   ============================================================ */
.fewset-cp__empty {
    padding: clamp(56px, 10vw, 130px) 20px clamp(48px, 8vw, 110px);
    text-align: center;
    border-bottom: 1px solid var(--cp-hair);
    margin-bottom: 36px;
}
.fewset-cp__empty-eyebrow {
    display: block;
    font-size: 10px; font-weight: 500;
    letter-spacing: 0.24em; text-transform: uppercase;
    color: var(--on-surface-variant);
    margin-bottom: 22px;
}
.fewset-cp__empty-title {
    font-family: var(--font-heading);
    font-size: var(--display-md);
    font-weight: 500;
    letter-spacing: -0.03em;
    line-height: 1.02;
    margin: 0 0 20px;
}
.fewset-cp__empty-title em {
    font-style: normal;
    font-weight: 300;
    color: var(--on-surface-variant);
}
.fewset-cp__empty-sub {
    margin: 0 auto 34px;
    max-width: 420px;
    font-size: var(--body-md);
    line-height: 1.7;
    color: var(--on-surface-variant);
}
.fewset-cp__empty-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}
.fewset-cp__empty-cta {
    display: inline-block;
    width: auto;
    margin-top: 0;
    padding: 16px 52px;
}
.fewset-cp__empty-wl {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11px; font-weight: 500;
    letter-spacing: 0.16em; text-transform: uppercase;
    color: var(--on-surface);
    text-decoration: none;
    border-bottom: 1px solid currentColor;
    padding-bottom: 3px;
    transition: opacity var(--duration-base) var(--ease-luxe);
}
.fewset-cp__empty-wl:hover { opacity: 0.6; }

.fewset-cp--empty .fewset-cp__banners { max-width: 560px; margin: 0 auto 36px; }

/* coupon management on the empty cart */
.fewset-cp__empty-coupon { max-width: 340px; margin: 34px auto 0; }
.fewset-cp__empty-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 4px;
    color: var(--on-surface);
}
.fewset-cp__empty-coupon .fewset-cp__coupon-form { margin-top: 10px; }

/* ============================================================
   OVERLAY — the cart page opened as an instant "mini cart"
   (built by js/cart-page.js; server markup is identical)
   ============================================================ */
body.fewset-cpov-lock { overflow: hidden; }

.fewset-cpov {
    position: fixed;
    inset: 0;
    z-index: 10040;              /* above header/menus (~10005) but UNDER the
                                    product modal (10050) so quick-add works
                                    from inside the overlay */
    background: var(--background);
    overflow-y: auto;
    overscroll-behavior: contain;
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 260ms var(--ease-luxe), transform 260ms var(--ease-luxe);
}
.fewset-cpov.is-in { opacity: 1; transform: none; }

.fewset-cpov__bar {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 56px;
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(var(--glass-blur));
    backdrop-filter: blur(var(--glass-blur));
    border-bottom: 1px solid rgba(10, 10, 10, 0.12);
}
.fewset-cpov__title {
    font-family: var(--font-primary);
    font-size: 11px; font-weight: 500;
    letter-spacing: 0.22em; text-transform: uppercase;
}
.fewset-cpov__close {
    appearance: none;
    border: none;
    background: transparent;
    padding: 6px;
    color: var(--on-surface);
    cursor: pointer;
    display: inline-flex;
}
/* GP's default button hover paints the glyph white — hold our colour */
.fewset-cpov__close:hover {
    opacity: 0.6;
    color: var(--on-surface);
    background: transparent;
}

.fewset-cpov__loading {
    padding: 90px 20px;
    text-align: center;
    font-size: 11px; font-weight: 500;
    letter-spacing: 0.2em; text-transform: uppercase;
    color: var(--on-surface-variant);
}
.fewset-cpov__retry {
    display: block;
    margin: 18px auto 0;
    appearance: none;
    padding: 11px 24px;
    border: 1px solid var(--outline);
    background: transparent;
    color: var(--on-surface);
    font-family: var(--font-primary);
    font-size: 10px; font-weight: 500;
    letter-spacing: 0.16em; text-transform: uppercase;
    cursor: pointer;
    transition: background var(--duration-base) var(--ease-luxe),
                color var(--duration-base) var(--ease-luxe);
}
.fewset-cpov__retry:hover { background: var(--primary); color: var(--on-primary); }

.fewset-cpov__spin {
    display: block;
    width: 26px;
    height: 26px;
    margin: 0 auto 16px;
    border: 2px solid rgba(10, 10, 10, 0.14);
    border-top-color: var(--on-surface);
    border-radius: 50%;
    animation: fewset-cpov-spin 0.7s linear infinite;
}
@keyframes fewset-cpov-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    .fewset-cpov__spin { animation-duration: 1.6s; }
}

/* inside the overlay the container IS the viewport — undo the breakout,
   drop the duplicate page h1 (the bar already says Krepšelis) */
.fewset-cpov .fewset-cp { width: 100%; max-width: 100%; margin-left: 0; margin-right: 0; }
.fewset-cpov .fewset-cp__title { display: none; }
.fewset-cpov .fewset-cp__frame { padding-top: 30px; }
.fewset-cpov .fewset-cp__sticky { top: 66px; }   /* under the overlay bar, not the site header */

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1240px) {
    .fewset-cp__grid { grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; }
}

@media (max-width: 1024px) {
    /* One column, custom order: banners FIRST (above "Pristatymas"), then
       items, then "Klientai perka kartu" BEFORE the summary/checkout CTA,
       recent rail last. display:contents flattens the side wrappers so the
       banners and summary become orderable flex items. */
    .fewset-cp__grid {
        display: flex;
        flex-direction: column;
        align-items: stretch;   /* the desktop grid's align-items:start would
                                   shrink the banner to max-content — stretch
                                   keeps it the same width as the items card */
    }
    .fewset-cp__side,
    .fewset-cp__sticky { display: contents; }
    .fewset-cp__banners    { order: -1; margin-bottom: 0; }
    .fewset-cp__area-items { order: 0; }
    .fewset-cp__area-xsell { order: 1; }
    [data-cp-summary]    { order: 2; }
    .fewset-cp__area-recent { order: 3; }

    /* empty rail wrappers must not eat a flex gap slot */
    .fewset-cp__area-xsell:empty,
    .fewset-cp__area-recent:empty { display: none; }
}

@media (max-width: 768px) {
    .fewset-cp { --cp-gutter: 10px; }
    .fewset-cp__frame { padding-top: 22px; padding-bottom: 56px; }
    .fewset-cp__grid { gap: 20px; }

    /* ---- compact type ---- */
    .fewset-cp__title { margin-bottom: 14px; font-size: 20px; }
    .fewset-cp__ship { padding: 12px 14px; flex-direction: column; align-items: flex-start; gap: 3px; }
    .fewset-cp__ship-label { font-size: 9px; }
    .fewset-cp__ship-dates { font-size: 14px; }
    .fewset-cp__ship-note { font-size: 11px; }

    .fewset-cp__row { padding: 12px 14px; gap: 12px; }
    .fewset-cp__img { flex-basis: 72px; }
    .fewset-cp__name { font-size: 13px; }
    .fewset-cp__vars { font-size: 11px; }
    .fewset-cp__unit { font-size: 11px; }
    .fewset-cp__qbtn { width: 28px; height: 28px; font-size: 14px; }
    .fewset-cp__qval { min-width: 26px; font-size: 12px; }
    .fewset-cp__line { font-size: 14px; }
    .fewset-cp__confirm-q { font-size: 12px; }
    .fewset-cp__confirm-yes, .fewset-cp__confirm-no { padding: 9px 14px; font-size: 9px; }
    .fewset-cp__confirm-swap { font-size: 10px; }
    .fewset-cp__sizedoubt { padding: 10px 14px; font-size: 11px; }
    .fewset-cp__sizedoubt-btn { font-size: 11px; }

    .fewset-cp__xsell-eyebrow { font-size: 9px; }
    .fewset-cp__xsell-title { font-size: 15px; }
    .fewset-cp__xsell-head { margin-bottom: 14px; }
    ul.products.fewset-cpx__track li.product.fewset-cpx__item { width: 160px !important; flex-basis: 160px; }

    .fewset-cp__banner { padding: 12px 14px; font-size: 12px; }
    .fewset-cp__banner-cta { padding: 6px 11px; font-size: 9px; }
    .fewset-cp__banner--img { min-height: 88px; }

    .fewset-cp__sumcard { padding: 14px; }
    .fewset-cp__sumrow { font-size: 12px; }
    .fewset-cp__sumrow--total { font-size: 13px; padding-top: 12px; }
    .fewset-cp__grand { font-size: 17px; }
    .fewset-cp__checkout { padding: 13px 0; font-size: 10px; margin-top: 16px; }
    .fewset-cp__coupon-form input { padding: 9px 10px; font-size: 12px; }
    .fewset-cp__sumchip { font-size: 9px; padding: 2px 6px; }
    .fewset-cp__empty-sub { font-size: 12px; }
    .fewset-cp__empty-cta { padding: 14px 40px; }

    .fewset-cpov__bar { padding: 12px 10px; }
}


/* ==========================================================================
   GIFT ROWS (inc/product-gifts.php) — server-owned lines: DOVANA chip,
   struck real price + 0,00 €, no qty stepper / remove / swap.
   ========================================================================== */

.fewset-cp__giftchip {
    display: inline-flex;
    align-items: center;
    vertical-align: 2px;
    margin-left: 8px;
    padding: 2px 6px;
    border: 1px solid currentColor;
    font-size: 9px; font-weight: 600;
    letter-spacing: 0.12em; text-transform: uppercase;
    line-height: 1.3;
}

.fewset-cp__qty--gift {
    border: none;
    margin-top: 2px;
    font-size: 11px;
    color: var(--on-surface-variant);
}

/* Bundle frame: PHP wraps the trigger row(s) + gift row in .fewset-cp__bundleset
   so the pair reads as ONE unit — shared border, dashed inner seam and a "+"
   medallion on the seam. NOTE: nesting removes these rows from the
   `.fewset-cp__items > * + *` separator scope, so the frame owns its seams. */
.fewset-cp__bundleset {
    position: relative;
    margin: 16px;
    border: 1px solid color-mix(in srgb, var(--on-surface) 40%, transparent);
}
.fewset-cp__bundleset > * + * { border-top: 1px dashed var(--cp-hair); }

.fewset-cp__row--gift {
    background: var(--surface-dim);
    padding-top: 14px;
    padding-bottom: 14px;
}
/* orphan gift row (trigger gone mid-request, no frame) still separates softly */
.fewset-cp__items > * + .fewset-cp__row--gift { border-top: 1px dashed var(--cp-hair); }
.fewset-cp__row--gift .fewset-cp__img { flex-basis: 64px; position: relative; }

/* the "+" medallion — sits ON the seam between product and gift */
.fewset-cp__bundleset .fewset-cp__row--gift::before {
    content: '+';
    position: absolute;
    top: -13px;
    left: 44px;
    width: 25px; height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid color-mix(in srgb, var(--on-surface) 40%, transparent);
    font-size: 15px; font-weight: 500; line-height: 1;
    color: var(--on-surface);
    z-index: 1;
}

/* present badge — corner tag on gift imagery (also used by the PDP notice) */
.fewset-gwp-badge {
    position: absolute;
    right: 0; bottom: 0;
    width: 20px; height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-top: 1px solid var(--cp-hair);
    border-left: 1px solid var(--cp-hair);
    color: var(--on-surface);
    font-style: normal;
}

@media (max-width: 768px) {
    .fewset-cp__bundleset { margin: 12px 10px; }
    .fewset-cp__bundleset .fewset-cp__row--gift::before { left: 30px; top: -11px; width: 21px; height: 21px; font-size: 13px; }
    .fewset-cp__row--gift .fewset-cp__img { flex-basis: 52px; }
    .fewset-gwp-badge { width: 17px; height: 17px; }
    .fewset-gwp-badge svg { width: 9px; height: 9px; }
}
