/**
 * Icebox Mini-Cart Drawer
 * 3 states: Empty cart, Cart with items, Item-added confirmation
 */

/* Overlay */
.icebox-drawer-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,.45);
    z-index: 99998;
    opacity: 0; visibility: hidden;
    transition: opacity .3s ease, visibility .3s ease;
}
.icebox-drawer-overlay.--open { opacity: 1; visibility: visible; }

/* Drawer panel */
.icebox-drawer {
    position: fixed; top: 0; right: 0; bottom: 0;
    width: 420px; max-width: 92vw;
    background: #fff;
    z-index: 99999;
    transform: translateX(100%);
    transition: transform .35s cubic-bezier(.39,.575,.565,1);
    display: flex; flex-direction: column;
    box-shadow: -8px 0 30px rgba(0,0,0,.12);
    overflow: hidden;
}
.icebox-drawer.--open { transform: translateX(0); }

/* Header */
.icebox-drawer__header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 24px 24px 20px;
    border-bottom: 1px solid #eee;
    flex: none;
}
.icebox-drawer__title {
    font-size: 20px; font-weight: 600; letter-spacing: -.01em;
}
.icebox-drawer__title span { font-weight: 400; opacity: .5; }
.icebox-drawer__close {
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; background: none; border: none; font-size: 22px;
    color: #333; transition: opacity .2s;
}
.icebox-drawer__close:hover { opacity: .6; }

/* FedEx banner */
.icebox-drawer__fedex {
    background: #f8f8f8;
    padding: 12px 24px;
    display: flex; align-items: center; gap: 14px;
    flex: none;
    border-bottom: 1px solid #eee;
}
.icebox-drawer__fedex img { height: 22px; }
.icebox-drawer__fedex span { font-size: 13px; font-weight: 600; color: #333; }

/* Body (scrollable) */
.icebox-drawer__body {
    flex: 1; overflow-y: auto; padding: 0;
}

/* Empty state */
.icebox-drawer__empty {
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; padding: 60px 24px; text-align: center;
}
.icebox-drawer__empty h3 {
    font-size: 18px; font-weight: 600; margin-bottom: 20px; color: #333;
}
.icebox-drawer__empty a {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 15px; font-weight: 600; color: #1a1a1a;
    text-decoration: none; border-bottom: 2px solid #1a1a1a;
    padding-bottom: 4px; transition: opacity .2s;
}
.icebox-drawer__empty a:hover { opacity: .7; }

/* Cart item */
.icebox-drawer__item {
    display: flex; gap: 16px; padding: 20px 24px;
    border-bottom: 1px solid #f0f0f0;
}
.icebox-drawer__item-img {
    width: 80px; height: 80px; object-fit: contain;
    background: #f8f8f8; border-radius: 6px; flex: none;
}
.icebox-drawer__item-info { flex: 1; min-width: 0; }
.icebox-drawer__item-cat {
    font-size: 11px; text-transform: uppercase; letter-spacing: .05em;
    color: #888; margin-bottom: 4px;
}
.icebox-drawer__item-name {
    font-size: 14px; font-weight: 600; color: #1a1a1a;
    margin-bottom: 4px; line-height: 1.35;
}
.icebox-drawer__item-meta {
    font-size: 12px; color: #666; margin-bottom: 8px;
}
.icebox-drawer__item-actions {
    display: flex; align-items: center; gap: 8px;
}
.icebox-drawer__item-actions button {
    width: 34px; height: 34px; border: 1px solid #ddd; background: #fff;
    border-radius: 4px; cursor: pointer; display: flex; align-items: center;
    justify-content: center; color: #666; transition: border-color .2s;
}
.icebox-drawer__item-actions button:hover { border-color: #999; }
.icebox-drawer__item-price {
    text-align: right; flex: none;
}
.icebox-drawer__item-price-old {
    font-size: 12px; color: #999; text-decoration: line-through;
}
.icebox-drawer__item-price-current {
    font-size: 15px; font-weight: 700; color: #1a1a1a;
}

/* Footer (totals + checkout) */
.icebox-drawer__footer {
    flex: none; padding: 20px 24px; border-top: 1px solid #eee;
    background: #fff;
}
.icebox-drawer__total {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 8px;
}
.icebox-drawer__total-label { font-size: 16px; font-weight: 600; }
.icebox-drawer__total-value { font-size: 18px; font-weight: 700; }
.icebox-drawer__subtotal {
    display: flex; justify-content: space-between;
    font-size: 13px; color: #666; margin-bottom: 4px;
}
.icebox-drawer__checkout-btn {
    display: block; width: 100%; padding: 16px;
    background: #1a1a1a; color: #fff; text-align: center;
    font-size: 15px; font-weight: 700; border: none; border-radius: 6px;
    cursor: pointer; text-decoration: none; margin-top: 16px;
    transition: background .2s;
}
.icebox-drawer__checkout-btn:hover { background: #333; color: #fff; }
.icebox-drawer__payments {
    display: flex; align-items: center; justify-content: center;
    gap: 8px; margin-top: 14px;
}
.icebox-drawer__payments img { height: 22px; }

/* === ITEM ADDED CONFIRMATION STATE === */
.icebox-drawer__added {
    padding: 0;
}
.icebox-drawer__added-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 24px;
}
.icebox-drawer__added-header h3 {
    font-size: 18px; font-weight: 600;
}
.icebox-drawer__added-product {
    display: flex; gap: 16px; padding: 20px 24px;
    border-top: 1px solid #eee; border-bottom: 1px solid #eee;
}
.icebox-drawer__added-img {
    width: 100px; height: 100px; object-fit: contain;
    background: #f8f8f8; border-radius: 6px; flex: none;
}
.icebox-drawer__added-info { flex: 1; }
.icebox-drawer__added-cat {
    font-size: 11px; text-transform: uppercase; letter-spacing: .05em;
    color: #888; margin-bottom: 4px;
}
.icebox-drawer__added-name {
    font-size: 15px; font-weight: 600; color: #1a1a1a;
    margin-bottom: 4px; line-height: 1.35;
}
.icebox-drawer__added-meta {
    font-size: 13px; color: #666; margin-bottom: 6px;
}
.icebox-drawer__added-price {
    font-size: 16px; font-weight: 700; color: #1a1a1a;
}
.icebox-drawer__added-buttons {
    padding: 24px; display: flex; gap: 12px;
}
.icebox-drawer__added-buttons a {
    flex: 1; padding: 14px; text-align: center; font-size: 14px;
    font-weight: 700; border-radius: 50rem; text-decoration: none;
    transition: opacity .2s;
}
.icebox-drawer__view-cart {
    background: #fff; color: #1a1a1a; border: 2px solid #1a1a1a;
}
.icebox-drawer__go-checkout {
    background: #1a1a1a; color: #fff; border: 2px solid #1a1a1a;
}

@media (max-width: 480px) {
    .icebox-drawer { width: 100%; max-width: 100%; }
    .icebox-drawer__item-img { width: 64px; height: 64px; }
    .icebox-drawer__added-img { width: 80px; height: 80px; }
}
