/* Overlay */
.cart-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(13, 27, 18, 0.5); /* Forest Dark */
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cart-drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Drawer */
.cart-drawer {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 100%;
    max-width: 400px;
    background-color: white;
    box-shadow: -5px 0 30px rgba(0,0,0,0.1);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.cart-drawer-overlay.active .cart-drawer {
    transform: translateX(0);
}

/* Header */
.cart-header {
    padding: 24px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #0d1b12;
}

.cart-close-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    padding: 4px;
}

.cart-close-btn:hover {
    color: #0d1b12;
}

/* Body */
.cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.cart-empty {
    text-align: center;
    color: #666;
    margin-top: 40px;
}

.cart-empty .material-symbols-outlined {
    font-size: 48px;
    color: #ccc;
    margin-bottom: 16px;
    display: block;
}

/* Items */
.cart-item {
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid #f5f5f5;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.cart-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.cart-item-info {
    flex: 1;
    padding-right: 16px;
}

.cart-item-name {
    font-weight: 600;
    margin-bottom: 4px;
    color: #0d1b12;
}

.cart-item-variants {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 4px;
}

.cart-item-price {
    font-weight: 600;
    color: #13ec5b;
}

.cart-item-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f5f5f5;
    border-radius: 4px;
    padding: 2px;
}

.cart-item-qty button {
    border: none;
    background: white;
    width: 24px;
    height: 24px;
    border-radius: 2px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #0d1b12;
}

.cart-item-qty span {
    font-size: 0.9rem;
    min-width: 20px;
    text-align: center;
}

/* Footer */
.cart-footer {
    padding: 24px;
    border-top: 1px solid #eee;
    background: #fff;
    position: sticky;
    bottom: 0;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
    font-weight: 700;
    font-size: 1.25rem;
    color: #0d1b12;
}

.cart-checkout-btn {
    width: 100%;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    padding: 16px;
}

/* Nav Cart Button */
.nav-cart-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: background 0.2s;
}

.nav-cart-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #13ec5b;
    color: #0d1b12;
    font-size: 0.75rem;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}
