/* ========== CART ICON (NAV) ========== */
.cart-icon-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: none;
    background: none;
    cursor: pointer;
    margin-left: 8px;
    transition: transform 0.3s var(--ease);
}
.cart-icon-btn:hover { transform: scale(1.1); }
.cart-icon-btn svg {
    width: 22px;
    height: 22px;
    color: rgba(255,255,255,.85);
    transition: color 0.3s;
}
.nav.scrolled .cart-icon-btn svg { color: var(--text-dark); }

.cart-badge {
    position: absolute;
    top: 2px;
    right: 0;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--coral);
    color: var(--white);
    font-size: 0.65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    animation: badgePop 0.3s var(--ease-out);
}
@keyframes badgePop {
    0% { transform: scale(0); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* ========== CART OVERLAY ========== */
.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
    z-index: 2500;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s var(--ease);
}
.cart-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* ========== CART DRAWER ========== */
.cart-drawer {
    position: fixed;
    top: 0;
    right: -420px;
    width: 400px;
    max-width: 92vw;
    height: 100vh;
    background: var(--white);
    z-index: 2600;
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.12);
    transition: right 0.4s var(--ease-out);
}
.cart-drawer.open {
    right: 0;
}

.cart-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 24px 20px;
    border-bottom: 1px solid #EDF2F7;
}
.cart-drawer-header h3 {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--text-dark);
}
.cart-close-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: var(--off-white);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.25s;
}
.cart-close-btn:hover {
    background: #EDF2F7;
    transform: rotate(90deg);
}
.cart-close-btn svg {
    width: 18px;
    height: 18px;
    color: var(--text-mid);
}

/* ========== CART BODY ========== */
.cart-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
}

/* Empty state */
.cart-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}
.cart-empty-icon {
    width: 56px;
    height: 56px;
    margin-bottom: 16px;
    opacity: 0.35;
}
.cart-empty p {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    color: var(--text-mid);
    margin-bottom: 6px;
}
.cart-empty span {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* ========== CART ITEM ========== */
.cart-item {
    display: flex;
    gap: 14px;
    padding: 16px 0;
    border-bottom: 1px solid #F7FAFC;
    position: relative;
    animation: cartItemIn 0.35s var(--ease-out);
}
@keyframes cartItemIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.cart-item-img {
    width: 80px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--sand);
}
.cart-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
}

.cart-item-name {
    font-family: var(--font-serif);
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-dark);
    line-height: 1.3;
}
.cart-item-variant {
    font-size: 0.78rem;
    color: var(--text-light);
    letter-spacing: 0.02em;
}
.cart-item-price {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--blue-med);
    margin-top: 2px;
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 6px;
}
.cart-item-qty span {
    font-size: 0.88rem;
    font-weight: 500;
    min-width: 20px;
    text-align: center;
}
.qty-btn {
    width: 28px;
    height: 28px;
    border: 1.5px solid #E2E8F0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--text-mid);
    cursor: pointer;
    transition: all 0.2s;
    background: none;
    font-family: inherit;
}
.qty-btn:hover {
    border-color: var(--blue-med);
    color: var(--blue-med);
    background: var(--blue-sky);
}

.cart-item-remove {
    position: absolute;
    top: 16px;
    right: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: none;
    cursor: pointer;
    opacity: 0.4;
    transition: opacity 0.2s, transform 0.2s;
}
.cart-item-remove:hover {
    opacity: 1;
    transform: scale(1.15);
}
.cart-item-remove svg {
    width: 16px;
    height: 16px;
    color: var(--text-mid);
}

/* ========== CART FOOTER ========== */
.cart-drawer-footer {
    padding: 20px 24px 28px;
    border-top: 1px solid #EDF2F7;
    background: var(--off-white);
}

.cart-coupon-area {
    margin-bottom: 15px;
    display: flex;
    gap: 8px;
}
.cart-coupon-area input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #E2E8F0;
    border-radius: 6px;
    font-size: 0.85rem;
    outline: none;
    text-transform: uppercase;
}
.cart-coupon-area input:focus {
    border-color: var(--blue-med);
}
.cart-coupon-area button {
    padding: 0 16px;
    background: var(--blue-dark);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    text-transform: uppercase;
}
.cart-coupon-message {
    font-size: 0.8rem;
    margin-bottom: 15px;
    display: none;
}
.cart-coupon-message.success { color: #2E7D32; display: block; }
.cart-coupon-message.error { color: #C62828; display: block; }

.cart-discount-row {
    display: none;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    color: #2E7D32;
    font-size: 0.85rem;
}

.cart-total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}
.cart-total-row span {
    font-size: 0.88rem;
    color: var(--text-mid);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.cart-total-row strong {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    color: var(--text-dark);
}

.btn-cart-checkout {
    display: block;
    width: 100%;
    padding: 16px 24px;
    background: var(--blue-med);
    color: var(--white);
    font-size: 0.88rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.35s var(--ease);
    text-align: center;
}
.btn-cart-checkout:hover {
    background: var(--blue-deep);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(43, 108, 176, 0.3);
}

.btn-cart-whatsapp {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 24px;
    background: #25D366;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.35s var(--ease);
    text-align: center;
}
.btn-cart-whatsapp:hover {
    background: #128C7E;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.35);
}

.btn-cart-continue {
    display: block;
    width: 100%;
    padding: 12px 24px;
    background: transparent;
    color: var(--text-mid);
    font-size: 0.82rem;
    font-weight: 400;
    border: none;
    cursor: pointer;
    margin-top: 8px;
    transition: color 0.25s;
    text-align: center;
}
.btn-cart-continue:hover { color: var(--blue-med); }

/* ========== CART TOAST ========== */
.cart-toast {
    position: fixed;
    bottom: 100px;
    right: 28px;
    z-index: 3000;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    background: var(--text-dark);
    color: var(--white);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 400;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    transform: translateY(20px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s var(--ease-out);
}
.cart-toast.show {
    opacity: 1;
    transform: translateY(0);
}
.cart-toast svg {
    width: 18px;
    height: 18px;
    color: #68D391;
    flex-shrink: 0;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .cart-drawer {
        width: 100vw;
        max-width: 100vw;
        right: -100vw;
    }
    .cart-toast {
        left: 16px;
        right: 16px;
        bottom: 90px;
        justify-content: center;
    }
}
