/* ===================================================
   LIFARMAP BOTICA — Design System
   Variables, Reset, Base, Header, Topbars, Nav
   =================================================== */

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

/* -----------------------------------------------
   CSS Variables
----------------------------------------------- */
:root {
  /* Brand - New Yellow Scheme */
  --primary:        #FFE100;
  --primary-dark:   #E6CB00;
  --primary-light:  #FFF9CC;
  --primary-bar:    #332A00;
  --primary-text:   #B8A000; /* For text on light backgrounds */

  /* Legacy green variables - Now yellow for compatibility */
  --green:          #FFE100;
  --green-dark:     #E6CB00;
  --green-light:    #FFF9CC;
  --green-bar:      #332A00;

  /* UI */
  --bg:             #F5F5F5;
  --white:          #FFFFFF;
  --text:           #333333;
  --text-muted:     #666666;
  --text-light:     #9E9E9E;
  --border:         #E5E5E5;
  --border-dark:    #C8C8C8;

  /* Accents */
  --yellow:         #FFA500; /* Orange-yellow for accent */
  --red:            #E4002B;
  --orange:         #FF6B00;
  --pink:           #FF4081;
  --purple:         #9C27B0;
  --blue:           #2196F3;

  /* Shadows */
  --shadow-xs:  0 1px 3px rgba(0,0,0,0.07);
  --shadow-sm:  0 2px 8px rgba(0,0,0,0.09);
  --shadow:     0 4px 16px rgba(0,0,0,0.11);
  --shadow-md:  0 6px 24px rgba(0,0,0,0.13);
  --shadow-lg:  0 10px 40px rgba(0,0,0,0.16);

  /* Radii */
  --r-xs:  4px;
  --r-sm:  6px;
  --r:     8px;
  --r-md:  12px;
  --r-lg:  16px;
  --r-xl:  24px;
  --r-full: 9999px;

  /* Typography */
  --font: 'Poppins', 'Segoe UI', Arial, sans-serif;

  /* Transitions */
  --t:  0.18s ease;
  --ts: 0.32s ease;
}

/* -----------------------------------------------
   Reset & Base
----------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
img { display: block; max-width: 100%; height: auto; }

button, input, select, textarea {
  font-family: var(--font);
  border: none;
  outline: none;
  background: none;
}
button { cursor: pointer; }

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}

/* -----------------------------------------------
   PROMO BAR (top yellow)
----------------------------------------------- */
.promo-bar {
  background: linear-gradient(90deg, #FFE100 0%, #FFCC00 100%);
  color: #1a1a1a;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 0;
  text-align: center;
  overflow: hidden;
}

.promo-bar-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
}

.promo-bar .promo-code {
  background: #1a1a1a;
  color: var(--yellow);
  font-weight: 800;
  font-size: 14px;
  padding: 3px 12px;
  border-radius: var(--r-full);
  letter-spacing: 0.5px;
  display: inline-block;
}

.promo-bar a { color: inherit; }

/* -----------------------------------------------
   SECONDARY BAR (dark green)
----------------------------------------------- */
.secondary-bar {
  background: var(--green-bar);
  color: rgba(255,255,255,0.82);
  font-size: 12px;
  padding: 7px 0;
}

.secondary-bar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.secondary-bar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: #fff;
}

.secondary-bar-left .sb-icon {
  color: var(--green);
  font-size: 14px;
}

.secondary-bar-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.secondary-bar-right a {
  color: rgba(255,255,255,0.7);
  transition: color var(--t);
  font-size: 12px;
}

.secondary-bar-right a:hover { color: #fff; }

.secondary-bar-right .sep {
  color: rgba(255,255,255,0.25);
  font-size: 10px;
}

/* -----------------------------------------------
   MAIN HEADER
----------------------------------------------- */
.site-header {
  background: var(--white);
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.site-header .container {
  display: flex;
  align-items: center;
  gap: 20px;
  justify-content: space-between;
}

/* Logo */
.site-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-logo img {
  height: 42px;
  width: auto;
}

.site-logo .logo-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-symbol {
  width: 38px;
  height: 38px;
  background: var(--green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.logo-symbol svg { width: 22px; height: 22px; fill: #fff; }

.logo-name {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.logo-name strong {
  font-size: 20px;
  font-weight: 800;
  color: var(--green);
  letter-spacing: -0.3px;
}

.logo-name small {
  font-size: 10px;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.3px;
}

/* Search */
.site-search {
  flex: 1;
  display: flex;
  align-items: center;
  border: 2px solid var(--border);
  border-radius: var(--r-full);
  overflow: hidden;
  transition: border-color var(--t);
}

.site-search:focus-within { border-color: var(--green); }

.site-search input {
  flex: 1;
  padding: 10px 18px;
  font-size: 14px;
  color: var(--text);
}

.site-search input::placeholder { color: var(--text-light); }

.site-search button {
  background: var(--green);
  padding: 10px 20px;
  color: #fff;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background var(--t);
}

.site-search button:hover { background: var(--green-dark); }

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-shrink: 0;
}

.hdr-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
  transition: color var(--t);
  cursor: pointer;
  white-space: nowrap;
  position: relative;
}

.hdr-action:hover { color: var(--green); }

.hdr-action .ha-icon {
  font-size: 22px;
  line-height: 1;
}

.hdr-action .ha-label { font-size: 11px; }

.hdr-action .cart-badge {
  position: absolute;
  top: -3px;
  right: -6px;
  background: var(--green);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 17px;
  height: 17px;
  border-radius: var(--r-full);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
}

.hdr-divider {
  width: 1px;
  height: 30px;
  background: var(--border);
  flex-shrink: 0;
}

/* Mobile toggle — eliminado, ya no se usa */

/* -----------------------------------------------
   NAVIGATION BAR
----------------------------------------------- */
.site-nav {
  background: var(--white);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 71px;
  z-index: 999;
}

.site-nav .container {
  display: flex;
  align-items: center;
}

/* Categories trigger */
.nav-categories {
  position: relative;
  flex-shrink: 0;
}

.nav-cat-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  border-right: 1px solid var(--border);
  transition: all var(--t);
  white-space: nowrap;
}

.nav-cat-btn:hover,
.nav-categories.open .nav-cat-btn {
  color: var(--green);
  background: var(--green-light);
}

.nav-cat-btn .chevron {
  font-size: 9px;
  transition: transform var(--t);
}

.nav-categories.open .chevron { transform: rotate(180deg); }

/* Dropdown */
.cat-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 230px;
  background: var(--white);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--r-sm) var(--r-sm);
  box-shadow: var(--shadow-md);
  display: none;
  z-index: 1001;
  overflow: hidden;
}

.nav-categories.open .cat-dropdown { display: block; }

.cat-dropdown a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  font-size: 14px;
  color: var(--text);
  border-bottom: 1px solid var(--bg);
  transition: all var(--t);
}

.cat-dropdown a:last-child { border-bottom: none; }

.cat-dropdown a:hover {
  background: var(--green-light);
  color: var(--green);
  padding-left: 26px;
}

.cat-dropdown a .cat-icon {
  font-size: 18px;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1;
}

.nav-links::-webkit-scrollbar { display: none; }

.nav-links a {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 13px 15px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  transition: color var(--t);
  position: relative;
}

.nav-links a:hover { color: var(--green); }

.nav-links a.active { color: var(--green); font-weight: 600; }
.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: var(--green);
}

.nav-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}

/* -----------------------------------------------
   MAIN CONTENT
----------------------------------------------- */
#main-content { min-height: 60vh; }

/* -----------------------------------------------
   CONTAINER
----------------------------------------------- */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

/* -----------------------------------------------
   RESPONSIVE
----------------------------------------------- */
@media (max-width: 1024px) {
  .secondary-bar-right { gap: 12px; }
  .nav-links a { padding: 13px 11px; font-size: 12px; }
}

@media (max-width: 768px) {
  .promo-bar-inner { gap: 12px; }
  .secondary-bar { display: none; }

  .site-header .container { flex-wrap: wrap; gap: 12px; }
  .site-logo { order: 1; }
  .header-actions { order: 2; gap: 14px; }
  .site-search { order: 3; flex-basis: 100%; }

  .header-actions .ha-label { display: none; }
  .hdr-divider { display: none; }

  /* Nav: sin overflow en el container para no clipear el dropdown */
  .site-nav { top: auto; }
  .site-nav .container { overflow: visible; flex-wrap: nowrap; }

  /* El scroll horizontal va en nav-links, no en el container */
  .nav-links { overflow-x: auto; scrollbar-width: none; flex: 1; }
  .nav-links::-webkit-scrollbar { display: none; }

  /* Dropdown en mobile: fixed full-width, top se ajusta por JS */
  .cat-dropdown {
    position: fixed;
    left: 0;
    right: 0;
    width: 100%;
    min-width: unset;
    border-radius: 0;
    border-left: none;
    border-right: none;
    max-height: 55vh;
    overflow-y: auto;
    z-index: 9999;
  }

  .nav-cat-btn { padding: 11px 14px; font-size: 13px; }
  .nav-links a { padding: 11px 10px; font-size: 12px; }
}

@media (max-width: 480px) {
  .promo-bar { font-size: 11px; padding: 7px 0; }
  .logo-name strong { font-size: 17px; }
  .container { padding: 0 12px; }
}
