/* ============================================================================
   CART BUTTON
============================================================================ */
.header-cart {
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
}

.header-cart .icon {
    font-size: 22px;
    display: flex;
}

.header-cart-badge {
    position: absolute;
    top: -8px;
    left: 12px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: bold;
}

.header-cart-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.header-cart-text .cart-label {
    opacity: 0.8;
    font-size: 13px;
}

.header-cart-text .header-cart-total {
    font-size: 13px;
    font-weight: 600;
}

/* ============================================================================
   CART DROPDOWN
============================================================================ */
.cart-dropdown {
    position: absolute;
    top: 50px;
    right: 0;
    width: 360px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 6px 30px rgba(0,0,0,0.18);
    z-index: 99999;
    overflow: hidden;
    display: none;
    flex-direction: column;
}

.cart-dropdown.open {
    display: flex;
}

/* HEADER */
.cart-dropdown-header {
    padding: 15px 20px;
    background: #f8f8f8;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    color: #333;
    font-weight: 600;
}

/* ITEMS LIST (scrollable) */
.cart-items {
    flex: 1;
    max-height: 300px;
    overflow-y: auto;
}

/* ITEM CARD */
.cart-item {
    display: grid;
    grid-template-columns: 50px 1fr auto auto;
    gap: 10px;
    padding: 14px;
    border-bottom: 1px solid #eee;
}

.cart-item-image {
    width: 50px;
    height: 50px;
    background: #ccc;
    border-radius: 6px;
}

.cart-item-info {
    color: #333;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.cart-item-title {
    font-weight: bold;
    font-size: 14px;
}

.cart-item-sku,
.cart-item-qty {
    font-size: 12px;
    color: #777;
}

/* Price aligned bottom */
.cart-item-price {
    align-self: flex-end;
    font-weight: 600;
    color: #333;
}

/* Delete button top right */
.cart-delete-btn,
.cart-item-delete {
    color: #d9534f;
    font-size: 18px;
    cursor: pointer;
    align-self: flex-start;
    margin-left: 10px;
}

/* Hover effect */
.cart-delete-btn:hover,
.cart-item-delete:hover {
    color: #b52d2a;
}

/* FOOTER */
.cart-bottom {
    background: white;
    padding: 12px 0;
    box-shadow: 0 -3px 10px rgba(0,0,0,0.08);
}

.cart-subtotal {
    padding: 0 20px 12px 20px;
    display: flex;
    justify-content: space-between;
    font-weight: bold;
}

.subtotal-amount {
    color: var(--primary);
}

.cart-btn-primary,
.cart-btn-secondary {
    width: calc(100% - 40px);
    margin: 5px 20px;
    padding: 12px;
    border-radius: 8px;
    font-size: 15px;
    cursor: pointer;
}

.cart-btn-primary {
    background: var(--primary);
    color: white;
    border: none;
}

.cart-btn-secondary {
    background: white;
    color: #444;
    border: 1px solid #ccc;
}

.cart-btn-primary:hover,
.cart-btn-secondary:hover {
    opacity: 0.9;
}
