/* ===================================================
   RX Lifestyle Cart Styles
   Premium Sliding Cart Sidebar
   =================================================== */

/* Cart Overlay */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 9998;
}

.cart-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* Cart Sidebar */
.cart-sidebar {
    position: fixed;
    top: 45px;
    right: -450px;
    width: 100%;
    max-width: 420px;
    height: calc(100vh - 45px);
    background: var(--white-color);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    transition: right 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 9999;
}

.cart-sidebar.open {
    right: 0;
}

/* Cart Header */
.cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 25px 30px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #2d2d2d 100%);
    border-bottom: 3px solid var(--accent-color);
}

.cart-header h3 {
    color: var(--white-color);
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.cart-header h3 i {
    color: var(--accent-color);
    font-size: 22px;
}

.cart-close {
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--white-color);
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-close:hover {
    background: var(--accent-color);
    color: var(--primary-color);
    transform: rotate(90deg);
}

/* Cart Body */
.cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
}

/* Cart Empty State */
.cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    padding: 40px 20px;
}

.cart-empty i {
    font-size: 60px;
    color: #ddd;
    margin-bottom: 20px;
}

.cart-empty p {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.cart-empty span {
    font-size: 14px;
    color: var(--text-color);
}

/* Cart Items */
.cart-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.cart-item {
    display: flex;
    gap: 15px;
    background: var(--white-color);
    border-radius: 15px;
    padding: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    position: relative;
    transition: all 0.3s ease;
}

.cart-item:hover {
    transform: translateX(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.cart-item-image {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    background: linear-gradient(145deg, #f8f8f8 0%, #e8e8e8 100%);
    overflow: hidden;
    flex-shrink: 0;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
}

.cart-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.cart-item-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0;
    line-height: 1.3;
}

.cart-item-option {
    font-size: 12px;
    color: var(--accent-color);
    margin: 0;
    padding: 3px 8px;
    background: rgba(254, 131, 55, 0.1);
    border-radius: 4px;
    display: inline-block;
    width: fit-content;
}

.cart-item-price {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cart-item-price .price-usd {
    font-size: 16px;
    font-weight: 700;
    color: var(--accent-color);
}

.cart-item-price .price-peso {
    font-size: 13px;
    color: var(--text-color);
}

/* Quantity Controls */
.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 5px;
}

.cart-item-quantity button {
    width: 28px;
    height: 28px;
    border: 2px solid #e0e0e0;
    background: var(--white-color);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
}

.cart-item-quantity button:hover {
    border-color: var(--accent-color);
    background: var(--accent-color);
    color: var(--primary-color);
}

.cart-item-quantity .qty-value {
    min-width: 30px;
    text-align: center;
    font-weight: 600;
    color: var(--primary-color);
}

/* Remove Button */
.cart-item-remove {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 30px;
    height: 30px;
    border: none;
    background: rgba(255, 71, 87, 0.1);
    border-radius: 8px;
    color: #ff4757;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item-remove:hover {
    background: #ff4757;
    color: var(--white-color);
    transform: scale(1.1);
}

/* Cart Footer */
.cart-footer {
    padding: 25px;
    background: var(--white-color);
    border-top: 1px solid #eee;
    display: none;
}

.cart-summary {
    margin-bottom: 20px;
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px dashed #e0e0e0;
}

.cart-summary-row span:first-child {
    font-size: 14px;
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cart-totals {
    text-align: right;
}

.cart-total-amount {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: var(--accent-color);
}

.cart-total-peso {
    display: block;
    font-size: 16px;
    color: var(--primary-color);
    font-weight: 600;
}

/* Checkout Button */
.cart-checkout-btn {
    width: 100%;
    padding: 18px 30px;
    background: linear-gradient(135deg, var(--accent-color) 0%, #e67320 100%);
    color: var(--primary-color);
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
}

.cart-checkout-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(254, 131, 55, 0.4);
}

.cart-checkout-btn i {
    font-size: 18px;
}

/* Continue Shopping Button */
.cart-continue-btn {
    width: 100%;
    padding: 14px 30px;
    background: transparent;
    color: var(--text-color);
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.cart-continue-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Cart Badge */
.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    min-width: 20px;
    height: 20px;
    background: var(--accent-color);
    color: var(--primary-color);
    font-size: 11px;
    font-weight: 700;
    border-radius: 50px;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

/* Header Cart Button */
.header-cart-btn {
    position: relative;
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 10px;
    color: var(--white-color);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 15px;
    margin-right: 15px;
}

.header-cart-btn:hover {
    background: var(--accent-color);
    color: var(--primary-color);
}

/* Cart Notification */
.cart-notification {
    position: fixed;
    top: 100px;
    right: 20px;
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    color: white;
    padding: 18px 28px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 40px rgba(76, 175, 80, 0.3);
    z-index: 10000;
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    font-weight: 600;
}

.cart-notification.show {
    transform: translateX(0);
}

.cart-notification i {
    font-size: 22px;
}

.cart-notification-info {
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
    box-shadow: 0 10px 40px rgba(33, 150, 243, 0.3);
}

/* Responsive Design */
@media (max-width: 480px) {
    .cart-sidebar {
        max-width: 100%;
        right: -100%;
    }

    .cart-header {
        padding: 20px;
    }

    .cart-body {
        padding: 15px;
    }

    .cart-item {
        padding: 12px;
    }

    .cart-item-image {
        width: 70px;
        height: 70px;
    }

    .cart-footer {
        padding: 20px;
    }
}