/* ── Product Carousel — Frontend CSS v1.4 ──
   Scoped under .pc-wrap

   CARD STRUCTURE:
     .pc-item            — white card with outer padding + border-radius
       .pc-tag-row       — badge, above inner box
       .pc-inner-box     — rounded inner container, position:relative
                           On hover → background-image becomes gallery image
         .pc-inner-content   — featured image + info row, fades out on hover
           .pc-image-wrap    — 4:5 aspect ratio
           .pc-info-row      — name / short-info / price
         .pc-hover-atc       — ATC pill, slides up on hover, z-index:2

   RIGHT-BLEED:
     .pc-carousel-outer is wider than the container by (peek + gap) so
     the partial next card is visible. overflow-x:clip prevents scroll.
   ─────────────────────────────────────────────────────────────── */

.pc-wrap *,
.pc-wrap *::before,
.pc-wrap *::after { box-sizing: border-box; }

.pc-wrap {
    --pc-ink:       #1a1a1a;
    --pc-subtle:    #6b6b6b;
    --pc-light:     #f0efed;
    --pc-radius:    14px;
    --pc-inner-r:   10px;
    --pc-gap:       14px;
    --pc-peek:      52px;
    --pc-card-pad:  10px;
    --pc-tag-bg:    var(--e-global-color-primary, #1a1a1a);
    --pc-tag-color: #ffffff;
    --pc-ease:      cubic-bezier(.4, 0, .2, 1);

    position: relative;
    width: 100%;
    font-family: inherit;
}

/* ══ OUTER — extends right past column edge to allow peek bleed ══
   overflow-x:clip lets the partial card show without causing scroll.
   width > 100% is intentional — the extra (peek+gap) gives the track room. */
.pc-wrap .pc-carousel-outer {
    width: calc(100% + var(--pc-peek) + var(--pc-gap));
    overflow-x: clip;
    overflow-y: visible;
    position: relative;
}

.pc-wrap .pc-carousel-track {
    display: flex;
    gap: 0;
    transition: transform .42s var(--pc-ease);
    will-change: transform;
}

/* ══ CARD — white rounded box with padding ══ */
.pc-wrap .pc-item {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: #F2EBDE;
    border-radius: var(--pc-radius);
    padding: var(--pc-card-pad);
    margin-right: var(--pc-gap);
    position: relative;
}

/* ── TAG ROW — above the inner box, within card padding ── */
.pc-wrap .pc-tag-row {
    min-height: 28px;
    display: flex;
    align-items: flex-start;
    padding: 2px 2px 6px;
    flex-shrink: 0;
}

.pc-wrap .pc-tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 99em;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    background: var(--pc-tag-bg);
    color: var(--pc-tag-color);
    line-height: 1.4;
    text-decoration: none !important;
}

/* ══ INNER BOX — rounded, clips image corners, swaps bg on hover ══ */
.pc-wrap .pc-inner-box {
    position: relative;
    border-radius: var(--pc-inner-r);
    overflow: hidden;
    flex: 1;
    background: var(--pc-light);
    /* gallery image is set as CSS var --pc-gallery on the element */
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

.pc-wrap .pc-item:hover .pc-inner-box {
    background-image: var(--pc-gallery);
}

/* ══ INNER CONTENT — fades out on hover ══ */
.pc-wrap .pc-inner-content {
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
    background: #F2EBDE;
    transition: opacity .28s var(--pc-ease);
}

.pc-wrap .pc-item:hover .pc-inner-content {
    opacity: 0;
}

/* ── FEATURED IMAGE — 4:5 ── */
.pc-wrap .pc-image-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    flex-shrink: 0;
}

.pc-wrap .pc-item-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pc-wrap .pc-no-img {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #ccc;
}

/* ── INFO ROW ── */
.pc-wrap .pc-info-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 10px 12px;
    flex-shrink: 0;
}

.pc-wrap .pc-info-left  { flex: 1; min-width: 0; }

.pc-wrap .pc-prod-name {
    font-size: 17px;
    font-weight: 400;
    color: var(--color-primary);
    line-height: 1.3;
    margin: 0 0 3px;
    text-transform: none !important;
    letter-spacing: 0 !important;
}

.pc-wrap .pc-prod-short {
    font-size: 10px;
    font-weight: 400;
    color: var(--color-primary);
    line-height: 1.4;
    margin: 0;
}

.pc-wrap .pc-info-right {
    flex-shrink: 0;
    text-align: right;
}

.pc-wrap .pc-price-note {
    font-size: 10px;
    font-weight: 400;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--color-primary);
    margin-bottom: 2px;
    white-space: nowrap;
}

.pc-wrap .pc-price-val {
    font-size: 17px;
    font-weight: 400;
    color: var(--color-primary);
    white-space: nowrap;
    line-height: 1.2;
}

/* ══ ATC HOVER BAR — pinned inside .pc-inner-box, slides up ══ */
.pc-wrap .pc-hover-atc {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0 10px 10px;
    z-index: 2;
    transform: translateY(16px);
    opacity: 0;
    transition:
        transform .30s var(--pc-ease),
        opacity   .24s var(--pc-ease);
    pointer-events: none;
}

.pc-wrap .pc-item:hover .pc-hover-atc {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.pc-wrap .pc-atc-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    padding: 12px 14px;
    background: rgba(242, 235, 222, .96);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    text-decoration: none !important;
    cursor: pointer;
    transition: background .18s;
}

.pc-wrap .pc-atc-inner:hover { background: rgba(242, 235, 222, 1); }

.pc-wrap .pc-atc-label {
    font-size: 10px;
    font-weight: 400;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--color-primary);
    white-space: nowrap;
    line-height: 1;
}

.pc-wrap .pc-atc-price {
    font-size: 12px;
    font-weight: 400;
    color: var(--color-primary);
    white-space: nowrap;
    line-height: 1;
    text-align: right;
}

.pc-wrap .pc-atc-inner.added .pc-atc-label { color: #2d6a4f; }

/* ══ NAV ROW ══ */
.pc-wrap .pc-nav-row {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 8px;
    padding: 14px 0 0;
    margin: 0;
}

.pc-wrap .pc-nav-btn {
    width: 36px !important;
    height: 36px !important;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    cursor: pointer;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: var(--pc-ink) !important;
    font-size: 28px !important;
    font-weight: 300 !important;
    line-height: 1 !important;
    padding: 0 !important;
    transition: filter .18s, transform .18s;
    --lqd-cc-size-outer: auto !important;
    --lqd-cc-size-inner: auto !important;
    --lqd-cc-bg: transparent !important;
    --lqd-cc-active-bg: transparent !important;
    --lqd-cc-bc: transparent !important;
    --lqd-cc-bw: 0px !important;
    --lqd-cc-br: 0px !important;
}

.pc-wrap .pc-nav-btn:hover {
    background: transparent !important;
    filter: drop-shadow(0 2px 5px rgba(0,0,0,.2));
}

.pc-wrap .pc-prev:hover { transform: translateX(-3px); }
.pc-wrap .pc-next:hover { transform: translateX( 3px); }

.pc-wrap .pc-nav-counter {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .06em;
    color: var(--color-primary);
    min-width: 40px;
    text-align: center;
}

/* ══ DESKTOP CARD WIDTHS ══ */
@media (min-width: 769px) {
    .pc-wrap[data-slots="4"] .pc-item,
    .pc-wrap .pc-item {
        width: calc((100% - (var(--pc-gap) * 3) - var(--pc-peek)) / 4);
    }
    .pc-wrap[data-slots="5"] .pc-item {
        width: calc((100% - (var(--pc-gap) * 4) - var(--pc-peek)) / 5);
    }
}

/* ══ MOBILE ══ */
@media (max-width: 768px) {
    .pc-wrap { --pc-peek: 44px; }

    /* 1-per-row: show 1 full card + peek of next */
    .pc-wrap[data-mob="1"] .pc-item {
        width: calc(100% - var(--pc-peek));
    }

    /* 2-per-row: show 2 full cards + peek of next.
       Formula: (containerW - 1 gap between cards - peek) / 2  */
    .pc-wrap[data-mob="2"] .pc-item,
    .pc-wrap .pc-item {
        width: calc((100% - var(--pc-gap) - var(--pc-peek)) / 2);
    }

    .pc-wrap .pc-prod-name  { font-size: 17px; }
    .pc-wrap .pc-price-val  { font-size: 14px; }
    .pc-wrap .pc-price-note { font-size: 10px; }
    .pc-wrap .pc-atc-label  { font-size: 9px;  }
    .pc-wrap .pc-atc-price  { font-size: 11px; }
}
