/* Catalog styles — uses CSS vars from theme.css */

/* Hero placeholder */
.hero__placeholder {
  background: var(--color-surface);
  border: 2px dashed var(--color-border);
  border-radius: var(--border-radius);
  padding: 3rem 2rem;
  text-align: center;
  margin-bottom: 2rem;
  color: var(--color-text-muted);
}

/* Section titles */
.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--color-text);
}

.product-section { margin-bottom: 3rem; }

/* Product grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

@media (max-width: 1024px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 640px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: .625rem; }
}

/* Product card */
.product-card {
  background: var(--color-background);
  border: 1px solid #e5e7eb;
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: box-shadow 0.2s ease, opacity 0.2s ease;
}

.product-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.1); }

.product-card__link { text-decoration: none; color: inherit; display: block; }

.product-card__image {
  position: relative;
  aspect-ratio: 3 / 4;
  background: var(--color-surface);
  overflow: hidden;
}

.product-card__slide {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  background: #fff;
  opacity: 1;
  transition: opacity 0.6s ease;
}

.product-card__slide--hidden {
  opacity: 0;
}

.product-card__no-image {
  display: flex; align-items: center; justify-content: center;
  height: 100%; color: var(--color-text-muted); font-size: .875rem;
}

.product-card__badge {
  position: absolute; top: .75rem; left: .75rem;
  padding: .2rem .5rem;
  font-size: .7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em;
  border-radius: 2px;
}

.product-card__badge--sale     { background: var(--color-danger); color: #fff; }
.product-card__badge--esgotado { background: rgba(0,0,0,.55); color: #fff; }

/* Card info */
.product-card__info { padding: .875rem .75rem 1rem; }

.product-card__colors {
  display: inline-block;
  font-size: .7rem;
  color: var(--color-text-muted);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: .15rem .55rem;
  border-radius: 2px;
  margin-bottom: .4rem;
  letter-spacing: .02em;
}

.product-card__name {
  font-size: .8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin: 0 0 .35rem;
  line-height: 1.3;
  color: var(--color-text);
}

/* Price inside card */
.product-card__price { display: flex; flex-direction: column; gap: .1rem; }

.price--compare {
  text-decoration: line-through;
  color: var(--color-text-muted);
  font-size: .75rem;
}

.price--installment {
  font-size: .75rem;
  color: var(--color-text-muted);
  margin: 0;
}

.price--current {
  font-size: .9375rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
}

.price--large    { font-size: 1.5rem; }
.price--from     { display: block; font-size: .75rem; color: var(--color-text-muted); }
.price--unavailable { color: var(--color-text-muted); font-size: .875rem; }

/* Breadcrumb */
.breadcrumb {
  display: flex; align-items: center; gap: .5rem;
  font-size: .875rem; margin-bottom: 1.5rem;
  padding-top: 1.75rem;
  color: var(--color-text-muted);
}

.breadcrumb a { color: var(--color-primary); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb__sep { color: var(--color-border); }

/* Catalog layout: sidebar + main */
.catalog-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2rem;
  align-items: start;
}

/* Botão de toggle de filtros — oculto no desktop */
.filter-toggle-btn {
  display: none;
}

@media (max-width: 768px) {
  .catalog-layout {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  /* Sidebar: sem sticky no mobile */
  .catalog-sidebar {
    position: static !important;
    top: auto !important;
  }

  /* Botão "Filtros" visível no mobile */
  .filter-toggle-btn {
    display: flex;
    align-items: center;
    gap: .5rem;
    width: 100%;
    padding: .75rem 1rem;
    background: #fff;
    border: 1px solid rgba(0,0,0,.12);
    border-radius: 6px;
    font-size: .875rem;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #000;
  }
  .filter-toggle-chevron {
    margin-left: auto;
    transition: transform .25s;
  }
  .filter-toggle-btn[aria-expanded="true"] .filter-toggle-chevron {
    transform: rotate(180deg);
  }

  /* Painel de filtros: colapsado por padrão no mobile */
  .filter-body {
    display: none;
    padding-top: .75rem;
  }
  .filter-body.is-open {
    display: block;
  }
}

/* Sidebar */
.catalog-sidebar { position: sticky; top: 1rem; }

.filter-group { margin-bottom: 1.5rem; }

.filter-group__title {
  display: block; font-weight: 600; font-size: .875rem;
  margin-bottom: .5rem; color: var(--color-text);
}

.filter-list { list-style: none; }
.filter-list li { margin-bottom: .25rem; }
.filter-list--sub { padding-left: 1rem; margin-top: .25rem; }

.filter-list__link {
  text-decoration: none; color: var(--color-text-muted);
  font-size: .875rem; transition: color .15s;
}

.filter-list__link:hover, .filter-list__link--active {
  color: var(--color-primary); font-weight: 600;
}

.filter-checkbox {
  display: flex; align-items: center; gap: .5rem;
  font-size: .875rem; cursor: pointer; color: var(--color-text-muted);
}

.filter-checkbox input { accent-color: var(--color-primary); }

.price-range { display: flex; align-items: center; gap: .5rem; }
.price-range__input { width: 80px; }

/* Catalog header */
.catalog-header { margin-bottom: 1rem; }
.catalog-count { font-size: .875rem; color: var(--color-text-muted); }

/* Pagination */
.pagination {
  display: flex; align-items: center; justify-content: center; gap: 1rem;
  margin-top: 2rem; padding-top: 2rem; border-top: 1px solid var(--color-border);
}

.pagination__btn {
  padding: .5rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  text-decoration: none; color: var(--color-primary);
  font-size: .875rem;
}

.pagination__info { font-size: .875rem; color: var(--color-text-muted); }

/* Empty state */
.empty-state {
  text-align: center; padding: 4rem 2rem;
  color: var(--color-text-muted);
}

/* ── Catalog page title ──────────────────────────────────────────── */
h1.catalog-page-title,
.catalog-page-title {
  font-size: .9rem !important;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  color: var(--color-text-muted) !important;
}

/* ── Sidebar refinements ─────────────────────────────────────────── */
.catalog-sidebar {
  position: sticky;
  top: 90px;
}

.filter-group { margin-bottom: 1.75rem; }

/* Campo de busca com ícone */
.search-field {
  position: relative;
}
.search-field__input {
  padding-right: 2.5rem;
}
.search-field__btn {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-muted);
  transition: color .15s;
}
.search-field__btn:hover { color: var(--color-text); }

.filter-clear-link {
  display: block;
  margin-top: .5rem;
  font-size: .8rem;
  color: var(--color-text-muted);
  text-decoration: underline;
  cursor: pointer;
}
.filter-clear-link:hover { color: var(--color-text); }

/* ── Numeração bar ───────────────────────────────────────────────── */
.size-bar {
  display: flex;
  align-items: center;
  gap: .875rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.size-bar__label {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--color-text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.size-bar__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.size-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 36px;
  padding: 0 12px;
  border: 1.5px solid #e5e7eb;
  border-radius: 6px;
  background: #fafafa;
  color: var(--color-text);
  font-size: .8125rem;
  font-weight: 600;
  font-family: var(--font-family);
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s, box-shadow .15s;
  line-height: 1;
  letter-spacing: .02em;
  -webkit-appearance: none;
  appearance: none;
}

.size-pill:hover {
  border-color: #374151;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}

.size-pill--active {
  background: var(--color-text, #1e293b);
  border-color: var(--color-text, #1e293b);
  color: #fff;
  box-shadow: none;
}

.size-bar__clear {
  font-size: .75rem;
  color: var(--color-text-muted);
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-family);
  padding: 0;
  text-decoration: underline;
  white-space: nowrap;
  -webkit-appearance: none;
  appearance: none;
}
.size-bar__clear:hover { color: var(--color-text); }

/* Product detail */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

@media (max-width: 768px) {
  .product-detail { grid-template-columns: 1fr; }
}

/* Gallery */
.product-gallery__main {
  border-radius: var(--border-radius);
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: #fff;
}

.product-gallery__main img { width: 100%; height: 100%; object-fit: contain; }
.product-gallery__no-image {
  display: flex; align-items: center; justify-content: center;
  height: 100%; color: var(--color-text-muted);
}

.product-gallery__thumbs {
  display: flex; gap: .5rem; margin-top: .5rem; flex-wrap: wrap;
}

.product-gallery__thumb {
  width: 70px; height: 70px; object-fit: contain;
  background: #fff;
  border-radius: 4px; border: 2px solid var(--color-border);
  transition: border-color .15s, opacity .15s;
}

.product-gallery__thumb:hover { opacity: 1 !important; }

/* Product info */
.product-info__name { font-size: 1.75rem; font-weight: 700; margin-bottom: .75rem; }
.product-info__short-desc { color: var(--color-text-muted); margin-bottom: 1.25rem; }
.product-info__price { margin-bottom: 1.5rem; }

/* Variations */
.product-variations { margin-bottom: 1.5rem; }

.variation-group { margin-bottom: 1rem; }
.variation-group__label { font-size: .875rem; font-weight: 600; display: block; margin-bottom: .5rem; }

.variation-group__options { display: flex; gap: .5rem; flex-wrap: wrap; }

.variation-btn {
  padding: .375rem .875rem;
  border: 2px solid var(--color-border);
  border-radius: var(--button-border-radius);
  background: transparent; cursor: pointer;
  font-size: .875rem; transition: border-color .15s, background .15s;
}

.variation-btn:hover { border-color: #000; }
.variation-btn.selected { border-color: #000; background: #000; color: #fff; }

/* Stock badge */
.stock-badge { font-size: .8125rem; font-weight: 500; }
.stock-badge--in { color: var(--color-success); }
.stock-badge--out { color: var(--color-danger); }

/* Quantity */
.quantity-row {
  display: flex; align-items: center; gap: .75rem;
  margin: 1rem 0;
}

.quantity-input { width: 80px; }

.btn--large { padding: .875rem 2rem; font-size: 1rem; }
.add-to-cart-btn { width: 100%; justify-content: center; margin-bottom: 1.5rem; }

/* Product description */
.product-info__description { border-top: 1px solid var(--color-border); padding-top: 1.5rem; }
.product-info__description h2 { font-size: 1.125rem; margin-bottom: 1rem; }
.rich-text { line-height: 1.7; color: var(--color-text-muted); }
