/* RELM: visual da listagem (category/search) e da página de produto (product).
   Só CSS: formulários, classes js-*, data-*, componentes da plataforma e checkout intactos.
   O card de produto está em relm-cards.v1.css. Carregado por snipplets/relm/relm-head.tpl. */

/* ---------- Cores do Rio, só nessas páginas (as regras do Rio já usam estas variáveis) ---------- */
.template-category .category-controls,
.template-category .category-body,
.template-category .modal-filters,
.template-category .filters-sidebar,
.template-search .category-controls,
.template-search .category-body,
.template-search .modal-filters,
.template-product #single-product {
  --main-foreground: var(--relm-verde-escuro);
  --accent-color: var(--relm-verde-botao);
  --button-background: var(--relm-verde-botao);
  --button-foreground: var(--relm-creme);
  --label-background: var(--relm-amarelo);
  --label-foreground: var(--relm-verde-escuro);
  font-family: var(--relm-font-text);
  color: var(--relm-verde-escuro);
}

/* =============== Listagem =============== */

/* Cabeçalho da página: título e descrição curta */
.template-category .page-header h1,
.template-search .page-header h1 {
  margin: 0;
  font-family: var(--relm-font-title);
  font-weight: 300;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.1;
  letter-spacing: 0;
  text-transform: none;
  color: var(--relm-verde-escuro);
}
.template-category .breadcrumbs,
.template-search .breadcrumbs { font-size: 13px; opacity: .7; }
.template-category .breadcrumbs a { color: inherit; }
.template-category .relm-category-desc {
  font-size: 16px;
  line-height: 1.6;
  color: var(--relm-verde-escuro);
  opacity: .85;
}
.template-category .relm-category-desc-text { display: block; max-width: 62ch; }

/* Barra de filtros e ordenação (sticky do Rio) */
.template-category .category-controls,
.template-search .category-controls {
  background: var(--relm-creme);
  padding-top: 18px;
  padding-bottom: 14px;
}
.template-category .category-controls .btn-default,
.template-category .category-controls .form-select,
.template-category .modal-filters .btn-default,
.template-category .modal-filters .form-select,
.template-category .container-fluid .btn-default.form-select,
.template-search .category-controls .btn-default,
.template-search .category-controls .form-select {
  border: 1.5px solid rgba(27, 74, 31, .35);
  border-radius: 999px;
  background: transparent;
  color: var(--relm-verde-escuro);
  font-family: var(--relm-font-text);
  font-weight: 600;
  font-size: 14px;
  text-transform: none;
  letter-spacing: 0;
}
.template-category .category-controls .btn-default:hover,
.template-category .container-fluid .btn-default.form-select:hover { border-color: var(--relm-verde-botao); }

/* Barra lateral de filtros (desktop) */
.template-category .filters-sidebar,
.template-search .filters-sidebar { font-family: var(--relm-font-text); color: var(--relm-verde-escuro); }
.template-category .filters-sidebar h5,
.template-search .filters-sidebar h5 {
  font-family: var(--relm-font-title); font-weight: 400; font-size: 20px; letter-spacing: 0; text-transform: none;
  color: var(--relm-verde-escuro);
}
.template-category .filters-sidebar .subtitle,
.template-search .filters-sidebar .subtitle { font-weight: 700; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.template-category .filters-sidebar a,
.template-search .filters-sidebar a { color: var(--relm-verde-escuro); }
.template-category .filters-sidebar .form-control,
.template-search .filters-sidebar .form-control { border-radius: 10px; border-color: rgba(27, 74, 31, .3); }
.template-category .filters-sidebar input[type="checkbox"],
.template-search .filters-sidebar input[type="checkbox"] { accent-color: var(--relm-verde-botao); }

/* Modal / painel de filtros do Rio */
.template-category .modal-filters,
.template-search .modal-filters { background: var(--relm-creme); }
.template-category .modal-filters .subtitle,
.template-search .modal-filters .subtitle {
  font-family: var(--relm-font-text); font-weight: 700; font-size: 13px; letter-spacing: .06em; text-transform: uppercase;
}
.template-category .modal-filters input[type="checkbox"],
.template-category .modal-filters input[type="radio"],
.template-search .modal-filters input[type="checkbox"],
.template-search .modal-filters input[type="radio"] { accent-color: var(--relm-verde-botao); }
.template-category .modal-filters .divider,
.template-search .modal-filters .divider { border-color: rgba(27, 74, 31, .14); }

/* Grade: espaço vertical entre cards */
.template-category .js-product-table,
.template-search .js-product-table { row-gap: 20px; }

/* Paginação e "carregar mais" */
.template-category .js-load-more,
.template-search .js-load-more { border-radius: 999px; padding: 12px 28px; font-weight: 700; }

/* =============== Página de produto =============== */

/* Galeria */
.template-product #single-product .product-image-container .js-swiper-product {
  border-radius: 18px;
  overflow: hidden;
  background: var(--relm-creme-card);
}
.template-product #single-product .swiper-pagination-bullet { background: var(--relm-verde); }

/* Nome e breadcrumbs */
.template-product #single-product .breadcrumbs { font-size: 13px; opacity: .7; }
.template-product #single-product .js-product-name {
  margin: 8px 0 14px;
  font-family: var(--relm-font-title);
  font-weight: 400;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.18;
  letter-spacing: 0;
  text-transform: none;
  color: var(--relm-verde-escuro);
}

/* Preço, Pix e parcelamento */
.template-product #single-product .js-price-display {
  font-family: var(--relm-font-text);
  font-weight: 800;
  font-size: clamp(26px, 2.6vw, 32px);
  color: var(--relm-verde-botao);
}
.template-product #single-product .price-compare { opacity: .55; font-size: 16px; }
.template-product #single-product .product-installments,
.template-product #single-product .item-installments { font-size: 14px; }
.template-product #single-product .js-product-discount-container .text-accent,
.template-product #single-product .js-payment-discount-installments { color: var(--relm-verde-botao); font-weight: 700; }
.template-product #single-product .text-accent { color: var(--relm-verde-botao); }
.template-product #single-product .divider { border-color: rgba(27, 74, 31, .14); opacity: 1; }

/* Selos (oferta, frete grátis) */
.template-product #single-product .label {
  border-radius: 999px; padding: 5px 12px; font-weight: 700; font-size: 12px; letter-spacing: .02em;
}

/* Variações */
.template-product #single-product .form-label { font-weight: 700; font-size: 13px; letter-spacing: .04em; }
.template-product #single-product .btn-variant {
  border: 1.5px solid rgba(27, 74, 31, .3);
  border-radius: 999px;
  background: transparent;
  color: var(--relm-verde-escuro);
  font-weight: 600;
}
.template-product #single-product .btn-variant.selected {
  border-color: var(--relm-verde-botao);
  background: var(--relm-verde-botao);
  color: var(--relm-creme);
}
.template-product #single-product .btn-variant-color.selected { background: transparent; box-shadow: 0 0 0 2px var(--relm-verde-botao); }
.template-product #single-product .js-product-variants .form-select { border-radius: 12px; border-color: rgba(27, 74, 31, .3); }

/* Quantidade */
.template-product #single-product .js-form-quantity-container .form-row {
  border: 1.5px solid rgba(27, 74, 31, .3);
  border-radius: 999px;
  overflow: hidden;
}
.template-product #single-product .js-form-quantity-container input { border: 0; background: transparent; font-weight: 700; text-align: center; }
.template-product #single-product .form-quantity-icon { color: var(--relm-verde-botao); fill: var(--relm-verde-botao); }

/* Botão de compra (input real e o "placeholder" de animação do Rio) */
.template-product #single-product .js-addtocart.btn-primary {
  min-height: 52px;
  border-radius: 999px;
  font-family: var(--relm-font-text);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: .02em;
  text-transform: none;
}
.template-product #single-product .js-addtocart.btn-primary:not(.disabled):hover { background: var(--relm-verde-escuro); }

/* Acordeões (meios de pagamento, frete) */
.template-product #single-product .js-accordion-toggle { color: var(--relm-verde-escuro); text-decoration: none; }
.template-product #single-product .js-accordion-toggle .subtitle { font-weight: 700; font-size: 14px; letter-spacing: .02em; text-transform: none; }

/* Calculadora de frete */
.template-product #single-product .js-shipping-input {
  border: 1.5px solid rgba(27, 74, 31, .3);
  border-radius: 999px;
  background: var(--relm-creme-card);
  color: var(--relm-verde-escuro);
  padding-left: 18px;
}
.template-product #single-product .js-shipping-input:focus { border-color: var(--relm-verde-botao); box-shadow: none; }
.template-product #single-product .btn-secondary {
  border: 1.5px solid var(--relm-verde-botao);
  border-radius: 999px;
  background: transparent;
  color: var(--relm-verde-botao);
  font-weight: 700;
  text-transform: none;
}
.template-product #single-product .btn-secondary:hover { background: var(--relm-verde-botao); color: var(--relm-creme); }
.template-product #single-product .js-shipping-zipcode-help { color: var(--relm-verde-botao); letter-spacing: .04em; }

/* Descrição */
.template-product #single-product .product-description.user-content {
  font-size: 16px;
  line-height: 1.7;
  color: var(--relm-verde-escuro);
}
.template-product #single-product .product-description.user-content :is(h1, h2, h3, h4) {
  font-family: var(--relm-font-title);
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

/* Advertências do rótulo (snipplets/relm/relm-product-warnings.tpl) */
.relm-warnings {
  margin: 28px 0 24px;
  padding: 20px 24px;
  background: var(--relm-creme-card);
  border: 1px solid rgba(27, 74, 31, .16);
  border-left: 4px solid var(--relm-amarelo);
  border-radius: 14px;
  color: var(--relm-verde-escuro);
  font-family: var(--relm-font-text);
}
.relm-warnings-title {
  margin: 0 0 10px;
  font-family: var(--relm-font-text);
  font-weight: 700;
  font-size: 13px;
  line-height: 1.3;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.relm-warnings-list { margin: 0; padding-left: 18px; font-size: 14px; line-height: 1.6; }
.relm-warnings-list li + li { margin-top: 4px; }

/* Produtos relacionados: título da seção */
.template-product .products-section-title {
  font-family: var(--relm-font-title);
  font-weight: 300;
  font-size: clamp(24px, 2.6vw, 34px);
  letter-spacing: 0;
  text-transform: none;
  color: var(--relm-verde-escuro);
}

/* Foco visível */
.template-product #single-product :is(a, button, input, select):focus-visible,
.template-category :is(.category-controls, .modal-filters) :is(a, button, input, select):focus-visible {
  outline: 2px solid var(--relm-verde-botao);
  outline-offset: 2px;
}
