:root {
  --black: #05265c;
  --ink: #071b3f;
  --panel: #06245a;
  --muted: #60708a;
  --gold: #ff7a00;
  --gold-soft: #ffad58;
  --white: #ffffff;
  --line: rgba(255, 122, 0, 0.22);
  --shadow: 0 18px 55px rgba(5, 38, 92, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--white);
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  padding: 0 clamp(18px, 4vw, 64px);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand,
.nav-links {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand {
  font-weight: 800;
  font-size: 1.1rem;
}

.brand-logo {
  width: clamp(132px, 16vw, 188px);
  height: 54px;
  object-fit: contain;
  object-position: left center;
}

.nav-links a {
  color: rgba(7, 27, 63, 0.78);
  font-size: 0.95rem;
  font-weight: 800;
}

.nav-links a:hover {
  color: var(--gold);
}

.hero {
  min-height: calc(100vh - 78px);
  display: grid;
  grid-template-columns: minmax(300px, 0.72fr) minmax(360px, 1.28fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  padding: clamp(40px, 7vw, 92px) clamp(18px, 4vw, 64px);
  color: var(--white);
  background:
    linear-gradient(120deg, rgba(5, 38, 92, 0.98), rgba(5, 38, 92, 0.86)),
    radial-gradient(circle at 82% 22%, rgba(255, 122, 0, 0.24), transparent 34%),
    #05265c;
}

.eyebrow,
.small-label {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero h1,
.catalog-hero h1 {
  margin: 0;
  font-size: clamp(3.4rem, 9vw, 8.5rem);
  line-height: 0.92;
  letter-spacing: 0;
}

.hero-text,
.catalog-hero p {
  max-width: 680px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: clamp(1rem, 2vw, 1.24rem);
  line-height: 1.7;
}

.hero-actions,
.section-heading,
.pagination {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-actions {
  margin-top: 34px;
}

.button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.button:hover,
.icon-button:hover {
  transform: translateY(-2px);
}

.primary,
.dark {
  color: var(--white);
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
}

.ghost {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.08);
}

.dark {
  background: var(--black);
  color: var(--white);
}

.hero-banner-card {
  width: 100%;
  overflow: hidden;
  background: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 8px;
  box-shadow: var(--shadow);
  animation: liftIn 700ms ease both;
}

.hero-banner-card img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.banner,
.presentation,
.featured,
.catalog-shell {
  padding: clamp(34px, 5vw, 72px) clamp(18px, 4vw, 64px);
}

.banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: var(--white);
  background: linear-gradient(135deg, #ff7a00, #ff9d2f);
}

.banner h2,
.presentation h2,
.section-heading h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3.4rem);
  line-height: 1.05;
}

.presentation {
  display: grid;
  grid-template-columns: minmax(240px, 0.85fr) minmax(280px, 1fr);
  gap: clamp(22px, 5vw, 80px);
  align-items: start;
}

.presentation p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.8;
}

.section-heading {
  justify-content: space-between;
  margin-bottom: 28px;
}

.text-link {
  color: var(--gold);
  font-weight: 800;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.product-grid.compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.product-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #ffffff;
  border: 1px solid rgba(21, 18, 13, 0.1);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 14px 42px rgba(7, 7, 7, 0.08);
  animation: liftIn 360ms ease both;
}

.product-card.sold-out {
  border-color: rgba(89, 96, 111, 0.24);
}

.product-media {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  padding: 22px;
  background: linear-gradient(180deg, #fffefa, #f6f2e9);
  border: 0;
  cursor: pointer;
}

.sold-out-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 14px;
  color: var(--white);
  background: #5b6472;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  box-shadow: 0 10px 24px rgba(7, 27, 63, 0.22);
}

.product-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  padding: 18px;
}

.sold-out-inline {
  align-self: flex-start;
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 10px;
  color: #3f4754;
  background: #eef0f3;
  border: 1px solid rgba(91, 100, 114, 0.28);
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.sku {
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.product-card h3 {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.3;
}

.description,
.universal-code,
.product-model,
.colors,
.result-card small,
.footer p {
  color: var(--muted);
  line-height: 1.55;
}

.description {
  margin: 0;
  font-size: 0.92rem;
}

.universal-code,
.product-model {
  margin: -4px 0 0;
  font-size: 0.86rem;
}

.colors {
  margin: 0;
  font-size: 0.88rem;
}

.prices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.price-box {
  padding: 10px;
  background: #faf7ef;
  border: 1px solid rgba(198, 154, 66, 0.22);
  border-radius: 8px;
}

.price-box small {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
}

.price-box strong {
  display: block;
  margin-top: 4px;
}

.card-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: auto;
}

.copy-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.copy-button {
  min-height: 36px;
  padding: 0 10px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid rgba(5, 38, 92, 0.16);
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.copy-button:hover {
  background: #fff8ef;
  border-color: rgba(255, 122, 0, 0.5);
  transform: translateY(-1px);
}

.copy-announcement {
  grid-column: 1 / -1;
  color: var(--white);
  background: var(--black);
  border-color: var(--black);
}

.copy-announcement:hover {
  background: var(--panel);
}

.copy-confirmation {
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 8px 10px;
  color: #0b5d35;
  background: #eaf8ef;
  border: 1px solid rgba(11, 93, 53, 0.18);
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 800;
}

.copy-confirmation.visible {
  display: flex;
}

.icon-button {
  min-height: 42px;
  padding: 0 12px;
  font-size: 0.84rem;
  border-color: rgba(21, 18, 13, 0.14);
}

.icon-button.whatsapp {
  color: #0b5d35;
  background: #eaf8ef;
}

.icon-button.sold-out-action {
  color: #ffffff;
  background: #8b93a1;
  border-color: #8b93a1;
  cursor: not-allowed;
}

.icon-button.sold-out-action:hover {
  transform: none;
}

.icon-button.download {
  color: var(--black);
  background: #faf7ef;
}

.icon-button.view-photos {
  color: var(--black);
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
}

.gallery-open {
  overflow: hidden;
}

.gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  place-items: center;
  padding: 20px;
}

.gallery-modal[aria-hidden="false"] {
  display: grid;
}

.gallery-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 7, 7, 0.82);
  backdrop-filter: blur(10px);
}

.gallery-panel {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  gap: 16px;
  width: min(980px, 100%);
  max-height: min(92vh, 900px);
  padding: clamp(16px, 3vw, 26px);
  color: var(--white);
  background: #0b0b0b;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.gallery-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--gold-soft);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 1.55rem;
  cursor: pointer;
}

.gallery-info {
  padding-right: 46px;
}

.gallery-info h2 {
  margin: 6px 0 0;
  font-size: clamp(1.1rem, 3vw, 2rem);
  line-height: 1.2;
}

.gallery-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 260px;
  background: #fffefa;
  border-radius: 8px;
  overflow: hidden;
}

.gallery-stage img {
  width: 100%;
  height: min(58vh, 560px);
  object-fit: contain;
  padding: 18px;
}

.gallery-arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--black);
  background: rgba(241, 213, 138, 0.92);
  border: 1px solid var(--gold);
  border-radius: 50%;
  font-size: 2rem;
  cursor: pointer;
  transform: translateY(-50%);
}

.gallery-arrow.prev {
  left: 14px;
}

.gallery-arrow.next {
  right: 14px;
}

.gallery-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.gallery-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.gallery-count {
  color: rgba(255, 253, 248, 0.7);
  font-weight: 800;
}

.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 10px;
  max-height: 112px;
  overflow: auto;
}

.gallery-thumb {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  padding: 5px;
  background: #fffefa;
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
}

.gallery-thumb.active {
  border-color: var(--gold);
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.gallery-thumb-item {
  display: grid;
  gap: 6px;
}

.gallery-photo-download {
  display: grid;
  place-items: center;
  min-height: 28px;
  color: var(--gold-soft);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 800;
}

.catalog-hero {
  padding: clamp(44px, 7vw, 88px) clamp(18px, 4vw, 64px);
  color: var(--white);
  background:
    linear-gradient(120deg, rgba(5, 38, 92, 0.98), rgba(5, 38, 92, 0.86)),
    radial-gradient(circle at 92% 24%, rgba(255, 122, 0, 0.24), transparent 34%),
    #05265c;
}

.catalog-hero h1 {
  max-width: 980px;
  font-size: clamp(2.6rem, 7vw, 6rem);
}

.catalog-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.filters {
  position: sticky;
  top: 94px;
  display: grid;
  gap: 12px;
  padding: 18px;
  background: var(--black);
  color: var(--white);
  border-radius: 8px;
}

.field-label {
  color: var(--gold-soft);
  font-size: 0.8rem;
  font-weight: 800;
}

.input {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(255, 253, 248, 0.18);
  border-radius: 8px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
}

.input::placeholder {
  color: rgba(255, 253, 248, 0.45);
}

.result-card {
  display: grid;
  gap: 6px;
  margin-top: 8px;
  padding: 14px;
  background: rgba(198, 154, 66, 0.12);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.result-card span {
  color: var(--gold-soft);
  font-weight: 900;
}

.pagination {
  justify-content: center;
  margin-top: 30px;
}

.page-btn {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(21, 18, 13, 0.12);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  font-weight: 800;
  cursor: pointer;
}

.page-btn.active {
  color: var(--black);
  background: var(--gold-soft);
  border-color: var(--gold);
}

.floating-whatsapp {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 30;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  color: #063d24;
  background: #38d66b;
  border: 2px solid #fff;
  border-radius: 50%;
  font-weight: 900;
  box-shadow: var(--shadow);
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 32px clamp(18px, 4vw, 64px);
  color: rgba(255, 253, 248, 0.8);
  background: var(--black);
}

.admin-shell {
  min-height: calc(100vh - 78px);
  background: #f7f9fc;
}

.admin-hero {
  padding: clamp(44px, 7vw, 82px) clamp(18px, 4vw, 64px);
  color: var(--white);
  background:
    linear-gradient(120deg, rgba(5, 38, 92, 0.98), rgba(5, 38, 92, 0.88)),
    radial-gradient(circle at 90% 18%, rgba(255, 122, 0, 0.24), transparent 34%),
    #05265c;
}

.admin-hero h1 {
  max-width: 920px;
  margin: 0;
  font-size: clamp(2.5rem, 6vw, 5.8rem);
  line-height: 0.98;
}

.admin-hero p:last-child {
  max-width: 760px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.08rem;
  line-height: 1.7;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.95fr) minmax(320px, 1.05fr);
  gap: 24px;
  align-items: start;
  padding: clamp(28px, 5vw, 64px) clamp(18px, 4vw, 64px);
}

.admin-form,
.admin-preview {
  display: grid;
  gap: 16px;
  padding: clamp(18px, 3vw, 26px);
  background: var(--white);
  border: 1px solid rgba(5, 38, 92, 0.12);
  border-radius: 8px;
  box-shadow: 0 14px 42px rgba(7, 27, 63, 0.08);
}

.admin-form-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.admin-form-header h2 {
  margin: 0;
  color: var(--ink);
  font-size: 1.25rem;
}

.admin-status,
#photoCountLabel {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  color: var(--black);
  background: #fff3e8;
  border: 1px solid rgba(255, 122, 0, 0.24);
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 800;
}

.admin-status[data-available="true"] {
  color: #0b5d35;
  background: #eaf8ef;
  border-color: rgba(11, 93, 53, 0.18);
}

.admin-form label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 800;
}

.admin-input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid rgba(5, 38, 92, 0.18);
  border-radius: 8px;
  font: inherit;
  font-weight: 500;
}

textarea.admin-input {
  resize: vertical;
}

.admin-two-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.admin-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-ghost {
  color: var(--black);
  border-color: rgba(5, 38, 92, 0.16);
  background: #ffffff;
}

.admin-message {
  display: none;
  padding: 12px;
  border-radius: 8px;
  font-weight: 800;
  line-height: 1.45;
}

.admin-message:not(:empty) {
  display: block;
}

.admin-message[data-type="success"] {
  color: #0b5d35;
  background: #eaf8ef;
  border: 1px solid rgba(11, 93, 53, 0.18);
}

.admin-message[data-type="error"] {
  color: #842018;
  background: #fff0ef;
  border: 1px solid rgba(132, 32, 24, 0.18);
}

.admin-message[data-type="info"] {
  color: var(--black);
  background: #eef4ff;
  border: 1px solid rgba(5, 38, 92, 0.14);
}

.admin-photo-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 10px;
}

.admin-photo-preview img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  padding: 8px;
  background: #fffefa;
  border: 1px solid rgba(5, 38, 92, 0.12);
  border-radius: 8px;
}

.admin-json-preview {
  min-height: 360px;
  max-height: 560px;
  margin: 0;
  overflow: auto;
  padding: 14px;
  color: #dce8ff;
  background: var(--black);
  border-radius: 8px;
  font-size: 0.82rem;
  line-height: 1.55;
}

.footer strong,
.footer a {
  color: var(--gold-soft);
}

.footer p {
  margin: 8px 0 0;
}

@keyframes liftIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1040px) {
  .hero,
  .presentation,
  .catalog-shell {
    grid-template-columns: 1fr;
  }

  .filters {
    position: static;
  }

  .product-grid,
  .product-grid.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .admin-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .site-header,
  .banner,
  .footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero {
    min-height: auto;
  }

  .brand-logo {
    width: 150px;
    height: 48px;
  }

  .product-grid,
  .product-grid.compact {
    grid-template-columns: 1fr;
  }

  .prices,
  .card-actions,
  .copy-actions {
    grid-template-columns: 1fr;
  }

  .copy-announcement {
    grid-column: auto;
  }

  .gallery-modal {
    padding: 10px;
  }

  .gallery-panel {
    max-height: 94vh;
  }

  .gallery-stage img {
    height: 42vh;
  }

  .gallery-arrow {
    width: 38px;
    height: 38px;
  }

  .gallery-actions {
    width: 100%;
  }

  .gallery-actions .button {
    flex: 1 1 160px;
  }

  .admin-form-header,
  .admin-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-two-columns {
    grid-template-columns: 1fr;
  }

  .admin-actions .button {
    width: 100%;
  }
}
