/* ============================================================
   Sabores a Granel — main.css
   Estilos globales, variables y layout base
   ============================================================ */

/* ─── Variables ─── */
:root {
    --primary:       #1C3A2A;
    --primary-dark:  #142a1e;
    --primary-light: #2a5a40;
    --secondary:     #C8962A;
    --secondary-light: #e0aa35;
    --bg-cream:      #F5F0E8;
    --bg-white:      #ffffff;
    --text-dark:     #1A1A1A;
    --text-mid:      #4a4a4a;
    --text-light:    #888888;
    --border:        #e0d8cc;
    --radius:        14px;
    --radius-sm:     8px;
    --radius-lg:     24px;
    --shadow:        0 4px 24px rgba(0,0,0,0.07);
    --shadow-md:     0 8px 32px rgba(0,0,0,0.12);
    --shadow-hover:  0 12px 40px rgba(0,0,0,0.16);
    --transition:    all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-heading:  'Playfair Display', Georgia, serif;
    --font-body:     'Inter', system-ui, sans-serif;
}

/* ─── Reset y base ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    background: var(--bg-white);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration: none; transition: var(--transition); }

/* ─── Tipografía ─── */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.25;
    color: var(--text-dark);
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.section-title.light { color: var(--bg-white); }
.section-title.gold  { color: var(--secondary); }

.section-subtitle {
    font-size: 1.05rem;
    color: var(--text-mid);
    max-width: 580px;
    line-height: 1.8;
}

.section-subtitle.light { color: rgba(255,255,255,0.85); }

.section-divider {
    width: 60px;
    height: 3px;
    background: var(--secondary);
    margin: 1rem 0 1.5rem;
    border-radius: 2px;
}

.section-divider.center { margin-left: auto; margin-right: auto; }

/* ─── Secciones ─── */
section { padding: 80px 0; }

.section-cream  { background: var(--bg-cream); }
.section-dark   { background: var(--primary); }
.section-gold   { background: var(--secondary); }
.section-white  { background: var(--bg-white); }

/* ─── Botones ─── */
.btn-primary-custom {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary);
    color: #fff;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    border: 2px solid var(--primary);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}
.btn-primary-custom:hover {
    background: var(--primary-light);
    border-color: var(--primary-light);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(28,58,42,0.3);
}

.btn-secondary-custom {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--secondary);
    color: #fff;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    border: 2px solid var(--secondary);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}
.btn-secondary-custom:hover {
    background: var(--secondary-light);
    border-color: var(--secondary-light);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(200,150,42,0.35);
}

.btn-outline-custom {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: #fff;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    border: 2px solid rgba(255,255,255,0.7);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}
.btn-outline-custom:hover {
    background: rgba(255,255,255,0.1);
    border-color: #fff;
    color: #fff;
}

.btn-wa {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #25D366;
    color: #fff;
    padding: 13px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}
.btn-wa:hover {
    background: #1ebe59;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(37,211,102,0.4);
}
.btn-wa i { font-size: 1.1rem; }

/* ─── Navbar ─── */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: var(--transition);
}

.navbar {
    padding: 20px 0;
    transition: var(--transition);
}

.site-header.scrolled .navbar {
    background: rgba(28, 58, 42, 0.97);
    backdrop-filter: blur(12px);
    padding: 12px 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.site-header:not(.scrolled) .navbar {
    background: transparent;
}

/* En páginas internas (no hero), el header siempre sólido */
body.page-inner .site-header .navbar {
    background: rgba(28, 58, 42, 0.97);
    backdrop-filter: blur(12px);
    padding: 14px 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

.logo-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}
.logo-icon {
    height: 44px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.25));
}
.navbar-brand .logo-text {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.5px;
    line-height: 1.1;
}

.navbar-nav .nav-link {
    color: rgba(255,255,255,0.88) !important;
    font-weight: 500;
    font-size: 0.92rem;
    padding: 6px 14px !important;
    border-radius: 6px;
    transition: var(--transition);
    letter-spacing: 0.2px;
}
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: #fff !important;
    background: rgba(255,255,255,0.08);
}

.btn-cta-nav {
    background: var(--secondary);
    color: #fff !important;
    padding: 9px 22px !important;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.88rem;
    border: 2px solid var(--secondary);
    transition: var(--transition);
    white-space: nowrap;
    text-decoration: none;
}
.btn-cta-nav:hover {
    background: var(--secondary-light);
    border-color: var(--secondary-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(200,150,42,0.4);
}

/* Hamburguesa */
.navbar-toggler {
    border: none;
    padding: 8px;
    background: transparent;
    display: flex;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}
.toggler-icon {
    display: block;
    width: 24px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: var(--transition);
}
.navbar-toggler:focus { box-shadow: none; }

/* ─── Page hero (páginas internas) ─── */
.page-hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    padding: 120px 0 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3rem);
    color: #fff;
    margin-bottom: 0.75rem;
}
.page-hero p {
    color: rgba(255,255,255,0.8);
    font-size: 1.05rem;
    max-width: 500px;
    margin: 0 auto;
}
.breadcrumb-custom {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
}
.breadcrumb-custom a { color: rgba(255,255,255,0.75); }
.breadcrumb-custom a:hover { color: var(--secondary); }

/* ─── Footer ─── */
.site-footer {
    background: var(--primary-dark);
    color: rgba(255,255,255,0.8);
}

.footer-top { padding: 60px 0 40px; }

.footer-logo { height: auto; max-height: 80px; width: auto; max-width: 220px; object-fit: contain; }
.footer-icon {
    height: 72px;
    width: auto;
    object-fit: contain;
    display: block;
    margin-bottom: 10px;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.3));
}
.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-decoration: none;
}
.footer-brand-name {
    font-family: var(--font-heading);
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--secondary);
    letter-spacing: -0.3px;
    line-height: 1;
}
.footer-logo-text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: #fff;
    font-weight: 700;
}
.footer-desc {
    font-size: 0.88rem;
    color: rgba(255,255,255,0.65);
    line-height: 1.7;
}

.footer-title {
    font-family: var(--font-heading);
    color: var(--secondary);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-links { list-style: none; padding: 0; }
.footer-links li { margin-bottom: 10px; }
.footer-links a {
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
    transition: var(--transition);
}
.footer-links a:hover { color: var(--secondary); padding-left: 4px; }

.footer-sedes { list-style: none; padding: 0; }
.footer-sedes li { margin-bottom: 16px; }
.sede-label {
    display: block;
    color: #fff;
    font-weight: 600;
    font-size: 0.88rem;
    margin-bottom: 2px;
}
.sede-dir {
    display: block;
    color: rgba(255,255,255,0.6);
    font-size: 0.82rem;
}

.footer-contacto { list-style: none; padding: 0; }
.footer-contacto li { margin-bottom: 12px; }
.footer-contacto a {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: rgba(255,255,255,0.75);
    font-size: 0.88rem;
    transition: var(--transition);
}
.footer-contacto a:hover { color: #25D366; }
.footer-contacto a small {
    display: block;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.5);
}
.footer-contacto a i { margin-top: 3px; flex-shrink: 0; }

.footer-social {
    display: flex;
    gap: 10px;
}
.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.8);
    font-size: 0.95rem;
    transition: var(--transition);
}
.footer-social a:hover {
    background: var(--secondary);
    color: #fff;
    transform: translateY(-2px);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 20px 0;
}
.footer-bottom p {
    margin: 0;
    font-size: 0.83rem;
    color: rgba(255,255,255,0.45);
}

/* ─── WhatsApp flotante ─── */
.whatsapp-float {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 9999;
}

.whatsapp-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #25D366;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: #fff;
    box-shadow: 0 6px 24px rgba(37,211,102,0.5);
    transition: var(--transition);
    position: relative;
    z-index: 2;
}
.whatsapp-btn:hover { background: #1ebe59; transform: scale(1.08); }

.wa-pulse {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: rgba(37,211,102,0.3);
    animation: waPulse 2s ease infinite;
    z-index: -1;
}
@keyframes waPulse {
    0%   { transform: scale(1); opacity: 1; }
    70%  { transform: scale(1.5); opacity: 0; }
    100% { transform: scale(1); opacity: 0; }
}

.wa-selector {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 280px;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: 0 12px 40px rgba(0,0,0,0.18);
    overflow: hidden;
    display: none;
    transform: translateY(10px);
    opacity: 0;
    transition: var(--transition);
}
.wa-selector.open {
    display: block;
    animation: waOpen 0.25s ease forwards;
}
@keyframes waOpen {
    from { transform: translateY(10px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}

.wa-selector-header {
    background: var(--primary);
    color: #fff;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    font-size: 0.9rem;
}
.wa-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    padding: 4px;
    font-size: 1rem;
    transition: var(--transition);
}
.wa-close:hover { color: #fff; }

.wa-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid #f0f0f0;
    transition: var(--transition);
    text-decoration: none;
    color: var(--text-dark);
}
.wa-option:last-child { border-bottom: none; }
.wa-option:hover { background: #f0fdf4; color: var(--text-dark); }

.wa-option-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #25D366;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1rem;
    flex-shrink: 0;
}
.wa-option-info { flex: 1; line-height: 1.3; }
.wa-zona { display: block; font-weight: 600; font-size: 0.85rem; }
.wa-tel  { display: block; font-size: 0.78rem; color: var(--text-light); }
.wa-arrow { color: var(--text-light); font-size: 0.8rem; }

/* ─── Utilidades ─── */
.text-primary-custom { color: var(--primary) !important; }
.text-secondary-custom { color: var(--secondary) !important; }
.bg-primary-custom { background: var(--primary) !important; }
.bg-secondary-custom { background: var(--secondary) !important; }
.bg-cream { background: var(--bg-cream) !important; }

.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }

/* ─── Responsive ─── */
@media (max-width: 991px) {
    .navbar-collapse {
        background: rgba(20, 42, 30, 0.98);
        backdrop-filter: blur(12px);
        padding: 20px;
        margin-top: 10px;
        border-radius: var(--radius);
    }
    .navbar-nav .nav-link { padding: 10px 14px !important; }
    .btn-cta-nav { margin-top: 12px; display: inline-block; }
}

@media (max-width: 767px) {
    section { padding: 60px 0; }
    .whatsapp-float { bottom: 20px; right: 20px; }
    .wa-selector { width: 260px; }
}
