:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --text: #101828;
  --muted: #667085;
  --brand: #0ea5e9;
  --brand-dark: #0369a1;
  --brand-soft: rgba(14, 165, 233, 0.12);
  --accent: #22c55e;
  --danger: #ef4444;
  --cta-bg: var(--brand);
  --cta-text: #ffffff;
  --btn-bg: #e0f2fe;
  --btn-text: #0369a1;
  --nav-bg: #ffffff;
  --nav-text: #101828;
  --nav-subtext: #667085;
  --nav-border: #d0d5dd;
  --footer-bg: #f6f7fb;
  --footer-text: #667085;
  --footer-border: #d0d5dd;
  --radius: 16px;
  --shadow: 0 12px 28px rgba(16, 24, 40, 0.08);
}

body.dark-mode {
  --bg: #0b1220;
  --surface: #101a2f;
  --text: #e2e8f0;
  --muted: #94a3b8;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #f8fafc 0%, var(--bg) 100%);
}

body {
  opacity: 0;
  transition: opacity 0.18s ease;
}

body.page-ready {
  opacity: 1;
}

a {
  color: inherit;
}

.container {
  width: min(1140px, 92%);
  margin: 0 auto;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(8px);
  background: var(--nav-bg);
  color: var(--nav-text);
  border-bottom: 1px solid var(--nav-border);
}

.nav-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand img {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
}

.brand-title {
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1;
}

.brand-sub {
  color: var(--nav-subtext);
  font-size: 0.82rem;
}

.nav-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.file-status {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
  border: 1px solid transparent;
  white-space: nowrap;
}

.file-status.is-connected {
  color: #166534;
  background: #dcfce7;
  border-color: #86efac;
}

.file-status.is-disconnected {
  color: #991b1b;
  background: #fee2e2;
  border-color: #fca5a5;
}

.btn {
  border: none;
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
}

.btn-brand {
  color: var(--cta-text);
  background: var(--cta-bg);
}

.btn-brand:hover {
  background: var(--brand-dark);
}

.btn-soft {
  color: var(--btn-text);
  background: var(--btn-bg);
}

.hero {
  padding: 22px 0 14px;
}

.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-banner {
  position: relative;
  overflow: hidden;
  min-height: clamp(320px, 48vw, 430px);
}

.hero-bg-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(6, 10, 18, 0.66) 0%, rgba(6, 10, 18, 0.45) 42%, rgba(6, 10, 18, 0.2) 68%, rgba(6, 10, 18, 0.08) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  color: #ffffff;
  padding: clamp(24px, 5vw, 48px);
  max-width: 760px;
}

.eyebrow {
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.74rem;
}

.hero h1 {
  margin: 10px 0 12px;
  font-size: clamp(1.85rem, 4vw, 2.95rem);
  line-height: 1.05;
}

.hero p {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.04rem;
}

.hero-actions {
  flex-wrap: wrap;
}

.promo-bar-wrap {
  overflow: hidden;
  border-radius: 999px;
  border: 1px solid var(--brand-soft);
  background: var(--btn-bg);
}

.promo-track {
  display: flex;
  width: max-content;
  animation: promo-scroll 30s linear infinite;
}

.promo-item {
  padding: 10px 16px;
  white-space: nowrap;
  font-weight: 700;
  color: var(--btn-text);
  border-right: 1px dashed var(--brand-soft);
}

@keyframes promo-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.section {
  padding: 18px 0;
}

.section h2 {
  margin: 0 0 10px;
  font-size: 1.6rem;
}

.products-head {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
}

.product-filters {
  display: grid;
  grid-template-columns: 1.2fr 1.2fr auto auto auto;
  gap: 10px;
  align-items: center;
}

.filter-control {
  width: 100%;
  border: 1px solid rgba(15, 23, 42, 0.15);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  color: var(--text);
  background: var(--surface);
}

.filter-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}

.filter-reset {
  padding: 9px 14px;
}

.filter-count {
  color: var(--muted);
  font-weight: 700;
  white-space: nowrap;
}

.products-empty {
  padding: 18px;
  border: 1px solid var(--brand-soft);
  box-shadow: none;
  grid-column: 1 / -1;
}

.products-empty h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.products-empty p {
  margin: 0;
  color: var(--muted);
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.meta-item {
  padding: 14px;
}

.meta-item strong {
  display: block;
  font-size: 1.08rem;
}

.meta-item span {
  color: var(--muted);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.product-card {
  position: relative;
  overflow: hidden;
}

.product-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.product-body {
  padding: 10px 12px 12px;
}

.product-title {
  margin: 6px 0 8px;
  font-size: 1.02rem;
  font-weight: 800;
  line-height: 1.2;
  min-height: 2.2em;
}

.discount-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  background: var(--brand);
  color: var(--cta-text);
  font-size: 0.78rem;
  font-weight: 800;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.14);
}

.price-row {
  display: flex;
  gap: 8px;
  align-items: baseline;
  margin-bottom: 10px;
}

.price {
  font-size: 1.05rem;
  font-weight: 800;
}

.old-price {
  color: #94a3b8;
  text-decoration: line-through;
  font-size: 0.92rem;
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.btn-outline {
  background: transparent;
  color: var(--brand-dark);
  border: 1px solid rgba(3, 105, 161, 0.35);
}

.btn-success {
  background: var(--accent);
  color: #fff;
}

.btn-success:hover {
  filter: brightness(0.95);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-mercadopago {
  background: #009ee3;
  color: #ffffff;
}

.btn-mercadopago:hover {
  background: #0087c6;
}

.footer {
  margin-top: 18px;
  border-top: 1px solid var(--footer-border);
  padding: 16px 0 22px;
  color: var(--footer-text);
  background: var(--footer-bg);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.developer-credit {
  color: inherit;
  text-decoration: none;
  font-size: 0.9rem;
}

.developer-credit:hover {
  text-decoration: underline;
}

.credit-brand {
  font-weight: 800;
  color: var(--brand-dark);
}

.detail-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  align-items: start;
}

.detail-image {
  width: 100%;
  border-radius: var(--radius);
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.detail-carousel {
  position: relative;
}

.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  background: rgba(10, 16, 28, 0.42);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  cursor: pointer;
  z-index: 2;
}

.carousel-nav.prev {
  left: 12px;
}

.carousel-nav.next {
  right: 12px;
}

.detail-thumbs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.detail-thumb {
  border: 2px solid transparent;
  border-radius: 10px;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  background: transparent;
}

.detail-thumb img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

.detail-thumb.is-active {
  border-color: var(--brand);
}

.detail-box {
  padding: 22px;
}

.detail-box h1 {
  margin-top: 8px;
  margin-bottom: 10px;
  font-size: clamp(1.45rem, 3vw, 2.2rem);
}

.detail-box p {
  color: var(--muted);
}

.detail-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.detail-actions .btn {
  padding: 8px 10px;
  font-size: 0.9rem;
  white-space: nowrap;
}

.feature-list {
  margin: 14px 0;
  padding-left: 18px;
}

.payment-panel {
  margin-top: 12px;
}

.payment-panel-card {
  border: 1px solid var(--brand-soft);
  background: rgba(14, 165, 233, 0.06);
  border-radius: 12px;
  padding: 12px;
}

.payment-panel-card h3 {
  margin: 0 0 6px;
  font-size: 1.02rem;
}

.payment-panel-card p {
  margin: 0 0 10px;
  color: var(--muted);
}

.payment-note {
  font-size: 0.95rem;
  margin-bottom: 12px;
}

.payment-panel-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.payment-panel-actions .btn {
  white-space: normal;
  line-height: 1.2;
  text-align: center;
}

.transfer-data-list {
  margin: 0 0 10px;
  padding-left: 18px;
}

.transfer-data-list li {
  margin-bottom: 4px;
}

.editor-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 18px;
  align-items: start;
}

.editor-card {
  padding: 18px;
}

.input,
.textarea,
.select {
  width: 100%;
  border: 1px solid rgba(15, 23, 42, 0.15);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  background: #fff;
}

input[type="color"].input {
  min-height: 44px;
  padding: 6px;
  cursor: pointer;
}

.textarea {
  min-height: 96px;
  resize: vertical;
}

.field {
  margin-bottom: 12px;
}

.field label {
  display: block;
  margin-bottom: 5px;
  font-size: 0.9rem;
  font-weight: 700;
}

.row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

.product-editor-item {
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 10px;
  background: #fff;
}

.contact-layout {
  display: grid;
  grid-template-columns: 1fr;
}

.contact-card {
  padding: 16px;
  border: 1px solid var(--brand-soft);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.95) 100%);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: stretch;
}

.contact-map-col,
.contact-info-col {
  min-width: 0;
}

.contact-map-wrapper {
  min-height: 280px;
  height: 100%;
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--brand-soft);
  box-shadow: 0 10px 24px rgba(16, 24, 40, 0.08);
}

.contact-map-iframe {
  width: 100%;
  height: 100%;
  min-height: 280px;
  border: none;
}

.contact-info-col {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4px 2px;
}

.contact-card h2 {
  margin: 0 0 10px;
  letter-spacing: -0.02em;
}

.contact-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

#contactDescription {
  font-size: clamp(1rem, 1.05rem + 0.2vw, 1.12rem);
  max-width: 50ch;
  text-wrap: balance;
}

.contact-info-list {
  list-style: none;
  padding: 0;
  margin: 14px 0;
  display: grid;
  gap: 10px;
}

.contact-info-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.04rem;
  padding: 10px 12px;
  border: 1px solid var(--brand-soft);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.8);
}

.contact-info-list i {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 1.02rem;
  color: var(--brand-dark);
  background: var(--brand-soft);
}

.contact-info-list a {
  color: var(--brand-dark);
  font-weight: 700;
  text-underline-offset: 3px;
}

.contact-social-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 2px;
  align-items: center;
  justify-content: flex-start;
}

.social-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--btn-bg);
  color: var(--btn-text);
  border: 1px solid var(--brand-soft);
  font-size: 1.5rem;
  line-height: 0;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(16, 24, 40, 0.1);
  transition: transform 0.18s ease, filter 0.18s ease, background 0.2s ease, color 0.2s ease;
}

.social-icon-link i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.social-icon-link i::before {
  display: block;
}

.social-icon-link:hover {
  transform: translateY(-2px) scale(1.04);
  background: var(--brand);
  color: #ffffff;
}

body.dark-mode .contact-card {
  border-color: rgba(148, 163, 184, 0.24);
  background: linear-gradient(180deg, rgba(16, 26, 47, 0.96) 0%, rgba(11, 18, 32, 0.96) 100%);
}

body.dark-mode .contact-map-wrapper {
  border-color: rgba(148, 163, 184, 0.24);
}

body.dark-mode .contact-info-list li {
  background: rgba(15, 23, 42, 0.45);
  border-color: rgba(148, 163, 184, 0.24);
}

body.dark-mode .social-icon-link {
  background: rgba(148, 163, 184, 0.14);
  color: #e2e8f0;
  border-color: rgba(148, 163, 184, 0.24);
}

.whatsapp-float {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 45;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  text-decoration: none;
  color: #ffffff;
  background: #22c55e;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.28);
}

.whatsapp-float:hover {
  filter: brightness(0.95);
}

.whatsapp-float svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

@media (max-width: 980px) {
  .detail-layout,
  .editor-grid {
    grid-template-columns: 1fr;
  }

  .product-filters {
    grid-template-columns: 1fr 1fr;
  }

  .filter-check,
  .filter-count {
    grid-column: 1 / -1;
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .meta-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .nav-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .file-status {
    width: 100%;
    justify-content: center;
  }

  .product-filters {
    grid-template-columns: 1fr;
  }

  .filter-reset {
    width: 100%;
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .product-title {
    font-size: 0.95rem;
  }

  .price {
    font-size: 1rem;
  }
}

@media (max-width: 640px) {
  .row-2,
  .row-3 {
    grid-template-columns: 1fr;
  }

  .detail-actions {
    grid-template-columns: 1fr;
  }

  .detail-actions .btn {
    width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.2;
    text-align: center;
  }

  .payment-panel-actions {
    grid-template-columns: 1fr;
  }

  .hero-content {
    padding: 18px;
  }

  .whatsapp-float {
    right: 12px;
    bottom: 12px;
    width: 48px;
    height: 48px;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .contact-map-wrapper,
  .contact-map-iframe {
    min-height: 190px;
  }

  .contact-info-col {
    padding: 0;
  }

  .social-icon-link {
    width: 40px;
    height: 40px;
    font-size: 1.35rem;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 980px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}
