/* 
 * Sistema de Diseño: Brillo Matutino 
 * Proyecto: Desayunos Delibox
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&family=Playfair+Display:wght@700&display=swap');

:root {
    /* Paleta de Colores */
    --primary: #ff8442;
    --primary-light: #ffbf63;
    --secondary: #2f2573;
    --accent: #2da7df;
    --bg-main: #fffaf6;
    --brand-purple: #2f2573;
    --brand-purple-soft: #6152b8;
    --brand-blue: #2da7df;
    --brand-blue-deep: #1b8dcd;
    --brand-gold: #ffd84f;
    --white: #FFFFFF;
    --gray-light: #f4f2fb;
    --gray-medium: #726b94;
    --success: #2faa63;
    --error: #e85e66;
    
    /* Sombras y Efectos */
    --shadow-soft: 0 10px 28px rgba(47, 37, 115, 0.08);
    --shadow-medium: 0 18px 45px rgba(47, 37, 115, 0.14);
    --glass: rgba(255, 255, 255, 0.78);
    
    /* Espaciado */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    
    /* Bordes */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background:
        radial-gradient(circle at top right, rgba(45, 167, 223, 0.12), transparent 24%),
        radial-gradient(circle at top left, rgba(255, 132, 66, 0.12), transparent 28%),
        linear-gradient(180deg, #fffdfb 0%, var(--bg-main) 100%);
    color: var(--secondary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

h1, h2, h3, .heading-serif {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

/* --- Layout Grids --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.section-padding {
    padding: var(--spacing-lg) 0;
}

/* --- UI Components --- */

/* Botones Premium */
.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #ff9b52 100%);
    color: var(--white);
    box-shadow: 0 10px 22px rgba(255, 132, 66, 0.28);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(255, 132, 66, 0.34);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--brand-purple-soft) 100%);
    color: var(--white);
}

.btn-outline {
    background: rgba(255,255,255,0.82);
    border: 2px solid var(--primary);
    color: var(--primary);
}

/* Cards de Producto */
.product-card {
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: 0.4s;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-medium);
}

.product-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.product-info {
    padding: var(--spacing-sm);
}

.product-price {
    color: var(--primary);
    font-weight: 700;
    font-size: 1.2rem;
}

/* Checkout payment methods */
.payment-options-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.payment-option {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    border: 2px solid #eee;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.payment-option-content {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
}

.payment-option-info {
    display: flex;
    flex: 0 0 175px;
    flex-direction: column;
    gap: 6px;
}

.payment-gateway-logo {
    width: 145px;
    height: 38px;
    object-fit: contain;
    object-position: left center;
}

.payment-gateway-logo--epayco {
    width: 150px;
    height: 42px;
}

.payment-method-logos {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
    max-width: 390px;
    padding: 10px 14px;
    border-radius: 12px;
    background: #f9f9f9;
}

.payment-method-logos img {
    width: auto;
    height: auto;
    max-width: 86px;
    max-height: 30px;
    object-fit: contain;
}

.payment-method-logos img.payment-logo--bancolombia {
    max-width: 112px;
    max-height: 36px;
}

.payment-method-logos--transfer {
    display: grid;
    grid-template-columns: 1.2fr 0.9fr 0.82fr 0.9fr;
    align-items: center;
    gap: 14px;
    max-width: 520px;
    min-width: 420px;
}

.payment-method-logos--transfer img {
    justify-self: center;
    max-height: 34px;
    max-width: 108px;
}

.payment-method-logos--transfer img:first-child {
    max-height: 38px;
    max-width: 125px;
}

.payment-method-logos--transfer img.payment-logo--bancolombia {
    max-height: 38px;
    max-width: 122px;
}

/* Footer payment badge */
.footer-payment-card {
    display: inline-flex;
    flex-direction: column;
    gap: 8px;
    max-width: 320px;
    margin-top: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--white);
}

.footer-payment-title {
    color: #00877a;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.6px;
    line-height: 1;
    text-transform: uppercase;
}

.footer-payment-logos {
    display: flex;
    align-items: center;
    gap: 8px 12px;
    flex-wrap: wrap;
}

.footer-payment-logos--cards {
    display: grid;
    grid-template-columns: 1.05fr 0.55fr 0.9fr 0.5fr;
    align-items: center;
}

.footer-payment-logos--transfer {
    display: grid;
    grid-template-columns: 0.95fr 0.72fr 0.68fr 0.72fr;
    align-items: center;
    column-gap: 8px;
}

.footer-payment-logos img {
    width: auto;
    height: auto;
    max-width: 72px;
    max-height: 24px;
    object-fit: contain;
}

.footer-payment-logos--cards img:first-child {
    max-width: 92px;
    max-height: 30px;
}

.footer-payment-logos--cards img:nth-child(3) {
    max-width: 82px;
}

.footer-payment-logos--cards img:nth-child(4) {
    max-width: 48px;
}

.footer-payment-logos--transfer img {
    max-width: 74px;
    max-height: 24px;
}

.footer-payment-logos img.payment-logo--bancolombia {
    max-width: 98px;
    max-height: 32px;
}

/* Header & Nav */
header {
    background: var(--glass);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(47, 37, 115, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0.45rem 0;
}

.nav-container {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 18px;
    min-height: 72px;
}

.main-nav {
    display: flex;
    justify-content: center;
}

.main-nav-categories {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    list-style: none;
    gap: var(--spacing-sm);
    align-items: center;
}

.logo {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    max-width: 210px;
}

.logo img {
    width: 100%;
    max-width: 100%;
    max-height: 66px;
    object-fit: contain;
    object-position: left center;
    display: block;
}

/* Footer Premium */
footer {
    background: linear-gradient(180deg, #fff1de 0%, #ffe8d2 100%);
    color: var(--secondary);
    padding: var(--spacing-lg) 0;
    margin-top: var(--spacing-lg);
}

/* Glass Panels (Admin/Cart) */
.glass-panel {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(47, 37, 115, 0.08);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    box-shadow: 0 14px 40px rgba(47, 37, 115, 0.06);
}

/* Animaciones */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade {
    animation: fadeIn 0.8s ease forwards;
}

/* --- Cart Drawer --- */
.cart-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 95%;
    max-width: 440px;
    height: 100vh;
    background: #FFFBF9;
    box-shadow: -10px 0 50px rgba(0,0,0,0.08);
    z-index: 2000;
    transition: right 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.cart-drawer.open {
    right: 0;
}

/* ... existing overlay styles ... */

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    :root {
        --spacing-lg: 2.5rem;
        --spacing-md: 1.5rem;
    }

    h1 { font-size: 2.5rem !important; }
    
    .nav-container {
        grid-template-columns: 1fr;
        gap: 8px;
        min-height: auto;
    }

    .main-nav {
        width: 100%;
    }

    .hero-section h1 {
        font-size: 2.5rem !important;
    }

    /* Checkout stacking */
    #checkout-form {
        grid-template-columns: 1fr !important;
    }

    aside {
        position: static !important;
    }

    .payment-option {
        align-items: flex-start;
        padding: 16px;
    }

    .payment-option-content {
        align-items: flex-start;
        flex-direction: column;
    }

    .payment-option-info {
        flex-basis: auto;
    }

    .payment-method-logos {
        justify-content: flex-start;
        max-width: 100%;
        width: 100%;
    }

    .payment-method-logos--transfer {
        min-width: 0;
    }

    /* Grid adjustments */
    .container {
        padding: 0 1.5rem;
    }
}

@media (max-width: 480px) {
    .cart-drawer {
        width: 100%;
    }
    
    .product-image {
        height: 200px;
    }

    nav ul {
        gap: 10px !important;
        font-size: 0.9rem;
    }
    
    .logo img {
        max-height: 52px;
        width: auto;
    }

    .payment-method-logos {
        gap: 10px;
        padding: 10px;
    }

    .payment-method-logos img {
        height: auto;
        max-width: 88px;
        max-height: 32px;
    }

    .payment-method-logos--transfer img {
        max-height: 28px;
        max-width: 72px;
    }

    .payment-method-logos--transfer img:first-child {
        max-height: 30px;
        max-width: 88px;
    }

    .payment-method-logos img.payment-logo--bancolombia,
    .payment-method-logos--transfer img.payment-logo--bancolombia {
        max-height: 32px;
        max-width: 94px;
    }

    .footer-payment-card {
        max-width: 100%;
        width: 100%;
    }

    .footer-payment-logos img {
        max-width: 88px;
        max-height: 30px;
    }

    .footer-payment-logos img.payment-logo--bancolombia {
        max-width: 104px;
        max-height: 34px;
    }

    .footer-payment-logos--cards,
    .footer-payment-logos--transfer {
        display: flex;
    }
}

.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(2px);
    z-index: 1999;
    visibility: hidden;
    opacity: 0;
    transition: 0.3s;
}

.cart-overlay.open {
    visibility: visible;
    opacity: 1;
}

.drawer-header {
    padding: var(--spacing-sm) var(--spacing-md);
    border-bottom: 1px solid var(--gray-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.drawer-content {
    flex: 1;
    overflow-y: auto;
    padding: var(--spacing-md);
}

.upsell-section {
    background: var(--bg-main);
    padding: 15px;
    border-radius: var(--radius-sm);
    margin-top: 20px;
}

.upsell-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    background: var(--white);
    padding: 8px;
    border-radius: 6px;
    border: 1px dashed var(--primary-light);
}
