:root {
  --bg: #0b0d10;
  --surface: #14171c;
  --border: #262b33;
  --text: #eef0f2;
  --text-secondary: #9aa1ab;
  --accent: #2dd4bf;
  --accent-bg: color-mix(in srgb, var(--accent) 18%, var(--surface));
  --warn: #fbbf24;
  --warn-bg: color-mix(in srgb, var(--warn) 16%, var(--surface));
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

.header {
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 5;
}
.header-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.brand { font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }
.brand-sub { font-size: 12px; color: var(--text-secondary); }

.container { max-width: 960px; margin: 0 auto; padding: 32px 20px 40px; }

.hero { margin-bottom: 28px; }
.hero h1 { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 10px; line-height: 1.25; }
.hero p { font-size: 14px; color: var(--text-secondary); margin: 0; max-width: 520px; line-height: 1.6; }

.status-msg {
  text-align: center;
  padding: 40px 0;
  color: var(--text-secondary);
  font-size: 14px;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.filter-pill {
  font-size: 13px;
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all .15s ease;
}
.filter-pill:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.filter-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #06120f;
  font-weight: 600;
}

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

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
  box-shadow: 0 12px 28px -12px color-mix(in srgb, var(--accent) 35%, transparent);
}

.card-photo {
  height: 200px;
  background: color-mix(in srgb, var(--surface) 60%, var(--bg));
  position: relative;
  overflow: hidden;
}
.card-photo img { width: 100%; height: 100%; object-fit: contain; display: block; background: color-mix(in srgb, var(--surface) 60%, var(--bg)); }
.card-photo.empty { display: flex; align-items: center; justify-content: center; color: var(--text-secondary); font-size: 13px; }

.badge {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 11px;
  font-weight: var(--badge-weight, 600);
  padding: 3px 9px;
  border-radius: 6px;
  background: var(--badge-bg, var(--accent-bg));
  color: var(--badge-text, var(--accent));
}
.badge.low { background: var(--warn-bg); color: var(--warn); }
.badge.corner2 { top: auto; bottom: 8px; right: 8px; }

.discount-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 6px;
  background: #e5484d;
  color: #fff;
}
.discount-corner {
  position: absolute;
  top: 8px;
  left: 8px;
}

.photo-count {
  position: absolute;
  bottom: 8px;
  left: 8px;
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 6px;
  background: rgba(0,0,0,0.55);
  color: #fff;
}

.card-body { padding: 14px 16px 16px; }
.card-name { font-size: 14px; font-weight: 600; margin: 0 0 4px; }
.card-specs { font-size: 11px; color: var(--text-secondary); font-family: ui-monospace, "SF Mono", monospace; margin: 0 0 10px; }
.card-price { font-size: 15px; }
.price-row { display: flex; align-items: center; gap: 6px; margin-bottom: 2px; }
.price-old { font-size: 12px; color: var(--text-secondary); text-decoration: line-through; font-weight: 400; }
.price-final { font-size: 17px; font-weight: 700; color: var(--accent); }

.btn-card-cta {
  display: block;
  width: 100%;
  margin-top: 12px;
  background: var(--text);
  color: var(--bg);
  border: none;
  padding: 9px 0;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.banner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 20px;
}
.banner p { margin: 0; font-size: 15px; line-height: 1.6; }

.footer-cta {
  max-width: 960px;
  margin: 0 auto 60px;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.cta-col {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  text-align: center;
  transition: border-color .18s ease;
}
.cta-col:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.cta-heading { margin: 0 0 14px; font-size: 14px; color: var(--text-secondary); min-height: 18px; }

.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: #06120f;
  border: none;
  padding: 11px 22px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: filter .15s ease, transform .15s ease;
}
.btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-block { display: block; text-align: center; width: 100%; margin-top: 14px; }

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  align-items: flex-start;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
  z-index: 20;
}
.modal-overlay.open { display: flex; }

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 420px;
  width: 100%;
  position: relative;
}
.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.5);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  z-index: 2;
}
.modal-main-photo {
  height: 290px;
  background: color-mix(in srgb, var(--surface) 60%, var(--bg));
  cursor: zoom-in;
}
.modal-main-photo img, .modal-main-photo video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: color-mix(in srgb, var(--surface) 60%, var(--bg));
}
.modal-thumbs {
  display: flex;
  gap: 8px;
  padding: 10px 20px;
  overflow-x: auto;
  border-bottom: 1px solid var(--border);
}
.modal-thumb {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  position: relative;
  background: color-mix(in srgb, var(--surface) 60%, var(--bg));
}
.modal-thumb.active { border-color: var(--accent); }
.modal-thumb img, .modal-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.modal-thumb.video-thumb::after {
  content: "▶";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  background: rgba(0,0,0,0.35);
}
.modal-body { padding: 20px; }
.modal-body h2 { font-size: 18px; font-weight: 700; margin: 0 0 6px; }
.modal-price { font-size: 17px; font-weight: 700; color: var(--accent); margin: 0 0 16px; }
.modal-specs { width: 100%; font-size: 12px; font-family: ui-monospace, "SF Mono", monospace; border-collapse: collapse; margin-bottom: 16px; background: var(--bg); border-radius: 10px; }
.modal-specs td { padding: 8px 12px; }
.modal-specs tr td:last-child { text-align: right; font-weight: 700; }
.modal-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.6; margin: 0; }

.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.94);
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 30;
  cursor: zoom-out;
}
.lightbox-overlay.open { display: flex; }
.lightbox-overlay img { max-width: 92vw; max-height: 92vh; object-fit: contain; }
.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-size: 26px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 31;
  transition: background .15s ease;
}
.lightbox-arrow:hover { background: rgba(255,255,255,0.25); }
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

.banner-media-link { display: block; text-decoration: none; }
.banner-media-link.banner-side { height: 100%; }
.banner-media {
  background: color-mix(in srgb, var(--surface) 60%, var(--bg));
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.banner-media img, .banner-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: absolute;
  inset: 0;
}
.banner-top .banner-media, .banner-bottom .banner-media {
  max-width: 1240px;
  margin: 0 auto;
  height: auto;
  aspect-ratio: 4 / 1;
  border-radius: var(--radius);
}
.banner-top .banner-media img, .banner-top .banner-media video,
.banner-bottom .banner-media img, .banner-bottom .banner-media video {
  object-fit: contain;
}
.banner-top { margin-bottom: 24px; }
.banner-bottom { margin-top: 28px; margin-bottom: 8px; }
.banner-side { height: 100%; min-height: 300px; }
.banner-side .banner-media { width: 100%; height: 100%; min-height: 300px; border-radius: var(--radius); }

.main-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  max-width: 1240px;
  margin: 0 auto;
}
@media (min-width: 1100px) {
  .main-layout { grid-template-columns: 140px 1fr 140px; }
}
@media (max-width: 1099px) {
  .banner-side { display: none !important; }
}

.modal-wrapper {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  max-width: 820px;
  width: 100%;
  align-items: flex-start;
  justify-content: center;
}
.modal-wrapper .modal { max-width: 420px; }
.modal-extra {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 360px;
  width: 100%;
  padding: 20px;
}
.modal-extra h2 { font-size: 17px; font-weight: 700; margin: 0 0 12px; }
.modal-extra p { font-size: 13px; color: var(--text-secondary); line-height: 1.7; margin: 0; white-space: pre-wrap; }

.badge.oferta { background: var(--badge-oferta-bg, color-mix(in srgb, #e5484d 20%, var(--surface))); color: var(--badge-oferta-text, #ff8080); font-weight: var(--badge-oferta-weight, 600); }

.btn-icon { vertical-align: -3px; margin-right: 6px; }

#page-bg-layer {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-position: center;
  display: none;
}
#page-bg-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  display: none;
}
