/* 
 * Modern Revolutionary Cart Styles
 * Premium card-based design with gradients and modern UI
 */

/* Container and Layout */
.cart-modern-container {
    max-width: 1400px;
    margin: 0 auto 80px auto;
    padding: 20px;
}

.cart-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 30px;
    align-items: start;
}

/* Product Cards */
.cart-products-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cart-product-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cart-product-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.cart-product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #2a6496 0%, #4a9fd6 100%);
}

.product-card-content {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 20px;
    align-items: stretch;
    /* Image takes full height */
}

.product-main-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.product-top-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 20px;
    align-items: start;
}

.product-controls-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

.product-image-wrapper {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.product-image {
    width: 120px;
    height: 120px;
    object-fit: contain;
    border-radius: 12px;
    background: #f8f9fa;
    padding: 10px;
}

.discount-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(238, 90, 111, 0.4);
}

.stock-badge {
    display: none;
    /* Hidden per user request */
}



/* Product Info */
.product-info {
    flex: 1;
}

.product-name {
    font-size: 18px;
    font-weight: 600;
    color: #2a6496;
    margin-bottom: 8px;
    line-height: 1.4;
}

.product-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
}

.product-meta-item {
    font-size: 13px;
    color: #6c757d;
}

.product-meta-item strong {
    color: #495057;
    font-weight: 600;
}

/* Quantity Controls */
.product-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.quantity-control-modern {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8f9fa;
    padding: 8px 16px;
    border-radius: 50px;
    border: 2px solid #e9ecef;
}

.qty-btn-modern {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: #BF5020;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 36px;
    padding: 0;
}

.qty-btn-modern:hover:not(:disabled) {
    transform: scale(1.1);
}

.qty-btn-modern:disabled {
    color: #ccc !important;
    cursor: not-allowed;
}

.qty-input-modern {
    width: 60px;
    height: 40px;
    border: none;
    background: white;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: #2a6496;
    border-radius: 8px;
    padding: 0;
}

/* Price Section */
.product-price-section {
    text-align: right;
}

.price-unit {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 4px;
}

.price-original {
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
    margin-bottom: 4px;
}

.price-current {
    font-size: 16px;
    font-weight: 600;
    color: #2a6496;
    margin-bottom: 8px;
}

.price-total {
    font-size: 24px;
    font-weight: 700;
    color: #2a6496;
    margin-bottom: 4px;
}

.price-total-usd {
    font-size: 14px;
    color: #28a745;
    font-weight: 600;
}

/* Delete Button */
.delete-btn-modern {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #dc3545;
    background: #fff;
    color: #dc3545;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
}

.delete-btn-modern:hover {
    background: #dc3545;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

/* Summary Panel */
.cart-summary-panel {
    position: sticky;
    top: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 20px;
    padding: 28px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    border: 1px solid #dee2e6;
}

.summary-header {
    font-size: 22px;
    font-weight: 700;
    color: #2a6496;
    margin-bottom: 24px;
    text-align: center;
}

/* Delivery Progress */
.delivery-progress-section {
    background: white;
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.delivery-progress-text {
    font-size: 13px;
    color: #495057;
    margin-bottom: 8px;
    text-align: center;
}

.delivery-progress-bar {
    height: 8px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.delivery-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745 0%, #20c997 100%);
    border-radius: 10px;
    transition: width 0.3s ease;
}

/* Summary Lines */
.summary-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #dee2e6;
}

.summary-line:last-of-type {
    border-bottom: none;
}

.summary-label {
    font-size: 15px;
    color: #495057;
}

.summary-value {
    font-size: 15px;
    font-weight: 600;
    color: #2a6496;
}

.summary-total {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
}

.summary-total .summary-label {
    font-size: 18px;
    font-weight: 700;
    color: #2a6496;
}

.summary-total .summary-value {
    font-size: 28px;
    font-weight: 700;
    color: #2a6496;
}

.summary-total-usd {
    text-align: right;
    font-size: 16px;
    color: #28a745;
    font-weight: 600;
    margin-top: 4px;
}

/* Action Buttons */
.btn-checkout-modern {
    width: 100%;
    padding: 16px 24px;
    background: #2a6496;
    color: white;
    border: 1px solid #2a6496;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(42, 100, 150, 0.2);
    margin-bottom: 12px;
    text-decoration: none;
    display: block;
    text-align: center;
    text-transform: uppercase;
}

.btn-checkout-modern:hover {
    background: white;
    color: #2a6496;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(42, 100, 150, 0.3);
}

.btn-clear-cart {
    width: 100%;
    padding: 12px 24px;
    background: white;
    color: #6c757d;
    border: 2px solid #dee2e6;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: block;
    text-align: center;
}

.btn-clear-cart:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
    color: #495057;
}

.btn-continue-shopping {
    width: 100%;
    padding: 12px 24px;
    background: transparent;
    color: #2a6496;
    border: none;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: block;
    text-align: center;
    margin-top: 12px;
}

.btn-continue-shopping:hover {
    text-decoration: underline;
}

/* Empty Cart State */
.empty-cart-state {
    text-align: center;
    padding: 80px 20px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.empty-cart-icon {
    font-size: 80px;
    color: #dee2e6;
    margin-bottom: 20px;
}

.empty-cart-title {
    font-size: 24px;
    font-weight: 700;
    color: #495057;
    margin-bottom: 12px;
}

.empty-cart-text {
    font-size: 16px;
    color: #6c757d;
    margin-bottom: 32px;
}

/* Page Header */
.cart-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
}

.cart-title-section h1 {
    font-size: 32px;
    font-weight: 700;
    color: #2a6496;
    margin-bottom: 8px;
}

.cart-item-count {
    font-size: 16px;
    color: #6c757d;
}

.cart-item-count strong {
    color: #2a6496;
    font-weight: 600;
}

/* Mobile Responsive */
@media (max-width: 992px) {
    .cart-layout {
        grid-template-columns: 1fr;
    }

    .cart-summary-panel {
        position: static;
    }

    .product-card-content {
        grid-template-columns: 100px 1fr;
        gap: 16px;
    }

    .product-controls {
        grid-column: 1 / -1;
        flex-direction: row;
        justify-content: space-between;
        margin-top: 16px;
    }

    .product-price-section {
        text-align: right;
    }
}

@media (max-width: 576px) {
    .cart-modern-container {
        padding: 12px;
        padding-bottom: 100px;
        /* Space for fixed footer */
        margin-bottom: 0;
        /* Override desktop margin */
    }

    .cart-product-card {
        padding: 16px;
    }

    .cart-page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        margin-bottom: 24px;
        padding-bottom: 15px;
    }

    .cart-title-section h1 {
        font-size: 24px;
        /* Tamaño más equilibrado para móvil */
        margin-bottom: 4px;
    }

    .cart-item-count {
        font-size: 14px;
    }

    .cart-page-header .fwl-btn-secondary {
        width: auto;
        font-size: 12px;
        padding: 0 16px;
    }

    .product-card-content {
        grid-template-columns: 80px 1fr;
        gap: 12px;
    }

    .product-image {
        width: 80px;
        height: 80px;
    }

    .product-name {
        font-size: 15px;
    }

    .quantity-control-modern {
        gap: 8px;
        padding: 6px 12px;
    }

    .qty-btn-modern {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }

    .qty-input-modern {
        width: 50px;
        height: 44px;
        font-size: 16px;
    }

    .price-total {
        font-size: 20px;
    }

    .cart-summary-panel {
        padding: 20px;
    }

    /* Mobile: Move action buttons to end */
    .cart-summary-panel {
        display: flex;
        flex-direction: column;
    }

    .summary-actions {
        order: 10;
        margin-top: 20px;
    }
}

/* Animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cart-product-card {
    animation: slideInUp 0.3s ease;
}

/* Loading State */
.cart-loading {
    opacity: 0.6;
    pointer-events: none;
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}