:root {
  color-scheme: light;
  --tuca-orange: #ff6b00;
  --tuca-orange-dark: #cc5500;
}

html { scroll-behavior: smooth; }
html.dark { color-scheme: dark; background: #020617; }
body { font-family: Inter, ui-sans-serif, system-ui, sans-serif; }
html.dark body { background-color: #020617; color: #e2e8f0; }
[hidden] { display: none !important; }

/* Cabeçalho compartilhado */
.site-header,
.site-header button,
.site-header a { box-sizing: border-box; }
.site-header { position: relative; z-index: 50; background: #fff; box-shadow: 0 2px 10px rgba(17,24,39,.08); color: #111827; }
.site-header-top { border-bottom: 1px solid #e5e7eb; }
.site-header-inner,
.site-nav-shell { width: min(1280px, calc(100% - 32px)); margin: 0 auto; }
.site-header-inner { min-height: 96px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.site-brand-group,
.site-brand,
.site-actions,
.site-actions a,
.site-actions button,
.site-mobile-actions { display: flex; align-items: center; }
.site-brand { flex-shrink: 0; text-decoration: none; }
.site-brand img { width: 80px; height: 80px; object-fit: contain; margin-right: 8px; border-radius: 16px; }
.site-brand strong { font-size: 36px; line-height: 1; font-weight: 800; letter-spacing: -1.5px; }
.brand-dark { color: #111827; }
.brand-orange { color: var(--tuca-orange); }
.site-segments { display: flex; align-items: center; gap: 16px; margin-left: 14px; padding-left: 14px; border-left: 1px solid #d1d5db; font-size: 14px; font-weight: 600; }
.site-segments a { text-decoration: none; }
.site-segments a:first-child { color: var(--tuca-orange); }
.site-segments a:last-child { color: #4b5563; }
.site-actions { gap: 16px; font-size: 14px; }
.site-actions a,
.site-actions button { display: inline-flex; align-items: center; gap: 5px; border: 0; background: transparent; color: var(--tuca-orange); font: inherit; cursor: pointer; padding: 0; }
.site-actions svg,
.site-mobile-actions svg { width: 17px; height: 17px; }

.site-header .tuca-header-cart { appearance: none; position: relative; display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; gap: 7px; width: auto; height: 36px; margin-left: auto; padding: 0; border: 0; background: transparent; color: var(--tuca-orange); font: 500 14px/1 Inter, sans-serif; cursor: pointer; }
.site-header .tuca-header-cart:hover { color: #d95800; }
.site-header .tuca-header-cart-icon { display: block; flex: 0 0 18px; width: 18px; height: 18px; fill: none; stroke: currentColor; }
.site-header .tuca-header-cart-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border: 2px solid #fff; border-radius: 999px; background: var(--tuca-orange); color: #fff; font-size: 11px; font-weight: 800; line-height: 16px; box-shadow: 0 0 0 1px rgba(255,107,0,.18); }

.site-search-wrap { position: relative; }
.site-search-panel { position: absolute; right: 0; top: 30px; width: 320px; padding: 12px; background: #fff; border: 1px solid #e5e7eb; box-shadow: 0 12px 30px rgba(17,24,39,.15); z-index: 80; }
.site-search-panel > div { display: flex; gap: 8px; }
.site-search-panel input { width: 100%; border: 1px solid #d1d5db; padding: 9px 10px; font: inherit; }
.site-search-panel button { padding: 9px 16px !important; background: var(--tuca-orange) !important; color: #fff !important; font-weight: 700 !important; }
.site-search-panel p { margin: 7px 0 0; color: #6b7280; font-size: 11px; }
.site-dark-toggle { gap: 9px !important; padding: 7px 10px !important; border-radius: 999px !important; background: #f3f4f6 !important; color: #374151 !important; }
.site-switch { position: relative; width: 36px; height: 20px; border-radius: 999px; background: #d1d5db; }
.site-switch span { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.25); transition: transform .2s; }
.site-nav { height: 56px; display: flex; align-items: center; justify-content: center; gap: 20px; font-size: 14px; font-weight: 500; }
.site-nav a { display: inline-flex; align-items: center; min-height: 38px; padding: 7px 4px; border: 2px solid transparent; color: #374151; text-decoration: none; white-space: nowrap; }
.site-nav a:hover { color: var(--tuca-orange); border-bottom-color: var(--tuca-orange); }
.site-header .site-nav a[data-nav-static] {
  padding: 7px 4px !important;
  border-color: transparent !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #374151 !important;
  box-shadow: none !important;
}
.site-header .site-nav a[data-nav-static]:hover {
  border-bottom-color: var(--tuca-orange) !important;
  color: var(--tuca-orange) !important;
}
.site-header .cart-header-button,
.site-header .cart-mobile-button,
.site-header [data-cart-open]:not([data-header-cart-primary]) { display: none !important; }
.site-header .nav-current { padding-left: 16px !important; padding-right: 16px !important; border-color: #111827 !important; border-radius: 999px !important; background: #111827 !important; color: #fff !important; box-shadow: 0 7px 18px rgba(17,24,39,.18); }
.site-nav .site-contract,
.site-mobile-nav .site-contract { padding: 8px 20px; border: 0; border-radius: 999px; background: var(--tuca-orange); color: #fff; font-weight: 700; }
.site-nav .site-contract:hover { background: var(--tuca-orange-dark); color: #fff; }
.site-mobile-actions { display: none; gap: 14px; }
.site-mobile-actions button { border: 0; background: transparent; color: var(--tuca-orange); padding: 2px; }
.site-mobile-nav { display: none; }

/* Rodapé compartilhado */
.site-footer { background: #111827; color: #d1d5db; padding: 60px 0 26px; }
.site-footer-inner { width: min(1160px, calc(100% - 40px)); margin: auto; }
.site-footer-grid { display: grid; grid-template-columns: 1.35fr repeat(4,1fr); gap: 34px; }
.site-footer h4 { color: #fff; font-weight: 700; margin: 0 0 14px; }
.site-footer p { margin-top: 16px; color: #d1d5db; line-height: 1.6; }
.site-footer a { display: block; margin: 8px 0; color: inherit; text-decoration: none; font-size: 14px; }
.site-footer a:hover { color: var(--tuca-orange); }
.site-footer .site-footer-brand { display: flex; align-items: center; gap: 14px; margin: 0; color: #fff; font-weight: 900; font-size: 25px; }
.site-footer-brand img { width: 64px; height: 64px; object-fit: contain; border: 1px solid rgba(255,255,255,.24); border-radius: 16px; padding: 5px; background: rgba(255,255,255,.06); box-shadow: 0 7px 20px rgba(0,0,0,.18); }
.site-footer-brand span { color: var(--tuca-orange); }
.site-footer-bottom { border-top: 1px solid #303847; margin-top: 40px; padding-top: 22px; font-size: 13px; }

/* Carrinho compartilhado */
.cart-drawer[hidden], .cart-backdrop[hidden] { display: none !important; }
.cart-backdrop { position: fixed; inset: 0; z-index: 9998; background: rgba(17,24,39,.55); backdrop-filter: blur(2px); }
.cart-drawer { position: fixed; z-index: 9999; top: 0; right: 0; width: min(440px,100%); height: 100dvh; display: grid; grid-template-rows: auto 1fr auto; background: #fff; color: #111827; box-shadow: -18px 0 55px rgba(17,24,39,.22); transform: translateX(102%); transition: transform .24s ease; }
.cart-drawer.open { transform: translateX(0); }
.cart-open { overflow: hidden; }
.cart-head { display: flex; align-items: center; justify-content: space-between; padding: 24px; border-bottom: 1px solid #e5e7eb; }
.cart-head h2 { margin: 2px 0 0; font-size: 28px; font-weight: 700; }
.cart-kicker { color: var(--tuca-orange); text-transform: uppercase; letter-spacing: .12em; font-size: 11px; font-weight: 800; }
.cart-close { border: 0; background: #f3f4f6; width: 40px; height: 40px; border-radius: 50%; font-size: 28px; line-height: 1; cursor: pointer; }
.cart-items { overflow: auto; padding: 6px 24px; }
.cart-item { display: grid; grid-template-columns: 1fr auto; gap: 16px; padding: 20px 0; border-bottom: 1px solid #e5e7eb; }
.cart-item strong, .cart-item small, .cart-item span { display: block; }
.cart-item small { margin: 5px 0 10px; color: #6b7280; }
.cart-item span { color: var(--tuca-orange); font-weight: 800; }
.cart-item-actions { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 14px; }
.cart-qty { display: flex; align-items: center; border: 1px solid #d1d5db; border-radius: 999px; overflow: hidden; }
.cart-qty button { width: 34px; height: 32px; border: 0; background: #f9fafb; font-size: 19px; cursor: pointer; }
.cart-qty b { min-width: 28px; text-align: center; font-size: 13px; }
.cart-remove { border: 0; background: transparent; color: #b42318; text-decoration: underline; cursor: pointer; }
.cart-footer { padding: 22px 24px 26px; border-top: 1px solid #e5e7eb; box-shadow: 0 -10px 30px rgba(17,24,39,.04); }
.cart-total { display: flex; justify-content: space-between; align-items: center; font-size: 18px; }
.cart-total strong { font-size: 24px; }
.cart-footer p { color: #6b7280; font-size: 12px; line-height: 1.5; }
.cart-checkout { display: block; padding: 14px 18px; border-radius: 12px; background: var(--tuca-orange); color: #fff !important; text-align: center; text-decoration: none; font-weight: 800; }
.cart-checkout:hover { background: #d95800; }
.cart-checkout.disabled { pointer-events: none; opacity: .45; }
.cart-empty { padding: 50px 10px; text-align: center; }
.cart-empty strong { font-size: 20px; }
.cart-empty p { color: #6b7280; }
.cart-empty a { color: var(--tuca-orange); font-weight: 800; }

/* Recursos compartilhados */
.wa-float { position: fixed; right: 22px; bottom: 22px; z-index: 80; display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; background: #22c55e; color: #fff; box-shadow: 0 12px 30px rgba(20,83,45,.32); }
.wa-float svg { width: 31px; height: 31px; fill: currentColor; }
.large-text { font-size: 118%; }
.dark-mode { color-scheme: dark; }
.dark-mode .site-header,
.dark-mode .site-mobile-nav,
.dark-mode .cart-drawer { background: #121b2b; color: #eef2f7; }
.dark-mode .site-header-top,
.dark-mode .site-mobile-nav,
.dark-mode .cart-head,
.dark-mode .cart-item,
.dark-mode .cart-footer { border-color: #30394a; }
.dark-mode .site-header .brand-dark,
.dark-mode .site-header .site-segments a:last-child,
.dark-mode .site-header .site-nav a,
.dark-mode .site-mobile-nav a,
.dark-mode .site-mobile-nav button { color: #eef2f7; }
.dark-mode .site-switch { background: var(--tuca-orange); }
.dark-mode .site-switch span { transform: translateX(16px); }
.dark-mode .site-header .nav-current { background: var(--tuca-orange) !important; border-color: var(--tuca-orange) !important; }
.dark-mode .site-header .site-nav a[data-nav-static] { background: transparent !important; color: #eef2f7 !important; }
.dark-mode .cart-close,
.dark-mode .cart-qty button { background: #202a3a; color: #eef2f7; }
.dark-mode .cart-item small,
.dark-mode .cart-footer p { color: #aeb8c8; }

/* O seletor no <html> aplica o tema antes mesmo do body terminar de carregar. */
html.dark .site-header,
html.dark .site-mobile-nav,
html.dark .cart-drawer { background: #121b2b; color: #eef2f7; }
html.dark .site-header-top,
html.dark .site-mobile-nav,
html.dark .cart-head,
html.dark .cart-item,
html.dark .cart-footer { border-color: #30394a; }
html.dark .site-header .brand-dark,
html.dark .site-header .site-segments a:last-child,
html.dark .site-header .site-nav a,
html.dark .site-mobile-nav a,
html.dark .site-mobile-nav button { color: #eef2f7; }
html.dark .site-header .nav-current { background: var(--tuca-orange) !important; border-color: var(--tuca-orange) !important; }
html.dark .site-header .site-nav a[data-nav-static] { background: transparent !important; color: #eef2f7 !important; }
html.dark .site-dark-toggle,
html.dark .cart-close,
html.dark .cart-qty button { background: #202a3a !important; color: #eef2f7 !important; }
html.dark .site-switch { background: var(--tuca-orange); }
html.dark .site-switch span { transform: translateX(16px); }
html.dark .site-search-panel { background: #111827; border-color: #374151; box-shadow: 0 12px 30px rgba(0,0,0,.45); }
html.dark .site-search-panel input { background: #0f172a; border-color: #475569; color: #f8fafc; }
html.dark .site-search-panel p,
html.dark .cart-item small,
html.dark .cart-footer p,
html.dark .cart-empty p { color: #aeb8c8; }
html.dark .site-header .tuca-header-cart-count { border-color: #121b2b; }

/* Ajustes dos componentes legados da home que possuem gradiente próprio. */
html.dark .page-index #offersSection .offer-card {
  background: linear-gradient(180deg,#111827 0%,#111827 72%,#1c1917 100%);
  border-color: rgba(251,146,60,.28) !important;
}

@media (max-width: 1050px) {
  .site-actions > a,
  .site-actions > .accessibility-tool { display: none; }
  .site-nav { gap: 12px; }
}
@media (max-width: 900px) {
  .site-footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 800px) {
  .site-header-inner { min-height: 82px; gap: 10px; }
  .site-brand-group { min-width: 0; }
  .site-brand img { width: 52px; height: 52px; }
  .site-brand strong { font-size: 24px; }
  .site-segments, .site-actions { display: none; }
  .site-header .tuca-header-cart { width: 32px; height: 32px; margin-left: auto; }
  .site-header .tuca-header-cart > span:not(.tuca-header-cart-count) { display: none; }
  .site-header .tuca-header-cart-count { position: absolute; top: -7px; right: -8px; }
  .site-mobile-actions { display: flex; align-items: center; gap: 10px; }
  .site-nav { display: none; }
  .site-mobile-nav { position: absolute; left: 0; right: 0; top: 82px; background: #fff; padding: 18px 20px; border-top: 1px solid #e5e7eb; box-shadow: 0 16px 30px rgba(17,24,39,.15); }
  .site-mobile-nav:not(.hidden) { display: flex; flex-direction: column; gap: 4px; }
  .site-mobile-nav a,
  .site-mobile-nav button { display: block; width: 100%; padding: 10px 12px; border: 0; border-radius: 8px; background: transparent; color: #374151; text-align: left; font: inherit; text-decoration: none; }
  .site-header .site-mobile-nav a[data-nav-static] { padding: 10px 12px !important; border: 0 !important; border-radius: 8px !important; background: transparent !important; box-shadow: none !important; }
  .site-mobile-nav .site-contract { text-align: center; background: var(--tuca-orange); color: #fff; }
  .cart-item { grid-template-columns: 1fr; }
  .cart-item-actions { flex-direction: row; align-items: center; }
}
@media (max-width: 600px) {
  .site-footer-grid { grid-template-columns: 1fr; }
}
