/* ===== FiliPet — cores oficiais do Brandbook (Manual de Identidade Visual) ===== */
:root {
  /* Paleta principal — Brandbook, pág. 09 */
  --gray: #E4E5E4;
  --green: #B7D7A2;
  --teal: #5CBDAE;
  --purple: #6163AA;
  --orange: #EF7B43;

  /* Paleta secundária — Brandbook, pág. 10 */
  --blue: #2C6EAF;
  --pink: #DF1B84;
  --green-dark: #2B8F49;

  /* Tons derivados das cores acima — usados em hover e em textos pequenos,
     onde as cores originais não teriam contraste suficiente */
  --teal-dark: #2E8074;
  --teal-light: #95D4CA;
  --teal-soft: #E2F3F0;
  --orange-dark: #BB4F1B;
  --orange-tint: #F9D1BD;
  --orange-soft: #FDEBE3;

  /* Neutros de interface */
  --ink: #2C3038;
  --muted: #6B7280;
  --bg: #FFFFFF;
  --hover: var(--gray);
  --card: #FFFFFF;
  --line: #D4D6D4;
  --whatsapp: #25D366;
  --whatsapp-dark: #1EB455;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(44, 48, 56, .08);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
}

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

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

[hidden] { display: none !important; }

/* ===== Header ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand { text-decoration: none; }

.brand-name {
  font-size: 26px;
  font-weight: 700;
  color: var(--teal);
  letter-spacing: .3px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  margin-right: 8px;
}

.nav a {
  text-decoration: none;
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 999px;
  transition: all .15s;
}

.nav a:hover { color: var(--teal-dark); background: var(--hover); }

.nav a.active { color: var(--teal-dark); font-weight: 600; }

.cart-button {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--teal);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 15px;
  font-weight: 600;
  position: relative;
  transition: background .15s;
}

.cart-button:hover { background: var(--teal-dark); }

.cart-count {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--orange);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  border: 2px solid var(--card);
}

/* ===== Hero ===== */
.hero {
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-dark) 100%);
  color: #fff;
}

.hero-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 44px 16px 48px;
}

.hero h1 {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 700;
  line-height: 1.25;
  max-width: 640px;
}

.hero h1 span { color: var(--orange-tint); }

.hero p {
  margin-top: 12px;
  max-width: 560px;
  font-size: 15.5px;
  opacity: .94;
}

/* ===== Toolbar (busca + categorias) ===== */
.catalog {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 16px 64px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 22px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 16px;
  flex: 1 1 240px;
  max-width: 380px;
  color: var(--muted);
}

.search-box input {
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 15px;
  width: 100%;
  background: transparent;
  color: var(--ink);
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.chip {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  transition: all .15s;
}

.chip:hover { border-color: var(--teal); color: var(--teal-dark); }

.chip.active {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
}

/* ===== Grade de produtos ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 18px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  transition: transform .15s, box-shadow .15s;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 22px rgba(44, 48, 56, .12);
}

.card-image {
  aspect-ratio: 1 / .85;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity .18s ease;
}

/* Enquanto a foto da nova cor carrega */
.card-image img.is-swapping { opacity: .35; }

.card-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.card-sku {
  font-size: 12px;
  font-weight: 600;
  color: var(--purple);
  letter-spacing: .4px;
  text-transform: uppercase;
}

.card-name { font-size: 16px; font-weight: 600; line-height: 1.35; }

.card-desc {
  font-size: 13.5px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-options { display: flex; gap: 8px; }

.card-options label {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.card-options .qty-option { flex: 0 0 62px; }

.card-options select {
  font-family: inherit;
  font-size: 14px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  outline-color: var(--teal);
}

.card-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 4px;
}

.card-price { font-size: 18px; font-weight: 700; color: var(--teal-dark); }

.add-button {
  background: var(--orange);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 600;
  transition: background .15s;
  white-space: nowrap;
}

.add-button:hover { background: var(--orange-dark); }

.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 40px 16px;
  font-size: 15.5px;
}

/* ===== Rodapé ===== */
.footer {
  background: var(--ink);
  color: #cfd4da;
  text-align: center;
  padding: 36px 16px;
  font-size: 14.5px;
}

.footer-brand {
  display: block;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
}

.footer-contact { margin-top: 6px; }

.footer-contact a { color: var(--teal-light); text-decoration: none; }

/* ===== Carrinho (drawer) ===== */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 24, 30, .45);
  z-index: 90;
}

.cart {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(420px, 100vw);
  background: var(--card);
  z-index: 100;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 30px rgba(0, 0, 0, .18);
  animation: slide-in .22s ease;
}

@keyframes slide-in {
  from { transform: translateX(40px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.cart-header h2 { font-size: 19px; }

.icon-button {
  background: none;
  border: none;
  font-size: 18px;
  color: var(--muted);
  padding: 6px 10px;
  border-radius: 8px;
}

.icon-button:hover { background: var(--hover); color: var(--ink); }

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 8px 20px;
}

.cart-item {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.cart-item-image {
  width: 64px;
  height: 64px;
  border: 1px solid var(--line);
  border-radius: 10px;
  object-fit: contain;
  background: #fff;
  flex-shrink: 0;
}

.cart-item-info { flex: 1; min-width: 0; }

.cart-item-name { font-size: 14px; font-weight: 600; line-height: 1.3; }

.cart-item-variant { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

.cart-item-price { font-size: 14px; font-weight: 700; color: var(--teal-dark); margin-top: 4px; }

.cart-item-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.qty-control {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.qty-control button {
  background: none;
  border: none;
  width: 30px;
  height: 30px;
  font-size: 16px;
  font-weight: 600;
  color: var(--teal-dark);
  border-radius: 999px;
}

.qty-control button:hover { background: var(--hover); }

.qty-control span {
  min-width: 26px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
}

.remove-button {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 12.5px;
  text-decoration: underline;
}

.remove-button:hover { color: var(--pink); }

.cart-footer {
  border-top: 1px solid var(--line);
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--card);
}

.cart-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 16px;
}

.cart-total strong { font-size: 22px; color: var(--teal-dark); }

.whatsapp-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--whatsapp);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 14px;
  font-size: 15.5px;
  font-weight: 700;
  transition: background .15s;
}

.whatsapp-button:hover { background: var(--whatsapp-dark); }

.clear-button {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 13.5px;
  text-decoration: underline;
  padding: 4px;
}

.clear-button:hover { color: var(--pink); }

/* ===== Toast ===== */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 500;
  z-index: 120;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .25);
  animation: toast-in .2s ease;
  max-width: calc(100vw - 32px);
  text-align: center;
}

@keyframes toast-in {
  from { transform: translate(-50%, 12px); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}

/* ===== Home: hero ===== */
.hero-home .hero-inner { padding: 64px 16px 72px; }

.hero-compact .hero-inner { padding: 28px 16px 32px; }

.hero-compact p { font-size: 14.5px; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.button-primary,
.button-ghost,
.button-light {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  padding: 12px 26px;
  font-size: 15.5px;
  font-weight: 600;
  text-decoration: none;
  transition: all .15s;
}

.button-primary { background: var(--orange); color: #fff; }

.button-primary:hover { background: var(--orange-dark); }

.button-ghost {
  border: 2px solid rgba(255, 255, 255, .7);
  color: #fff;
}

.button-ghost:hover { background: rgba(255, 255, 255, .14); }

.button-light { background: #fff; color: var(--orange-dark); }

.button-light:hover { background: var(--orange-soft); }

/* ===== Home: seções ===== */
.section { padding: 64px 16px; }

.section-alt { background: var(--teal-soft); }

.section-inner { max-width: 1120px; margin: 0 auto; }

.section-kicker {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 8px;
}

.section h2 {
  font-size: clamp(22px, 3.2vw, 30px);
  line-height: 1.3;
  margin-bottom: 14px;
}

/* Sobre */
.about {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 40px;
  align-items: center;
}

.about-image img {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow);
}

.about-text p { color: var(--muted); margin-bottom: 12px; }

.about-text .button-primary { margin-top: 10px; }

/* Destaques */
.featured-grid { margin-top: 24px; }

.featured-card { text-decoration: none; color: inherit; }

.featured-card .card-body { gap: 6px; }

.section-cta { text-align: center; margin-top: 28px; }

/* Banner de personalização */
.banner-custom {
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 100%);
  color: #fff;
}

.banner-custom-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 40px 16px;
  flex-wrap: wrap;
}

.banner-custom-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .18);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.banner-custom-icon img { width: 34px; filter: brightness(0) invert(1); }

.banner-custom-text { flex: 1; min-width: 240px; }

.banner-custom-text h2 { font-size: clamp(20px, 2.8vw, 26px); margin-bottom: 6px; }

.banner-custom-text p { opacity: .95; font-size: 15px; max-width: 640px; }

/* Contato */
.contact { text-align: center; }

.contact > p { color: var(--muted); max-width: 520px; margin: 0 auto; }

.contact-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-top: 28px;
}

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px 32px;
  min-width: 190px;
  text-decoration: none;
  color: var(--ink);
  transition: transform .15s, box-shadow .15s;
}

.contact-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 22px rgba(44, 48, 56, .12);
}

.contact-card svg { color: var(--teal); }

.contact-card strong { font-size: 15.5px; }

.contact-card span { font-size: 14px; color: var(--muted); }

/* ===== Carregamento do catálogo ===== */
.data-banner {
  background: var(--orange-soft);
  border: 1px solid var(--orange-tint);
  color: var(--orange-dark);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 18px;
  font-size: 14px;
  line-height: 1.5;
}

.skeleton-card { pointer-events: none; }

.skeleton-body {
  padding: 14px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.skeleton-box {
  background: linear-gradient(90deg, var(--gray) 25%, #F1F2F1 50%, var(--gray) 75%);
  background-size: 400% 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
  border-radius: 8px;
}

.skeleton-image { aspect-ratio: 1 / .85; border-radius: 0; }

.skeleton-line { height: 13px; }

.skeleton-line.curta { width: 55%; }

@keyframes skeleton-shimmer {
  from { background-position: 100% 0; }
  to { background-position: 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  .skeleton-box { animation: none; }
}

/* ===== Tabela de medidas ===== */
.size-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  background: none;
  border: none;
  padding: 2px 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--teal-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.size-link:hover { color: var(--orange-dark); }

#size-overlay { z-index: 110; }

.size-modal {
  position: fixed;
  z-index: 120;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(760px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .28);
  padding: 24px;
  animation: size-in .18s ease;
}

@keyframes size-in {
  from { opacity: 0; transform: translate(-50%, -46%); }
  to { opacity: 1; transform: translate(-50%, -50%); }
}

.size-close {
  position: absolute;
  top: 14px;
  right: 14px;
}

.size-content h3 {
  font-size: 19px;
  line-height: 1.3;
  padding-right: 40px;
  margin-bottom: 6px;
}

.size-intro {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 18px;
}

.size-caption {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--orange);
  margin: 22px 0 8px;
}

.size-caption:first-child { margin-top: 0; }

.size-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.size-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  white-space: nowrap;
}

.size-table th,
.size-table td {
  padding: 9px 12px;
  text-align: center;
  border-bottom: 1px solid var(--line);
}

.size-table thead th {
  position: sticky;
  top: 0;
  background: var(--teal-soft);
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .3px;
  text-transform: uppercase;
  white-space: normal;
}

.size-table tbody th {
  font-weight: 700;
  color: var(--purple);
}

.size-table tbody tr:last-child th,
.size-table tbody tr:last-child td { border-bottom: none; }

.size-table tbody tr:nth-child(even) { background: #FAFBFA; }

.size-table tbody tr:hover { background: var(--teal-soft); }

/* Coluna de raças: texto longo, pode quebrar linha */
.size-table td:last-child { white-space: normal; min-width: 220px; }

.size-notes {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.size-notes p {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
  margin-bottom: 8px;
}

.size-notes p:last-child { margin-bottom: 0; }

body.no-scroll { overflow: hidden; }

/* ===== Mobile ===== */
@media (max-width: 560px) {
  .brand-name { font-size: 22px; }
  .header-inner { flex-wrap: wrap; padding: 10px 12px; gap: 8px; }
  .nav { margin: 0 auto; order: 3; width: 100%; justify-content: center; }
  .nav a { font-size: 14px; padding: 6px 10px; }
  .cart-button span:not(.cart-count) { display: none; }
  .cart-button { padding: 10px 12px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .card-options { flex-direction: column; }
  .card-footer { flex-direction: column; align-items: stretch; }
  .card-price { text-align: center; }
  .add-button { width: 100%; }
  .section { padding: 44px 16px; }
  .about { grid-template-columns: 1fr; gap: 24px; }
  .contact-card { flex: 1 1 100%; }
  .size-modal { padding: 20px 16px; width: calc(100vw - 20px); max-height: calc(100vh - 24px); }
  .size-content h3 { font-size: 17px; }
  .size-table { font-size: 12.5px; }
  .size-table th, .size-table td { padding: 8px 10px; }
}
