:root {
  --bg: #ffc8c8;
  --text: #222;
  --muted: #666;
  --accent-pink: #fddbdf;
  --accent-strong: #ff7a90;
  --accent-green: #8ac6a5;
  --green: #5e8d73;
  --card-shadow: 0 6px 18px rgba(18, 18, 18, 0.06);
  --maxw: 1200px;
  --header-h: 72px;
  font-family: "Inter", system-ui, "-apple-system", "Segoe UI", "Roboto", "Helvetica Neue", Arial;
}

/* garante offset para âncoras considerando o header sticky */
section[id],
h2[id],
[id] {
  scroll-margin-top: calc(var(--header-h) + 8px);
}

/* Base / reset */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

#cat-wrap{
  display: flex;
  justify-content: space-between;
}

@media (max-width: 900px){
 #cat-wrap {
  flex-direction: column;
 }
}

#sidebar {
  background-color: #ffffff9f;
  border-radius: 0px 0px 10px 0px;
  padding: 20px;
  margin-top: 12px;
  width: 280px;
  flex-shrink: 0;
}

#side_items{
  display: flex;
  flex-direction: column;
  gap: 6px;
  list-style: none;
}

.side-item {
  border-radius: 8px;
  padding: 14px;
  cursor: pointer;
}

.side-item:not(:last-child) {
  padding-bottom: 8px;
  border-bottom: 1px solid #f0f0f0;
}


#display-items {
  display: flex;
  flex-direction: column;
}

a {
  text-decoration: none;
  color: inherit;
}

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 16px;
}

.muted {
  color: var(--muted);
}

.center {
  text-align: center;
}

.mb-8 {
  margin-bottom: 32px;
}

/* small pill */
.chip {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #f0f0f0;
  font-weight: 600;
  font-size: 0.9rem;
  text-align: center;
}

/* HEADER */
header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.616);
  backdrop-filter: saturate(120%) blur(6px);
  border-bottom: 1px solid #f0f0f0;
  z-index: 50;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.05rem;
}

.logo-sub {
  color: var(--muted);
  font-weight: 600;
}

/* NAV list */
.head ul {
  display: flex;
  gap: 18px;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

#topo li {
  position: relative;
  padding-bottom: 4px;
}

/* underline animada (direita → esquerda) */
#topo li::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 110%;
  height: 2px;
  background: var(--text);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.45s cubic-bezier(.25, .8, .25, 1);
}

#topo li:hover::after {
  transform: scaleX(1);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--accent-strong);
  color: #fff;
  font-weight: 600;
  transition: transform .12s ease, opacity .12s ease;
  cursor: pointer;
  text-align: center;
  margin-top: 12px;
  border: 1px solid #cacaca;
}

#cartBtn {
  padding: 12px;
}

@media (max-width: 410px){
 .btn{
  padding: 8px 6px;
 } 
}

.btn:hover {
  transform: scale(1.05);
  opacity: 0.88;
}

/* ghost button */
.btn-ghost {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid #eee;
  background: #fff;
  cursor: pointer;
  transition: transform .12s ease;
  margin-top: 12px;
}

.btn-ghost:hover {
  transform: scale(1.05);
}

/* nav actions, menu toggle */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.menu-toggle {
  display: none;
  border: 0;
  background: transparent;
  font-size: 22px;
  cursor: pointer;
}

/* mobile menu */
@media (max-width: 900px) {
  #topo ul {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .menu-toggle:hover {
    transform: scale(1.08);
  }
}

@media (max-width: 900px) {
  #sidebar {
    display: none;
  }

}

/* HERO */
.hero {
  padding: 56px 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 520px;
  gap: 36px;
  align-items: center;
}

.hero h1 {
  font-size: 2.2rem;
  margin: 0 0 12px;
}

.hero-sub {
  margin-bottom: 18px;
}

.hero-ctas {
  display: flex;
  gap: 12px;
}

.card-hero {
  width: 100%;
  height: 320px;
  border-radius: 14px;
  background: #f8f6f7;
  box-shadow: var(--card-shadow);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  padding: 8px;
  border-radius: 20px;
}

@media (max-width:900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .card-hero {
    height: 260px;
  }

  .hero h1 {
    font-size: 1.6rem;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 32px 0;
  }

  .hero h1 {
    font-size: 1.4rem;
  }
}


/* SECTIONS */
section {
  padding: 40px;
}

@media (max-width: 600px){
  section {
    padding: 24px 16px;
  }
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

/* GRIDS */
.grid {
  display: grid;
  gap: 16px;
}

.grid.cols-3 {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.grid.cols-4 {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}


/* CARDS */
.card {
  background: #fff;
  border-radius: 12px;
  padding: 12px;
  box-shadow: var(--card-shadow);
  overflow: hidden;
  max-height: 640px;
}

/* cat-card fixed flex-direction */
.cat-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform .12s ease;
}

.cat-card:hover {
  transform: scale(1.05);
}

/* thumbnail */
.cat-thumb {
  width: 100%;
  height: 120px;
  border-radius: 8px;
  object-fit: cover;
  background: #eee;
}

/* PRODUCT */
.product {
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.11);
  transition: transform .12s ease;
}

.product:hover {
  transform: scale(1.05);
}

.product img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 8px;
}

/* product actions, price */
.product-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.price {
  font-weight: 700;
  color: var(--accent-strong);
}

/* ABOUT */
.about {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 28px;
  align-items: center;
  background-color: #ffffff;
  padding: 16px;
  border-radius: 16px;
}

.about img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

@media (max-width:900px) {
  .about {
    grid-template-columns: 1fr;
  }
}

/* CTA FINAL */
.cta-final {
  display: inline-block;
  padding: 22px;
  border-radius: 16px;
  margin: 0 auto;
}

/* FOOTER */
footer {
  padding: 28px 0;
  background: #fafafa;
  border-top: 1px solid #f0f0f0;
  margin-top: 50px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 16px;
}

@media (max-width:700px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* WHATSAPP FLOAT — mantive cor accent-strong */
.wa-float {
  position: fixed;
  right: 18px;
  bottom: 18px;
  background: var(--accent-strong);
  padding: 8px;
  border-radius: 16px;
  font-size: large;
  font-weight: bold;
  transition: transform .12s ease;
  color: #ffffff;
  cursor: pointer;
}

.wa-float:hover {
  transform: scale(1.08);
}

/* ensure product card grows with image */
.card.product {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

/* product-img-wrap behavior */
.product-img-wrap {
  display: block;
  height: 400px;
  width: 100%;
  overflow: hidden;
}

.product-img-wrap img,
.card.product img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  margin-left: auto;
  margin-right: auto;
}

.card.product h3 {
  min-height: 2.6em;       /* garante espaço igual p/ 1–2 linhas */
}

.card.product .muted {
  min-height: 1.6em;
}

.card.product .price {
  margin-top: auto;        /* empurra ações para baixo */
}

.product-actions {
  margin-top: 8px;
}


/* option to limit image width */
.product-img-wrap img.limited {
  max-width: 320px;
}

.nav-list.nav-open {
  display: flex !important;
  flex-direction: column;
  position: absolute;
  right: 16px;
  top: var(--header-h);
  background: #ffffff;
  padding: 12px;
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
  z-index: 60;
  gap: 8px;
}

/* Modal (visualização rápida / checkout) */
.dm-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 120;
  padding: 20px;
}

.dm-modal {
  width: 94%;
  max-width: 760px;
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
  display: grid;
  gap: 16px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.dm-modal .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.dm-modal .modal-body {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  overflow-y: auto;
  max-height: calc(90vh - 120px);
  -webkit-overflow-scrolling: touch;
}

.dm-modal .modal-body img {
  width: 100%;
  max-width: 260px;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
  flex-shrink: 0;
}

.dm-modal .modal-body>div {
  flex: 1 1 auto;
}

.dm-modal textarea {
  resize: none;
  min-height: 100px;
  max-height: 260px;
  overflow: auto;
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #eee;
  box-sizing: border-box;
}

.dm-modal .modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 6px;
}

.dm-modal .modal-header,
.dm-modal .modal-actions {
  flex-shrink: 0;
}


@media (max-width:900px) {
  .dm-modal {
    max-width: 92%;
    padding: 16px;
  }

  .dm-modal .modal-body {
    flex-direction: column;
    gap: 12px;
  }

  .dm-modal .modal-body img {
    width: 100%;
    height: auto;
    border-radius: 8px;
  }
}

/* catalog grid adjustments */
#catalog-grid {
  display: grid;
  gap: 32px;
  grid-template-columns: repeat(auto-fit, minmax(235px, 240px));
  align-items: start;
  margin-top: 12px;
  justify-content: center;
}

.catalog-page {
  flex: 1;
  display: block;
  justify-content: center;
}

.catalog-container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 16px;
}


/* subtle hover visual on product cards */
.card.product {
  transition: transform .14s ease, box-shadow .14s ease;
}

.card.product:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.06);
}

.btn-color {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid #eee;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.btn-color:hover {
  transform: scale(1.15);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-color.active,
.btn-color.selected,
.btn-color[aria-pressed="true"] {
  border-color: var(--accent-strong);
  box-shadow: 0 0 0 3px rgba(255, 122, 144, 0.35);
}

.btn-color[data-color="branco"],
.btn-color[data-color="white"],
.btn-color[data-color="bege"] {
  border-color: #ccc;
}


/* tooltip base */
.btn-color[data-color] {
  position: relative;
}

/* caixa do tooltip */
.btn-color[data-color]::after {
  content: attr(aria-label);
  position: absolute;
  bottom: 130%;
  left: 50%;
  transform: translateX(-50%);
  background: #111;
  color: #fff;
  font-size: 0.75rem;
  padding: 6px 10px;
  border-radius: 6px;
  white-space: nowrap;

  opacity: 0;
  pointer-events: none;

  transition: opacity 0.1s ease;
}

/* setinha */
.btn-color[data-color]::before {
  content: "";
  position: absolute;
  bottom: 140%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: #111 transparent transparent transparent;

  opacity: 0;
  transition: opacity 0.1s ease;
}

/* delay + exibição */
.btn-color[data-color]:hover::after,
.btn-color[data-color]:hover::before {
  opacity: 1;
  transition-delay: 0.4s; /* ⏱ tempo parado para aparecer */
}

/* ===== FILTER PANEL ===== */

#sidebar {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
  padding: 20px;
  min-width: 260px;
}

/* lista base */
#side_items {
  gap: 40px; /* antes era 50px */
  padding: 0;
  margin: 0;
}

/* título */
.filters-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 8px;
}

/* input de busca */
#searchInput {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #eee;
  font-size: 0.95rem;
  outline: none;
  background: #fff;
}

#searchInput:focus {
  border-color: var(--accent-strong);
}

/* select de categoria */
#categorySelect {
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%),
    linear-gradient(to right, transparent, transparent);

  background-position:
    calc(100% - 18px) calc(50% - 3px),
    calc(100% - 12px) calc(50% - 3px),
    100% 0;

  background-size:
    6px 6px,
    6px 6px,
    2.5em 100%;

  background-repeat: no-repeat;
}

#categorySelect:focus {
  border-color: var(--accent-strong);
}

#categorySelect:hover {
  border-color: #ddd;
}


#categorySelect option {
  font-size: 0.95rem;
  padding: 8px;
}


/* ===== FILTRO: TAMANHOS ===== */

#sizesWrapper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 8px;
}

#sizesWrapper button,
#sizesWrapper .size-btn,
#sizesWrapper label {
  padding: 8px 0;
  border-radius: 10px;
  border: 1px solid #eee;
  background: #fff;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
  user-select: none;
}

#sizesWrapper button:hover,
#sizesWrapper .size-btn:hover,
#sizesWrapper label:hover {
  border-color: var(--accent-strong);
  transform: scale(1.05);
}

#sizesWrapper .active,
#sizesWrapper .selected,
#sizesWrapper [aria-pressed="true"] {
  background: var(--accent-strong);
  color: #fff;
  border-color: var(--accent-strong);
}

/* ===== FILTRO: CORES ===== */

#colorsWrapper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(36px, 1fr));
  gap: 10px;
}

/* ===== TÍTULOS DOS FILTROS ===== */

.filter-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ===== BOTÃO: LIMPAR FILTROS ===== */

.btn-clear {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff;
  border: 1px dashed #ddd;
  color: var(--muted);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-clear:hover {
  scale: 1.03;
}

#clearFilters.clicked {
  background: #e7e7e7;
  scale: 0.97;
}

.btn-clear:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ===== SELECT: CATEGORIAS ===== */

#categorySelect {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  width: 100%;
  padding: 10px 40px 10px 12px;
  border-radius: 12px;
  border: 1px solid #eee;
  background-color: #fff;

  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);

  cursor: pointer;
}

/* ===== FILTROS MOBILE (DRAWER) ===== */

/* barra do botão no mobile */
.filters-mobile-bar {
  display: none;
  margin-bottom: 12px;
}

/* BARRA DE FILTROS MOBILE */
@media (max-width: 900px) {
  .filters-mobile-bar {
    display: flex;
    align-items: center;
    background: var(--accent-pink);
    padding: 12px 16px;
    margin-bottom: 32px;
    border-radius: 24px;
  }

  .btn-filter{
    font-size: 18px;
    font-weight: 600;
    padding: 10px 16px;
    border-radius: 10px;
    border: none;
    background-color: transparent;
  }
}


/* drawer base */
@media (max-width: 900px) {
  #sidebar {
    position: fixed;
    top: var(--header-h);
    left: 0;
    height: calc(100vh - var(--header-h));
    width: 80%;
    max-width: 320px;

    background: #fff;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);

    transform: translateX(-100%);
    transition: transform 0.25s ease;
    z-index: 120;
    display: block; /* sobrescreve o display:none */
  }

  #sidebar.is-open {
    transform: translateX(0);
  }
}

/* FILTROS MOBILE — SCROLL INTERNO */
@media (max-width: 900px) {
  #sidebar {
    height: 100vh;              /* ocupa a altura da tela */
    max-height: 100vh;
    overflow: hidden;           /* impede scroll externo */
  }

  #side-bar-content {
    height: 100%;
    max-height: 100%;
    overflow-y: auto;           /* scroll interno */
    padding-bottom: 96px;       /* espaço extra pro botão */
    -webkit-overflow-scrolling: touch;
  }
}


/* overlay */
.filters-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 110;
}

.filters-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

/* ===== HEADER DO DRAWER (MOBILE) ===== */

.filters-drawer-header {
  display: none;
}

@media (max-width: 900px) {
  .filters-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid #eee;
  }

  .filters-drawer-header strong {
    font-size: 1rem;
    font-weight: 700;
  }

  .filters-drawer-header button {
    background: none;
    border: 0;
    font-size: 1.2rem;
    cursor: pointer;
    line-height: 1;
  }
}

/* ===== HERO SLIDER ===== */

.hero-slider {
  position: relative;
  overflow: hidden;
}

/* trilho */
.hero-slider .slides {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.6s ease;
}

/* cada slide */
.hero-slider .slide {
  min-width: 100%;
  height: 100%;
  object-fit: cover;
}

/* bolinhas */
.slider-dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.slider-dots .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  padding: 0;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35),
              0 2px 6px rgba(0, 0, 0, 0.35);
}

.slider-dots .dot.active {
  background: #ffffff;
}

.slider-dots .dot:hover {
  scale: 1.1;
  transition: 0.2s;
}

/* TOAST — feedback discreto */
.dm-toast {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 200;

  background: #222;
  color: #fff;
  padding: 12px 16px;
  border-radius: 10px;

  font-size: 0.95rem;
  box-shadow: 0 12px 30px rgba(0,0,0,0.25);

  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;

  transition: opacity 0.25s ease, transform 0.25s ease;
}

.dm-toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* mobile: centraliza um pouco melhor */
@media (max-width: 600px) {
  .dm-toast {
    right: 16px;
    left: 16px;
    text-align: center;
  }
}

/* CONTROLE DE QUANTIDADE */
.qty-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}

.qty-control input {
  width: 48px;
  text-align: center;
  padding: 6px;
  border-radius: 6px;
  border: 1px solid #eee;
}

.qty-btn {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: none;
  background: #f0f0f0;
  font-size: 18px;
  cursor: pointer;
}

.qty-btn:active {
  transform: scale(0.95);
}

.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 120;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.cart-overlay.show {
  opacity: 1;
  pointer-events: auto;
}
