:root {
  --ink: #171614;
  --muted: #746f66;
  --paper: #f7f4ed;
  --panel: #fffdfa;
  --espresso: #211713;
  --gold: #9b7440;
  --moss: #263d35;
  --line: rgba(23, 22, 20, 0.12);
  --whatsapp: #1fa855;
  --telegram: #229ed9;
  --shadow: 0 18px 50px rgba(31, 28, 22, 0.11);
  --shell: min(1440px, 100%);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: #d9d7d0;
  color: var(--ink);
  font-family: "Avenir Next", "Helvetica Neue", Helvetica, Arial, sans-serif;
  letter-spacing: 0;
}

.h5-shell {
  width: var(--shell);
  min-height: 100vh;
  margin: 0 auto;
  background:
    linear-gradient(180deg, #fffdfa 0%, var(--paper) 48%, #ebe5d8 100%);
  box-shadow: 0 0 80px rgba(38, 31, 23, 0.13);
}

body[data-page="product"].h5-shell {
  width: min(1180px, 100%);
}

body[data-page="product"] main {
  width: min(1080px, calc(100% - 32px));
}

a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 2px solid rgba(155, 116, 64, 0.34);
  outline-offset: 2px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(23, 22, 20, 0.1);
  background: rgba(255, 253, 250, 0.82);
  backdrop-filter: blur(20px);
}

.brand { display: inline-flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid rgba(155, 116, 64, 0.46);
  background: #fff;
  color: var(--gold);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
}
.brand strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  letter-spacing: 0.08em;
}
.brand small {
  display: block;
  margin-top: 2px;
  color: var(--gold);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.nav { display: flex; align-items: center; gap: 14px; font-weight: 800; }
.nav a, .nav-button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,0.68);
  padding: 8px 12px;
  color: var(--ink);
  cursor: pointer;
}
.language-select {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,0.72);
  color: var(--ink);
  padding: 0 8px;
  font-size: 12px;
  font-weight: 900;
}

main { width: min(1240px, calc(100% - 48px)); margin: 0 auto; }

.hero, .catalog-hero { padding: 38px 0 24px; }

.h5-hero {
  display: block;
  min-height: 330px;
  align-content: end;
}

.catalog-hero { display: block; max-width: 780px; }
.eyebrow {
  color: var(--gold);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}
h1, h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: 0;
}
h1 { margin: 14px 0; max-width: 840px; font-size: clamp(48px, 6.4vw, 92px); line-height: 0.9; }
h2 { margin: 8px 0 0; font-size: clamp(30px, 4vw, 46px); line-height: 1.05; }
.hero-copy p, .catalog-hero p {
  max-width: 620px;
  color: #4a4740;
  font-size: 16px;
  line-height: 1.62;
}
.replica-disclosure,
.catalog-hero .replica-disclosure {
  margin: 18px 0 0;
  max-width: 760px;
  border-left: 3px solid var(--gold);
  border-radius: 4px;
  background: var(--espresso);
  color: #fff8ea;
  padding: 12px 14px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.55;
}
.product-disclosure {
  width: min(1080px, calc(100% - 32px));
  margin: 18px auto 0;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.primary-link, .secondary-link, .contact-link {
  min-height: 48px;
  border-radius: 12px;
  padding: 13px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  font-weight: 900;
  cursor: pointer;
}
.primary-link { background: var(--espresso); color: #fffdfa; }
.secondary-link { border: 1px solid var(--line); background: rgba(255,255,255,0.82); color: var(--ink); }

.story-band {
  margin: 0 0 14px;
  padding: 14px 0;
  border-top: 1px solid rgba(23, 22, 20, 0.12);
  border-bottom: 1px solid rgba(23, 22, 20, 0.08);
  color: #565149;
  line-height: 1.62;
}

.section { padding: 34px 0 82px; }
.compact-section { padding-top: 22px; }
.section-head { margin-bottom: 14px; }
.brand-summary {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 14px;
  padding: 2px 0 10px;
}
.brand-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 253, 250, 0.72);
  color: var(--ink);
  padding: 12px 12px 10px;
  text-align: left;
  cursor: pointer;
  box-shadow: none;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}
.brand-card:hover { transform: translateY(-1px); border-color: rgba(155, 116, 64, 0.42); }
.brand-card strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand-card small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  line-height: 1.32;
  min-height: 32px;
}
.brand-card.is-active {
  background: var(--moss);
  color: #fffdfa;
  border-color: var(--moss);
}
.brand-card.is-active small { color: rgba(255,253,250,0.7); }
.brand-chips { padding-bottom: 8px; }
.filters, .feed-tools {
  display: grid;
  grid-template-columns: 1fr 0.56fr;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255,253,250,0.72);
}
.search-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}
.filters input, .filters select, .feed-tools input, .feed-tools select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fffdfa;
  padding: 0 12px;
}
.search-button {
  min-height: 42px;
  border: 0;
  border-radius: 5px;
  background: var(--espresso);
  color: #fffdfa;
  padding: 0 16px;
  font-weight: 900;
  cursor: pointer;
}
.filters input:focus,
.filters select:focus,
.feed-tools input:focus,
.feed-tools select:focus {
  border-color: rgba(155, 116, 64, 0.46);
  box-shadow: 0 0 0 3px rgba(155, 116, 64, 0.1);
  outline: 0;
}

.chip-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 14px;
  scrollbar-width: none;
}
.chip-row::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,253,250,0.74);
  color: #3a2b20;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}
.chip.is-active {
  background: var(--moss);
  color: #fffdfa;
  border-color: var(--moss);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}
.product-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  box-shadow: 0 12px 28px rgba(35, 31, 25, 0.045);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}
.product-card:hover {
  transform: translateY(-2px);
  border-color: rgba(155, 116, 64, 0.35);
  box-shadow: 0 18px 36px rgba(35, 31, 25, 0.075);
}
.product-card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: #ede7dc;
  display: block;
}
.product-card-body { padding: 10px; }
.product-card h3 { min-height: 48px; margin: 0 0 9px; font-size: 13px; line-height: 1.32; }
.meta { color: var(--muted); font-size: 12px; line-height: 1.5; }
.empty-state { color: var(--muted); line-height: 1.6; }
[hidden] { display: none !important; }
.catalog-loading {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.catalog-loading span {
  min-height: 260px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: linear-gradient(110deg, rgba(255,253,250,0.66), rgba(234,223,206,0.82), rgba(255,253,250,0.66));
  background-size: 220% 100%;
  animation: loading-sheen 1.5s ease-in-out infinite;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 0;
}
.page-button {
  min-width: 38px;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,253,250,0.82);
  color: var(--ink);
  font-weight: 900;
  cursor: pointer;
}
.page-button.is-active {
  background: var(--moss);
  color: #fffdfa;
  border-color: var(--moss);
}
.page-button:disabled {
  opacity: 0.42;
  cursor: default;
}
.page-gap {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.product-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.72fr);
  gap: 28px;
  padding: 22px 0 96px;
  align-items: start;
  min-width: 0;
}
.product-loading {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.72fr);
  gap: 28px;
  align-items: start;
  width: 100%;
}
.loading-media,
.loading-copy {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(110deg, rgba(255,253,250,0.66), rgba(234,223,206,0.82), rgba(255,253,250,0.66));
  background-size: 220% 100%;
  animation: loading-sheen 1.5s ease-in-out infinite;
}
.loading-media {
  aspect-ratio: 4 / 5;
  box-shadow: var(--shadow);
}
.loading-copy {
  padding: 20px;
  min-height: 220px;
}
.loading-copy span,
.loading-copy strong,
.loading-copy p {
  display: block;
  max-width: 100%;
  color: transparent;
  border-radius: 999px;
  background: rgba(43, 28, 20, 0.11);
}
.loading-copy span {
  width: 118px;
  height: 12px;
  margin-bottom: 22px;
}
.loading-copy strong {
  width: min(310px, 82%);
  height: 36px;
  margin-bottom: 16px;
}
.loading-copy p {
  width: min(420px, 100%);
  height: 18px;
}
@keyframes loading-sheen {
  0% { background-position: 140% 0; }
  100% { background-position: -80% 0; }
}
.product-detail > *,
.product-media,
.detail-copy,
.inquiry-actions,
.contact-link {
  min-width: 0;
}
.gallery-main {
  width: 100%;
  border: 0;
  padding: 0;
  border-radius: 8px;
  overflow: hidden;
  background: #eadfce;
  box-shadow: var(--shadow);
  aspect-ratio: 4 / 5;
  cursor: zoom-in;
}
.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.thumbs {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}
.thumbs::-webkit-scrollbar { display: none; }
.thumb-button {
  border: 0;
  padding: 0;
  background: transparent;
  border-radius: 6px;
  cursor: zoom-in;
  flex: 0 0 auto;
}
.thumbs img {
  width: 82px;
  height: 82px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}
.detail-gallery {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
  overflow: hidden;
}
.detail-gallery summary {
  min-height: 46px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-weight: 900;
}
.detail-gallery summary span {
  color: var(--gold);
}
.all-thumbs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 0 10px 12px;
}
.all-thumbs .thumb-button,
.all-thumbs img {
  width: 100%;
}
.all-thumbs img {
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}
.detail-copy {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,0.72);
  padding: 20px;
  align-self: start;
  position: sticky;
  top: 86px;
}
.detail-copy h1 { font-size: clamp(34px, 9vw, 46px); }
.description { color: #453a31; line-height: 1.75; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0; }
.tag {
  border: 1px solid rgba(184, 138, 68, 0.34);
  border-radius: 999px;
  color: #5f4a31;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 800;
}
.inquiry-actions { display: grid; gap: 10px; margin-top: 22px; }
.contact-link.whatsapp { background: var(--whatsapp); color: #fff; }
.contact-link.telegram { background: var(--telegram); color: #fff; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  place-items: center;
  padding: 18px;
  background: rgba(25,20,15,0.62);
}
.modal.is-open { display: grid; }
.modal-card {
  width: min(430px, 100%);
  border-radius: 10px;
  background: var(--panel);
  padding: 28px;
  box-shadow: var(--shadow);
  position: relative;
}
.close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
}
.contact-list { display: grid; gap: 10px; margin-top: 18px; }

.floating-contact {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  z-index: 35;
  width: min(448px, calc(100% - 32px));
  min-height: 52px;
  border: 0;
  border-radius: 999px;
  background: var(--espresso);
  color: #fff7e8;
  box-shadow: 0 16px 36px rgba(25, 20, 15, 0.28);
  font-weight: 900;
  cursor: pointer;
}

body[data-page="product"] .floating-contact {
  display: none;
}

body[data-page="home"] .floating-contact,
body[data-page="catalog"] .floating-contact {
  display: none;
}

@media (max-width: 900px) {
  main {
    width: calc(100% - 28px);
  }
  .h5-hero {
    grid-template-columns: 1fr;
    min-height: auto;
    gap: 14px;
  }
  .hero-panel {
    grid-template-columns: 1fr 1fr;
    padding: 16px;
  }
  .hero-stat strong {
    font-size: 42px;
  }
  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }
  .catalog-loading {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .brand-summary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  body[data-page="product"].h5-shell {
    width: min(100%, 480px);
  }
  body[data-page="product"] main {
    width: calc(100% - 28px);
  }
  .product-detail {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .product-loading {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .loading-copy {
    min-height: 176px;
  }
  .detail-copy {
    position: static;
  }
  .gallery-main {
    aspect-ratio: 4 / 5;
    background: #f8efe2;
  }
  .gallery-main img {
    object-fit: contain;
  }
  .filters { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  body {
    background: #15100c;
  }
  .h5-shell {
    width: min(480px, 100%);
    box-shadow: 0 0 80px rgba(0, 0, 0, 0.34);
  }
  main {
    width: calc(100% - 28px);
  }
  .hero {
    padding: 24px 0 14px;
  }
  .h5-hero {
    min-height: auto;
    align-content: start;
  }
  h1 {
    font-size: clamp(38px, 11vw, 54px);
    line-height: 0.94;
  }
  h2 {
    font-size: clamp(27px, 7vw, 38px);
  }
  .hero-copy p {
    font-size: 14px;
    line-height: 1.55;
  }
  .hero-actions {
    margin-top: 18px;
  }
  .primary-link,
  .secondary-link,
  .contact-link {
    min-height: 42px;
    padding: 10px 14px;
  }
  .story-band {
    padding: 14px;
    font-size: 13px;
  }
  .section {
    padding: 24px 0 72px;
  }
  .section-head {
    margin-bottom: 10px;
  }
  .brand-summary {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .brand-summary::-webkit-scrollbar {
    display: none;
  }
  .brand-card {
    flex: 0 0 132px;
    flex-basis: 132px;
    padding: 10px;
  }
  .brand-card strong {
    font-size: 15px;
  }
  .brand-card span,
  .brand-card small {
    font-size: 10px;
  }
  .brand-card small {
    min-height: 28px;
  }
  .chip {
    padding: 8px 11px;
    font-size: 11px;
  }
  .filters,
  .feed-tools {
    padding: 10px;
  }
  .catalog-loading {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .catalog-loading span {
    min-height: 240px;
  }
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .product-card-body {
    padding: 9px;
  }
  .product-card h3 {
    min-height: 46px;
    font-size: 12px;
  }
  .meta {
    font-size: 10px;
  }
}

@media (max-width: 560px) {
  .h5-shell,
  body[data-page="product"].h5-shell {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }
  .topbar {
    padding: 0 12px;
    gap: 8px;
  }
  .nav { gap: 7px; }
  .brand-mark { width: 40px; height: 40px; }
  .brand strong { font-size: 20px; }
  .brand small { display: none; }
  .nav a { display: none; }
  .nav-button {
    max-width: 90px;
    padding: 9px 10px;
    white-space: nowrap;
    font-size: 13px;
  }
  .language-select {
    width: 58px;
    padding: 0 5px;
  }
  .filters { grid-template-columns: 1fr; }
  .search-control {
    grid-template-columns: minmax(0, 1fr) 88px;
  }
  .search-button {
    padding: 0 12px;
  }
  .hero { padding-top: 34px; }
  .page-button {
    min-width: 38px;
    min-height: 38px;
    font-size: 12px;
  }
}
