/* ==========================================================================
   Camomila Vintage — folha de estilo partilhada
   Paleta ativa: Camomila Clássica · Estilo: Vintage Elegante
   ========================================================================== */

:root {
  --color-yellow: #F4C430;
  --color-white: #FFFDF7;
  --color-accent: #8A9A5B;
  --color-accent-dark: #5F6B3E;
  --color-text: #3A2E22;
  --color-text-muted: #8A7B68;
  --color-border: #E8DCC0;
  --color-surface: #FBF6E7;
  --color-story-bg: #FBF3D9;

  --font-title: "Playfair Display", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;

  --radius: 16px;
  --radius-pill: 999px;

  --container-max: 1312px;
  --pad-page: 64px;
  --gap-grid: 24px;
}

@media (max-width: 900px) {
  :root {
    --pad-page: 20px;
    --gap-grid: 16px;
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-white);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img, svg { display: block; max-width: 100%; }

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

ul { list-style: none; margin: 0; padding: 0; }

h1, h2, h3, p { margin: 0; }

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--pad-page);
}

/* -------------------------------------------------------------------------
   Barra de anúncio + Header
   ------------------------------------------------------------------------- */

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px var(--pad-page);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-white);
  position: relative;
}

.logo {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 24px;
  color: var(--color-text);
}

.nav {
  display: flex;
  gap: 32px;
}

.nav a {
  font-size: 14px;
  font-weight: 500;
}

.header-icons {
  display: flex;
  align-items: center;
  gap: 18px;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--color-text);
  font-size: 13px;
  font-weight: 500;
  padding: 0;
}

.icon-btn svg { width: 18px; height: 18px; }

.menu-toggle { display: none; }

@media (max-width: 900px) {
  .nav { display: none; }
  .menu-toggle { display: inline-flex; }
}

/* Menu mobile (drawer simples) */
.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 8px var(--pad-page) 20px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-white);
}

.mobile-nav.open { display: flex; }

.mobile-nav a {
  padding: 10px 0;
  font-size: 14px;
  font-weight: 500;
  border-bottom: 1px solid var(--color-border);
}

.mobile-nav a:last-child { border-bottom: none; }

/* -------------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------------- */

.footer {
  background: var(--color-text);
  color: var(--color-border);
  padding: 48px var(--pad-page);
  margin-top: auto;
}

.footer-columns {
  display: flex;
  gap: 80px;
  flex-wrap: wrap;
  padding-bottom: 32px;
}

.footer-columns h4 {
  color: var(--color-white);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 12px;
}

.footer-columns ul li {
  font-size: 13px;
  padding: 4px 0;
}

.footer-columns ul li a:hover {
  text-decoration: underline;
}

.footer-social {
  display: flex;
  align-items: center;
  padding-bottom: 8px;
}

.footer-social-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--color-border);
}

.footer-social-link svg { width: 20px; height: 20px; }
.footer-social-link:hover { text-decoration: underline; color: var(--color-white); }

.footer-placeholder-note {
  display: inline-block;
  margin-top: 24px;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--color-story-bg);
  color: var(--color-text-muted);
  font-size: 13px;
  font-style: italic;
}

@media (max-width: 900px) {
  .footer-columns { flex-direction: column; gap: 24px; }
}

/* -------------------------------------------------------------------------
   Botões / Badges / Chips
   ------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  border: 1.5px solid transparent;
  transition: opacity 0.15s ease;
}

.btn:hover { opacity: 0.88; }

.btn-primary {
  background: var(--color-accent-dark);
  color: var(--color-white);
}

.btn-secondary {
  background: var(--color-white);
  color: var(--color-accent-dark);
  border-color: var(--color-accent-dark);
}

.badge {
  display: inline-block;
  background: var(--color-accent);
  color: var(--color-white);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--color-yellow);
  color: var(--color-text);
  font-size: 12px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  border: none;
}

.link-clear {
  font-size: 12px;
  font-weight: 500;
  color: var(--color-accent-dark);
  background: none;
  border: none;
}

/* -------------------------------------------------------------------------
   Placeholder de imagem
   ------------------------------------------------------------------------- */

.placeholder-img {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--color-yellow);
  border-radius: var(--radius);
  color: var(--color-text);
  text-align: center;
  padding: 12px;
  overflow: hidden;
  border: none;
  font: inherit;
  width: 100%;
}

.placeholder-img svg { width: 26px; height: 26px; opacity: 0.75; }

.placeholder-img span {
  font-size: 11px;
  line-height: 1.3;
}

.placeholder-img.small svg { width: 40%; height: 40%; }
.placeholder-img.small span { display: none; }
.placeholder-img.tint-accent { background: var(--color-accent); color: var(--color-white); }

/* Quando o produto já tem fotos reais, a <img> preenche a mesma caixa da
   placeholder (que continua a definir o tamanho/posição em cada contexto). */
.placeholder-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

/* -------------------------------------------------------------------------
   Grelha de produtos / Product Card
   ------------------------------------------------------------------------- */

.product-grid {
  display: grid;
  grid-template-columns: repeat(var(--cols, 4), 1fr);
  gap: var(--gap-grid);
}

@media (max-width: 900px) {
  .product-grid { --cols: 2 !important; }
}

.product-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.product-card .placeholder-img { aspect-ratio: 1 / 1; width: 100%; }

.product-card .brand-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.5px;
  color: var(--color-accent-dark);
  text-transform: uppercase;
}

.product-card .product-name {
  font-size: 14px;
}

.product-card .price-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
}

.product-card .price {
  font-weight: 500;
  font-size: 15px;
}

.quick-add {
  width: 28px;
  height: 28px;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  border-radius: 50%;
  background: var(--color-accent-dark);
  color: var(--color-white);
  border: none;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.quick-add svg {
  width: 14px;
  height: 14px;
  display: block;
}

.quick-add:disabled {
  background: var(--color-border);
  color: var(--color-text-muted);
  cursor: not-allowed;
}

.product-card.sold-out .placeholder-img { opacity: 0.55; }

.sold-out-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--color-text);
  color: var(--color-white);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.btn:disabled, .btn[disabled] {
  background: var(--color-border);
  border-color: var(--color-border);
  color: var(--color-text-muted);
  cursor: not-allowed;
}

/* -------------------------------------------------------------------------
   Secções genéricas
   ------------------------------------------------------------------------- */

.section {
  padding: 40px var(--pad-page);
}

.content-page {
  max-width: 760px;
  margin: 0 auto;
}
.content-page p + p { margin-top: 4px; }

.section-title {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 32px;
  margin-bottom: 24px;
}

@media (max-width: 900px) {
  .section-title { font-size: 22px; }
}

/* -------------------------------------------------------------------------
   Hero (Homepage)
   ------------------------------------------------------------------------- */

.hero {
  display: flex;
  align-items: center;
  gap: 48px;
  padding: 64px var(--pad-page);
}

.hero-text { flex: 1; display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }

.hero-eyebrow {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 1px;
  color: var(--color-accent-dark);
  text-transform: uppercase;
}

.hero-title {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 56px;
  line-height: 1.1;
}

.hero-body {
  font-size: 15px;
  color: var(--color-text-muted);
  line-height: 1.6;
  max-width: 46ch;
}

.hero-image { flex: 1; }
.hero-image .placeholder-img { width: 100%; height: 460px; }

@media (max-width: 900px) {
  .hero { flex-direction: column; align-items: stretch; padding: 40px var(--pad-page); gap: 24px; }
  .hero-title { font-size: 32px; }
  .hero-image .placeholder-img { height: 280px; }
}

/* Hero alternativo — foto a ocupar o ecrã todo, texto por cima (protótipo em
   index-preview-fullscreen.html, para comparar com o hero atual antes de
   decidir qual fica). Não é usado por nenhuma página publicada. */

.hero-fullscreen {
  position: relative;
  height: 100vh;
  min-height: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-fullscreen-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-fullscreen-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(58, 46, 34, 0.2) 0%, rgba(58, 46, 34, 0.6) 100%);
}

.hero-fullscreen-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
  max-width: 640px;
  padding: 0 24px;
  color: var(--color-white);
}

.hero-fullscreen-content .hero-eyebrow { color: var(--color-yellow); }
.hero-fullscreen-content .hero-title { color: var(--color-white); }
.hero-fullscreen-content .hero-body { color: rgba(255, 253, 247, 0.92); max-width: 50ch; }

@media (max-width: 900px) {
  .hero-fullscreen { height: 92vh; min-height: 480px; }
}

/* Categorias */

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap-grid);
}

.category-tile { display: flex; flex-direction: column; gap: 10px; align-items: center; text-align: center; }
.category-tile .placeholder-img { width: 100%; aspect-ratio: 1 / 1; }
.category-tile span { font-size: 13px; font-weight: 500; }

@media (max-width: 900px) {
  .category-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Sobre a marca */

.brand-story {
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 48px var(--pad-page);
  background: var(--color-story-bg);
}

.brand-story .placeholder-img { flex: 0 0 400px; height: 260px; }
/* Ícone da flor precisa de mais espaço do que os placeholders genéricos (26px)
   para não se perder num borrão — mais específico do que ".placeholder-img svg". */
.brand-story .placeholder-img svg { width: 64px; height: 64px; opacity: 1; }
.brand-story-text { flex: 1; display: flex; flex-direction: column; gap: 14px; }
.brand-story-text h3 { font-family: var(--font-title); font-size: 26px; }
.brand-story-text p { font-size: 14px; line-height: 1.6; max-width: 52ch; }

@media (max-width: 900px) {
  .brand-story { flex-direction: column; }
  .brand-story .placeholder-img { flex: none; width: 100%; height: 220px; }
}

/* Newsletter */

.newsletter {
  background: var(--color-accent-dark);
  color: var(--color-white);
  padding: 48px var(--pad-page);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
}

.newsletter h3 { font-family: var(--font-title); font-size: 22px; }

.newsletter-form {
  display: flex;
  gap: 12px;
}

.newsletter-form input {
  padding: 12px 16px;
  border-radius: 8px;
  border: none;
  font-family: var(--font-body);
  font-size: 13px;
  width: 320px;
  max-width: 60vw;
}

.newsletter-form .btn-secondary {
  background: var(--color-white);
  border: none;
}

.newsletter-form button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.newsletter-message {
  font-size: 13px;
  min-height: 16px;
}

.newsletter-message--success { color: var(--color-white); font-weight: 600; }
.newsletter-message--info { color: var(--color-white); opacity: 0.85; }
.newsletter-message--error { color: #ffd6d6; font-weight: 600; }

/* -------------------------------------------------------------------------
   Catálogo
   ------------------------------------------------------------------------- */

.catalog-title-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 16px;
}

.catalog-title-row .count { font-size: 13px; color: var(--color-text-muted); }

.catalog-body {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

.filters {
  flex: 0 0 240px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.filter-group h5 {
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 12px;
}

.filter-group label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  padding: 4px 0;
}

.filter-group hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 0;
}

.color-swatches { display: flex; gap: 10px; }
.color-swatches .dot {
  width: 22px; height: 22px; border-radius: 50%;
  border: 1px solid var(--color-border);
  padding: 0;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.color-swatches .dot.selected {
  box-shadow: 0 0 0 2px var(--color-white), 0 0 0 4px var(--color-accent-dark);
}

.price-slider {
  position: relative;
  height: 20px;
  margin: 14px 0 8px;
}

.price-slider .track {
  position: absolute;
  top: 8px;
  left: 0;
  right: 0;
  height: 4px;
  border-radius: 2px;
  background: var(--color-border);
  overflow: visible;
}

.price-slider .filled {
  position: absolute;
  top: 0;
  height: 100%;
  background: var(--color-accent-dark);
  border-radius: 2px;
}

.price-slider input[type="range"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 20px;
  margin: 0;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  pointer-events: none;
}

.price-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  pointer-events: auto;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--color-accent-dark);
  border: 2px solid var(--color-white);
  box-shadow: 0 0 0 1px var(--color-border);
  cursor: pointer;
}

.price-slider input[type="range"]::-moz-range-thumb {
  pointer-events: auto;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--color-accent-dark);
  border: 2px solid var(--color-white);
  box-shadow: 0 0 0 1px var(--color-border);
  cursor: pointer;
}

.price-slider input[type="range"]::-moz-range-track {
  background: transparent;
  border: none;
}

.price-range .labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--color-text-muted);
}

.no-results {
  padding: 40px 0;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 14px;
}

.grid-col { flex: 1; display: flex; flex-direction: column; gap: 20px; }

.filter-chips { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.sort-row {
  display: flex;
  justify-content: flex-end;
}

.sort-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  background: var(--color-white);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text);
  cursor: pointer;
}

.mobile-filter-bar { display: none; gap: 12px; }
.mobile-filter-bar button {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  background: none;
  font-size: 13px;
  font-weight: 500;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
}

.pagination .page {
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border);
  font-size: 13px;
  font-weight: 500;
  background: none;
}

.pagination .page.active {
  background: var(--color-accent-dark);
  border-color: var(--color-accent-dark);
  color: var(--color-white);
}

.pagination .page:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pagination .page:not(:disabled):not(.active):hover {
  border-color: var(--color-accent-dark);
}

@media (max-width: 900px) {
  .catalog-body { flex-direction: column; }
  .filters { display: none; }
  .mobile-filter-bar { display: flex; }
}

/* -------------------------------------------------------------------------
   Detalhe do produto
   ------------------------------------------------------------------------- */

.product-detail-top {
  display: flex;
  gap: 48px;
  align-items: flex-start;
}

.gallery { flex: 0 0 560px; display: flex; flex-direction: column; gap: 16px; }
.gallery .placeholder-img.main { width: 100%; aspect-ratio: 1 / 1; }
.thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.thumbs .placeholder-img { aspect-ratio: 1 / 1; cursor: pointer; }
.thumbs .placeholder-img.active-thumb { box-shadow: 0 0 0 2px var(--color-white), 0 0 0 4px var(--color-accent-dark); }

.product-info { flex: 1; display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
.product-info h1 { font-family: var(--font-title); font-size: 28px; }
.product-info .price { font-family: var(--font-body); font-weight: 500; font-size: 22px; }
.product-info .piece-count { margin-top: -14px; font-size: 13px; color: var(--color-text-muted); }
.product-info .description { font-size: 14px; color: var(--color-text-muted); line-height: 1.6; }

.stock-hint {
  display: inline-block;
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: #FDF1D6;
  color: #8A6D1D;
  font-size: 12px;
  font-weight: 500;
}

.product-info .stock-hint { margin-top: -8px; }

.qty-stepper {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--color-border);
}
.qty-stepper button {
  background: none; border: none; font-size: 16px; font-weight: 700; color: var(--color-text);
}
.qty-stepper button:disabled { opacity: 0.3; cursor: not-allowed; }

.accordion { width: 100%; border-top: 1px solid var(--color-border); }
.accordion-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--color-border);
  background: none;
  border-left: none; border-right: none; border-top: none;
  width: 100%;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
}
.accordion-row .chev { transition: transform 0.15s ease; }
.accordion-row[aria-expanded="true"] .chev { transform: rotate(90deg); }
.accordion-panel {
  display: none;
  padding: 0 0 16px;
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.6;
}
.accordion-panel.open { display: block; }

@media (max-width: 900px) {
  .product-detail-top { flex-direction: column; }
  .gallery { flex: none; width: 100%; }
}

/* -------------------------------------------------------------------------
   Carrinho
   ------------------------------------------------------------------------- */

.cart-body { display: flex; gap: 40px; align-items: flex-start; }
.cart-items { flex: 1; display: flex; flex-direction: column; }
.cart-items hr { border: none; border-top: 1px solid var(--color-border); margin: 0; }

.cart-empty {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 64px 20px;
  text-align: center;
  color: var(--color-text-muted);
}

.line-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 0;
}

.line-item .placeholder-img { flex: 0 0 88px; width: 88px; height: 88px; }
.line-item .info { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.line-item .info .name { font-size: 14px; }
.line-item .info .meta { font-size: 12px; color: var(--color-text-muted); }
.line-item .price { font-weight: 500; font-size: 14px; }
.line-item .remove { background: none; border: none; color: var(--color-text-muted); font-size: 14px; }

.qty-mini {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--color-border);
}
.qty-mini button { background: none; border: none; font-weight: 700; }
.qty-mini button:disabled { opacity: 0.3; cursor: not-allowed; }

.order-summary {
  flex: 0 0 360px;
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.order-summary h4 { font-size: 14px; font-weight: 500; }

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}

.summary-row.total { font-size: 16px; font-weight: 700; }

.order-summary hr { border: none; border-top: 1px solid var(--color-border); margin: 0; }

.promo-row { display: flex; gap: 10px; }
.promo-row input {
  flex: 1;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  font-family: var(--font-body);
  font-size: 12px;
}

.continue-link { text-align: center; font-size: 13px; font-weight: 500; color: var(--color-accent-dark); }

@media (max-width: 900px) {
  .cart-body { flex-direction: column; }
  .order-summary { flex: none; width: 100%; }
  .line-item { flex-wrap: wrap; }
  .line-item .info { flex: 1 1 60%; }
  .line-item .qty-price-row { display: flex; justify-content: space-between; align-items: center; width: 100%; margin-top: 4px; }
}

/* -------------------------------------------------------------------------
   Checkout
   ------------------------------------------------------------------------- */

.checkout-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  max-width: 480px;
  margin: 0 auto;
}

.checkout-whatsapp-explainer { display: flex; flex-direction: column; gap: 12px; text-align: center; }
.checkout-whatsapp-explainer h3 { font-family: var(--font-title); font-size: 20px; }
.checkout-whatsapp-explainer p { font-size: 14px; color: var(--color-text-muted); line-height: 1.6; }

.order-summary.checkout { width: 100%; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; color: var(--color-text-muted); font-weight: 500; }
.field input {
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  font-family: var(--font-body);
  font-size: 13px;
}

.field-row { display: flex; gap: 16px; }
.field-row .field { flex: 1; }

.mini-item { display: flex; align-items: center; gap: 12px; }
.mini-item .placeholder-img { flex: 0 0 48px; width: 48px; height: 48px; }
.mini-item .name { flex: 1; font-size: 12px; }
.mini-item .price { font-size: 12px; font-weight: 500; }

.whatsapp-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #25D366;
  border-color: #25D366;
}
.whatsapp-btn:hover { background: #1EBE5A; border-color: #1EBE5A; }

.checkout-sent-note {
  font-size: 12px;
  color: var(--color-text-muted);
  text-align: center;
}

@media (max-width: 900px) {
  .checkout-body { max-width: 100%; }
  .field-row { flex-direction: column; }
}

/* -------------------------------------------------------------------------
   Backoffice (admin.html)
   ------------------------------------------------------------------------- */

.admin-subtitle {
  font-family: var(--font-title);
  font-size: 20px;
  margin: 32px 0 16px;
}

.admin-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 560px;
}

.admin-form textarea, .admin-form select {
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  font-family: var(--font-body);
  font-size: 13px;
  resize: vertical;
}

.admin-error {
  color: #B3261E;
  font-size: 13px;
}

.admin-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
  font-size: 13px;
}

.admin-table th, .admin-table td {
  border: 1px solid var(--color-border);
  padding: 8px;
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  background: var(--color-surface);
  font-weight: 500;
}

.admin-table input, .admin-table textarea, .admin-table select {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 6px 8px;
  font-family: var(--font-body);
  font-size: 13px;
  background: transparent;
}

.admin-table input:focus, .admin-table textarea:focus, .admin-table select:focus {
  border-color: var(--color-border);
  background: var(--color-white);
  outline: none;
}

.admin-row-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  white-space: nowrap;
}

.admin-row-actions .btn {
  padding: 6px 12px;
  font-size: 12px;
}

.admin-row-saved { background: #EAF2E3; transition: background 0.3s ease; }

.admin-row-outofstock td { background: #FBEAE7; }

.order-status {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}
.order-status--pendente { background: #FDF1D6; color: #8A6D1D; }
.order-status--confirmado { background: #EAF2E3; color: var(--color-accent-dark); }
.order-status--devolvido { background: #F3E3E0; color: #A13F2F; }
.order-status--cancelado { background: var(--color-surface); color: var(--color-text-muted); }

.order-row-conflict td { background: #FBEAE7; }

.order-conflict-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  background: #A13F2F;
  color: var(--color-white);
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.admin-hint {
  font-size: 13px;
  color: var(--color-text-muted);
  margin: -8px 0 12px;
}

.admin-taxonomies {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 32px;
}

@media (max-width: 900px) {
  .admin-taxonomies { grid-template-columns: 1fr; }
}

.admin-taxonomy-group h4 {
  font-size: 14px;
  margin-bottom: 10px;
}

.admin-taxonomy-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
  max-height: 260px;
  overflow-y: auto;
}

.admin-taxonomy-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
}

.admin-taxonomy-list li span:first-of-type,
.admin-taxonomy-list li > span {
  flex: 1;
}

.admin-taxonomy-empty {
  color: var(--color-text-muted);
  font-style: italic;
  border-style: dashed !important;
}

.admin-taxonomy-list li .admin-color-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  flex: none !important;
  border: 1px solid var(--color-border);
}

.admin-taxonomy-remove {
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--color-text-muted);
  font-size: 12px;
  flex: none;
}

.admin-taxonomy-form {
  display: flex;
  gap: 8px;
}

.admin-taxonomy-form input[type="text"] {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid var(--color-border);
  font-family: var(--font-body);
  font-size: 13px;
}

.admin-taxonomy-form input[type="color"] {
  width: 36px;
  height: 36px;
  padding: 2px;
  border-radius: 6px;
  border: 1px solid var(--color-border);
  flex: none;
}

.admin-taxonomy-form .btn {
  padding: 6px 14px;
  font-size: 12px;
  flex: none;
}

.admin-photos-row td { background: var(--color-surface); }

.admin-photos-manager {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-photos-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-photo-thumb {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--color-border);
}

.admin-photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.admin-photo-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.6);
  color: var(--color-white);
  font-size: 10px;
  line-height: 1;
  cursor: pointer;
}

.admin-photo-move {
  position: absolute;
  bottom: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.6);
  color: var(--color-white);
  font-size: 10px;
  line-height: 1;
  cursor: pointer;
}

.admin-photo-move:disabled {
  opacity: 0.35;
  cursor: default;
}

.admin-photo-move--left { left: 2px; }
.admin-photo-move--right { right: 2px; }

.admin-photo-cover-badge {
  position: absolute;
  top: 2px;
  left: 2px;
  padding: 1px 5px;
  border-radius: 3px;
  background: var(--color-accent-dark);
  color: var(--color-white);
  font-size: 9px;
  text-align: center;
  pointer-events: none;
}

.admin-photos-empty {
  color: var(--color-text-muted);
  font-style: italic;
  font-size: 13px;
}

.admin-photos-upload {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}

.admin-photos-status { color: var(--color-text-muted); }

.admin-search-input {
  display: block;
  width: 100%;
  max-width: 360px;
  margin-bottom: 16px;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  font-family: var(--font-body);
  font-size: 13px;
}

/* --- Backoffice: separadores (Gestão / Estatísticas) --------------------- */

.admin-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--color-border);
}

.admin-tab-btn {
  padding: 10px 18px;
  border: none;
  background: none;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.admin-tab-btn.is-active {
  color: var(--color-text);
  border-bottom-color: var(--color-accent);
}

/* --- Backoffice: Estatísticas --------------------------------------------- */

.admin-stats-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
  margin-bottom: 24px;
}

.admin-stats-filters .field {
  min-width: 150px;
}

.admin-stats-filters label {
  display: block;
  font-size: 12px;
  color: var(--color-text-muted);
  margin-bottom: 4px;
}

.admin-stats-filters input, .admin-stats-filters select {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  font-family: var(--font-body);
  font-size: 13px;
}

.stats-date-pair {
  display: flex;
  gap: 6px;
}

.stats-date-pair select {
  width: auto;
  min-width: 0;
  flex: 1;
}

.admin-stats-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-card-value {
  font-family: var(--font-title);
  font-size: 22px;
}

.stat-card-label {
  font-size: 12px;
  color: var(--color-text-muted);
}

.stat-card--positive .stat-card-value { color: var(--color-accent-dark); }
.stat-card--negative .stat-card-value { color: #A13F2F; }

.admin-stats-chart-title {
  font-size: 14px;
  margin: 24px 0 12px;
}

.admin-stats-chart-legend {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--color-text-muted);
  margin-bottom: 12px;
}

.admin-stats-chart-legend span::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  margin-right: 6px;
  vertical-align: middle;
}

.legend-faturado::before { background: var(--color-accent); }
.legend-devolvido::before { background: #A13F2F; }

.admin-stats-chart {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  height: 180px;
  padding: 12px 8px 0;
  border-bottom: 1px solid var(--color-border);
  overflow-x: auto;
}

.chart-month {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 44px;
  height: 100%;
  justify-content: flex-end;
  flex-shrink: 0;
}

.chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 100%;
  flex: 1;
}

.chart-bar {
  width: 14px;
  min-height: 2px;
  border-radius: 3px 3px 0 0;
}

.chart-bar--faturado { background: var(--color-accent); }
.chart-bar--devolvido { background: #A13F2F; }

.chart-month-label {
  font-size: 11px;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.admin-stats-table td:nth-child(4), .admin-stats-table td:nth-child(5) {
  white-space: nowrap;
}

.stats-return-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: #F3E3E0;
  color: #A13F2F;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.stats-discard-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  color: var(--color-text-muted);
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}
