/* ============================================================
   FLAGON COS — PRODUCTS PAGE
   Compact hero • 3-col desktop • 2-col mobile (larger cards)
   ============================================================ */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg-primary: #F8F7F2;
    --bg-secondary: #FFFFFF;
    --card-bg: #FFFFFF;
    --accent: #627862;
    --accent-soft: #344638;
    --accent-dim: rgba(98, 120, 98, 0.08);
    --accent-glow: rgba(98, 120, 98, 0.15);
    --text: #263027;
    --text-soft: #344638;
    --muted: #687268;
    --border: #DDE3DA;
    --border-accent: rgba(98, 120, 98, 0.35);
    --whatsapp: #25D366;
    --whatsapp-dark: #1ebe5b;
    --font: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --max-w: 1200px;
    --nav-h: 68px;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --shadow-md: 0 12px 40px rgba(38, 48, 39, 0.06);
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    font-weight: 400;
    letter-spacing: -0.01em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
body.no-scroll { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; border: none; background: none; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ---------- TYPOGRAPHY ---------- */
.display-sm {
    font-size: clamp(1.6rem, 3.4vw, 2.4rem);
    font-weight: 600;
    letter-spacing: -0.015em;
    line-height: 1.15;
    color: var(--text);
}
.lead {
    font-size: clamp(0.9rem, 1.1vw, 1rem);
    color: var(--muted);
    line-height: 1.6;
    max-width: 56ch;
    font-weight: 400;
}

/* ---------- LAYOUT ---------- */
.container {
    width: 100%;
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 clamp(18px, 4vw, 48px);
}

/* ---------- ANNOUNCEMENT BAR ---------- */
.announcement-bar {
    background-color: var(--accent-soft);
    color: #fff;
    text-align: center;
    padding: 0.42rem 1rem;
    font-size: 0.6rem;
    letter-spacing: 0.2em;
    font-weight: 600;
    position: relative;
    z-index: 1001;
}

/* ---------- NAVBAR ---------- */
.navbar {
    position: sticky;
    top: 0;
    height: var(--nav-h);
    z-index: 1000;
    display: flex;
    align-items: center;
    transition: background 0.4s var(--ease), border-color 0.4s var(--ease);
    border-bottom: 1px solid transparent;
}
.navbar.scrolled {
    background: rgba(248, 247, 242, 0.85);
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    border-bottom-color: var(--border);
}
.nav-inner {
    width: 100%;
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 clamp(18px, 4vw, 48px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.nav-brand { display: flex; align-items: center; gap: 11px; flex-shrink: 0; }
.monogram {
    width: 38px; height: 38px;
    border-radius: 10px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; padding: 4px;
    transition: border-color 0.3s var(--ease);
}
.monogram img { width: 100%; height: 100%; object-fit: contain; }
.nav-brand:hover .monogram { border-color: var(--border-accent); }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong {
    font-size: 12.5px; font-weight: 800;
    letter-spacing: 0.1em; text-transform: uppercase; color: var(--text);
}
.brand-text span {
    font-size: 9px; font-weight: 600;
    letter-spacing: 0.2em; text-transform: uppercase;
    color: var(--muted); margin-top: 2px;
}
.nav-links {
    display: flex; align-items: center;
    gap: clamp(18px, 2.4vw, 34px);
    list-style: none;
}
.nav-links a {
    font-size: 12px; font-weight: 600;
    letter-spacing: 0.06em; text-transform: uppercase;
    color: var(--muted); position: relative; padding: 6px 0;
    transition: color 0.3s var(--ease);
}
.nav-links a::after {
    content: ''; position: absolute; bottom: 0; left: 0;
    width: 0; height: 2px; background: var(--accent);
    transition: width 0.35s var(--ease);
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }
.nav-cta {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 18px; border-radius: 100px;
    background: var(--accent); color: #fff;
    font-size: 11px; font-weight: 700;
    letter-spacing: 0.05em; text-transform: uppercase;
    white-space: nowrap; flex-shrink: 0;
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s var(--ease);
    box-shadow: 0 4px 14px var(--accent-glow);
}
.nav-cta:hover {
    transform: translateY(-2px);
    background: var(--accent-soft);
    box-shadow: 0 10px 28px rgba(98, 120, 98, 0.25);
}
.hamburger {
    display: none; width: 40px; height: 40px;
    border-radius: 10px; border: 1px solid var(--border);
    cursor: pointer; position: relative; flex-shrink: 0;
    transition: border-color 0.3s var(--ease);
}
.hamburger:hover { border-color: var(--border-accent); }
.hamburger span {
    position: absolute; left: 50%; top: 50%;
    width: 16px; height: 2px; background: var(--text);
    border-radius: 2px; transform: translate(-50%, -50%);
    transition: transform 0.35s var(--ease), opacity 0.3s var(--ease);
}
.hamburger span:nth-child(1) { transform: translate(-50%, -6px); }
.hamburger span:nth-child(3) { transform: translate(-50%, 6px); }
.hamburger.open span:nth-child(1) { transform: translate(-50%, 0) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translate(-50%, 0) rotate(-45deg); }

/* ---------- MOBILE MENU ---------- */
.mobile-menu {
    position: fixed; inset: 0;
    background: rgba(248, 247, 242, 0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    z-index: 999;
    display: flex; flex-direction: column; justify-content: center;
    padding: 90px clamp(22px, 6vw, 48px) 48px;
    opacity: 0; visibility: hidden;
    transition: opacity 0.4s var(--ease), visibility 0.4s;
}
.mobile-menu.open { opacity: 1; visibility: visible; }
.mobile-menu nav { display: flex; flex-direction: column; gap: 4px; }
.mobile-menu a {
    font-size: clamp(1.5rem, 5.5vw, 2.2rem);
    font-weight: 600; padding: 12px 0;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    display: flex; align-items: center; justify-content: space-between;
    transition: color 0.3s var(--ease), padding-left 0.35s var(--ease);
}
.mobile-menu a:hover { color: var(--accent); padding-left: 10px; }
.mobile-menu a span {
    font-size: 11px; color: var(--muted); font-weight: 600;
    letter-spacing: 0.1em; text-transform: uppercase;
}
.mobile-menu a.nav-cta {
    margin-top: 22px; padding: 15px 22px;
    border-radius: 100px; justify-content: center;
    border-bottom: none; color: #fff;
    background: var(--accent);
    box-shadow: 0 10px 28px rgba(98, 120, 98, 0.3);
    font-size: 12px; font-weight: 800;
    letter-spacing: 0.08em; text-transform: uppercase;
}
.mobile-menu a.nav-cta:hover { padding-left: 22px; color: #fff; background: var(--accent-soft); }
.mobile-menu a.nav-cta span { display: none; }

/* ---------- COMPACT PAGE HERO ---------- */
.page-hero {
    padding: clamp(20px, 3vw, 36px) 0 clamp(8px, 1.5vw, 16px);
}
.page-hero .display-sm { margin-bottom: 8px; }
.page-hero .lead { max-width: 48ch; }

/* ---------- CATALOG ---------- */
.catalog {
    padding: clamp(12px, 2vw, 22px) 0 clamp(48px, 6vw, 72px);
}

/* Filter pills */
.filter-pills {
    display: flex; flex-wrap: wrap; gap: 8px;
    margin-bottom: clamp(18px, 2.5vw, 26px);
}
.filter-pill {
    padding: 8px 18px; border-radius: 100px;
    border: 1px solid var(--border);
    background: var(--card-bg);
    color: var(--muted);
    font-size: 11px; font-weight: 700;
    letter-spacing: 0.06em; text-transform: uppercase;
    cursor: pointer;
    transition: border-color 0.3s var(--ease), color 0.3s var(--ease),
                background 0.3s var(--ease), transform 0.3s var(--ease);
}
.filter-pill:hover {
    border-color: var(--border-accent);
    color: var(--text);
    transform: translateY(-1px);
}
.filter-pill.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    box-shadow: 0 5px 16px var(--accent-glow);
}

/* ---------- PRODUCTS GRID ---------- */
/* Desktop: 3 per row (unchanged) */
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(14px, 1.8vw, 20px);
}
.products-empty {
    text-align: center; color: var(--muted);
    font-size: 13px; padding: 40px 0;
}

/* ---------- PRODUCT CARD (smaller) ---------- */
.product-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.product-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-accent);
    box-shadow: var(--shadow-md);
}
.product-card-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--bg-primary);
    display: flex; align-items: center; justify-content: center;
}
.product-card-image img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--ease);
}
.product-card:hover .product-card-image img { transform: scale(1.03); }

.product-card-info {
    padding: 11px 12px 13px;
    display: flex; flex-direction: column; gap: 7px;
    flex: 1;
}
.product-card-name {
    font-size: 12px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.3;
    letter-spacing: -0.005em;
}
.product-card-tagline {
    font-size: 10.5px;
    color: var(--muted);
    line-height: 1.4;
    margin-top: -3px;
}

/* Buy button */
.btn-buy {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 5px;
    padding: 8px 12px;
    border-radius: 100px;
    background: var(--whatsapp);
    color: #fff;
    font-size: 10px; font-weight: 700;
    letter-spacing: 0.05em; text-transform: uppercase;
    text-decoration: none;
    margin-top: auto;
    box-shadow: 0 3px 10px rgba(37, 211, 102, 0.22);
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s var(--ease);
}
.btn-buy:hover {
    transform: translateY(-1px);
    background: var(--whatsapp-dark);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.32);
}
.btn-buy svg { width: 12px; height: 12px; fill: currentColor; flex-shrink: 0; }

/* ---------- FOOTER ---------- */
.footer {
    border-top: 1px solid var(--border);
    padding: 24px 0;
    background: var(--bg-secondary);
}
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}
.footer-bottom p {
    font-size: 12px;
    color: var(--muted);
    opacity: 0.85;
}

/* ---------- WHATSAPP FLOAT ---------- */
.whatsapp-float {
    position: fixed;
    bottom: 28px; right: 22px;
    width: 50px; height: 50px;
    border-radius: 14px;
    background: var(--whatsapp);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    z-index: 950;
    box-shadow: 0 8px 22px rgba(37, 211, 102, 0.32);
    transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background 0.35s var(--ease);
}
.whatsapp-float:hover {
    transform: translateY(-3px) scale(1.04);
    background: var(--whatsapp-dark);
    box-shadow: 0 14px 32px rgba(37, 211, 102, 0.42);
}
.whatsapp-float svg { width: 24px; height: 24px; fill: currentColor; display: block; }

/* ---------- REVEAL ---------- */
.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
    will-change: opacity, transform;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.06s; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Tablet / small desktop — still 3 per row but tighter */
@media (max-width: 900px) {
    .nav-links, .navbar .nav-cta { display: none; }
    .hamburger { display: block; }
}

/* MOBILE — 2 per row, LARGER cards */
@media (max-width: 640px) {
    :root { --nav-h: 60px; }

    .container { padding: 0 16px; }

    .page-hero {
        padding: 14px 0 6px;
    }
    .page-hero .display-sm {
        font-size: 1.5rem;
        margin-bottom: 4px;
    }
    .page-hero .lead {
        font-size: 0.85rem;
        line-height: 1.5;
    }

    .catalog {
        padding: 10px 0 48px;
    }

    /* 2 products per row on mobile */
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    /* Larger card on mobile */
    .product-card {
        border-radius: 16px;
    }
    .product-card-info {
        padding: 12px 12px 14px;
        gap: 8px;
    }
    .product-card-name {
        font-size: 13.5px;
        line-height: 1.35;
    }
    .product-card-tagline {
        font-size: 11px;
        line-height: 1.4;
    }
    .btn-buy {
        font-size: 11px;
        padding: 10px 14px;
        gap: 6px;
    }
    .btn-buy svg { width: 13px; height: 13px; }

    /* Filter pills — horizontal scroll */
    .filter-pills {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 2px;
        scrollbar-width: none;
        margin-bottom: 16px;
    }
    .filter-pills::-webkit-scrollbar { display: none; }
    .filter-pill {
        flex-shrink: 0;
        padding: 8px 16px;
        font-size: 11px;
    }

    .footer-bottom { flex-direction: column; text-align: center; gap: 6px; }

    .whatsapp-float {
        bottom: 18px; right: 16px;
        width: 46px; height: 46px;
        border-radius: 13px;
    }
    .whatsapp-float svg { width: 22px; height: 22px; }
}

/* Very small phones — keep 2 columns, just tighten spacing */
@media (max-width: 380px) {
    .products-grid { gap: 10px; }
    .product-card-info { padding: 10px 10px 12px; }
    .product-card-name { font-size: 12.5px; }
    .btn-buy { font-size: 10px; padding: 9px 12px; }
}
