/* Cart Container */
.cart-container {
    position: relative;
}

.cart-icon {
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: inherit;
    font-size: 20px;
}

.cart-count {
    position: absolute;
    top: 0;
    right: 0;
    background: #ee4d2d;
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* Loading State */
.cart-dropdown-loading {
    padding: 40px 20px;
    text-align: center;
    color: #666;
}

.cart-dropdown-loading i {
    font-size: 24px;
    color: #ee4d2d;
    margin-bottom: 8px;
}

.cart-dropdown-loading span {
    display: block;
    font-size: 14px;
}

/* Header */
.cart-dropdown-header {
    padding: 12px 16px;
    background: #f8f8f8;
    border-bottom: 1px solid #e8e8e8;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-invoice-label {
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

.cart-invoice-number {
    font-size: 13px;
    color: #ee4d2d;
    font-weight: 600;
}

/* Items List */
.cart-dropdown-items {
    max-height: 280px;
    overflow-y: auto;
    padding: 8px 0;
}

.cart-dropdown-item {
    display: flex;
    gap: 12px;
    padding: 10px 16px;
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.2s;
}

.cart-dropdown-item:hover {
    background: #fafafa;
}

.cart-item-image {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    object-fit: cover;
    border-radius: 4px;
    background: #f5f5f5;
}

.cart-item-info {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    font-size: 13px;
    color: #333;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cart-item-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

.cart-item-qty {
    color: #666;
}

.cart-item-price {
    color: #ee4d2d;
    font-weight: 600;
}

/* Footer */
.cart-dropdown-footer {
    border-top: 1px solid #e8e8e8;
    padding: 12px 16px;
    background: #fafafa;
}

.cart-dropdown-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.summary-label {
    font-size: 14px;
    color: #333;
    font-weight: 600;
}

.summary-value {
    font-size: 15px;
    color: #ee4d2d;
    font-weight: 700;
}

.btn-view-cart {
    display: block;
    width: 100%;
    padding: 10px;
    background: #ee4d2d;
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-view-cart:hover {
    background: #d73211;
}

/* Empty State */
.cart-dropdown-empty {
    padding: 40px 20px;
    text-align: center;
}

.cart-dropdown-empty i {
    font-size: 48px;
    color: #ddd;
    margin-bottom: 12px;
}

.cart-dropdown-empty p {
    color: #666;
    margin-bottom: 16px;
    font-size: 14px;
}

.btn-shop-now {
    display: inline-block;
    padding: 8px 20px;
    background: #ee4d2d;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.2s;
    margin: 0.4rem;
    width: 14rem;
}

.btn-shop-now:hover {
    background: #d73211;
}

/* Scrollbar */
.cart-dropdown-items::-webkit-scrollbar {
    width: 4px;
}

.cart-dropdown-items::-webkit-scrollbar-track {
    background: #f5f5f5;
}

.cart-dropdown-items::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 2px;
}

.cart-dropdown-items::-webkit-scrollbar-thumb:hover {
    background: #ccc;
}

/* Header Cart Wrapper - tidak mengubah layout header */
.header-cart-wrapper {
    position: relative;
    display: inline-block;
}

/* Cart Icon Button - mirip dengan anchor sebelumnya */
.cart-icon-btn {
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: inherit;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.cart-icon-btn:hover {
    color: white;
}

.cart-icon-btn i {
    font-size: 24px;
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -8px;
    background: #ee4d2d;
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Cart Dropdown */
.cart-dropdown {
    position: absolute;
    top: calc(100% + 15px);
    right: 0;
    width: 340px;
    max-height: 500px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: none;
    z-index: 9999;
    overflow: hidden;
}

/* Responsive */
@media (max-width: 480px) {
    .cart-dropdown {
        width: 280px;
        right: -70px;
    }
}

.cart-dropdown.active {
    display: block;
}

/* Arrow indicator */
.cart-dropdown::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 15px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid white;
}