/* === Cart Icon & Badge in Header === */
.header-cart-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background-color: rgba(37, 76, 99, 0.05);
    color: var(--primary-color);
    transition: all 0.3s ease;
    cursor: pointer;
}

.header-cart-icon:hover {
    background-color: var(--primary-color);
    color: #ffffff;
}

.header-cart-icon svg {
    width: 20px;
    height: 20px;
}

.header-cart-icon .cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background-color: var(--secondary-color);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-right-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* === Product Card Form & Inputs === */
.product-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-option-selects {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 1rem 0;
}

.product-option-selects label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.15rem;
}

.cart-select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dark);
    background-color: #ffffff;
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.cart-select:focus {
    border-color: var(--primary-color);
}

.product-card-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0.5rem 0 1rem;
}

.product-price-display {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

.btn-add-to-cart {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: var(--primary-color);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.btn-add-to-cart:hover {
    background-color: var(--primary-hover, #1d3b4d);
    box-shadow: 0 4px 8px rgba(37, 76, 99, 0.2);
}

/* === Product Detail Page Selection === */
.detail-options-container {
    background-color: var(--light-bg);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border: 1px solid var(--border-color);
}

.detail-price-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

.detail-price-row .price-label {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.detail-price-display {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* === Sliding Cart Drawer === */
.cart-drawer-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    z-index: 9999;
}

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

.cart-drawer {
    position: fixed;
    top: 0;
    right: -460px;
    width: 440px;
    max-width: 100%;
    height: 100%;
    background-color: #ffffff;
    box-shadow: -4px 0 24px rgba(15, 23, 42, 0.15);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.cart-drawer-backdrop.active .cart-drawer {
    right: 0;
}

.cart-drawer-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-drawer-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
}

.cart-drawer-close {
    background: none;
    border: none;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.cart-drawer-close:hover {
    color: var(--text-dark);
}

.cart-drawer-body {
    flex-grow: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.cart-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    text-align: center;
    padding: 2rem;
}

.cart-empty-state svg {
    margin-bottom: 1rem;
    opacity: 0.5;
}

.cart-item {
    display: flex;
    gap: 1rem;
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--border-color);
    align-items: center;
}

.cart-item-img {
    width: 64px;
    height: 64px;
    background-color: var(--light-bg);
    border-radius: 8px;
    padding: 0.25rem;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.cart-item-info {
    flex-grow: 1;
}

.cart-item-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.15rem;
}

.cart-item-spec {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.cart-item-price {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 0.95rem;
}

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

.cart-item-qty {
    display: flex;
    align-items: center;
    border: 1.5px solid #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
}

.qty-btn {
    border: none;
    background: none;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-medium);
    transition: background-color 0.2s ease;
}

.qty-btn:hover {
    background-color: var(--light-bg);
    color: var(--primary-color);
}

.qty-val {
    width: 26px;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-dark);
}

.cart-item-remove {
    border: none;
    background: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0;
    transition: opacity 0.2s ease;
}

.cart-item-remove:hover {
    opacity: 0.8;
}

.cart-drawer-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    background-color: var(--light-bg);
}

.cart-subtotal-row {
    display: flex;
    justify-content: space-between;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1.25rem;
}

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

.cart-checkout-btn {
    width: 100%;
    padding: 0.9rem;
    background-color: var(--secondary-color);
    color: var(--primary-color);
    border: none;
    border-radius: 8px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.cart-checkout-btn:hover {
    background-color: var(--primary-color);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(37, 76, 99, 0.25);
}

/* === Responsive adjustments === */
@media (max-width: 480px) {
    .cart-drawer {
        width: 100%;
    }
}

