@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=Fredoka:wght@400;500;600;700&family=Poppins:wght@400;500;600;700&display=swap');

:root {
  --color-primary: #c9974d;
  --color-primary-dark: #85591e;
  --color-primary-light: #e8c99b;
  --color-bg: #fff8ef;
  --color-surface: #ffffff;
  --color-text: #3a2e22;
  --color-text-muted: #8a7b68;
  --color-footer-bg: #3b362f;
  --color-border: #eadfcb;
  --shadow-sm: 0 2px 8px rgba(58, 46, 34, 0.08);
  --shadow-md: 0 8px 24px rgba(58, 46, 34, 0.12);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --header-height: 350px;
  --gradient-primary: linear-gradient(135deg, #d9ae6e, #b6864a);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.hidden {
  display: none !important;
}

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

/* Header / brinquedos */
.site-header {
  z-index: 1000;
  background:
    radial-gradient(circle at 49% 32%, rgba(255, 255, 255, 0.78), transparent 31%),
    linear-gradient(105deg, #f8e7cc, #fff8ed 47%, #f5dfbd);
  border-bottom: 1px solid rgba(184, 135, 65, 0.2);
  overflow: hidden;
}

.header-showcase {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--header-height);
  isolation: isolate;
}

.header-showcase::before {
  position: absolute;
  z-index: -1;
  width: 360px;
  height: 150px;
  border-radius: 50%;
  background: rgba(255, 250, 239, 0.65);
  box-shadow: 0 0 35px 24px rgba(255, 248, 235, 0.65);
  content: '';
}

.header-showcase::after {
  position: absolute;
  z-index: -1;
  color: #c18a31;
  font-size: 1.55rem;
  opacity: 0.7;
  content: '♡  ✦';
}

.header-showcase::before { right: -3rem; bottom: -5.5rem; }
.header-showcase::after { right: 22%; top: 2.2rem; transform: rotate(8deg); }

.brand--seal {
  position: absolute;
  z-index: 0;
  top: 50%;
  left: max(1.5rem, calc((100% - 1180px) / 2 + 1.5rem));
  display: block;
  width: 260px;
  height: 260px;
  overflow: hidden;
  border-radius: 50%;
  box-shadow: 0 10px 18px rgba(102, 65, 26, 0.2);
  transform: translateY(-50%);
}

.brand__medallion {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: contain;
}

.header-showcase__center {
  z-index: 1;
  width: min(590px, 50vw);
  padding: 2rem 0 3.75rem;
  text-align: center;
}

.header-showcase__sparkles { height: 1.1rem; color: #d19a2e; font-size: 1.8rem; line-height: 1; transform: translateX(28%); }

.header-showcase h1 {
  color: #5b351c;
  font-family: 'DM Serif Display', serif;
  font-size: clamp(3.5rem, 5.4vw, 5.2rem);
  font-weight: 400;
  font-style: italic;
  letter-spacing: -0.045em;
  line-height: 1;
  text-shadow: 0 3px 0 rgba(255, 255, 255, 0.7), 0 5px 8px rgba(86, 48, 20, 0.14);
}

.header-showcase__line {
  width: 66%;
  height: 5px;
  margin: 0.58rem auto 0.8rem;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, #c58a28 10%, #c58a28 90%, transparent);
  transform: rotate(-1deg);
}

.header-pills { display: flex; justify-content: center; align-items: flex-end; gap: 0.55rem; }
.header-pill {
  display: inline-flex;
  align-items: center;
  min-width: 112px;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0 0.6rem 0.55rem;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 18px 18px 9px 9px;
  box-shadow: 0 3px 6px rgba(86, 54, 24, 0.12);
  color: #fff;
  font: 500 0.88rem/1 'Fredoka', sans-serif;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
}
.header-pill:hover { filter: brightness(1.06); transform: translateY(-2px); }
.header-pill.is-active { border-color: #fff; filter: brightness(1.12); box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.35), 0 5px 10px rgba(86, 54, 24, 0.22); transform: translateY(-3px); }
.header-pill span { display: grid; width: 64px; height: 64px; margin-top: -18px; place-items: center; border: 4px solid rgba(255, 255, 255, 0.76); border-radius: 50%; background: inherit; box-shadow: 0 3px 7px rgba(86, 54, 24, 0.16); }
.header-pill i { color: #fff8e8; font-size: 1.9rem; }
.header-pill--sage { background: #9e9b6d; }
.header-pill--coral { background: #cf7650; }
.header-pill--blue { background: #789ca0; }
.header-pill--gold { background: #d49b3e; }
.header-showcase__tagline { position: absolute; bottom: 0.55rem; left: 50%; width: min(720px, 72vw); padding: 0.38rem 1.2rem; border-radius: 999px; background: rgba(255, 247, 231, 0.86); box-shadow: 0 2px 8px rgba(112, 73, 27, 0.1); color: #4e3525; font: 600 0.9rem/1.3 'Poppins', sans-serif; transform: translateX(-50%); }
.header-showcase__tagline i { margin: 0 0.8rem; color: #ca913b; }

.header-showcase__toys {
  position: absolute;
  z-index: -1;
  right: 1rem;
  top: 50%;
  width: min(400px, 31vw);
  mix-blend-mode: multiply;
  opacity: 0.94;
  transform: translateY(-50%);
}

.brand__logo {
  height: 52px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.site-nav--header {
  position: absolute;
  top: 0.7rem;
  right: max(1.5rem, calc((100vw - 1180px) / 2 + 1.5rem));
  gap: 0.55rem;
}

.site-nav a {
  min-height: 36px;
  padding: 0.45rem 0.6rem;
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.7);
  color: #79502d;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  opacity: 0.95;
  transition: opacity 0.2s ease;
}

.site-nav a:hover {
  background: #fffdf8;
  opacity: 1;
}

.site-nav a i {
  font-size: 1.25rem;
}

.cart-btn {
  position: relative;
  background: #c97750;
  border: none;
  color: #fffdf7;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
}

.cart-btn:hover {
  background: #b96a45;
  transform: scale(1.05);
}

.cart-btn__badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #e25c45;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* Hero */
.hero {
  padding: 3.5rem 0 3rem;
  text-align: center;
  background: radial-gradient(circle at top, #fff1dc, var(--color-bg) 70%);
}

.hero__badge {
  width: 220px;
  margin: 0 auto 1.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.hero h1 {
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--color-primary-dark);
  margin-bottom: 0.75rem;
}

.hero p {
  max-width: 520px;
  margin: 0 auto 1.75rem;
  color: var(--color-text-muted);
  font-size: 1.05rem;
}

.hero__content { max-width: 760px; }
.hero__eyebrow { color: var(--color-primary-dark); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.hero__actions { display: flex; justify-content: center; gap: 0.75rem; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.75rem 1.5rem;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
}

.btn--primary {
  background: var(--gradient-primary);
  color: #fff;
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn--ghost {
  background: var(--color-surface);
  color: var(--color-primary-dark);
  border: 1px solid var(--color-border);
}

.btn--ghost:hover {
  background: var(--color-bg);
}

.btn--whatsapp { background: #168b4e; color: #fff; }
.btn--whatsapp:hover { background: #107640; }

.btn--block {
  width: 100%;
}

/* Catalog controls */
.catalog {
  padding: 2.5rem 0 4rem;
}

.catalog__controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 240px;
  max-width: 360px;
}

.search-box i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
}

.search-box input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.95rem;
  background: var(--color-surface);
}

.search-box input:focus {
  outline: none;
  border-color: var(--color-primary);
}

/* Product grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1.75rem;
}

.product-card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.product-card__details-trigger { appearance: none; display: block; width: 100%; padding: 0; color: inherit; text-align: left; font: inherit; background: transparent; border: 0; cursor: pointer; }

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.product-card__media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--color-bg);
}

.product-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.product-card__badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: rgba(255, 255, 255, 0.92);
  color: var(--color-primary-dark);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
}

.product-card__body {
  padding: 0 1.25rem;
  flex: 1;
}

.product-card__title {
  font-size: 1.02rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.product-card__price {
  color: var(--color-primary-dark);
  font-weight: 700;
}

.product-card__actions {
  display: flex;
  gap: 0.6rem;
  padding: 1.25rem;
}

.product-card__actions .btn--primary {
  flex: 1;
}

#load-more-sentinel {
  height: 1px;
}

.empty-state {
  text-align: center;
  color: var(--color-text-muted);
  padding: 3rem 0;
  grid-column: 1 / -1;
}

.error-message {
  background: #fbe7e4;
  color: #a3392a;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
}

.spinner {
  width: 42px;
  height: 42px;
  border: 4px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  margin: 3rem auto;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Modals */
.modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(40, 30, 18, 0.55);
}

.modal__content {
  position: relative;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 520px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-md);
  animation: modalIn 0.25s ease;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.modal__close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  background: none;
  border: none;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--color-text-muted);
  cursor: pointer;
}

.modal__close:hover {
  color: var(--color-text);
}

.product-detail__gallery {
  margin-bottom: 1.25rem;
}

#detail-main-image {
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  border-radius: var(--radius-md);
  background: var(--color-bg);
}

.product-detail__thumbs {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.6rem;
  overflow-x: auto;
}

.product-detail__thumb {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  cursor: pointer;
  overflow: hidden;
}

.product-detail__thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-detail__thumb.is-active {
  border-color: var(--color-primary);
}

#product-detail .tag {
  display: inline-block;
  background: var(--color-bg);
  color: var(--color-primary-dark);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  margin-bottom: 0.6rem;
}

#product-detail .tag--sub {
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  margin-left: 0.4rem;
}

#product-detail h2 {
  margin-bottom: 0.5rem;
}

.product-detail__descricao {
  color: var(--color-text-muted);
  margin-bottom: 1rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.product-detail__price {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-primary-dark);
  margin-bottom: 1.25rem;
}

.quantity-stepper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.quantity-stepper button {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  font-size: 1.2rem;
  cursor: pointer;
}

.quantity-stepper input {
  width: 60px;
  text-align: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.5rem;
  font-family: inherit;
  font-size: 1rem;
}

.modal__content--cart {
  max-width: 560px;
  display: flex;
  flex-direction: column;
}

.modal__content--cart h2 {
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: 45vh;
  overflow-y: auto;
  margin-bottom: 1.25rem;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  background: var(--color-bg);
}

.cart-item img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
}

.cart-item__details {
  flex: 1;
}

.cart-item__details h4 {
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.cart-item__details p {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.cart-item__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cart-item__actions input {
  width: 48px;
  text-align: center;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 0.3rem;
  font-family: inherit;
}

.btn-icon {
  background: none;
  border: none;
  color: #a3392a;
  cursor: pointer;
  font-size: 1rem;
  padding: 0.3rem;
}

.cart-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
  flex-wrap: wrap;
}

.checkout__intro { color: var(--color-text-muted); font-size: 0.9rem; }

.cart-total {
  font-size: 1.05rem;
}

#checkout-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 0.5rem;
}

#checkout-form label {
  font-weight: 600;
  font-size: 0.9rem;
}

#checkout-form input {
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1rem;
}

#checkout-form input:focus {
  outline: none;
  border-color: var(--color-primary);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: var(--color-text);
  color: #fff;
  padding: 0.9rem 1.4rem 2.7rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  z-index: 3000;
  font-size: 0.9rem;
  animation: toastIn 0.25s ease;
}

.toast-cart-action { position: fixed; right: 1.5rem; bottom: 1.65rem; z-index: 3001; padding: 0.25rem; border: 0; background: transparent; color: var(--color-primary-light); font: inherit; font-size: 0.85rem; font-weight: 700; text-decoration: underline; cursor: pointer; }
.mobile-nav { display: none; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid #3a2e22; outline-offset: 3px; }
button:active, .btn:active { transform: scale(0.98); }
button:disabled, .btn:disabled { cursor: not-allowed; opacity: 0.55; }

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Footer */
.site-footer {
  background: var(--color-footer-bg);
  color: #e8dfd2;
  padding: 2.5rem 0;
  margin-top: 2rem;
}

.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.footer__logo {
  height: 60px;
  border-radius: var(--radius-sm);
}

.footer__social {
  display: flex;
  gap: 1rem;
}

.footer__social a {
  color: #e8dfd2;
  font-size: 1.4rem;
  transition: color 0.2s ease;
}

.footer__social a:hover {
  color: var(--color-primary-light);
}

.footer__copy {
  font-size: 0.85rem;
  color: #b6ac9c;
}

.footer__links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem 1.25rem;
  flex-wrap: wrap;
}

.footer__links a,
.site-footer > .container > a {
  color: #cfc4b4;
  font-size: 0.8rem;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.footer__links a:hover,
.site-footer > .container > a:hover {
  color: var(--color-primary-light);
}

.footer__admin-link {
  font-size: 0.75rem;
  color: #8a8074;
  opacity: 0.7;
}

.footer__admin-link:hover {
  opacity: 1;
}

/* Páginas institucionais */
.institutional-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.institutional-header {
  border-bottom: 1px solid rgba(184, 135, 65, 0.2);
  background: linear-gradient(105deg, #f8e7cc, #fff8ed 47%, #f5dfbd);
}

.institutional-header__inner {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.institutional-main {
  width: 100%;
  flex: 1;
  display: grid;
  place-items: center;
  padding-top: 4rem;
  padding-bottom: 4rem;
}

.institutional-card {
  width: min(100%, 680px);
  padding: clamp(2rem, 5vw, 3.5rem);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-md);
  text-align: center;
}

.institutional-card__icon {
  width: 64px;
  height: 64px;
  display: grid;
  margin: 0 auto 1rem;
  place-items: center;
  border-radius: 50%;
  background: #f6e7cf;
  color: var(--color-primary-dark);
  font-size: 1.5rem;
}

.institutional-card__eyebrow {
  margin-bottom: 0.35rem;
  color: var(--color-primary-dark);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.institutional-card h1 {
  margin-bottom: 1.25rem;
  color: #5b351c;
  font-family: 'DM Serif Display', serif;
  font-size: clamp(2.25rem, 6vw, 3.4rem);
  font-weight: 400;
  line-height: 1.1;
}

.institutional-card p:not(.institutional-card__eyebrow) {
  max-width: 560px;
  margin: 0 auto 1rem;
  color: var(--color-text-muted);
}

.institutional-card .btn {
  margin-top: 0.75rem;
}
