/* Tía Vicenta v425 · Modo Día/Noche pulido y limpio
   Una sola fuente visual: variables + botón único #themeBtn.
   No toca la lógica del carrito. */

html{
  color-scheme: light;
  --tv-trans:.18s ease;
}

html[data-theme="light"],
html.theme-light-v425{
  color-scheme:light;

  --bg:#f6eadc!important;
  --bg2:#fff8ef!important;
  --surface:#fffaf3!important;
  --surface2:#fff3e5!important;
  --card:#ffffff!important;
  --text:#151827!important;
  --muted:#665e6b!important;
  --line:rgba(88,56,26,.14)!important;
  --accent:#ff9416!important;
  --accent2:#f47c12!important;
  --shadow:0 18px 46px rgba(74,43,12,.12)!important;
  --shadow2:0 12px 26px rgba(36,25,16,.09)!important;

  --tv-bg:#fff7ed;
  --tv-bg-end:#f2e3d3;
  --tv-text:#151827;
  --tv-muted:#665e6b;
  --tv-surface:#fffdf9;
  --tv-surface-2:#fff6ec;
  --tv-surface-3:#ffffff;
  --tv-line:rgba(88,56,26,.14);
  --tv-line-strong:rgba(255,148,22,.30);
  --tv-glass:rgba(255,255,255,.88);
  --tv-input:#ffffff;
  --tv-shadow:0 18px 50px rgba(66,39,13,.12);
  --tv-shadow-sm:0 10px 24px rgba(66,39,13,.08);
  --tv-accent:#ff9416;
  --tv-accent-2:#f47c12;
  --tv-focus:rgba(255,148,22,.26);
  --tv-overlay:rgba(30,18,8,.46);
  --tv-modal-foot:#fff6ea;
}

html[data-theme="dark"],
html.theme-dark-v425{
  color-scheme:dark;

  --bg:#11100f!important;
  --bg2:#1a1512!important;
  --surface:#1d1714!important;
  --surface2:#261d17!important;
  --card:#211a16!important;
  --text:#fff9f0!important;
  --muted:#dbc9b3!important;
  --line:rgba(255,230,197,.15)!important;
  --accent:#ffad3d!important;
  --accent2:#ff8617!important;
  --shadow:0 24px 60px rgba(0,0,0,.46)!important;
  --shadow2:0 16px 34px rgba(0,0,0,.34)!important;

  --tv-bg:#120f0d;
  --tv-bg-end:#241a14;
  --tv-text:#fff9f0;
  --tv-muted:#dbc9b3;
  --tv-surface:#211a16;
  --tv-surface-2:#2b211a;
  --tv-surface-3:#171310;
  --tv-line:rgba(255,230,197,.15);
  --tv-line-strong:rgba(255,173,61,.36);
  --tv-glass:rgba(28,22,18,.90);
  --tv-input:#171310;
  --tv-shadow:0 24px 64px rgba(0,0,0,.46);
  --tv-shadow-sm:0 14px 34px rgba(0,0,0,.34);
  --tv-accent:#ffad3d;
  --tv-accent-2:#ff8617;
  --tv-focus:rgba(255,173,61,.28);
  --tv-overlay:rgba(0,0,0,.64);
  --tv-modal-foot:#231a14;
}

/* Base */
html body{
  background:
    radial-gradient(circle at 7% 1%, color-mix(in srgb,var(--tv-accent) 15%, transparent), transparent 27rem),
    radial-gradient(circle at 96% 11%, color-mix(in srgb,var(--tv-accent-2) 10%, transparent), transparent 24rem),
    linear-gradient(180deg,var(--tv-bg),var(--tv-bg-end))!important;
  color:var(--tv-text)!important;
  transition:background-color var(--tv-trans), color var(--tv-trans)!important;
}

html body,
html body input,
html body textarea,
html body select,
html body button{
  color:var(--tv-text);
}

/* Superficies */
html body .topbar-inner,
html body .tv-business-actions-v420,
html body .category,
html body .product,
html body .compact-product,
html body #cartDrawer,
html body .drawer,
html body .modal-card,
html body .cart-item,
html body .cart-addons-pro,
html body .checkout-panel,
html body .choice,
html body .summary-row,
html body .admin-panel,
html body .admin-card{
  background:var(--tv-surface)!important;
  color:var(--tv-text)!important;
  border-color:var(--tv-line)!important;
  box-shadow:var(--tv-shadow-sm)!important;
}

html body .topbar-inner{
  background:var(--tv-glass)!important;
  border-color:var(--tv-line-strong)!important;
  box-shadow:var(--tv-shadow)!important;
  backdrop-filter:blur(18px)!important;
  -webkit-backdrop-filter:blur(18px)!important;
}

html body .category.open{
  border-color:var(--tv-line-strong)!important;
}

/* Texto */
html body .brand-title,
html body .section-head h2,
html body .category-title,
html body .product h3,
html body .cart-name,
html body .drawer-title,
html body .modal h3,
html body .detail-section h4,
html body .tv-business-action-copy-v420 b,
html body .checkout-title,
html body label,
html body strong,
html body b{
  color:var(--tv-text)!important;
}

html body .brand-tag,
html body .category-meta,
html body .desc,
html body .cart-details,
html body .cart-unit-price,
html body .modal-sub,
html body .detail-section,
html body .tv-business-action-copy-v420 small,
html body small,
html body .muted{
  color:var(--tv-muted)!important;
}

html body .price,
html body .cart-category,
html body .kicker,
html body .section-kicker{
  color:var(--tv-accent)!important;
}

/* Buscador/formularios */
html body .search,
html body input,
html body textarea,
html body select,
html body .form-control{
  background:var(--tv-input)!important;
  color:var(--tv-text)!important;
  border-color:var(--tv-line)!important;
}

html body .search svg{
  color:var(--tv-muted)!important;
}

html body input::placeholder,
html body textarea::placeholder{
  color:color-mix(in srgb,var(--tv-muted) 76%, transparent)!important;
}

html body .search:focus-within,
html body input:focus,
html body textarea:focus,
html body select:focus{
  border-color:var(--tv-line-strong)!important;
  box-shadow:0 0 0 4px var(--tv-focus)!important;
}

/* Accesos */
html body .tv-business-actions-v420{
  background:linear-gradient(180deg,var(--tv-glass),color-mix(in srgb,var(--tv-surface-2) 92%, transparent))!important;
  border-color:var(--tv-line-strong)!important;
}

html body .tv-business-action-v420,
html body .details-btn,
html body .chev,
html body .icon-btn,
html body .search-clear,
html body .tv423-scroll-top,
html body .cart-remove-icon{
  background:var(--tv-surface-2)!important;
  color:var(--tv-text)!important;
  border-color:var(--tv-line)!important;
}

html body .tv-business-action-icon-v420{
  background:color-mix(in srgb,var(--tv-accent) 16%, var(--tv-surface))!important;
  border-color:var(--tv-line-strong)!important;
}

/* Productos/fotos */
html body .product-body,
html body .category-head{
  background:transparent!important;
}

html body .product-media{
  background:linear-gradient(145deg,var(--tv-surface-2),var(--tv-surface-3))!important;
}

html body .product[data-cat="Bebidas"] .product-media,
html body .product[data-cat="Snacks"] .product-media,
html body .product[data-cat="Helados"] .product-media{
  background:#fff!important;
}

html[data-theme="dark"] body .product[data-cat="Bebidas"] .product-media,
html[data-theme="dark"] body .product[data-cat="Snacks"] .product-media,
html[data-theme="dark"] body .product[data-cat="Helados"] .product-media{
  background:#fff8ef!important;
}

html[data-theme="dark"] body .product-media img{
  filter:saturate(1.03) contrast(1.02);
}

/* Botones de acción */
html body .add-btn,
html body .primary,
html body #checkoutBtn,
html body #continueBtn,
html body #cartFloatBtn,
html body .card-qty-btn.card-qty-plus,
html body .qty-control button:last-child,
html body .cart-addon-pro-control button:last-child{
  background:linear-gradient(180deg,var(--tv-accent),var(--tv-accent-2))!important;
  color:#211100!important;
  border-color:transparent!important;
  box-shadow:0 12px 28px color-mix(in srgb,var(--tv-accent) 28%, transparent)!important;
}

html body .card-buy-control,
html body .qty-control,
html body .cart-addon-pro-control{
  background:var(--tv-surface-2)!important;
  color:var(--tv-text)!important;
  border-color:var(--tv-line)!important;
}

html body .card-qty-number,
html body .qty-control span,
html body .cart-addon-pro-control span{
  color:var(--tv-text)!important;
}

/* Promo */
html body .promo-banners,
html body .promo-premium,
html body .promo-premium-slide{
  background:transparent!important;
}

html body .promo-premium-dot,
html body [data-promo-dot]{
  background:color-mix(in srgb,var(--tv-muted) 40%, transparent)!important;
}

html body .promo-premium-dot.active,
html body [data-promo-dot].active{
  background:var(--tv-accent)!important;
}

/* Carrito/modal */
html body .drawer-backdrop.show,
html body .modal-backdrop.show,
html body #drawerBackdrop.show{
  background:var(--tv-overlay)!important;
  backdrop-filter:blur(8px)!important;
  -webkit-backdrop-filter:blur(8px)!important;
}

html body .modal-foot,
html body .drawer-foot,
html body .cart-footer,
html body .checkout-panel{
  background:linear-gradient(180deg,var(--tv-surface),var(--tv-modal-foot))!important;
  border-color:var(--tv-line)!important;
}

html body .cart-empty,
html body .tv409-empty,
html body .tv410-empty{
  background:var(--tv-surface-2)!important;
  color:var(--tv-text)!important;
  border-color:var(--tv-line)!important;
}

/* BOTÓN ÚNICO DÍA/NOCHE */
html body #themeBtn,
html body #themeBtn.tv-theme-switch-v425{
  appearance:none!important;
  -webkit-appearance:none!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:9px!important;
  width:auto!important;
  min-width:138px!important;
  min-height:54px!important;
  height:54px!important;
  padding:7px 14px 7px 8px!important;
  border:1px solid var(--tv-line-strong)!important;
  border-radius:999px!important;
  background:linear-gradient(135deg,#fff8df,#ffd27b)!important;
  color:#231505!important;
  box-shadow:0 14px 30px rgba(86,48,7,.15), inset 0 1px 0 rgba(255,255,255,.70)!important;
  cursor:pointer!important;
  user-select:none!important;
  -webkit-tap-highlight-color:transparent!important;
  touch-action:manipulation!important;
  overflow:hidden!important;
}

html[data-theme="dark"] body #themeBtn{
  background:linear-gradient(135deg,#171411,#33251a)!important;
  color:#fff5e8!important;
  box-shadow:0 16px 34px rgba(0,0,0,.34), inset 0 1px 0 rgba(255,255,255,.08)!important;
}

html body #themeBtn .tv-theme-track-v425{
  position:relative!important;
  flex:0 0 auto!important;
  width:58px!important;
  height:32px!important;
  padding:3px!important;
  border-radius:999px!important;
  background:linear-gradient(135deg,#ffb73d,#ff8d18)!important;
  box-shadow:inset 0 2px 7px rgba(80,42,0,.28)!important;
  overflow:hidden!important;
}

html[data-theme="dark"] body #themeBtn .tv-theme-track-v425{
  background:linear-gradient(135deg,#0d1020,#303a5e)!important;
  box-shadow:inset 0 2px 9px rgba(0,0,0,.42)!important;
}

html body #themeBtn .tv-theme-thumb-v425{
  position:absolute!important;
  left:4px!important;
  top:4px!important;
  width:24px!important;
  height:24px!important;
  border-radius:999px!important;
  display:grid!important;
  place-items:center!important;
  background:#fffaf0!important;
  color:#8a4500!important;
  font-size:13px!important;
  line-height:1!important;
  box-shadow:0 5px 14px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.86)!important;
  transform:translateX(0)!important;
  transition:transform .22s ease, background .22s ease, color .22s ease!important;
}

html[data-theme="dark"] body #themeBtn .tv-theme-thumb-v425{
  transform:translateX(26px)!important;
  background:#f4f7ff!important;
  color:#111827!important;
}

html body #themeBtn .tv-theme-label-v425{
  display:grid!important;
  gap:2px!important;
  text-align:left!important;
  line-height:1!important;
  pointer-events:none!important;
}

html body #themeBtn .tv-theme-label-v425 b{
  color:inherit!important;
  font-size:13px!important;
  font-weight:1000!important;
  letter-spacing:-.02em!important;
}

html body #themeBtn .tv-theme-label-v425 small{
  color:color-mix(in srgb,currentColor 72%, transparent)!important;
  font-size:9.5px!important;
  font-weight:900!important;
  text-transform:uppercase!important;
  letter-spacing:.08em!important;
}

/* desactiva restos de botones creados por la v424 anterior */
html body #themeBtnV424{
  display:none!important;
}

html body #themeBtn:focus-visible{
  outline:3px solid var(--tv-focus)!important;
  outline-offset:3px!important;
}

html body #themeBtn.is-switching .tv-theme-thumb-v425{
  transition-duration:.12s!important;
}

/* Microinteracciones */
html body button:not(:disabled),
html body a{
  transition:transform .14s ease, box-shadow .14s ease, background-color .18s ease, color .18s ease, border-color .18s ease!important;
}

@media (hover:hover){
  html body #themeBtn:hover,
  html body .tv-business-action-v420:hover,
  html body .product:hover,
  html body .category:hover{
    transform:translateY(-1px)!important;
  }
}

html body :focus-visible{
  outline-color:var(--tv-focus)!important;
}

/* Responsive */
@media (max-width:980px){
  html body #themeBtn{
    width:100%!important;
    min-width:0!important;
    min-height:43px!important;
    height:43px!important;
    gap:7px!important;
    padding:5px 9px!important;
    border-radius:15px!important;
  }

  html body #themeBtn .tv-theme-track-v425{
    width:49px!important;
    height:27px!important;
  }

  html body #themeBtn .tv-theme-thumb-v425{
    width:21px!important;
    height:21px!important;
    top:3px!important;
    left:3px!important;
    font-size:12px!important;
  }

  html[data-theme="dark"] body #themeBtn .tv-theme-thumb-v425{
    transform:translateX(22px)!important;
  }

  html body #themeBtn .tv-theme-label-v425 b{
    font-size:11px!important;
  }

  html body #themeBtn .tv-theme-label-v425 small{
    display:none!important;
  }
}

@media (max-width:390px){
  html body #themeBtn{
    gap:5px!important;
    padding-inline:6px!important;
  }

  html body #themeBtn .tv-theme-track-v425{
    width:45px!important;
    height:25px!important;
  }

  html body #themeBtn .tv-theme-thumb-v425{
    width:19px!important;
    height:19px!important;
  }

  html[data-theme="dark"] body #themeBtn .tv-theme-thumb-v425{
    transform:translateX(20px)!important;
  }

  html body #themeBtn .tv-theme-label-v425 b{
    font-size:10px!important;
  }
}

@media (prefers-reduced-motion: reduce){
  html,
  html body,
  html body *{
    transition-duration:.01ms!important;
    animation-duration:.01ms!important;
  }
}
