/* Tema "Oferta": página de oferta clara, bordas finas, preço e economia em destaque.
   Carregado só quando cfg('theme') === 'oferta'; tudo escopado em .theme-oferta.
   --accent / --accent-dark vêm da cor dos botões da loja (button_color) e não são redefinidos aqui. */

.theme-oferta {
  --bg: #ffffff;
  --bg-white: #ffffff;
  --bg-alt: #f3f4f6;
  --bg-soft: #f9fafb;
  --text: #111827;
  --text-soft: #6b7280;
  --dark: #111827;
  --line: #e5e7eb;
  --save: #dc2626;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --heading-spacing: 0;
  --body-spacing: 0;
  --radius-button: 10px;
  --radius-card: 12px;
  --radius-media: 12px;
  --page-width: 1240px;
  --header-h: 64px;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}
.theme-oferta :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Botões ---------- */
.theme-oferta .button { font-size: 14px; letter-spacing: .06rem; padding: 0 1.4rem; }
.theme-oferta .button--large { min-height: 52px; font-size: 15px; }
.theme-oferta .button--outline { border-width: 1px; border-color: var(--line); color: var(--text); }
.theme-oferta .button--outline:hover { border-color: var(--text); background: var(--text); color: #fff; }

/* ---------- Header: ☰ + logo à esquerda (centralizado no celular), sacola à direita ---------- */
.theme-oferta .header { border-bottom: 1px solid var(--line); }
.theme-oferta .header__inner { padding-top: 8px; padding-bottom: 8px; min-height: var(--header-h); }
.theme-oferta .header__left [data-open="search-modal"],
.theme-oferta .header__account,
.theme-oferta .header__nav { display: none; }
.theme-oferta .header__logo { padding: 4px 0; }
.theme-oferta .header__logo img { max-height: 44px; }
.theme-oferta .header__logo-text { font-size: 20px; }
.theme-oferta .cart-count { background: var(--accent); }
@media (min-width: 990px) {
  .theme-oferta .header__menu-toggle { display: inline-flex; }
  .theme-oferta .header__inner { grid-template-columns: auto auto 1fr; gap: 12px; padding-top: 10px; padding-bottom: 10px; }
  .theme-oferta .header__logo { text-align: left; }
  .theme-oferta .header__logo img { max-height: 52px; margin: 0; }
  .theme-oferta .header__logo-text { font-size: 24px; }
}
.theme-oferta .announcement { background: var(--dark); }
.theme-oferta .sub-bar { background: var(--accent); font-size: 14px; }
.theme-oferta .menu-drawer__list a { font-size: 16px; border-bottom: 1px solid var(--line); }
.theme-oferta .menu-drawer__list a:hover { background: var(--bg-soft); }

/* ---------- Seções, cards e coleção ---------- */
.theme-oferta .section__title { font-size: 22px; }
@media (min-width: 750px) { .theme-oferta .section__title { font-size: 28px; } }
.theme-oferta .page-title { font-size: 28px; }
@media (min-width: 750px) { .theme-oferta .page-title { font-size: 34px; } }
.theme-oferta .section--alt { background: var(--bg-soft); }
.theme-oferta .card__media { border: 1px solid var(--line); }
.theme-oferta .card__title { font-weight: 500; }
.theme-oferta .card .price__now { font-size: 17px; }
.theme-oferta .badge { background: var(--save); border-radius: 6px; padding: 3px 8px; }
.theme-oferta .badge--soldout { background: #fff; color: var(--text); }
.theme-oferta .badge--promo { background: var(--dark); }
.theme-oferta .feature { background: var(--bg-soft); border: 1px solid var(--line); }
.theme-oferta .collection-card { border: 1px solid var(--line); }
.theme-oferta .facets select { border-color: var(--line); }
.theme-oferta .cart-line__img, .theme-oferta .upsell__img { background: var(--bg-soft); }

/* ---------- Página de produto ---------- */
.theme-oferta .product { padding-top: 20px; }
.theme-oferta .product__grid { gap: 22px; }
.theme-oferta .product__grid > * { min-width: 0; }
@media (min-width: 990px) {
  .theme-oferta .product { padding-top: 36px; }
  .theme-oferta .product__grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 56px; }
  .theme-oferta .product__media { position: sticky; top: calc(var(--header-h) + 24px); }
  .theme-oferta .product__info { position: static; max-width: 560px; }
}
.theme-oferta .product__main { background: #fff; border: 1px solid var(--line); }
.theme-oferta .product__thumbs { flex-wrap: nowrap; gap: 8px; margin-top: 10px; padding-bottom: 4px; scroll-snap-type: x proximity; }
.theme-oferta .product__thumbs li { scroll-snap-align: start; }
.theme-oferta .product__thumbs button { width: 68px; height: 68px; border: 1px solid var(--line); border-radius: 8px; }
.theme-oferta .product__thumbs button[aria-current] { border: 2px solid var(--text); }

.theme-oferta .product__title { font-size: 24px; line-height: 1.25; margin-bottom: 8px; }
@media (min-width: 750px) { .theme-oferta .product__title { font-size: 30px; } }
.theme-oferta .product__rating { margin: 0 0 10px; }
.theme-oferta .price--large { align-items: center; gap: 6px 12px; margin: 6px 0 4px; }
.theme-oferta .price--large .price__now { font-size: 30px; line-height: 1.2; }
@media (min-width: 750px) { .theme-oferta .price--large .price__now { font-size: 34px; } }
.theme-oferta .price--large .price__was { font-size: 17px; }
.theme-oferta .badge--save {
  position: static; display: inline-block; background: var(--save); color: #fff;
  border-radius: 6px; padding: 4px 10px; font-size: 13px; font-weight: 700; letter-spacing: 0; line-height: 1.4;
}
.theme-oferta .product__promo { color: var(--save); }
.theme-oferta .product__tax { margin-bottom: 18px; }
.theme-oferta .product__form { margin-bottom: 18px; gap: 12px; }
.theme-oferta .product__label { font-weight: 600; color: var(--text-soft); }
.theme-oferta .qty { border: 1px solid var(--line); border-radius: var(--radius-button); }

.theme-oferta .product__chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 2px; }
.theme-oferta .product__chips li {
  border: 1px solid var(--line); background: var(--bg-alt); border-radius: 999px;
  padding: 5px 12px; font-size: 13px; font-weight: 600; line-height: 1.4; max-width: 100%; overflow-wrap: anywhere;
}
.theme-oferta .product__ctas { display: grid; gap: 10px; margin-top: 4px; }
.theme-oferta .button--buy { background: var(--dark); border-color: var(--dark); color: #fff; }
.theme-oferta .button--buy:hover { background: #000; border-color: #000; }

.theme-oferta .product__trust {
  display: grid; gap: 10px; margin: 0 0 8px; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--bg-soft); font-size: 14px;
}
.theme-oferta .product__trust li { display: flex; align-items: center; gap: 10px; }
.theme-oferta .product__trust .icon { width: 20px; height: 20px; flex: none; color: var(--accent); }

/* Descrição em largura total, abaixo da grade */
.theme-oferta .product__more { max-width: 880px; margin-top: 36px; padding-top: 32px; border-top: 1px solid var(--line); }
@media (min-width: 750px) { .theme-oferta .product__more { margin-top: 56px; padding-top: 44px; } }
.theme-oferta .product__more .product__desc { margin-bottom: 28px; font-size: 16px; line-height: 1.7; overflow-wrap: anywhere; }
.theme-oferta .rte h2 { font-size: 24px; text-align: center; margin: 1.6em 0 .6em; }
.theme-oferta .rte h3 { font-size: 20px; }
.theme-oferta .rte img { border-radius: var(--radius-media); }
.theme-oferta .accordion { border-color: var(--line); }

/* Blocos da descrição, reforçados */
.theme-oferta .blk { margin: 2em 0; }
.theme-oferta .blk-faq { border: 1px solid var(--line); border-radius: var(--radius-card); padding: 0 18px; }
.theme-oferta .blk-faq details { border-top: 1px solid var(--line); }
.theme-oferta .blk-faq details:first-child { border-top: 0; }
.theme-oferta .blk-faq details:last-child { border-bottom: 0; }
.theme-oferta .blk-faq summary { padding: 16px 0; min-height: 44px; align-items: center; font-family: var(--font-heading); font-weight: 600; font-size: 15px; }
.theme-oferta .blk-faq summary::after { color: var(--text-soft); }
.theme-oferta .blk-faq details > p { color: var(--text-soft); }
.theme-oferta .blk-card { background: var(--bg-soft); border-color: var(--line); padding: 22px 20px; text-align: center; }
.theme-oferta .blk-card h4 { font-size: 15px; text-transform: uppercase; letter-spacing: .04rem; }
.theme-oferta .blk-card p { color: var(--text-soft); font-size: 15px; }
.theme-oferta .blk-split img { border: 1px solid var(--line); }
.theme-oferta .blk-note { background: var(--bg-soft); border: 1px solid var(--line); border-left: 4px solid var(--accent); }

/* Avaliações */
.theme-oferta .reviews { border-top: 0; }
.theme-oferta .reviews .page-width { max-width: 920px; }
.theme-oferta .review__verified { background: var(--bg-alt); }

/* ---------- Barra fixa de compra (celular) ---------- */
.theme-oferta .buybar { display: none; }
@media (max-width: 768px) {
  .theme-oferta .buybar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    display: flex; align-items: center; gap: 12px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
    background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(17, 24, 39, .08);
    animation: buybar-in .2s ease-out;
  }
  .theme-oferta .buybar[hidden] { display: none !important; }
  .theme-oferta .buybar__price { display: grid; line-height: 1.2; flex: none; }
  .theme-oferta .buybar__price strong { font-size: 18px; }
  .theme-oferta .buybar__price s { font-size: 13px; color: var(--text-soft); }
  .theme-oferta .buybar__btn { flex: 1; min-width: 0; min-height: 48px; padding: 0 12px; font-size: 13px; letter-spacing: .03rem; }
  .theme-oferta.has-buybar { padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
  .theme-oferta.has-buybar .scroll-top { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
}
@keyframes buybar-in { from { transform: translateY(100%); } }
@media (prefers-reduced-motion: reduce) { .theme-oferta .buybar { animation: none; } }

/* ---------- Footer claro ---------- */
.theme-oferta .footer { background: var(--bg-soft); color: var(--text); border-top: 1px solid var(--line); }
.theme-oferta .footer__heading { font-size: 13px; text-transform: uppercase; letter-spacing: .06rem; color: var(--text-soft); }
.theme-oferta .footer__payments span { border-color: var(--line); background: #fff; }
.theme-oferta .footer__legal { border-top-color: var(--line); color: var(--text-soft); opacity: 1; }
.theme-oferta .scroll-top { background: var(--dark); }
