
/* =============================================
   SHOPPING CART STYLES - FIXED MOBILE
   ============================================= */
/* Cart Button in Navigation - FIXED */
.cart-button {
    position: relative;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--secondary);
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
    white-space: nowrap;
}
.cart-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}
.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    border: 2px solid white;
}
/* Cart Modal - ENHANCED DESIGN */
.cart-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    overflow: auto;
    backdrop-filter: blur(5px);
}
.cart-modal-content {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    margin: 2% auto;
    width: 95%;
    max-width: 900px;
    border-radius: 20px;
    position: relative;
    animation: modalFadeIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(212, 175, 55, 0.2);
    overflow: hidden;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}
.cart-modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
}
.cart-modal-header {
    background: linear-gradient(135deg, var(--secondary), #34495e);
    color: white;
    padding: 25px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}
.cart-modal-header h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}
.close-cart {
    color: white;
    font-size: 2.2rem;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}
.close-cart:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}
.cart-modal-body {
    padding: 30px;
    overflow-y: auto;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
/* Cart Items - ENHANCED DESIGN */
.cart-items-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
    flex-grow: 1;
}
.cart-item {
    display: grid;
    grid-template-columns: 100px 1fr auto;
    gap: 20px;
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border-left: 4px solid var(--primary);
    transition: all 0.3s ease;
    align-items: center;
}
.cart-item:hover {
    transform: translateX(5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}
.cart-item-image {
    width: 100px;
    height: 100px;
    object-fit: contain;
    border-radius: 10px;
    background: #f8f9fa;
    padding: 10px;
    border: 2px solid #e9ecef;
}
.cart-item-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-grow: 1;
}
.cart-item-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--secondary);
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.3;
}
.cart-item-origin {
    display: inline-block;
    background: linear-gradient(135deg, var(--secondary), #34495e);
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 8px;
    width: fit-content;
}
.cart-item-price {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 8px;
}
.item-original-price {
    text-decoration: line-through;
    color: var(--gray);
    font-size: 1.1rem;
    font-weight: 400;
}
.cart-item-quantity {
    font-size: 0.9rem;
    color: var(--gray);
    margin-top: 5px;
    font-weight: 600;
}
.cart-item-actions {
    display: flex;
    align-items: center;
}
.remove-from-cart {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}
.remove-from-cart:hover {
    background: #c0392b;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}
/* Empty Cart State - ENHANCED */
.empty-cart {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.empty-cart i {
    font-size: 4rem;
    color: #cbd5e1;
    margin-bottom: 20px;
}
.empty-cart h3 {
    font-family: var(--font-heading);
    color: var(--secondary);
    margin-bottom: 10px;
    font-size: 1.5rem;
}
.empty-cart p {
    margin-bottom: 25px;
    font-size: 1.1rem;
    max-width: 400px;
    line-height: 1.6;
}
.continue-shopping {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--secondary);
    padding: 12px 30px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    font-size: 1rem;
}
.continue-shopping:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}
/* Cart Summary - ENHANCED */
.cart-summary {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border-top: 3px solid var(--primary);
    margin-top: auto;
}
.cart-summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
    align-items: center;
}
.cart-summary-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.cart-summary-label {
    font-weight: 600;
    color: var(--secondary);
    font-size: 1rem;
}
.cart-summary-value {
    font-weight: 700;
    color: var(--primary);
    font-size: 1.1rem;
}
.cart-total-row {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid var(--primary);
}
.cart-total-row .cart-summary-label {
    font-family: var(--font-heading);
    font-size: 1.3rem;
}
.cart-total-row .cart-summary-value {
    font-size: 1.8rem;
}
/* =============================================
   UPDATED CART ACTIONS - CHECKOUT BUTTON
   ============================================= */
.cart-actions {
    display: flex;
    gap: 1rem;
    margin-top: 25px;
    flex-wrap: wrap;
}
.cart-action-btn {
    flex: 1;
    padding: 15px 25px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 160px;
}
.clear-cart-btn {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}
.clear-cart-btn:hover {
    background: linear-gradient(135deg, #c0392b, #e74c3c);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(220, 53, 69, 0.4);
}
/* NEW: Checkout Button with Main Theme Colors */
.checkout-btn {
    background: linear-gradient(135deg, #d4af37, #b8941f);
    color: #2c3e50;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}
.checkout-btn:hover {
    background: linear-gradient(135deg, #b8941f, #d4af37);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(212, 175, 55, 0.4);
}
/* Add to Cart Button in Coin Cards */
.add-to-cart-btn {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--secondary);
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1;
    font-size: 0.95rem;
}
.add-to-cart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(212, 175, 55, 0.4);
}
.add-to-cart-btn.in-cart {
    background: #27ae60;
    color: white;
}
.add-to-cart-btn.in-cart:hover {
    background: #229954;
    transform: translateY(-2px);
}
/* Enhanced Mobile Responsiveness - FIXED */
@media (max-width: 768px) {
    .cart-modal-content {
        width: 98%;
        margin: 1% auto;
        max-height: 95vh;
    }
    .cart-modal-header {
        padding: 20px;
    }
    .cart-modal-header h2 {
        font-size: 1.5rem;
    }
    .cart-modal-body {
        padding: 20px;
    }
    .cart-item {
        grid-template-columns: 80px 1fr;
        gap: 15px;
        padding: 15px;
    }
    .cart-item-image {
        width: 80px;
        height: 80px;
    }
    .cart-item-actions {
        grid-column: 1 / -1;
        justify-content: center;
        margin-top: 10px;
    }
    .remove-from-cart {
        width: 100%;
        justify-content: center;
    }
    .cart-actions {
        flex-direction: column;
    }
    .cart-action-btn {
        width: 100%;
    }
    .cart-summary {
        padding: 20px;
    }
    .cart-summary-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    .cart-summary-value {
        align-self: flex-end;
    }
    .cart-total-row .cart-summary-value {
        font-size: 1.5rem;
    }
  
    /* FIXED: Mobile cart button alignment */
    .cart-button {
        width: auto;
        max-width: 200px;
        justify-content: center;
    }
}
@media (max-width: 480px) {
    .cart-modal-header h2 {
        font-size: 1.3rem;
    }
    .cart-item-title {
        font-size: 1rem;
    }
    .cart-item-price {
        font-size: 1.2rem;
    }
    .cart-item {
        grid-template-columns: 70px 1fr;
        gap: 12px;
        padding: 12px;
    }
    .cart-item-image {
        width: 70px;
        height: 70px;
    }
    .empty-cart {
        padding: 40px 15px;
    }
    .empty-cart i {
        font-size: 3rem;
    }
    .empty-cart h3 {
        font-size: 1.3rem;
    }
    .empty-cart p {
        font-size: 1rem;
    }
    .cart-button {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
}
/* Animation for cart items */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}
@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}
/* Loading animation */
.cart-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}
