/* Cart Page Specific Styles */

/* Page Title */
.page-title {
    font-family: var(--heading-font);
    font-size: 36px;
    font-weight: 600;
    color: var(--primary-color);
    text-align: center;
    margin: 40px 0;
    letter-spacing: -0.5px;
}

/* Cart Container */
.cart-container {
    background-color: #fff;
    border-radius: 16px;
    box-shadow: var(--shadow-light);
    padding: 30px;
    margin-bottom: 40px;
}

.cart-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 0.5fr;
    padding: 15px 20px;
    background-color: var(--light-bg);
    border-radius: 8px;
    font-family: var(--body-font);
    font-weight: 600;
    color: var(--primary-color);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e5e5e5;
}

.cart-items {
    margin-top: 20px;
}

.cart-item {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 0.5fr;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e5e5e5;
    transition: all 0.3s ease;
}

.cart-item:hover {
    background-color: var(--light-bg);
}

.cart-item-product {
    display: flex;
    align-items: center;
    gap: 20px;
}

.cart-item-product img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: var(--shadow-light);
}

.cart-item-details h3 {
    font-family: var(--heading-font);
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
    line-height: 1.3;
}

.cart-item-price {
    font-weight: 600;
    color: var(--accent-color);
    font-size: 16px;
}

.cart-item-quantity {
    display: flex;
    justify-content: center;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: var(--light-bg);
    border-radius: 8px;
    padding: 5px;
}

.quantity-btn {
    background-color: var(--primary-color);
    color: var(--light-color);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quantity-btn:hover {
    background-color: var(--accent-color);
    transform: translateY(-1px);
}

.quantity-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.item-quantity {
    width: 50px;
    padding: 8px;
    border: 2px solid #e5e5e5;
    border-radius: 6px;
    text-align: center;
    font-family: var(--body-font);
    font-size: 16px;
    color: var(--primary-color);
}

.item-quantity:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(176, 136, 64, 0.1);
}

.cart-item-total {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 16px;
}

.cart-item-remove {
    display: flex;
    justify-content: center;
}

.remove-item {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--accent-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.remove-item:hover {
    color: #7e2a3e;
    transform: scale(1.1);
}

/* Empty Cart State */
.empty-cart {
    text-align: center;
    padding: 60px;
    background-color: #fff;
    border-radius: 16px;
    box-shadow: var(--shadow-light);
    margin-bottom: 40px;
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.empty-cart h2 {
    font-family: var(--heading-font);
    font-size: 28px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.empty-cart p {
    font-size: 16px;
    color: #555;
    margin-bottom: 30px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* Cart Summary */
.cart-summary {
    background-color: #fff;
    border-radius: 16px;
    box-shadow: var(--shadow-light);
    padding: 30px;
    max-width: 500px;
    margin-left: auto;
}

.cart-summary h2 {
    font-family: var(--heading-font);
    font-size: 28px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 25px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    font-size: 16px;
    color: var(--primary-color);
}

.summary-row span:first-child {
    font-weight: 500;
}

.summary-row span:last-child {
    font-weight: 600;
}

.summary-row.total {
    font-size: 18px;
    font-weight: 700;
    border-top: 2px solid #e5e5e5;
    padding-top: 20px;
    margin-top: 20px;
}

.coupon-section {
    margin: 20px 0;
}

.coupon-section h3 {
    font-family: var(--heading-font);
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.coupon-form {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

#coupon-code {
    flex: 1;
    padding: 12px;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    font-family: var(--body-font);
    font-size: 14px;
    transition: all 0.3s ease;
}

#coupon-code:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(176, 136, 64, 0.1);
}

#coupon-message .success {
    color: #155724;
    background-color: #d4edda;
    padding: 10px;
    border-radius: 8px;
    font-size: 14px;
}

#coupon-message .error {
    color: #721c24;
    background-color: #f8d7da;
    padding: 10px;
    border-radius: 8px;
    font-size: 14px;
}

.checkout-btn {
    display: block;
    width: 100%;
    text-align: center;
    margin-top: 20px;
}

.continue-shopping {
    display: block;
    text-align: center;
    margin-top: 20px;
    color: var(--accent-color);
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
}

.continue-shopping:hover {
    color: #7e2a3e;
    text-decoration: underline;
}

/* Loading State */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px;
    background-color: #fff;
    border-radius: 16px;
    box-shadow: var(--shadow-light);
    margin-bottom: 40px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--primary-color);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading p {
    margin-top: 20px;
    font-size: 16px;
    color: #555;
}

/* Recommended Products Section */
.recommended-products {
    padding: 60px 0;
}

.recommended-products h2 {
    font-family: var(--heading-font);
    font-size: 32px;
    font-weight: 600;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 40px;
}

.recommended-products .products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.recommended-products .product-card {
    background-color: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
}

.recommended-products .product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-medium);
}

.recommended-products .product-image {
    height: 160px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f8f8 0%, #f0f0f0 100%);
}

.recommended-products .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.recommended-products .product-card:hover .product-image img {
    transform: scale(1.05);
}

.recommended-products .product-info {
    padding: 15px;
}

.recommended-products .product-info h3 {
    font-family: var(--heading-font);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--primary-color);
    line-height: 1.3;
}

.recommended-products .product-price {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.recommended-products .current-price {
    font-weight: 600;
    font-size: 16px;
    color: var(--accent-color);
}

.recommended-products .original-price {
    font-size: 12px;
    text-decoration: line-through;
    color: #999;
}

.recommended-products .add-to-cart {
    width: 100%;
    padding: 8px;
    background-color: var(--primary-color);
    color: var(--light-color);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: var(--body-font);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.recommended-products .add-to-cart:hover {
    background-color: var(--accent-color);
    transform: translateY(-1px);
}

/* Responsive */
@media (max-width: 1024px) {
    .cart-container,
    .cart-summary,
    .empty-cart,
    .loading {
        padding: 20px;
    }

    .cart-header {
        font-size: 13px;
        padding: 12px 15px;
    }

    .cart-item {
        padding: 15px;
    }

    .cart-item-product img {
        width: 60px;
        height: 60px;
    }

    .cart-item-details h3 {
        font-size: 16px;
    }

    .recommended-products .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 15px;
    }

    .recommended-products .product-image {
        height: 140px;
    }

    .recommended-products .product-info {
        padding: 12px;
    }

    .recommended-products .product-info h3 {
        font-size: 13px;
    }

    .recommended-products .current-price {
        font-size: 15px;
    }

    .recommended-products .original-price {
        font-size: 12px;
    }
}

@media (max-width: 768px) {
    .cart-header {
        display: none; /* Hide header on mobile */
    }

    .cart-item {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 20px;
        background-color: var(--light-bg);
        border-radius: 8px;
        margin-bottom: 15px;
    }

    .cart-item-product {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .cart-item-product img {
        width: 100%;
        height: 150px;
        object-fit: cover;
    }

    .cart-item-price,
    .cart-item-total {
        font-size: 14px;
    }

    .quantity-selector {
        width: 100%;
        justify-content: space-between;
    }

    .item-quantity {
        width: 60px;
    }

    .cart-item-remove {
        position: absolute;
        top: 20px;
        right: 20px;
    }

    .cart-summary {
        max-width: 100%;
    }

    .recommended-products {
        padding: 40px 0;
    }

    .recommended-products h2 {
        font-size: 28px;
    }

    .recommended-products .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 15px;
    }

    .recommended-products .product-image {
        height: 120px;
    }

    .recommended-products .product-info {
        padding: 10px;
    }

    .recommended-products .add-to-cart {
        padding: 7px;
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 28px;
        margin: 30px 0;
    }

    .cart-container,
    .cart-summary,
    .empty-cart,
    .loading {
        padding: 15px;
    }

    .cart-item-details h3 {
        font-size: 14px;
    }

    .quantity-btn {
        width: 28px;
        height: 28px;
        font-size: 16px;
    }

    .item-quantity {
        width: 50px;
        font-size: 14px;
    }

    .recommended-products h2 {
        font-size: 24px;
    }

    .recommended-products .products-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .recommended-products .product-image {
        height: 120px;
    }

    .recommended-products .product-info h3 {
        font-size: 13px;
    }

    .recommended-products .current-price {
        font-size: 14px;
    }

    .recommended-products .original-price {
        font-size: 11px;
    }
}/* Modal de Confirmación Elegante */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.confirm-modal {
    background: white;
    border-radius: 16px;
    padding: 32px;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s ease;
    text-align: center;
}

.modal-overlay.active .confirm-modal {
    transform: scale(1) translateY(0);
}

.modal-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #ff6b6b, #ff5252);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
}

.modal-icon svg {
    width: 32px;
    height: 32px;
    color: white;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.modal-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 12px;
    font-family: var(--heading-font);
}

.modal-message {
    font-size: 16px;
    color: #64748b;
    margin-bottom: 32px;
    line-height: 1.5;
    font-family: var(--body-font);
}

.modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.modal-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--body-font);
    min-width: 100px;
}

.btn-cancel {
    background: #e2e8f0;
    color: #475569;
}

.btn-cancel:hover {
    background: #cbd5e1;
    transform: translateY(-1px);
}

.btn-confirm {
    background: linear-gradient(135deg, #ff6b6b, #ff5252);
    color: white;
}

.btn-confirm:hover {
    background: linear-gradient(135deg, #ff5252, #e53e3e);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
}

@media (max-width: 480px) {
    .confirm-modal {
        margin: 20px;
        padding: 24px;
    }
    
    .modal-buttons {
        flex-direction: column;
    }
    
    .modal-btn {
        width: 100%;
    }
}