/* Base Custom Font Definitions */
@font-face {
    font-family: 'Milkstore 02';
    src: url('tipografia/Milkstore02-Clean.otf') format('opentype');
    font-weight: 400 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Milkstore 01 Cursiva';
    src: url('tipografia/Milkstore01-Clean.otf') format('opentype');
    font-weight: 400 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Apex Serif';
    src: url('tipografia/Apex-Serif-Book-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Apex Serif';
    src: url('tipografia/Apex-Serif-Book-Italic-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Apex Serif';
    src: url('tipografia/Apex-Serif-Bold-Regular.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --color-primary: #401d04;
    --color-primary-container: #5a3217;
    --color-secondary: #645e48;
    --color-secondary-container: #ebe2c5;
    --color-background: #f9f9f9;
    --color-surface: #ffffff;
    --color-accent-red: #d71920;
    --color-text-main: #1a1c1c;
    --color-text-muted: #51443d;

    --font-display-title: 'Milkstore 02', 'Archivo Narrow', sans-serif;
    --font-base-title: 'Archivo Narrow', sans-serif;
    --font-accent-script: 'Milkstore 01 Cursiva', 'Playfair Display', cursive;
    --font-institutional-body: 'Apex Serif', 'Source Serif 4', serif;
}

/* Global Typography Roles */
body {
    background-color: var(--color-background);
    color: var(--color-text-main);
    font-family: var(--font-institutional-body);
    font-size: 1.125rem;
    line-height: 1.6;
}

/* Large Hero Titles Only use Milkstore 02 */
.font-display-lg, h1 {
    font-family: 'Milkstore 02', 'Archivo Narrow', sans-serif;
    font-size: clamp(2.5rem, 5vw, 4.5rem) !important;
    line-height: 1.15 !important;
    letter-spacing: 0.02em;
}

/* Subtitles, Section Titles, Buttons & Badges use Archivo Narrow for Clean Legibility */
.font-headline-lg, h2 {
    font-family: 'Archivo Narrow', sans-serif;
    font-size: clamp(1.8rem, 3.5vw, 3rem) !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
}

.font-headline-md, h3 {
    font-family: 'Archivo Narrow', sans-serif;
    font-size: clamp(1.3rem, 2.2vw, 2.2rem) !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
}

.font-label-caps, label {
    font-family: 'Archivo Narrow', sans-serif;
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.12em !important;
}

button, .btn, .tab-btn {
    font-family: 'Archivo Narrow', sans-serif;
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.1em !important;
}

/* Script Accents */
.font-accent-script, .script-accent {
    font-family: 'Milkstore 01 Cursiva', 'Playfair Display', cursive;
    font-size: clamp(1.8rem, 3vw, 2.8rem) !important;
}

/* Body Text */
.font-body-lg {
    font-family: 'Apex Serif', 'Source Serif 4', serif;
    font-size: 1.25rem !important;
    line-height: 1.7 !important;
}

.font-body-md, p {
    font-family: 'Apex Serif', 'Source Serif 4', serif;
    font-size: 1.1rem !important;
    line-height: 1.65 !important;
}

/* Swiss Vintage Styling */
.swiss-cross::before {
    content: "+";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #d71920;
    color: white;
    width: 1.25rem;
    height: 1.25rem;
    font-weight: bold;
    font-size: 0.875rem;
    border-radius: 2px;
    margin-right: 0.5rem;
}

.vintage-border {
    border: 1px solid #401d04;
    position: relative;
}

.vintage-border::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    right: 4px;
    bottom: 4px;
    border: 0.5px solid #401d04;
    pointer-events: none;
}

.double-border {
    position: relative;
    border: 1px solid #401d04;
}

.double-border::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    right: 3px;
    bottom: 3px;
    border: 1px solid #401d04;
    pointer-events: none;
}

/* ==========================================================================
   CLEAN RESPONSIVE NAVIGATION & MOBILE HAMBURGER MENU
   ========================================================================== */

/* Prevent horizontal overflow globally */
html, body {
    overflow-x: hidden !important;
    max-width: 100vw;
}

/* Mobile Hamburger Trigger & Fullscreen Drawer */
.wollen-burger-btn {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 100;
    color: #401d04;
}

.wollen-mobile-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #fdfbf7;
    z-index: 999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 24px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-15px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.wollen-mobile-drawer.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.wollen-mobile-drawer a {
    font-family: 'Milkstore 02', 'Archivo Narrow', sans-serif;
    font-size: 24px;
    color: #401d04;
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 1px;
    transition: color 0.2s ease;
}

.wollen-mobile-drawer a:hover {
    color: #d71920;
}

.wollen-drawer-close {
    position: absolute;
    top: 30px;
    right: 30px;
    background: transparent;
    border: none;
    font-size: 32px;
    color: #401d04;
    cursor: pointer;
}

/* TABLET & INTERMEDIATE SCREENS (1025px to 1340px) */
@media (min-width: 1025px) and (max-width: 1340px) {
    .hero-nav {
        margin-left: 20px !important;
        gap: 18px !important;
    }
    .hero-nav a {
        font-size: 11px !important;
        letter-spacing: 1px !important;
    }
    div[style*="top:40px"] {
        top: 24px !important;
    }
    .hero-image {
        width: 44% !important;
    }
    .hero-content {
        max-width: 50% !important;
    }
}

/* TABLETS & MOBILE DEVICES (<= 1024px) */
@media (max-width: 1024px) {
    /* Show Hamburger button, Hide Desktop nav links and top Access button */
    .wollen-burger-btn {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
    }

    .hero-nav {
        display: none !important;
    }

    .desktop-only-btn {
        display: none !important;
    }

    /* Top Nav Container */
    div[style*="top:40px"], .hero > div > div:first-child {
        position: relative !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        padding: 16px 20px !important;
        margin: 0 !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        box-sizing: border-box !important;
        z-index: 50 !important;
    }

    /* Hero section heights adapt dynamically */
    .hero {
        height: auto !important;
        min-height: auto !important;
        max-height: none !important;
        padding-bottom: 30px !important;
        display: flex !important;
        flex-direction: column !important;
    }

    /* Hero lateral image on home & franquicias: becomes clean top photo card */
    .hero-image {
        position: relative !important;
        width: 100% !important;
        max-width: 100% !important;
        height: 260px !important;
        right: auto !important;
        top: auto !important;
        border-radius: 16px !important;
        margin: 10px 0 20px !important;
        box-shadow: 0 10px 30px rgba(64,29,4,0.08) !important;
        order: 2 !important;
    }

    /* Hero Container & Content */
    .hero > div {
        position: relative !important;
        height: auto !important;
        padding: 0 20px !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .hero-content {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        max-width: 100% !important;
        padding: 10px 0 20px !important;
        margin-top: 0 !important;
        order: 3 !important;
    }

    /* Hide diamond marker on mobile */
    div[style*="left:53%;top:56%"] {
        display: none !important;
    }

    /* Spotlight Heroes (Productos) */
    div[style*="padding-top:140px"] {
        padding-top: 10px !important;
    }

    div[style*="display:flex;align-items:center;justify-content:space-between;max-width:1260px"] {
        flex-direction: column !important;
        gap: 20px !important;
    }

    div[style*="flex:1.25;max-width:640px"] {
        max-width: 100% !important;
        justify-content: center !important;
        margin-bottom: 10px !important;
    }

    div[style*="flex:1.25;max-width:640px"] img {
        transform: none !important;
        max-width: 300px !important;
        margin: 0 auto !important;
    }

    div[style*="flex:0.85;max-width:460px"] {
        max-width: 100% !important;
        padding-left: 0 !important;
        transform: none !important;
        text-align: center !important;
    }

    div[style*="flex:0.85;max-width:460px"] div[style*="display:flex;align-items:center"] {
        justify-content: center !important;
    }
}

/* SMARTPHONES (<= 640px) */
@media (max-width: 640px) {
    .hero-image {
        height: 240px !important;
    }

    h1, .font-headline-xl {
        font-size: clamp(32px, 9vw, 44px) !important;
        line-height: 1.08 !important;
    }

    h2, .font-headline-lg {
        font-size: clamp(24px, 7.5vw, 34px) !important;
        line-height: 1.15 !important;
    }

    /* Action Buttons stack cleanly full width */
    .hero-content div[style*="display:flex;gap:14px"] {
        flex-direction: column !important;
        width: 100% !important;
    }

    .hero-content a {
        width: 100% !important;
        text-align: center !important;
        box-sizing: border-box !important;
    }

    div[style*="flex:1.25;max-width:640px"] img {
        max-width: 250px !important;
    }

    /* Compact scrollable or pill tabs for 40 flavors on mobile */
    div[style*="justify-content:center;gap:10px"] {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        justify-content: flex-start !important;
        padding: 0 10px 14px !important;
        gap: 8px !important;
        -webkit-overflow-scrolling: touch !important;
    }

    div[style*="justify-content:center;gap:10px"]::-webkit-scrollbar {
        display: none !important;
    }

    .tab-btn {
        flex-shrink: 0 !important;
        font-size: 10px !important;
        padding: 7px 14px !important;
        letter-spacing: 1px !important;
        white-space: nowrap !important;
    }
}

/* ==========================================================================
   SUCURSALES & MAP SECTION RESPONSIVE PERFECTION
   ========================================================================== */

.store-search-box {
    position: relative;
    margin-bottom: 14px;
    width: 100%;
}

/* Custom smooth thin scrollbar */
#stores-container::-webkit-scrollbar {
    width: 5px;
}
#stores-container::-webkit-scrollbar-track {
    background: transparent;
}
#stores-container::-webkit-scrollbar-thumb {
    background: #d6c5b0;
    border-radius: 4px;
}
#stores-container::-webkit-scrollbar-thumb:hover {
    background: #401d04;
}

/* Desktop Grid: Side-by-side with equal height containers and full-width unclipped cards */
@media (min-width: 1025px) {
    .sucursales-grid-layout {
        display: grid !important;
        grid-template-columns: 440px 1fr !important;
        gap: 24px !important;
        align-items: stretch !important;
    }
    #store-list-wrapper {
        background: #fdfbf7 !important;
        border: 1px solid #e8decb !important;
        border-radius: 16px !important;
        padding: 18px !important;
        box-shadow: 0 8px 30px rgba(64,29,4,0.03) !important;
        height: 640px !important;
        display: flex !important;
        flex-direction: column !important;
        box-sizing: border-box !important;
    }
    #stores-container {
        flex: 1 !important;
        max-height: 540px !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
        padding-right: 6px !important;
    }
    #map-wrapper {
        background: #ffffff !important;
        border: 1px solid #e8decb !important;
        border-radius: 16px !important;
        overflow: hidden !important;
        padding: 8px !important;
        box-shadow: 0 8px 30px rgba(64,29,4,0.04) !important;
        height: 640px !important;
        box-sizing: border-box !important;
    }
    #map {
        height: 100% !important;
        width: 100% !important;
        border-radius: 12px !important;
    }
}

/* Mobile & Tablet: Clean vertical flow without clipping (media_1787706315682.png) */
@media (max-width: 1024px) {
    .sucursales-grid-layout {
        display: flex !important;
        flex-direction: column !important;
        gap: 16px !important;
    }

    #store-list-wrapper {
        background: transparent !important;
        border: none !important;
        padding: 0 !important;
        box-shadow: none !important;
        display: flex !important;
        flex-direction: column !important;
    }

    /* Top Search Bar */
    .store-search-box {
        order: 1 !important;
        margin-bottom: 14px !important;
    }

    /* Map in the middle */
    #map-wrapper {
        order: 2 !important;
        margin-bottom: 14px !important;
        background: #ffffff !important;
        border: 1px solid #e8decb !important;
        border-radius: 16px !important;
        padding: 6px !important;
        box-shadow: 0 8px 30px rgba(64,29,4,0.04) !important;
    }

    #map {
        height: 340px !important;
        border-radius: 12px !important;
    }

    /* Cards stack below map with clean scrolling */
    #stores-container {
        order: 3 !important;
        max-height: 480px !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
        padding-right: 4px !important;
    }

    /* Franchise Form Card Mobile Stack */
    .franchise-form-col {
        border-left: none !important;
        border-top: 1px solid #f0e6d8 !important;
        padding-left: 0 !important;
        padding-top: 28px !important;
    }
}

/* Wöllen Elegant Minimalist Tone (Sin verdes ni amarillos - 100% monocromo/cálido) */
.leaflet-tile {
    filter: grayscale(100%) invert(4%) contrast(90%) brightness(105%) sepia(8%);
}

