/* ============================================= */
/* ===== CART PAGE STYLES (cart.html) ============ */
/* ============================================= */

/* ============================================= */
/* ===== CART PAGE =============================== */
/* ============================================= */
.page-hero-cart { padding-bottom: 80px; }

.cart-section {
    position: relative;
    max-width: 1300px;
    margin: 0 auto;
    padding: 60px 40px 120px;
}

.cart-layout {
    display: grid;
    grid-template-columns: 1.4fr 0.9fr;
    gap: 32px;
    align-items: start;
}

.cart-items-wrap { min-width: 0; }

.cart-items-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.cart-items-title {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.cart-items-count {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    padding: 5px 11px;
    border-radius: 50px;
    color: #001d0c;
    background: linear-gradient(135deg, #00ff7a 0%, #00b347 100%);
    box-shadow: 0 4px 12px rgba(0, 217, 87, 0.4);
}

.cart-clear {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.65);
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
}

.cart-clear:hover {
    border-color: rgba(255, 122, 138, 0.55);
    color: #ff7a8a;
    background: rgba(255, 122, 138, 0.08);
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ===== Cart item card ===== */
.cart-item {
    position: relative;
    display: grid;
    grid-template-columns: 110px 1fr auto;
    gap: 20px;
    align-items: center;
    padding: 18px;
    border-radius: 22px;
    background: linear-gradient(160deg,
        rgba(255, 255, 255, 0.04) 0%,
        rgba(0, 60, 30, 0.18) 100%);
    border: 1px solid rgba(0, 217, 87, 0.15);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.45),
        inset 0 1px 1px rgba(255, 255, 255, 0.1);
    transition: transform 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease, opacity 0.4s ease;
    overflow: hidden;
}

.cart-item:hover {
    transform: translateY(-3px);
    border-color: rgba(0, 217, 87, 0.4);
    box-shadow:
        0 22px 50px rgba(0, 0, 0, 0.5),
        0 0 36px rgba(0, 217, 87, 0.18);
}

.cart-item.is-removing {
    opacity: 0;
    transform: translateX(-30px) scale(0.96);
}

.cart-item-img {
    width: 110px;
    height: 110px;
    border-radius: 16px;
    overflow: hidden;
    background:
        radial-gradient(120% 80% at 50% 100%, rgba(0, 217, 87, 0.15), transparent 60%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(0, 0, 0, 0.4));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                border-color 0.3s ease,
                box-shadow 0.3s ease;
}
.cart-item-img:hover {
    transform: translateY(-3px) scale(1.02);
    border-color: rgba(0, 217, 87, 0.45);
    box-shadow: 0 12px 28px rgba(0, 217, 87, 0.18);
}
.cart-item-img img {
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.cart-item-img:hover img {
    transform: scale(1.06);
}

.cart-item-name-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.25s ease;
}
.cart-item-name-link:hover {
    color: #00ff7a;
}

.cart-item-img img {
    width: 90%;
    height: 90%;
    object-fit: contain;
    filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.6));
}

.cart-item-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cart-item-tag {
    display: inline-block;
    align-self: flex-start;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #00ff7a;
}

.cart-item-size {
    display: inline-flex;
    align-self: flex-start;
    align-items: center;
    gap: 6px;
    padding: 4px 11px;
    border-radius: 999px;
    background: rgba(0, 217, 87, 0.10);
    border: 1px solid rgba(0, 217, 87, 0.35);
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-top: 2px;
}
.cart-item-size strong {
    color: #00ff7a;
    font-weight: 800;
    letter-spacing: 0.06em;
}

.cart-item-name {
    font-size: 17px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.3px;
}

.cart-item-price {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.55);
}

.cart-item-controls {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.cart-qty {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border-radius: 50px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.cart-qty button {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, rgba(0, 217, 87, 0.18) 0%, rgba(0, 100, 50, 0.32) 100%);
    color: #00ff7a;
    font-family: inherit;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-qty button:hover {
    background: linear-gradient(135deg, #00ff7a 0%, #00b347 100%);
    color: #001d0c;
    box-shadow: 0 4px 12px rgba(0, 217, 87, 0.4);
}

.cart-qty button:active { transform: scale(0.92); }

.cart-qty .cart-qty-value {
    min-width: 26px;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
}

.cart-item-subtotal {
    font-size: 16px;
    font-weight: 800;
    color: #fff;
}

.cart-item-remove {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid rgba(255, 122, 138, 0.3);
    background: rgba(255, 122, 138, 0.06);
    color: #ff7a8a;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    align-self: flex-start;
}

.cart-item-remove:hover {
    background: #ff7a8a;
    color: #1d0008;
    transform: rotate(90deg);
    box-shadow: 0 6px 16px rgba(255, 122, 138, 0.45);
}

/* ===== Summary card ===== */
.cart-summary {
    position: sticky;
    top: 110px;
    align-self: start;
}

.cart-summary-card {
    position: relative;
    padding: 32px;
    border-radius: 26px;
    background: linear-gradient(135deg,
        rgba(20, 60, 50, 0.45) 0%,
        rgba(10, 30, 25, 0.7) 50%,
        rgba(20, 60, 50, 0.45) 100%);
    border: 1px solid rgba(0, 217, 87, 0.28);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    box-shadow:
        0 30px 70px rgba(0, 0, 0, 0.55),
        inset 0 1px 1px rgba(255, 255, 255, 0.18);
    overflow: hidden;
    animation: ctaCardFloat 11s ease-in-out infinite;
}

.cart-summary-shine {
    position: absolute;
    top: -50%;
    left: -75%;
    width: 60%;
    height: 200%;
    background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, 0.1) 50%, transparent 60%);
    transform: rotate(8deg);
    pointer-events: none;
    animation: finalShineSweep 7s ease-in-out infinite;
}

.cart-summary-card .section-tag { margin-bottom: 14px; }

.cart-summary-title {
    font-size: 26px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.8px;
    line-height: 1.05;
    margin-bottom: 22px;
}

.cart-summary-lines {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 22px;
    margin-bottom: 22px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.12);
}

.cart-summary-lines li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

/* The hidden attribute is overridden by the flex rule above otherwise */
.cart-summary-lines li[hidden] { display: none; }

.cart-summary-lines strong {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
}

.cart-summary-lines .free {
    color: #00ff7a;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 12px;
}

.discount-line strong { color: #00ff7a; }
.discount-line em {
    font-style: normal;
    margin-left: 6px;
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 50px;
    background: rgba(0, 217, 87, 0.16);
    color: #00ff7a;
}

/* Promo */
.cart-promo {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    margin-bottom: 22px;
}

.cart-promo input {
    padding: 13px 18px;
    border-radius: 50px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    font-family: inherit;
    font-size: 13px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    transition: border-color 0.3s ease, background 0.3s ease;
    outline: none;
}

.cart-promo input::placeholder { color: rgba(255, 255, 255, 0.35); letter-spacing: 1.5px; }

.cart-promo input:focus {
    border-color: rgba(0, 217, 87, 0.55);
    background: rgba(0, 0, 0, 0.55);
}

.cart-promo button {
    padding: 13px 22px;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.cart-promo button:hover {
    background: linear-gradient(135deg, #00ff7a 0%, #00b347 100%);
    color: #001d0c;
}

.cart-promo-hint {
    position: absolute;
    bottom: -22px;
    left: 18px;
    margin: 0;
    font-size: 12px;
    color: #00ff7a;
}
.cart-promo-hint.error { color: #ff7a8a; }

.cart-summary-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
    padding-top: 4px;
}

.cart-summary-total span {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
}

.cart-summary-total strong {
    font-size: 30px;
    font-weight: 900;
    background: linear-gradient(135deg, #00ff7a 0%, #00b347 100%);
    -webkit-background-clip: text;
            background-clip: text;
    color: transparent;
    letter-spacing: -1px;
    line-height: 1;
}

.cart-checkout-btn {
    width: 100%;
    justify-content: center;
    padding: 18px 24px;
    font-size: 15px;
}

.cart-continue {
    display: block;
    text-align: center;
    margin-top: 14px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    transition: color 0.3s ease;
}

.cart-continue:hover { color: #00ff7a; }

.cart-trust {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 22px;
    padding-top: 22px;
    border-top: 1px dashed rgba(255, 255, 255, 0.12);
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
}

.trust-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: #00ff7a;
    box-shadow: 0 0 10px #00ff7a;
    animation: tagPulse 1.6s ease-in-out infinite;
}

/* ===== Empty state ===== */
.cart-empty {
    position: relative;
    text-align: center;
    padding: 80px 40px 100px;
    border-radius: 30px;
    background: linear-gradient(135deg,
        rgba(20, 60, 50, 0.4) 0%,
        rgba(10, 30, 25, 0.65) 100%);
    border: 1px solid rgba(0, 217, 87, 0.22);
    backdrop-filter: blur(20px);
    overflow: hidden;
}

.cart-empty-glow {
    position: absolute;
    width: 400px;
    height: 400px;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: radial-gradient(circle, rgba(0, 217, 87, 0.32), transparent 60%);
    filter: blur(50px);
    pointer-events: none;
    animation: bridgeOrbFloat 14s ease-in-out infinite;
}

.cart-empty-icon {
    position: relative;
    z-index: 2;
    width: 110px;
    height: 110px;
    margin: 0 auto 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(0, 217, 87, 0.18) 0%, rgba(0, 60, 30, 0.4) 100%);
    border: 1px solid rgba(0, 217, 87, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #00ff7a;
    box-shadow: 0 18px 38px rgba(0, 217, 87, 0.18), inset 0 1px 1px rgba(255,255,255,0.2);
    animation: glowBreathe 4s ease-in-out infinite alternate;
}

.cart-empty-title {
    position: relative;
    z-index: 2;
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 800;
    color: #fff;
    letter-spacing: -1px;
    margin-bottom: 12px;
}

.cart-empty-sub {
    position: relative;
    z-index: 2;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.65);
    margin-bottom: 32px;
}

.cart-empty-actions {
    position: relative;
    z-index: 2;
    display: inline-flex;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Cart responsive */
@media (max-width: 980px) {
    .cart-layout { grid-template-columns: 1fr; }
    .cart-summary { position: static; }
}

@media (max-width: 720px) {
    /* Leave room past the mobile browser's bottom toolbar so Checkout isn't hidden */
    .cart-section {
        padding: 40px 16px 40px;
        padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px));
    }
    .cart-items { gap: 12px; }
    .cart-items-header { margin-bottom: 16px; }
    .cart-items-title { font-size: 18px; }
    .cart-item {
        grid-template-columns: 92px 1fr;
        grid-template-rows: auto auto;
        gap: 12px 14px;
        padding: 12px;
        border-radius: 18px;
    }
    .cart-item-img { width: 92px; height: 92px; border-radius: 14px; }
    .cart-item-body { gap: 4px; }
    .cart-item-tag { font-size: 9px; letter-spacing: 1.6px; }
    .cart-item-name { font-size: 15px; }
    .cart-item-size {
        padding: 3px 9px;
        font-size: 0.58rem;
        margin-top: 1px;
    }
    .cart-item-price { font-size: 12px; }
    .cart-item-controls {
        grid-column: 1 / -1;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding-top: 8px;
        border-top: 1px dashed rgba(255,255,255,0.08);
    }
    .cart-item-remove { width: 28px; height: 28px; align-self: auto; }
    .cart-qty { padding: 3px; gap: 2px; }
    .cart-qty button { width: 26px; height: 26px; font-size: 13px; }
    .cart-qty .cart-qty-value { min-width: 22px; font-size: 13px; }
    .cart-item-subtotal { font-size: 15px; }

    /* ===== Summary card — tighter ===== */
    .cart-summary-card { padding: 22px 20px; border-radius: 22px; }
    .cart-summary-title { font-size: 22px; margin-bottom: 18px; }
    .cart-summary-lines { padding-bottom: 18px; margin-bottom: 18px; gap: 10px; }
    .cart-summary-lines li,
    .cart-summary-lines strong { font-size: 13px; }
    .cart-summary-total strong { font-size: 26px; }
    .cart-promo input { padding: 12px 16px; font-size: 12px; }
    .cart-promo button { padding: 12px 18px; font-size: 11px; }
    .cart-checkout-btn { padding: 16px 20px; font-size: 14px; }

    .cart-empty { padding: 60px 24px 70px; }
    .cart-empty-actions { flex-direction: column; align-items: stretch; width: 100%; max-width: 280px; margin: 0 auto; }
    .cart-empty-actions .page-btn { justify-content: center; }
}

@media (max-width: 420px) {
    .cart-item {
        grid-template-columns: 82px 1fr;
        padding: 10px;
        gap: 10px 12px;
    }
    .cart-item-img { width: 82px; height: 82px; }
    .cart-item-name { font-size: 14px; }
    .cart-summary-card { padding: 20px 16px; }
    .cart-summary-total strong { font-size: 24px; }
}
