/* ============================================
   CART.CSS - ESTILOS PARA CARRITO DE COMPRAS
   ============================================ */

/* Variables heredadas del ecommerce.css */
:root {
    --primary-color: #3A1916;
    --secondary-color: #f8f9fa;
    --accent-color: #ff6b6b;
    --text-color: #6c757d;
    --white-color: #ffffff;
    --border-color: #e9ecef;
    --hover-color: #fef5f5;
    --success-color: #4caf50;
    --bg-color: #ffffff;
}

/* ============================================
   CART SECTION
   ============================================ */

.cart-section {
    padding: 40px 0;
    background: #f8f9fa;
   /* min-height: 70vh;*/
}

/* ============================================
   CART CONTAINER
   ============================================ */

.cart-container {
    background: var(--white-color);
    border-radius: 20px;
    padding: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-bottom: 40px;
}

/* Cart Header */
.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 25px;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 30px;
}

.cart-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.cart-header h2 i {
    color: var(--accent-color);
    font-size: 1.6rem;
}

.cart-count {
    background: var(--accent-color);
    color: white;
    padding: 8px 18px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

/* ============================================
   CART ITEMS
   ============================================ */

.cart-items {
    margin-bottom: 30px;
}

.cart-item {
    display: grid;
    grid-template-columns: 120px 1fr auto 180px 60px;
    gap: 25px;
    align-items: center;
    padding: 25px;
    background: var(--white-color);
    border: 2px solid var(--border-color);
    border-radius: 15px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.cart-item:hover {
    border-color: var(--accent-color);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.15);
    transform: translateY(-2px);
}

/* Cart Item Image */
.cart-item-image {
    width: 120px;
    height: 120px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--secondary-color);
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.cart-item:hover .cart-item-image img {
    transform: scale(1.1);
}

/* Cart Item Details */
.cart-item-details {
    flex: 1;
}

.cart-item-details h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 8px;
    line-height: 1.3;
}

.cart-item-description {
    color: var(--text-color);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.cart-item-rating {
    display: flex;
    gap: 3px;
}

.cart-item-rating i {
    color: #ffc107;
    font-size: 0.85rem;
}

/* Cart Item Quantity */
.cart-item-quantity {
    text-align: center;
}

.cart-item-quantity label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-color);
    margin-bottom: 8px;
    font-weight: 600;
}

.quantity-controls {
    display: flex;
    align-items: center;
    background: var(--secondary-color);
    border-radius: 10px;
    padding: 4px;
    gap: 2px;
}

.qty-btn {
    width: 36px;
    height: 36px;
    background: white;
    border: none;
    border-radius: 8px;
    color: var(--primary-color);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.qty-btn:hover {
    background: var(--accent-color);
    color: white;
    transform: scale(1.1);
}

.quantity-controls input {
    width: 50px;
    text-align: center;
    border: none;
    background: transparent;
    font-weight: 700;
    font-size: 1rem;
    color: var(--primary-color);
}

/* Cart Item Price */
.cart-item-price {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.price-label {
    font-size: 0.75rem;
    color: var(--text-color);
    text-transform: uppercase;
    font-weight: 600;
}

.unit-price {
    font-size: 1rem;
    color: var(--text-color);
    text-decoration: line-through;
}

.item-total {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-color);
}

/* Cart Item Remove */
.cart-item-remove {
    display: flex;
    justify-content: center;
}

.remove-btn {
    width: 45px;
    height: 45px;
    background: #ffebee;
    border: 2px solid #ffcdd2;
    border-radius: 10px;
    color: #f44336;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-btn:hover {
    background: #f44336;
    border-color: #f44336;
    color: white;
    transform: scale(1.1) rotate(10deg);
}

/* ============================================
   CART ACTIONS
   ============================================ */

.cart-actions {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding-top: 25px;
    border-top: 2px solid var(--border-color);
}

.btn-continue-shopping,
.btn-clear-cart {
    padding: 14px 30px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    text-decoration: none;
}

.btn-continue-shopping {
    background: var(--secondary-color);
    color: var(--primary-color);
    border: 2px solid var(--border-color);
}

.btn-continue-shopping:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(58, 25, 22, 0.3);
}

.btn-clear-cart {
    background: transparent;
    color: #f44336;
    border: 2px solid #ffcdd2;
}

.btn-clear-cart:hover {
    background: #f44336;
    color: white;
    border-color: #f44336;
    transform: translateY(-2px);
}

/* ============================================
   COUPON BOX
   ============================================ */

.coupon-box {
    background: var(--white-color);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
}

.coupon-box h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.coupon-box h3 i {
    color: var(--accent-color);
}

.coupon-box p {
    color: var(--text-color);
    margin-bottom: 20px;
}

.coupon-input {
    display: flex;
    gap: 10px;
}

.coupon-input input {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.coupon-input input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

.btn-apply-coupon {
    padding: 14px 30px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-apply-coupon:hover {
    background: #ff5252;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

/* ============================================
   SHIPPING INFO
   ============================================ */

.shipping-info {
    background: var(--white-color);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
}

.shipping-info h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.shipping-info h3 i {
    color: var(--accent-color);
}

.shipping-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.shipping-option {
    position: relative;
}

.shipping-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.shipping-option label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.shipping-option input[type="radio"]:checked + label {
    border-color: var(--accent-color);
    background: var(--hover-color);
}

.shipping-option label:hover {
    border-color: var(--accent-color);
    transform: translateX(5px);
}

.shipping-name {
    font-weight: 600;
    color: var(--primary-color);
    flex: 1;
}

.shipping-time {
    color: var(--text-color);
    font-size: 0.9rem;
    flex: 1;
    text-align: center;
}

.shipping-price {
    font-weight: 700;
    color: var(--accent-color);
    font-size: 1.1rem;
}

/* ============================================
   ORDER SUMMARY
   ============================================ */

.order-summary {
    background: var(--white-color);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    position: sticky;
    top: 100px;
}

.order-summary h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.order-summary h3 i {
    color: var(--accent-color);
}

.summary-details {
    margin-bottom: 25px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    font-size: 1rem;
    color: var(--text-color);
}

.summary-row span:last-child {
    font-weight: 600;
    color: var(--primary-color);
}

.discount-row {
    display: none;
    color: var(--success-color);
}

.discount-amount {
    color: var(--success-color) !important;
    font-weight: 700 !important;
}

.summary-divider {
    height: 2px;
    background: var(--border-color);
    margin: 15px 0;
}

.total-row {
    font-size: 1.2rem;
    padding: 15px 0;
}

.total-row span {
    font-weight: 700;
    color: var(--primary-color);
}

.total-amount {
    font-size: 1.8rem !important;
    color: var(--accent-color) !important;
}

/* Payment Methods */
.payment-methods {
    background: var(--secondary-color);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px;
}

.payment-methods p {
    font-size: 0.9rem;
    color: var(--text-color);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.payment-icons {
    display: flex;
    gap: 15px;
    font-size: 2rem;
    color: var(--primary-color);
}

/* Checkout Button */
.btn-checkout {
    width: 100%;
    padding: 18px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 15px;
}

.btn-checkout:hover {
    background: #ff5252;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 107, 107, 0.4);
}

.secure-checkout {
    text-align: center;
    color: var(--success-color);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
}

/* ============================================
   EMPTY CART
   ============================================ */

.empty-cart {
    background: var(--white-color);
    border-radius: 20px;
    padding: 80px 40px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.empty-cart-content i {
    font-size: 6rem;
    color: var(--border-color);
    margin-bottom: 25px;
}

.empty-cart-content h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.empty-cart-content p {
    color: var(--text-color);
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.btn-shop-now {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 35px;
    background: var(--accent-color);
    color: white;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.btn-shop-now:hover {
    background: #ff5252;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 107, 107, 0.4);
    color: white;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablets (992px and below) */
@media (max-width: 992px) {
    .cart-container {
        padding: 30px 20px;
    }

    .cart-item {
        grid-template-columns: 100px 1fr;
        gap: 15px;
    }

    .cart-item-image {
        width: 100px;
        height: 100px;
    }

    .cart-item-quantity,
    .cart-item-price,
    .cart-item-remove {
        grid-column: 1 / -1;
    }

    .cart-item-quantity {
        justify-self: start;
    }

    .cart-item-price {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        text-align: left;
    }

    .cart-item-remove {
        justify-self: center;
    }

    .cart-actions {
        flex-direction: column;
    }

    .order-summary {
        position: static;
        margin-top: 20px;
    }
}

/* Mobile (768px and below) */
@media (max-width: 768px) {
    .cart-section {
        padding: 50px 0;
    }

    .cart-container {
        padding: 25px 15px;
    }

    .cart-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .cart-header h2 {
        font-size: 1.5rem;
    }

    .cart-item {
        padding: 20px 15px;
    }

    .coupon-box,
    .shipping-info,
    .order-summary {
        padding: 25px 20px;
    }

    .coupon-input {
        flex-direction: column;
    }

    .btn-apply-coupon {
        width: 100%;
    }

    .shipping-option label {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .shipping-time,
    .shipping-price {
        text-align: center;
    }

    .total-amount {
        font-size: 1.5rem !important;
    }
}

/* Small Mobile (576px and below) */
@media (max-width: 576px) {
    .cart-item {
        grid-template-columns: 80px 1fr;
        gap: 12px;
        padding: 15px;
    }

    .cart-item-image {
        width: 80px;
        height: 80px;
    }

    .cart-item-details h3 {
        font-size: 1rem;
    }

    .quantity-controls {
        width: 100%;
        max-width: 200px;
    }

    .btn-continue-shopping,
    .btn-clear-cart {
        font-size: 0.9rem;
        padding: 12px 20px;
    }

    .empty-cart {
        padding: 60px 20px;
    }

    .empty-cart-content i {
        font-size: 4rem;
    }

    .empty-cart-content h2 {
        font-size: 1.5rem;
    }

    .payment-icons {
        gap: 10px;
        font-size: 1.5rem;
    }
}

/* Animation for item removal */
@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-30px);
    }
}