:root {
  /* Paleta de marca: verde bosque y crema */
  --bg:        #f3ecdc;
  --bg2:       #faf5e9;
  --surface:   #faf5e9;
  --surface-2: #eee5d2;
  --surface-3: #d9cfb9;
  --surface-4: #c5baa2;
  --glass:     rgba(11, 48, 35, 0.05);
  --border:    #d9cfb9;
  --border-h:  #0b3023;

  /* Verde bosque */
  --accent:      #0b3023;
  --accent-dim:  rgba(11, 48, 35, 0.1);
  --accent-mid:  #164a36;
  --accent-glow: rgba(11, 48, 35, 0.25);
  --accent-glow-strong: rgba(11, 48, 35, 0.4);

  /* Secundarios */
  --accent-2:  #286047;

  /* Estados */
  --danger:    #ef4444;
  --danger-d:  rgba(239, 68, 68, 0.1);
  --warning:   #f59e0b;
  --warning-d: rgba(245, 158, 11, 0.1);
  --info:      #3b82f6;
  --info-d:    rgba(59, 130, 246, 0.1);

  /* Texto */
  --text:       #0b3023;
  --text-dim:   #47594b;
  --text-muted: #647363;

  /* Layout */
  --sidebar-w: 260px;
  --radius:    16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --tr:        0.3s ease-out;
}
/* MOBILE OPTIMIZATIONS */
@media (max-width: 768px) {
  /* Navbar */
  .navbar > div { gap: 12px !important; }
  .nav-sub { display: none !important; }
  .nav-elegant-btn { padding: 6px 10px !important; font-size: 0.85rem !important; }
  
  /* Hero */
  .hero { padding: 30px 15px 20px !important; }
  .hero h1 { font-size: clamp(1.8rem, 8vw, 2.5rem) !important; }
  
  /* Product Cards & Grids */
  .products-grid, .cf-grid, .bento-grid {
    grid-template-columns: 1fr !important;
  }
  
  /* Modals */
  .modal-content {
    width: 95% !important;
    padding: 24px !important;
    margin: 10px auto !important;
  }
  
  /* Layout constraints */
  body {
    font-size: 14px !important;
  }
}

@media (max-width: 480px) {
  .nav-brand { gap: 8px !important; }
  .hero-logo { width: 32px !important; height: 32px !important; font-size: 1rem !important; }
  .nav-title { font-size: 1rem !important; }
  .navbar-cart-btn { padding: 6px 12px !important; }
  .social-links-nav { display: none !important; }
}
/* BACK.HTML MOBILE OPTIMIZATIONS */
@media(max-width: 800px) {
  body { overflow-x: hidden; }
  .sidebar {
    width: 100% !important;
    height: auto !important;
    position: relative !important;
    flex-direction: column !important;
    border-right: none !important;
    border-bottom: 1px solid var(--border) !important;
    border-top: none !important;
    background: var(--surface) !important;
    padding: 12px 0 !important;
  }
  .sb-logo, .sb-footer { display: none !important; }
  .sb-nav { 
    display: flex !important; 
    flex-direction: row !important; 
    padding: 0 16px !important; 
    width: 100% !important; 
    overflow-x: auto !important; 
    align-items: center !important;
    gap: 12px !important;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
  }
  .nav-item {
    flex-direction: row !important; 
    gap: 8px !important;
    padding: 10px 16px !important;
    font-size: 0.9rem !important;
    flex: 0 0 auto !important;
    border-radius: 50px !important;
    background: var(--surface-2) !important;
  }
  .nav-item.active {
    background: var(--accent) !important;
    color: #fff !important;
  }
  .nav-icon { font-size: 1.1rem !important; opacity: 1 !important; }
  .nav-text { display: block !important; font-weight: 600 !important; }
  
  .main-content {
    margin-left: 0 !important;
    padding: 16px !important;
    height: auto !important;
  }
}

/* Superficies y controles de marca, compartidos por las tres paginas. */
.card, .product-card, .modal-content, .panel, .legal-box, .sidebar, .bottom-bar, header {
  background: var(--surface) !important;
  border-color: var(--border) !important;
}
.card:hover, .product-card:hover, .legal-box:hover {
  background: var(--bg2) !important;
  border-color: var(--accent-mid) !important;
}
.navbar {
  background: #0b3023 !important;
  border-color: #286047 !important;
}
.navbar .nav-title, .navbar .nav-sub, .navbar .social-links-nav a,
.navbar .nav-elegant-btn {
  color: #f3ecdc !important;
}
.navbar .navbar-cart-btn {
  background: #f3ecdc !important;
  color: #0b3023 !important;
}
.navbar .navbar-cart-btn:hover {
  background: #eee5d2 !important;
}
.hero h1, h1[style*="background-clip"], .maintenance-overlay h1 {
  background: none !important;
  color: var(--text) !important;
  -webkit-text-fill-color: var(--text) !important;
}
.btn-primary, .btn-submit, .cart-fab, .step-num, .cart-count,
.prog-step.active .ps-num, .btn-add:hover,
button[style*="background:var(--accent)"] {
  color: #faf5e9 !important;
}
.btn-submit:hover, .btn-primary:hover, .cart-fab:hover {
  background: #164a36 !important;
}
:focus-visible {
  outline: 3px solid #286047;
  outline-offset: 3px;
}
/* Refinamiento visual y correccion de contraste. */
body { font-size: 16px; background-image: none !important; }
button, input, textarea, select { font-family: inherit; }
button:hover, .btn:hover, .btn-primary:hover, .fab:hover {
  transform: none !important;
  box-shadow: none !important;
}
.navbar {
  padding: 18px max(24px, calc((100vw - 1160px) / 2)) !important;
  gap: 20px;
}
.navbar .nav-elegant-btn { min-height: 44px; font-size: .95rem; }
.navbar .nav-elegant-btn:hover,
.navbar .nav-elegant-btn:focus-visible {
  background: #f3ecdc !important;
  color: #0b3023 !important;
}
.navbar .navbar-cart-btn { min-height: 44px; }
.navbar .navbar-cart-count {
  background: #0b3023 !important; color: #faf5e9 !important;
}
.navbar .hero-logo { background: transparent; border: none; box-shadow: none; }
#home-hero { padding: 64px 24px 48px !important; border: none !important; box-shadow: none !important; }
#home-hero::before, #home-hero::after { display: none; }
#home-hero > div:first-child { gap: 56px !important; margin-bottom: 56px !important; }
#home-hero h1 { font-size: clamp(2.3rem, 5vw, 4rem) !important; line-height: 1.08; letter-spacing: -.045em !important; }
#home-hero p { margin-left: 0; max-width: 48ch; }
#home-hero img { border-radius: 120px 120px 18px 18px !important; box-shadow: none !important; }
#home-hero .card {
  border-radius: 16px; padding: 26px !important; box-shadow: none !important;
}
#home-hero .card > div:first-child { font-size: 1.7rem !important; }
#home-hero .card h3 { font-size: 1.15rem !important; }
#home-hero .card p { font-size: 1rem !important; }
#screen-shop .btn-primary, .btn-submit, .btn-to-checkout, .cart-fab {
  background: #0b3023 !important;
  color: #faf5e9 !important;
  border: 1px solid #0b3023 !important;
  border-radius: 10px !important;
  box-shadow: none !important;
  min-height: 48px;
}
#screen-shop .btn-primary:hover, .btn-submit:hover,
.btn-to-checkout:hover, .cart-fab:hover {
  background: #164a36 !important;
  color: #faf5e9 !important;
}
.btn-submit:disabled { background: #47594b !important; opacity: .7; }
#catalog-section { max-width: 1200px; margin: auto; padding: 28px 24px 0 !important; }
#catalog-section .btn-back { min-height: 44px; margin-bottom: 18px !important; font-size: .95rem; }
#catalog-section .shop-wrap { padding: 0 0 48px !important; }
.sec-title { font-size: clamp(1.7rem, 3vw, 2.2rem); letter-spacing: -.03em; }
.sec-sub { font-size: 1rem; margin: 8px 0 28px; }
.product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.product-card { box-shadow: none !important; }
.product-card:hover { box-shadow: 0 8px 24px rgba(11,48,35,.08) !important; transform: none !important; }
.product-card::before, .p-img::after { display: none; }
.p-img { height: auto; aspect-ratio: 4 / 3; background: #eee5d2; }
.product-card:hover .p-img img { transform: scale(1.03); }
.p-body { padding: 20px 20px 12px; display: flex; flex-direction: column; }
.p-name { white-space: normal; font-size: 1rem; line-height: 1.4; margin-bottom: 8px; }
.p-desc { font-size: .875rem; line-height: 1.55; }
.p-price { font-size: 1.25rem; text-shadow: none; margin-top: auto; padding-top: 10px; }
.p-footer { padding: 8px 20px 20px; }
.btn-add { min-height: 44px; font-size: .95rem; background: #0b3023; color: #faf5e9; border-color: #0b3023; }
.btn-add:hover { background: #164a36; color: #faf5e9 !important; box-shadow: none !important; }
#home-contact { background: #eee5d2; }
#home-contact p { font-size: 1rem !important; }
.btn-contact-wa { background: #0b3023 !important; color: #faf5e9 !important; min-height: 48px; }
.btn-contact-mail { min-height: 48px; }
.modal-overlay { background: rgba(11,48,35,.65); }
.modal-box { padding: 32px; max-height: 90dvh; }
.modal-title { padding-right: 30px; }
.f-label, .delivery-info span { font-size: .875rem; }
.f-inp, .f-sel, .f-textarea { font-size: 1rem; }
.modal-close { width: 40px; height: 40px; top: 16px; right: 16px; }
.color-option { font-size: .95rem; }
@media (max-width: 900px) {
  .navbar { flex-wrap: wrap; padding: 16px 20px !important; }
  .navbar > div:first-of-type { flex: 1; flex-wrap: wrap; gap: 16px !important; }
  .nav-sub { display: none; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
}
@media (max-width: 600px) {
  body { font-size: 16px !important; }
  .navbar { position: relative; padding: 14px 16px !important; align-items: flex-start; gap: 12px; }
  .navbar > div:first-of-type { display: grid !important; gap: 14px !important; min-width: 0; }
  .navbar > div:last-child { flex-shrink: 0; }
  .navbar .nav-brand { gap: 8px !important; }
  .navbar .nav-title { font-size: 1.05rem !important; white-space: nowrap; }
  .navbar .hero-logo { width: 30px !important; height: 30px !important; }
  .navbar .nav-elegant-btn { padding: 8px 12px !important; font-size: .9rem !important; }
  .navbar .social-links-nav { display: none; }
  #home-hero { padding: 32px 20px !important; }
  #home-hero > div:first-child { gap: 30px !important; margin-bottom: 32px !important; }
  #home-hero > div:first-child > div { min-width: 0 !important; flex-basis: 100% !important; }
  #home-hero h1 { font-size: clamp(2rem, 9vw, 2.7rem) !important; }
  #home-hero p { font-size: 1rem !important; }
  #home-hero .btn-primary { width: 100%; font-size: 1rem !important; padding: 14px 20px !important; }
  #home-hero .card { min-width: 0 !important; flex-basis: 100% !important; }
  #catalog-section { padding: 20px 16px 0 !important; }
  .product-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .modal-box { width: calc(100% - 24px); padding: 26px 20px; max-height: 92dvh; }
  .modal-title { font-size: 1.2rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
.navbar .hero-logo { margin: 0 !important; flex-shrink: 0; }
