/* ============================================
   STAYNA CART DRAWER — Shopify-clean pixel-perfect
   ============================================ */

/* ─── Overlay ─── */
.scd-overlay {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 99998;
    opacity: 0;
    -webkit-transition: opacity 300ms ease;
    transition: opacity 300ms ease;
}

.scd-overlay.active {
    display: block;
    opacity: 1;
}

/* ─── Drawer ─── */
.scd-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 420px;
    max-width: 100%;
    height: 100%;
    z-index: 99999;
    background: #fff;
    border-radius: 20px 0 0 20px;
    box-shadow: -6px 0 32px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    -webkit-transform: translateX(100%);
    transform: translateX(100%);
    -webkit-transition: -webkit-transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
    transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    pointer-events: none;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.scd-drawer.open {
    -webkit-transform: translateX(0);
    transform: translateX(0);
    pointer-events: auto;
}

body.scd-body-lock {
    overflow: hidden !important;
}

/* =========================================================
   HEADER
   ========================================================= */
.scd-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 16px;
    border-bottom: 1px solid #ebebeb;
    flex-shrink: 0;
}

.scd-header__left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.scd-header__title {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    color: #1a1a1a;
    line-height: 1;
    letter-spacing: -0.4px;
}

.scd-header__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #1a1a1a;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    line-height: 1;
}

.scd-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: #999;
    border-radius: 50%;
    transition: all 150ms;
    line-height: 0;
}

.scd-close:hover {
    background: #f5f5f5;
    color: #333;
}

/* =========================================================
   SCROLLABLE BODY
   ========================================================= */
.scd-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

/* =========================================================
   URGENCY + TIMER (discret, noir)
   ========================================================= */
.scd-urgency {
    padding: 16px 20px 14px;
    text-align: center;
    background: #fafafa;
}

.scd-urgency__text {
    font-size: 13px;
    color: #555;
    margin: 0 0 8px;
    line-height: 1.55;
}

.scd-timer {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
}

.scd-timer svg {
    stroke: #1a1a1a;
    flex-shrink: 0;
}

/* =========================================================
   SOCIAL PROOF (pill 56px like capture)
   ========================================================= */
.scd-social-proof {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 14px 18px;
    padding: 0 16px;
    background: #f1f1f1;
    border-radius: 999px;
    height: 56px;
    box-sizing: border-box;
}

.scd-social-proof__stars {
    display: flex;
    flex-shrink: 0;
    align-items: center;
}

.scd-star-img {
    height: 18px;
    width: auto;
    display: block;
}

.scd-social-proof__text {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    line-height: 1.35;
}

.scd-social-proof__text strong {
    font-weight: 700;
}

/* =========================================================
   ITEMS LIST
   ========================================================= */
.scd-items {
    padding: 0 18px;
}

/* Single item */
.scd-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 0;
    border-bottom: 1px solid #f0f0f0;
}

.scd-item:last-child {
    border-bottom: none;
}

/* Image */
.scd-item__image {
    width: 64px;
    height: 64px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    background: #f5f5f5;
}

.scd-item__image a {
    display: block;
    width: 100%;
    height: 100%;
}

.scd-item__image img,
.scd-item__image .scd-item__img {
    width: 64px !important;
    height: 64px !important;
    object-fit: cover;
    display: block;
}

/* Middle zone (name + price rows + qty) */
.scd-item__mid {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* Row 1 : name left + price right */
.scd-item__row1 {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.scd-item__name {
    font-size: 14px;
    font-weight: 500;
    color: #1a1a1a;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
    flex: 1;
    min-width: 0;
}

.scd-item__name:hover {
    color: #555;
}

.scd-item__price-main {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Row 2 : promo price + old price + discount badge */
.scd-item__row2 {
    display: flex;
    align-items: center;
    gap: 0;
    margin-top: 3px;
}

.scd-item__price-old {
    font-size: 12px;
    color: #1a1a1a;
    opacity: 0.45;
    text-decoration: line-through;
}

.scd-item__discount {
    font-size: 11px;
    font-weight: 600;
    color: #555;
    background: #eee;
    padding: 3px 9px;
    border-radius: 999px;
    margin-left: 8px;
    white-space: nowrap;
}

/* Quantity controls */
.scd-item__qty {
    display: inline-flex;
    align-items: center;
    border: 1px solid #e5e5e5;
    border-radius: 999px;
    width: fit-content;
    margin-top: 10px;
    height: 34px;
    background: #fff;
}

.scd-qty-btn {
    width: 34px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: #888;
    transition: color 150ms;
    padding: 0;
    line-height: 1;
}

.scd-qty-btn:hover {
    color: #1a1a1a;
}

.scd-qty-val {
    font-size: 13px;
    font-weight: 600;
    min-width: 26px;
    text-align: center;
    color: #1a1a1a;
    user-select: none;
}

/* Remove button */
.scd-item__remove {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    color: #bbb;
    border-radius: 50%;
    transition: all 150ms;
    margin-top: 2px;
}

.scd-item__remove:hover {
    color: #ef4444;
    background: #fef2f2;
}

/* Loading state */
.scd-loading {
    opacity: 0.35;
    pointer-events: none;
    transition: opacity 150ms;
}

/* =========================================================
   TRUST BADGES (blue icons, no bg pill, 2+1 layout)
   ========================================================= */
.scd-trust {
    padding: 14px 18px 18px;
    border-top: 1px solid #ebebeb;
    margin-top: 4px;
}

.scd-trust__row {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 8px;
}

.scd-trust__row:last-child {
    margin-bottom: 0;
}

.scd-trust__row--center {
    justify-content: center;
}

.scd-trust__badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #1a1a1a;
    white-space: nowrap;
}

.scd-trust__badge svg {
    flex-shrink: 0;
}

/* =========================================================
   EMPTY STATE
   ========================================================= */
.scd-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 60px 24px;
    text-align: center;
}

.scd-empty p {
    font-size: 15px;
    color: #737373;
    margin: 0;
}

.scd-empty__btn {
    padding: 12px 32px;
    background: #1a1a1a;
    color: #fff;
    border: none;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 200ms;
}

.scd-empty__btn:hover {
    background: #333;
}

/* =========================================================
   FOOTER STICKY
   ========================================================= */
.scd-footer {
    flex-shrink: 0;
    padding: 16px 20px calc(16px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid #ebebeb;
    background: #fff;
}

.scd-footer__total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.scd-footer__total span:first-child {
    font-size: 16px;
    font-weight: 500;
    color: #1a1a1a;
}

.scd-footer__amount {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: -0.3px;
}

.scd-footer__checkout {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 56px;
    background: #1a1a1a;
    color: #fff !important;
    border: none;
    border-radius: 16px;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-decoration: none !important;
    cursor: pointer;
    transition: background 200ms;
}

.scd-footer__checkout:hover {
    background: #333;
    color: #fff !important;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 480px) {
    .scd-drawer {
        width: 100%;
        border-radius: 0;
    }

    .scd-header {
        padding: 16px 16px 14px;
    }

    .scd-header__title {
        font-size: 21px;
    }

    .scd-urgency {
        padding: 14px 16px 12px;
    }

    .scd-social-proof {
        margin: 12px 14px;
        padding: 0 14px;
        height: 52px;
    }

    .scd-social-proof__text {
        font-size: 11.5px;
    }

    .scd-items {
        padding: 0 14px;
    }

    .scd-item {
        padding: 14px 0;
        gap: 12px;
    }

    .scd-item__image,
    .scd-item__image img,
    .scd-item__image .scd-item__img {
        width: 56px !important;
        height: 56px !important;
    }

    .scd-item__name {
        font-size: 13px;
    }

    .scd-item__price-main {
        font-size: 14px;
    }

    .scd-trust {
        padding: 12px 14px 16px;
    }

    .scd-trust__row {
        gap: 16px;
    }

    .scd-trust__badge {
        font-size: 12px;
    }

    .scd-footer {
        padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px));
    }

    .scd-footer__checkout {
        height: 52px;
        border-radius: 14px;
        font-size: 14px;
    }

    .scd-footer__amount {
        font-size: 18px;
    }

    .scd-footer__total span:first-child {
        font-size: 15px;
    }
}

@media (max-width: 360px) {
    .scd-social-proof {
        height: auto;
        padding: 10px 14px;
        border-radius: 14px;
        flex-direction: column;
        text-align: center;
        gap: 4px;
    }

    .scd-trust__row {
        gap: 12px;
    }

    .scd-trust__badge {
        font-size: 11px;
    }
}
