﻿/* ==========================================================================
   UNIMAGEN CHILE - TEMA JARDÍN VIBRANTE (FONDO SUAVE 92%)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@700;800;900&display=swap');

:root {
    --bg-page: #fffaf2;         
    --text: #2e1e4a;            
    --muted: #71717a;
    --hero-bg: #ff6f61;         
    --hero-text: #4c1d95;       
    --btn-mint: #10b981;        
    --btn-mint-dark: #047857;   
    --primary: #8b5cf6;         
    --primary-dark: #6d28d9;    
    --pink: #f43f5e;            
    --accent-blue: #0ea5e9;     
    --accent-yellow: #fde047;   
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: 'Nunito', sans-serif;
    color: var(--text);
    background-color: var(--bg-page);
    
    /* FONDO SUAVIZADO: Crema al 92% de opacidad para que sea una marca de agua tierna */
    background-image: 
        linear-gradient(rgba(255, 250, 242, 0.92), rgba(255, 250, 242, 0.92)),
        url('../img/gibetmoll-internet-3116062.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    
    padding-bottom: 80px;
    overflow-x: hidden;
}

h1, h2, h3, .brand { margin: 0; }
a { text-decoration: none; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 15px; }

/* CABECERA */
.site-header { background-color: #ffffff; border-bottom: 5px solid var(--accent-blue); position: sticky; top: 0; z-index: 1000; box-shadow: 0 8px 25px rgba(46, 30, 74, 0.1); }
.navbar { display: flex; justify-content: space-between; align-items: center; height: 85px; gap: 15px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-avatar { width: 48px; height: 48px; background-color: var(--primary); border: 3px solid #ffffff; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 1.8rem; color: #ffffff; box-shadow: 0 4px 0 var(--primary-dark); transform: rotate(-5deg); }
.brand-text-wrapper { display: flex; flex-direction: column; justify-content: center;}
.brand-text { font-weight: 900; font-size: 1.6rem; line-height: 1; color: var(--text); }
.brand-subtitle { font-size: 0.9rem; font-weight: 900; color: var(--hero-bg); letter-spacing: 1px;}

.nav-links { display: flex; align-items: center; gap: 10px; }
.nav-links a { color: var(--text); font-weight: 900; font-size: 1.05rem; padding: 8px 18px; border-radius: 999px; white-space: nowrap; transition: 0.2s; }
.nav-links a.active, .nav-links a:hover { background-color: var(--primary); color: #ffffff; box-shadow: 0 3px 0 var(--primary-dark); }

.nav-actions { display: flex; align-items: center; gap: 12px; }
.badge-pill { background-color: var(--accent-yellow); color: #854d0e; border: 2px solid #ffffff; box-shadow: 0 3px 0 #ca8a04; border-radius: 999px; padding: 8px 16px; font-size: 0.95rem; font-weight: 900; white-space: nowrap; max-width: 150px; overflow: hidden; text-overflow: ellipsis; }

/* BOTONES */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-family: 'Nunito', sans-serif; font-weight: 900; font-size: 1.05rem; border-radius: 999px; border: none; cursor: pointer; padding: 12px 24px; white-space: nowrap; transition: 0.1s; }
.btn-secondary { background: #ffffff; color: var(--primary); border: 3px solid var(--primary); border-bottom: 5px solid var(--primary-dark); }
.btn-secondary:active { transform: translateY(3px); border-bottom-width: 2px; }
.btn-primary { background: var(--btn-mint); color: #ffffff; border: 3px solid #ffffff; border-bottom: 5px solid var(--btn-mint-dark); }
.btn-primary:active { transform: translateY(3px); border-bottom-width: 2px; }

/* BANNERS Y SECCIONES */
.beta-banner { background-color: var(--accent-yellow); color: #854d0e; padding: 12px 0; font-weight: 900; font-size: 1rem; border-bottom: 4px dashed #ffffff; box-shadow: 0 4px 10px rgba(0,0,0,0.05); }
.beta-banner-container { display: flex; justify-content: center; align-items: center; gap: 10px; text-align: center; }
.beta-banner a { color: var(--hero-bg); text-decoration: underline; font-weight: 900;}
.btn-close-banner { background: none; border: none; cursor: pointer; color: #854d0e; }
.section { padding: 50px 0; }

/* HERO BANNER */
.hero-fun-wrapper { display: flex; justify-content: center; padding: 20px 20px 50px; }
.hero-fun-card { background-color: var(--hero-bg); border: 12px solid #ffffff; border-radius: 50px; padding: 40px 30px; width: 100%; max-width: 950px; text-align: center; box-shadow: 0 20px 40px rgba(255, 111, 97, 0.4); display: flex; flex-direction: column; align-items: center; gap: 15px; position: relative; overflow: hidden; }
.hero-fun-card::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,0.4) 4px, transparent 5px); background-size: 40px 40px; pointer-events: none; }
.hero-fun-card .text-gradient-title { font-size: clamp(2.5rem, 5vw, 4.5rem); font-weight: 900; color: var(--hero-text); text-shadow: -4px -4px 0 #fff, 4px -4px 0 #fff, -4px 4px 0 #fff, 4px 4px 0 #fff, 0px 8px 0px rgba(0,0,0,0.15); line-height: 1.1; margin-bottom: 0; position: relative; z-index: 1; transform: rotate(-2deg); }
.hero-fun-card .text-gradient-subtitle { font-size: 1.35rem; font-weight: 900; color: #ffffff; margin-bottom: 20px; max-width: 750px; position: relative; z-index: 1; text-shadow: 2px 2px 0px rgba(0,0,0,0.1); }
.btn-fun { background-color: var(--btn-mint); color: #ffffff; padding: 18px 50px; font-size: 1.6rem; font-weight: 900; border-radius: 999px; display: inline-block; border: 4px solid #ffffff; border-bottom: 8px solid var(--btn-mint-dark); box-shadow: 0 12px 25px rgba(16, 185, 129, 0.5); position: relative; z-index: 10; }
.btn-fun:active { transform: translateY(4px); border-bottom-width: 4px; }
.fun-socials { margin-top: 15px; display: flex; justify-content: center; gap: 15px; position: relative; z-index: 10; }
.social-btn { width: 60px; height: 60px; background-color: #ffffff; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--hero-text); border: 4px solid #ffffff; box-shadow: 0 6px 0 rgba(76, 29, 149, 0.2); transition: 0.1s; }
.social-btn:active { transform: translateY(3px); box-shadow: 0 3px 0 rgba(76, 29, 149, 0.2); }
.social-btn svg, .social-btn i { width: 24px; height: 24px; }

/* CATALOGO */
.section-head { text-align: center; margin-bottom: 50px; }
.eyebrow { font-size: 1.05rem; font-weight: 900; color: #ffffff; background-color: var(--primary); border-radius: 999px; padding: 10px 24px; display: inline-block; margin-bottom: 15px; border: 3px solid #ffffff; box-shadow: 0 5px 0 var(--primary-dark); }
.section-head h2 { font-size: 3rem; color: var(--text); font-weight: 900; text-shadow: 2px 2px 0px #fff;}
.catalog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 30px; }
.product-card { background-color: #ffffff; border: 5px solid var(--accent-blue); border-radius: 30px; padding: 25px; box-shadow: 0 12px 30px rgba(14, 165, 233, 0.2); display: flex; flex-direction: column; height: 100%; transition: 0.2s; }
.product-card:hover { transform: translateY(-8px); border-color: var(--primary); box-shadow: 0 18px 40px rgba(139, 92, 246, 0.3); }
.product-thumb { background-color: #ffffff; border-radius: 20px; padding: 20px; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; margin-bottom: 20px; border: 3px dashed var(--accent-blue); }
.product-thumb img { max-width: 90%; max-height: 90%; object-fit: contain; }
.product-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.product-tag { font-weight: 900; font-size: 0.85rem; color: #ffffff; padding: 6px 14px; border-radius: 10px; }
.tag-timbres { background-color: var(--primary); }
.tag-libreria { background-color: var(--hero-bg); }
.stock-note { font-size: 0.95rem; color: var(--muted); font-weight: 800; }
.product-card h3 { font-size: 1.4rem; color: var(--text); margin-bottom: 8px; font-weight: 900; line-height: 1.2; }
.product-extra { font-size: 1rem; color: var(--muted); margin-bottom: 20px; font-weight: 800; }
.price-line { display: flex; justify-content: space-between; align-items: center; margin-top: auto; gap: 10px; padding-top: 10px; }
.price-main { font-size: 1.8rem; font-weight: 900; color: var(--pink); text-shadow: 2px 2px 0px rgba(0,0,0,0.05); }

/* MODALES */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(46, 30, 74, 0.85); backdrop-filter: blur(5px); z-index: 9999; align-items: center; justify-content: center; padding: 20px;}
.modal-box { background: #ffffff; padding: 40px; border-radius: 40px; border: 8px solid var(--primary); width: 100%; max-width: 440px; text-align: center; position: relative; box-shadow: 0 25px 50px rgba(0,0,0,0.3);}
.btn-close-modal { position: absolute; top: 15px; right: 15px; background: none; border: none; font-size: 1.6rem; color: var(--muted); cursor: pointer; font-weight: 900;}
.modal-icon { width: 80px; height: 80px; background-color: var(--bg-page); color: var(--hero-text); border-radius: 50%; display: grid; place-items: center; margin: 0 auto 20px; border: 4px solid var(--hero-bg); box-shadow: 0 5px 0 var(--hero-bg);}
.modal-title { font-size: 1.9rem; color: var(--text); margin-bottom: 12px; font-weight: 900;}
.modal-text { font-size: 1.1rem; color: var(--muted); margin-bottom: 25px; font-weight: 800;}
.modal-actions { display: flex; flex-direction: column; gap: 12px; }
.btn-login-modal { width: 100%; padding: 18px; font-size: 1.2rem; background-color: var(--primary); color: #fff; border: 3px solid #fff; border-bottom: 6px solid var(--primary-dark); border-radius: 999px; font-weight: 900; cursor: pointer; transition: 0.1s; text-decoration: none; display: flex; justify-content: center; align-items: center;}
.btn-login-modal:active { transform: translateY(4px); border-bottom-width: 2px; }
.link-guest { background: none; border: none; text-decoration: underline; color: var(--muted); font-weight: 900; cursor: pointer; margin-top: 10px; font-size: 1.05rem; }

.mobile-bottom-nav { display: none; }

@media (max-width: 900px) {
    .nav-links, .nav-actions { display: none !important; }
    .site-header { padding: 10px 0; border-bottom-width: 4px; }
    .navbar { justify-content: center !important; height: auto; padding: 5px 0;}
    .brand-text-wrapper { text-align: center; }
    .brand { flex-direction: column; gap: 8px; }
    body { padding-bottom: 100px; }
    .hero-fun-card { padding: 40px 20px; border-radius: 40px; border-width: 8px;}
    .hero-fun-card .text-gradient-title { font-size: 2.2rem; }
    .hero-fun-card .text-gradient-subtitle { font-size: 1.15rem; }
    .btn-fun { padding: 16px 30px; font-size: 1.3rem; border-bottom-width: 6px;}
    .section-head h2 { font-size: 2.4rem; }
    .catalog-grid { grid-template-columns: repeat(auto-fill, minmax(100%, 1fr)); }
    .price-line { flex-direction: column; gap: 12px; }
    .price-main { font-size: 2rem; }
    .price-line .btn { width: 100%; padding: 15px; font-size: 1.2rem;}
    
    .mobile-bottom-nav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; background: #ffffff; border-top: 4px solid var(--accent-blue); padding: 10px 20px; padding-bottom: calc(10px + env(safe-area-inset-bottom)); justify-content: space-around; align-items: center; z-index: 9998; }
    .mobile-nav-item { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--muted); text-decoration: none; font-size: 0.75rem; font-weight: 900; }
    .mobile-nav-item.active { color: #ffffff; background: var(--primary); padding: 8px 15px; border-radius: 12px; margin: -8px 0; box-shadow: 0 4px 0 var(--primary-dark);}
    .mobile-cart-badge { position: absolute; top: -5px; right: -8px; background: var(--hero-bg); color: #ffffff; font-size: 0.65rem; font-weight: 900; padding: 2px 6px; border-radius: 10px; border: 2px solid #fff; }
}