/* Responsividad mejorada del carrito */
.cart-layout, .cart-items-section, .cart-sidebar, .cart-summary-card {
    box-sizing: border-box;
    overflow-x: hidden;
}
.cart-layout * {
    box-sizing: border-box;
}
.cart-layout img, .cart-layout table {
    max-width: 100%;
    width: 100%;
    height: auto;
    display: block;
}
/* ========================================
   PREMIUM CART PAGE - ULTRA MODERN DESIGN
   ======================================== */

:root {
    --cart-primary: linear-gradient(135deg, #BE9485 0%, #E1C2B7 100%);
    --cart-accent: #BE9485;
    --cart-accent-dark: #BE9485;
    --cart-accent-light: #E1C2B7;
    --cart-success: #BE9485;
    --cart-danger: #BE9485;
    --cart-bg: #F5EEE8;
    --cart-card: #F5EEE8;
    --cart-shadow: 0 4px 20px rgba(190, 148, 133, 0.18);
    --cart-shadow-lg: 0 10px 40px rgba(190, 148, 133, 0.28);
    --cart-radius: 16px;
    --cart-text: #141414;
    --cart-text-light: #BE9485;
}

body {
    background: var(--cart-bg);
}

/* Header Section */
.cart-page-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px 80px;
    min-height: calc(100vh - 200px);
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
}

.cart-header-content {
    flex: 1;
}

.cart-page-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: #fff;
    margin: 0 0 10px 0;
    font-family: 'Playfair Display', serif;
    display: flex;
    align-items: center;
    gap: 15px;
}

.cart-page-title i {
    background: var(--cart-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 0.9em;
}

.cart-subtitle {
    color: var(--cart-text-light);
    font-size: 1.1rem;
    margin: 0;
}

.btn-continue-shopping {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: #A97869;
    color: #F5EEE8;
    border: none;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 6px 16px rgba(169, 120, 105, 0.3);
}

.btn-continue-shopping:hover {
    background: #A97869;
    color: #F5EEE8;
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(169, 120, 105, 0.4);
}

/* Layout Grid */
.cart-layout {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 30px;
    align-items: start;
    width: 100%;
    box-sizing: border-box;
}
@media (max-width: 600px) {
    .cart-layout {
        grid-template-columns: 1fr;
        gap: 18px;
        width: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
    }
    .cart-sidebar, .cart-summary-card, .cart-items-section {
        width: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
    }
}

/* Cart Items Section */
.cart-items-section {
    background: var(--cart-card);
    border-radius: var(--cart-radius);
    padding: 30px;
    box-shadow: var(--cart-shadow);
}

#cart-container {
    min-height: 200px;
}

.cart-empty {
    text-align: center;
    padding: 80px 20px;
    animation: fadeIn 0.5s ease;
}

.cart-empty i {
    font-size: 100px;
    background: var(--cart-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 24px;
    display: block;
}

.cart-empty h3 {
    font-size: 1.75rem;
    color: var(--cart-text);
    margin-bottom: 12px;
    font-family: 'Playfair Display', serif;
}

.cart-empty p {
    color: var(--cart-text-light);
    margin-bottom: 30px;
    font-size: 1.1rem;
}

/* Cart Item Card */
.cart-item {
    display: grid;
    grid-template-columns: 140px 1fr auto;
    gap: 25px;
    align-items: center;
    padding: 25px 0;
    border-bottom: 2px solid #f3f4f6;
    transition: all 0.3s ease;
    animation: slideIn 0.4s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.cart-item:hover {
    background: linear-gradient(to right, transparent, #f9fafb, transparent);
    padding-left: 10px;
    padding-right: 10px;
    margin: 0 -10px;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-image {
    width: 140px;
    height: 140px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: relative;
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
}

.cart-item-image::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.cart-item:hover .cart-item-image img {
    transform: scale(1.1);
}

.cart-item-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cart-item-info h4 {
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--cart-text);
    margin: 0;
    font-family: 'Playfair Display', serif;
    line-height: 1.3;
}

.cart-item-price {
    font-size: 1.15rem;
    background: var(--cart-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

.cart-item-description {
    font-size: 0.95rem;
    color: var(--cart-text-light);
    line-height: 1.5;
}

.cart-item-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 20px;
}

/* Quantity Control */
.quantity-control {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f3f4f6;
    border-radius: 50px;
    padding: 6px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
}

.quantity-control button {
    width: 36px;
    height: 36px;
    border: none;
    background: white;
    color: var(--cart-accent);
    font-size: 16px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.quantity-control button:hover {
    background: var(--cart-accent);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(197, 155, 45, 0.4);
}

.quantity-control button:active {
    transform: scale(0.95);
}

.quantity-control input {
    width: 50px;
    text-align: center;
    border: none;
    background: transparent;
    font-size: 17px;
    font-weight: 700;
    color: var(--cart-text);
    pointer-events: none;
}

.cart-item-subtotal {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--cart-text);
    font-family: 'Playfair Display', serif;
}

.remove-item {
    background: none;
    border: none;
    color: var(--cart-danger);
    cursor: pointer;
    font-size: 14px;
    padding: 8px 16px;
    transition: all 0.3s ease;
    border-radius: 8px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.remove-item:hover {
    background: #fef2f2;
    color: #dc2626;
}

/* Sidebar Summary */
.cart-sidebar {
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
}

.cart-summary-card {
    background: var(--cart-card);
    border-radius: var(--cart-radius);
    padding: 35px;
    box-shadow: var(--cart-shadow-lg);
    border: 1px solid #f3f4f6;
    display: none !important;
}

.cart-summary-card.visible {
    display: block !important;
}

.summary-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 25px 0;
    font-family: 'Playfair Display', serif;
    display: flex;
    align-items: center;
    gap: 12px;
}

.summary-title i {
    background: var(--cart-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.summary-details {
    margin-bottom: 30px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    font-size: 1.05rem;
    color: var(--cart-text-light);
}

.summary-value {
    font-weight: 600;
    color: var(--cart-text);
}

.summary-divider {
    height: 2px;
    background: linear-gradient(to right, transparent, #e5e7eb, transparent);
    margin: 20px 0;
}

.summary-total {
    padding-top: 20px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--cart-text);
}

.summary-total-value {
    font-size: 2rem;
    background: var(--cart-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-family: 'Playfair Display', serif;
}

/* Checkout Button */
.cart-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.btn-checkout {
    position: relative;
    overflow: hidden;
    width: 100%;
    background: #A97869;
    color: #F5EEE8;
    padding: 20px 30px;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.15rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    box-shadow: 0 8px 24px rgba(169, 120, 105, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: none;
}

.btn-checkout::before {
    content: '';
    position: absolute;
    inset: 0;
    background: transparent;
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.btn-checkout:hover::before {
    transform: translateX(100%);
}

.btn-checkout:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(169, 120, 105, 0.6);
    background: #A97869;
}

.btn-checkout:active {
    transform: translateY(-1px);
}

.btn-checkout i:last-child {
    transition: transform 0.3s ease;
}

.btn-checkout:hover i:last-child {
    transform: translateX(4px);
}

/* Payment Badges */
.payment-badges {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 24px;
    background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
    border-radius: 12px;
    align-items: center;
    border: 1px solid #e5e7eb;
    width: 100%;
}

.payment-methods-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--cart-text);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: 100%;
}

.payment-methods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 12px;
    width: 100%;
}

.payment-method-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: white;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
    cursor: default;
}

.payment-method-item:hover {
    border-color: var(--cart-accent);
    box-shadow: 0 4px 12px rgba(197, 155, 45, 0.15);
    transform: translateY(-2px);
}

.payment-method-item i {
    font-size: 24px;
    color: var(--cart-accent);
    display: flex;
    align-items: center;
    justify-content: center;
}

.payment-method-item span {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--cart-text-light);
    text-align: center;
    line-height: 1.2;
    max-width: 70px;
    word-break: break-word;
}

/* Iconos de métodos de pago (antiguo, puede ser removido) */
.payment-methods {
    display: none;
}

/* Clear Cart Button */
.btn-clear-cart {
    width: 100%;
    background: #A97869;
    color: #F5EEE8;
    padding: 14px 24px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-clear-cart:hover {
    background: #A97869;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(169, 120, 105, 0.3);
}

/* Trust Badges */
.trust-badges {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 2px solid #f3f4f6;
}

.trust-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}

.trust-item i {
    font-size: 24px;
    color: var(--cart-success);
}

.trust-item span {
    font-size: 0.85rem;
    color: var(--cart-text-light);
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .cart-layout {
        grid-template-columns: 1fr 380px;
    }
}

@media (max-width: 992px) {
    .cart-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .cart-sidebar {
        position: static;
        width: 100%;
    }
    
    .cart-summary-card {
        width: 100%;
        padding: 30px;
    }
}

/* Pantallas grandes - Asegurar que todo se vea bien */
@media (min-width: 1201px) {
    .cart-page-container {
        padding: 40px 40px 80px;
        max-width: 100%;
    }
    
    .cart-layout {
        grid-template-columns: 1fr 450px;
        gap: 40px;
        width: 100%;
    }
    
    .cart-items-section {
        padding: 40px;
        width: 100%;
    }
    
    .cart-sidebar {
        position: sticky;
        top: 100px;
        width: 100%;
    }
    
    .cart-summary-card {
        padding: 40px;
        width: 100%;
        box-shadow: var(--cart-shadow-lg);
        border: 1px solid #f3f4f6;
        border-radius: var(--cart-radius);
    }
    
    .cart-item {
        grid-template-columns: 160px 1fr auto;
        gap: 30px;
    }
    
    .cart-item-image {
        width: 160px;
        height: 160px;
    }
    
    .summary-title {
        font-size: 1.5rem;
        margin-bottom: 25px;
    }
    
    .summary-row {
        padding: 16px 0;
        font-size: 1.1rem;
    }
    
    .summary-total-value {
        font-size: 2.2rem;
    }
    
    .btn-checkout {
        padding: 22px 30px;
        font-size: 1.2rem;
    }
}

@media (max-width: 768px) {
    .cart-page-container {
        padding: 20px 15px 60px;
    }
    
    .cart-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .cart-page-title {
        font-size: 2rem;
    }
    
    .cart-item {
        grid-template-columns: 100px 1fr;
        gap: 15px;
    }
    
    .cart-item-image {
        width: 100px;
        height: 100px;
    }
    
    .cart-item-actions {
        grid-column: 1 / -1;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }
    
    .cart-items-section,
    .cart-summary-card {
        padding: 20px;
    }
    
    .summary-total-value {
        font-size: 1.75rem;
    }
    
    .trust-badges {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .trust-item {
        flex-direction: row;
        justify-content: center;
    }
    
    /* Mejoras para métodos de pago en tablets */
    .payment-badges {
        padding: 18px;
        gap: 14px;
    }
    
    .payment-methods-title {
        font-size: 0.85rem;
    }
    
    .payment-methods-grid {
        grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
        gap: 10px;
    }
    
    .payment-method-item {
        padding: 10px;
        border-radius: 8px;
    }
    
    .payment-method-item i {
        font-size: 20px;
    }
    
    .payment-method-item span {
        font-size: 0.7rem;
        max-width: 65px;
    }
}

@media (max-width: 480px) {
    .cart-item-info h4 {
        font-size: 1.1rem;
    }
    
    .cart-item-subtotal {
        font-size: 1.25rem;
    }
    
    /* Mejoras para métodos de pago en móviles */
    .payment-badges {
        padding: 16px;
        gap: 12px;
        border-radius: 10px;
    }
    
    .payment-methods-title {
        font-size: 0.8rem;
        margin-bottom: 4px;
    }
    
    .payment-methods-grid {
        grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
        gap: 8px;
        width: 100%;
    }
    
    .payment-method-item {
        padding: 8px;
        border-radius: 8px;
        gap: 6px;
        min-height: 70px;
        justify-content: space-around;
    }
    
    .payment-method-item i {
        font-size: 18px;
    }
    
    .payment-method-item span {
        font-size: 0.65rem;
        max-width: 55px;
        word-break: break-word;
    }
    
    /* Ajustar resumen en móviles */
    .cart-summary-card {
        width: 100%;
    }
}
