/**
 * Shopping Cart Styles
 * LPGas4U E-commerce System
 */

/* Cart Button in Header */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cart-btn {
    position: relative;
    background: rgba(20, 73, 130, 0.1);
    border: 1px solid rgba(20, 73, 130, 0.2);
    color: #144982;
    width: 45px;
    height: 45px;
    min-width: 44px;
    min-height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    -webkit-tap-highlight-color: transparent;
}

.cart-btn:hover {
    background: #144982;
    color: #fff;
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(20, 73, 130, 0.4);
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #144982;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.cart-count.hidden {
    display: none;
}

/* Cart Sidebar */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 9999;
    pointer-events: none;
}

.cart-sidebar.active {
    pointer-events: all;
}

.cart-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cart-sidebar.active .cart-overlay {
    opacity: 1;
}

.cart-panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 450px;
    background: #fff;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.cart-sidebar.active .cart-panel {
    transform: translateX(0);
}

.cart-header {
    padding: 1.5rem;
    background: #144982;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cart-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cart-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.cart-close:hover {
    background: #144982;
    transform: rotate(90deg);
}

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

.cart-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: #666;
}

.cart-empty i {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 1rem;
}

.cart-empty p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    position: relative;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cart-item-name {
    font-weight: 600;
    color: #1a1a1a;
    font-size: 0.95rem;
    margin: 0;
}

.cart-item-price {
    color: #F97808;
    font-weight: 600;
    font-size: 1.1rem;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #fff;
    border-radius: 6px;
    padding: 0.25rem;
}

.quantity-btn {
    background: #f0f0f0;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #333;
    font-weight: 600;
}

.quantity-btn:hover {
    background: #144982;
    color: #fff;
}

.quantity-value {
    min-width: 30px;
    text-align: center;
    font-weight: 600;
    color: #1a1a1a;
}

.cart-item-remove {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(249, 120, 8, 0.1);
    border: none;
    color: #F97808;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.cart-item-remove:hover {
    background: #144982;
    color: #fff;
}

.cart-footer {
    padding: 1.5rem;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
}

.cart-summary {
    margin-bottom: 1.5rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    color: #666;
}

.summary-row.total {
    border-top: 2px solid #e0e0e0;
    margin-top: 0.5rem;
    padding-top: 1rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a1a1a;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* Product Card Updates */
.btn-add-to-cart,
.btn-out-of-stock {
    padding: 0.7rem 1.2rem;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}

.btn-add-to-cart {
    background: #144982;
    color: #fff;
}

.btn-add-to-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(20, 73, 130, 0.4);
}

.btn-out-of-stock {
    background: #e0e0e0;
    color: #999;
    cursor: not-allowed;
}

.product-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #144982;
    color: #fff;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-badge.out-of-stock {
    background: #666;
}

/* Notifications */
.notification {
    position: fixed;
    top: 100px;
    right: 20px;
    background: #fff;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 10000;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease;
    min-width: 300px;
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification-success {
    border-left: 4px solid #28a745;
    color: #28a745;
}

.notification-error {
    border-left: 4px solid #dc3545;
    color: #dc3545;
}

.notification i {
    font-size: 1.3rem;
}

.notification span {
    color: #333;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
    .cart-panel {
        max-width: 100%;
    }

    .nav-actions {
        gap: 0.5rem;
    }

    .notification {
        right: 10px;
        left: 10px;
        min-width: auto;
    }
}

