:root {
  --bg: #0b0b0c;
  --panel: #141416;
  --ink: #f4efe6;
  --muted: #9a9388;
  --line: #2a2926;
  --gold: #d7b56d;
  --red: #c44536;
  --card: #1b1b1e;
  --navbar-height: 76px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--ink); }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  font-family: "DM Sans", sans-serif;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-image:
    radial-gradient(1200px 500px at 10% -10%, rgba(215, 181, 109, 0.08), transparent 50%),
    radial-gradient(800px 400px at 90% 0%, rgba(196, 69, 54, 0.08), transparent 45%);
}
body.nav-open { overflow: hidden; }

.app {
  display: grid;
  grid-template-columns: minmax(260px, 320px) 1fr;
  grid-template-rows: auto 1fr auto;
  grid-template-areas:
    "nav nav"
    "side main"
    "foot foot";
  flex: 1;
  min-height: 100vh;
}

.navbar {
  grid-area: nav;
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 12px 20px;
  padding-top: max(12px, env(safe-area-inset-top));
  border-bottom: 1px solid var(--line);
  background: rgba(11, 11, 12, 0.96);
  backdrop-filter: blur(14px);
}
.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
  flex: 0 0 auto;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}
.menu-toggle span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: currentColor;
  border-radius: 2px;
}
.navbar .search {
  margin: 0;
  flex: 1;
  max-width: 420px;
  margin-left: auto;
}

.nav-backdrop {
  display: none;
}

.sidebar {
  grid-area: side;
  border-right: 1px solid var(--line);
  background: rgba(11, 11, 12, 0.92);
  padding: 20px 16px 40px;
  position: sticky;
  top: var(--navbar-height);
  height: calc(100dvh - var(--navbar-height));
  max-height: calc(100dvh - var(--navbar-height));
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.drawer-head { display: none; }

.main { grid-area: main; padding: 28px 32px 48px; }

.brand h1, h2, h3 { font-family: "Bebas Neue", sans-serif; letter-spacing: 0.04em; margin: 0; }
.brand h1 { font-size: 42px; line-height: 0.9; }
.eyebrow { color: var(--gold); text-transform: uppercase; letter-spacing: 0.19em; font-size: 13px; margin: 0 0 8px; }
.lede { color: var(--muted); font-size: 20px; line-height: 1.5; }

.search { display: block; margin: 24px 0 18px; }
.search span { display: block; color: var(--muted); font-size: 11px; margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.12em; }
.search input, .pager button, .close, .drawer-close, .menu-toggle, .to-top {
  font: inherit;
}
.search input {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 16px;
}

.nav { display: grid; gap: 6px; }
.group { border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.group-toggle,
.nav-cat,
.subnav-item {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  text-align: left;
  background: transparent;
  border: 0;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
}
.group-toggle {
  color: var(--muted);
  font-family: "Bebas Neue", sans-serif;
  font-size: 18px;
  letter-spacing: 0.04em;
  padding: 10px 8px 8px;
}
.group-body { display: none; padding-bottom: 8px; }
.group.open .group-body { display: block; }
.nav-cat {
  padding: 7px 8px;
  border-radius: 6px;
  font-size: 14px;
}
.nav-cat:hover,
.subnav-item:hover,
.group-toggle:hover,
.nav-cat.active,
.subnav-item.active { background: #232226; color: var(--gold); }
.nav-item.open > .nav-cat { color: var(--gold); }
.chevron {
  width: 8px;
  height: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 160ms ease;
  flex: 0 0 auto;
}
.group.open > .group-toggle .chevron,
.nav-item.open > .nav-cat .chevron { transform: rotate(45deg); }
.subnav {
  display: grid;
  gap: 1px;
  margin: 2px 0 8px 12px;
  padding-left: 8px;
  border-left: 1px solid var(--line);
}
.subnav-item {
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 13px;
  color: #d4cdc3;
}
.subnav-item small {
  color: var(--muted);
  font-size: 11px;
}
.subnav-status {
  margin: 0;
  padding: 6px 8px;
  color: var(--muted);
  font-size: 12px;
}

.toolbar { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 24px; }
.toolbar h2 { font-size: 48px; }
.meta { color: var(--muted); display: grid; gap: 4px; text-align: right; font-size: 13px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  color: inherit;
  padding: 0;
  font: inherit;
  display: grid;
}
.card:hover { border-color: var(--gold); transform: translateY(-2px); transition: 160ms ease; }
.card img {
  width: 100%;
  aspect-ratio: 1 / 1.15;
  object-fit: cover;
  background: #111;
}
.card .body { padding: 12px 14px 16px; }
.card .brand { color: var(--gold); font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; }
.card .title { margin: 6px 0 10px; font-size: 15px; line-height: 1.35; }
.card .row { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 12px; }
.badge { color: var(--red); }

.skeleton-card {
  pointer-events: none;
  cursor: default;
}
.skeleton-card:hover { border-color: var(--line); transform: none; }
.skeleton {
  display: block;
  background: linear-gradient(90deg, #1b1b1e 25%, #2a2926 37%, #1b1b1e 63%);
  background-size: 400% 100%;
  animation: shimmer 1.2s ease-in-out infinite;
  border-radius: 6px;
}
.skeleton-img { aspect-ratio: 1 / 1.15; border-radius: 0; }
.skeleton-photo {
  width: 100%;
  aspect-ratio: 1 / 1.15;
  border-radius: 12px;
}
.skeleton-line { height: 12px; margin: 8px 0; width: 88%; }
.skeleton-line.short { width: 42%; height: 10px; }
.skeleton-line.tiny { width: 28%; height: 10px; }
.skeleton-line.title { width: 70%; height: 22px; margin: 10px 0 16px; }
.skeleton-nav { height: 14px; margin: 8px; width: 78%; }
@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}

.empty {
  grid-column: 1 / -1;
  padding: 48px 12px;
  color: var(--muted);
  text-align: center;
}
.retry-wrap {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
}
.retry {
  background: var(--gold);
  color: #111;
  border: 0;
  border-radius: 999px;
  padding: 8px 16px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.pager { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.pager button {
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
  cursor: pointer;
  font-weight: 700;
}
.pager button:hover { border-color: var(--gold); color: var(--gold); }
.pager button.active {
  background: var(--gold);
  border-color: var(--gold);
  color: #111;
}
.close {
  background: var(--gold);
  color: #111;
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 700;
}

.detail {
  width: min(920px, calc(100vw - 32px));
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  border-radius: 18px;
  padding: 0;
}
.detail::backdrop { background: rgba(0, 0, 0, 0.72); }
.detail-body { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 24px; padding: 28px; }
.gallery img { width: 100%; border-radius: 12px; background: #0b0b0c; margin-bottom: 8px; }
.info h3 { font-size: 34px; margin-bottom: 16px; }
.info h4 {
  font-family: "Bebas Neue", sans-serif;
  letter-spacing: 0.06em;
  margin: 0 0 10px;
  font-size: 20px;
  color: var(--gold);
}
.info dl { display: grid; gap: 10px; margin: 0 0 18px; }
.info dl div { display: flex; justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
dt { color: var(--muted); }
.sizes {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.sizes th, .sizes td {
  text-align: left;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.sizes th { color: var(--muted); font-weight: 500; }
.sizes td:last-child, .sizes th:last-child { text-align: right; }
.sizes tr.oos td { color: var(--red); }
.close { position: absolute; top: 14px; right: 14px; }

.site-footer {
  grid-area: foot;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 18px 24px;
  padding-bottom: max(18px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(11, 11, 12, 0.96);
}
.footer-label {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.footer-socials {
  display: flex;
  align-items: center;
  gap: 10px;
}
.social-link {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--panel);
  transition: 160ms ease;
}
.social-link svg { width: 20px; height: 20px; }
.social-link:hover { transform: translateY(-2px); }
.social-link.whatsapp:hover {
  color: #25d366;
  border-color: #25d366;
}
.social-link.instagram:hover {
  color: #e1306c;
  border-color: #e1306c;
}

.to-top {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 40;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: var(--gold);
  color: #111;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: 180ms ease;
}
.to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}
.to-top:hover { filter: brightness(1.08); }
.to-top svg { width: 22px; height: 22px; }
body.nav-open .to-top { opacity: 0; pointer-events: none; }

@media (max-width: 900px) {
  :root { --navbar-height: 118px; }
  .app {
    grid-template-columns: 1fr;
    grid-template-areas:
      "nav"
      "main"
      "foot";
  }
  .navbar {
    display: grid;
    grid-template-columns: 44px 1fr;
    grid-template-areas:
      "menu brand"
      "search search";
    align-items: center;
    gap: 10px 12px;
    padding: 10px 12px 12px;
    padding-top: max(10px, env(safe-area-inset-top));
  }
  .menu-toggle {
    display: flex;
    grid-area: menu;
  }
  .navbar .brand { grid-area: brand; }
  .brand h1 { font-size: 28px; }
  .eyebrow { font-size: 11px; letter-spacing: 0.14em; }
  .navbar .search {
    grid-area: search;
    max-width: none;
    margin-left: 0;
  }
  .search span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

  .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 55;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
  }
  body.nav-open .nav-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(320px, 88vw);
    height: 100dvh;
    max-height: none;
    z-index: 60;
    transform: translateX(-105%);
    transition: transform 220ms ease;
    padding: max(16px, env(safe-area-inset-top)) 16px 24px;
    border-right: 1px solid var(--line);
    box-shadow: 12px 0 40px rgba(0, 0, 0, 0.35);
  }
  body.nav-open .sidebar { transform: translateX(0); }
  .drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
  }
  .drawer-head .eyebrow { margin: 0; }
  .drawer-close {
    background: transparent;
    color: var(--muted);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px 12px;
    cursor: pointer;
  }

  .main { padding: 18px 14px 40px; }
  .toolbar {
    flex-direction: column;
    align-items: start;
    gap: 8px;
    margin-bottom: 16px;
  }
  .toolbar h2 { font-size: 28px; line-height: 1; }
  .meta { text-align: left; font-size: 12px; }
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .card .title { font-size: 13px; }
  .card .body { padding: 10px 10px 12px; }
  .card .row { font-size: 11px; flex-wrap: wrap; }
  .pager { gap: 6px; margin-top: 20px; }
  .pager button { min-width: 38px; height: 38px; padding: 0 8px; }

  .detail {
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
    overflow: auto;
    border-radius: 14px;
  }
  .detail-body {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 52px 16px 20px;
  }
  .info h3 { font-size: 26px; }
  .close { top: 10px; right: 10px; padding: 8px 12px; }
}
