:root {
  --bg: #14151a;
  --surface: #1d1f26;
  --surface-2: #262933;
  --border: #33363f;
  --text: #f2efe9;
  --text-muted: #9a978f;
  --accent: #e0a458;
  --accent-dark: #b9803a;
  --radius: 14px;
  --font-display: "Space Grotesk", sans-serif;
  --font-body: "Manrope", sans-serif;
}

h1, h2, h3, .brand, .price, .modal h2, .cuotas-card h2, .cart-header h2 {
  letter-spacing: -0.01em;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: transparent;
  color: var(--text);
  font-family: var(--font-body);
  scroll-behavior: smooth;
}

/* ---------- Liquid glass: fondo con manchas de color difuminadas ---------- */
.bg-blobs {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: var(--bg);
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  will-change: transform;
}
.blob-1 {
  width: 460px;
  height: 460px;
  top: -140px;
  left: -120px;
  background: radial-gradient(circle, var(--accent), transparent 70%);
  animation: blob-float-1 24s ease-in-out infinite;
}
.blob-2 {
  width: 380px;
  height: 380px;
  bottom: -160px;
  right: -100px;
  background: radial-gradient(circle, #5b7fe0, transparent 70%);
  animation: blob-float-2 28s ease-in-out infinite;
}
.blob-3 {
  width: 300px;
  height: 300px;
  top: 38%;
  left: 58%;
  background: radial-gradient(circle, #c96bd6, transparent 70%);
  animation: blob-float-3 32s ease-in-out infinite;
}
@keyframes blob-float-1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(70px, 50px) scale(1.12); }
}
@keyframes blob-float-2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-60px, -40px) scale(1.15); }
}
@keyframes blob-float-3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-50px, 60px) scale(0.9); }
}
@media (prefers-reduced-motion: reduce) {
  .blob { animation: none; }
}
@media (max-width: 600px) {
  .blob { filter: blur(60px); opacity: 0.32; }
  .blob-1 { width: 300px; height: 300px; }
  .blob-2 { width: 260px; height: 260px; }
  .blob-3 { width: 200px; height: 200px; }
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

a { color: inherit; }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(20, 21, 26, 0.55);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  row-gap: 10px;
  padding: 14px 0;
}
.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
  transition: transform 0.25s cubic-bezier(.16,1,.3,1);
}
.brand:hover { transform: scale(1.03); }
.brand-logo {
  height: 130px;
  width: auto;
  display: block;
  border-radius: 10px;
  filter: drop-shadow(0 6px 18px rgba(0,0,0,0.35));
}
@media (max-width: 560px) {
  .brand-logo { height: 130px; }
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-shrink: 0;
}

/* ---------- Menú móvil (hamburguesa + panel de vidrio) ---------- */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}
.hamburger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s cubic-bezier(.65,0,.35,1), opacity 0.2s ease;
}
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px 24px 30px;
  background: rgba(24, 25, 31, 0.65);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  visibility: hidden;
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition: opacity 0.28s ease, transform 0.28s cubic-bezier(.16,1,.3,1), visibility 0.28s;
}
.mobile-menu.open {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.mobile-menu-links {
  display: flex;
  flex-direction: column;
}
.mobile-menu-links a {
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.2rem;
  padding: 13px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.mobile-menu-social {
  padding-top: 4px;
}
.social-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s cubic-bezier(.34,1.56,.64,1), background 0.2s ease;
}
.social-icon svg {
  width: 17px;
  height: 17px;
}
.social-icon:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px) scale(1.06);
  background: rgba(224, 164, 88, 0.08);
}
.social-row-header span { display: none; }
.topnav {
  display: flex;
  gap: 28px;
}
.topnav a {
  position: relative;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s ease;
  padding-bottom: 3px;
}
.topnav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1.5px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.28s cubic-bezier(.65,0,.35,1);
}
.topnav a:hover { color: var(--text); }
.topnav a:hover::after { transform: scaleX(1); transform-origin: left; }

.cart-toggle {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 9px 16px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: border-color 0.2s ease, transform 0.15s ease;
}
.cart-toggle:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}
.cart-count {
  background: var(--accent);
  color: #1a1206;
  font-weight: 700;
  border-radius: 999px;
  min-width: 20px;
  height: 20px;
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  transition: transform 0.3s cubic-bezier(.34,1.56,.64,1);
}
.cart-count.bump {
  animation: bump 0.4s cubic-bezier(.34,1.56,.64,1);
}
@keyframes bump {
  0% { transform: scale(1); }
  40% { transform: scale(1.45); }
  100% { transform: scale(1); }
}

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 48px;
  padding: 88px 24px 72px;
}
.hero-kicker {
  color: var(--accent);
  text-transform: none;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin: 0 0 18px;
  font-size: 0.95rem;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 4.2vw, 3.4rem);
  line-height: 1.08;
  margin: 0 0 22px;
  max-width: 15ch;
}
.hero-sub {
  color: var(--text-muted);
  font-size: 1.08rem;
  line-height: 1.6;
  max-width: 42ch;
  margin: 0 0 32px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 999px;
  padding: 14px 28px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.98rem;
  cursor: pointer;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn-primary::before {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.6), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
}
.btn-primary:hover:not(:disabled)::before { left: 130%; }
.btn-primary {
  background: var(--accent);
  color: #1a1206;
}
.btn-primary:hover:not(:disabled) {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -10px rgba(224, 164, 88, 0.55);
}
.btn-primary:active:not(:disabled) { transform: translateY(0); }
.btn-primary:disabled {
  background: var(--surface-2);
  color: var(--text-muted);
  cursor: not-allowed;
}
.btn-full { width: 100%; }

.hero-art { display: flex; justify-content: center; }
.phone-illustration {
  width: 230px;
  height: 470px;
  background: linear-gradient(160deg, #3a3d47, #1c1d22 70%);
  border-radius: 46px;
  border: 6px solid #45484f;
  position: relative;
  box-shadow: 0 40px 80px -30px rgba(0,0,0,0.7);
}
.phone-notch {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 90px;
  height: 22px;
  background: #101114;
  border-radius: 999px;
}
.phone-screen {
  position: absolute;
  inset: 14px;
  border-radius: 34px;
  background: radial-gradient(circle at 30% 20%, #2c2f3a, #0f1013 75%);
  overflow: hidden;
}
.phone-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.screen-glow {
  position: absolute;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(224,164,88,0.35), transparent 70%);
  top: -60px;
  right: -60px;
  animation: glow-pulse 5s ease-in-out infinite;
}
.phone-float {
  animation: float 6s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-14px) rotate(0.6deg); }
}
@keyframes glow-pulse {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.12); }
}
@media (prefers-reduced-motion: reduce) {
  .phone-float, .screen-glow { animation: none; }
}

/* ---------- Catalog ---------- */
.catalog { padding: 40px 24px 80px; }
.section-head { margin-bottom: 36px; max-width: 50ch; }
.section-head h2 {
  font-family: var(--font-display);
  font-size: 2rem;
  margin: 0 0 8px;
}
.section-head p { color: var(--text-muted); margin: 0; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
}
.loading-msg { color: var(--text-muted); }

.product-card {
  background: linear-gradient(160deg, rgba(255,255,255,0.07), rgba(255,255,255,0.015));
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(.16,1,.3,1), border-color 0.25s ease, box-shadow 0.25s ease;
}
.product-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -75%;
  width: 45%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.10), transparent);
  transform: skewX(-18deg);
  transition: left 0.75s ease;
  pointer-events: none;
}
.product-card:hover::before { left: 130%; }
.product-card:hover {
  transform: translateY(-6px);
  border-color: rgba(224, 164, 88, 0.55);
  box-shadow: 0 24px 48px -26px rgba(0,0,0,0.6), 0 0 0 1px rgba(224,164,88,0.08) inset;
}
.product-card.destacado { border-color: rgba(224, 164, 88, 0.55); }
.mini-phone {
  transition: transform 0.3s cubic-bezier(.34,1.56,.64,1);
}
.product-card:hover .mini-phone {
  transform: translateY(-3px) rotate(-3deg);
}
.badge {
  position: absolute;
  top: 18px;
  right: 18px;
  background: var(--accent);
  color: #1a1206;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}
.product-photo {
  width: 100%;
  height: 240px;          /* alto de la foto: súbelo o bájalo */
  object-fit: contain;    /* muestra el celular completo sin recortarlo */
  padding: 16px;          /* espacio entre el celular y el borde de la foto */
  border-radius: 14px;
  margin-bottom: 8px;     /* espacio entre la foto y el nombre */
  background: #1c1d22;
}
.mini-phone {
  width: 64px;
  height: 118px;
  margin-bottom: 4px;
  background: linear-gradient(160deg, #3a3d47, #1c1d22 70%);
  border-radius: 16px;
  border: 3px solid #45484f;
  position: relative;
}
.mini-phone::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 8px;
  background: #101114;
  border-radius: 999px;
}
.product-card h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin: 0;
}
.product-card p.desc {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.5;
  margin: 0;
}
.field-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.field-row select {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 10px;
  font-family: var(--font-body);
}
.price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 4px;
}
.price {
  font-family: var(--font-display);
  font-size: 1.4rem;
}
.installment-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ---------- Cuotas ---------- */
.cuotas { padding: 20px 24px 90px; }
.cuotas-card {
  background: linear-gradient(160deg, rgba(255,255,255,0.07), rgba(255,255,255,0.015));
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  padding: 40px;
}
.cuotas-card h2 {
  font-family: var(--font-display);
  margin-top: 0;
}
.cuotas-card ol {
  color: var(--text-muted);
  line-height: 1.8;
  padding-left: 20px;
}

/* ---------- Cart drawer ---------- */
.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: min(400px, 90vw);
  background: rgba(27, 29, 36, 0.6);
  backdrop-filter: blur(26px) saturate(160%);
  -webkit-backdrop-filter: blur(26px) saturate(160%);
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 40;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(.16,1,.3,1);
}
.cart-drawer.open { transform: translateX(0); }
.cart-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 30;
  display: none;
}
.cart-backdrop.open { display: block; }
.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 24px;
  border-bottom: 1px solid var(--border);
}
.cart-header h2 { font-family: var(--font-display); margin: 0; font-size: 1.3rem; }
.cart-header button, .modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
}
.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 16px 24px;
}
.empty-cart-msg { color: var(--text-muted); font-size: 0.92rem; }
.cart-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.cart-item-name { font-weight: 600; font-size: 0.95rem; }
.cart-item-meta { font-size: 0.8rem; color: var(--text-muted); }
.cart-item-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.8rem;
  text-decoration: underline;
  padding: 0;
}
.cart-footer {
  padding: 20px 24px 26px;
  border-top: 1px solid var(--border);
}
.cart-total {
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
  font-size: 1.05rem;
}

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: rgba(27, 29, 36, 0.65);
  backdrop-filter: blur(26px) saturate(160%);
  -webkit-backdrop-filter: blur(26px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  padding: 32px;
  width: min(420px, 100%);
  position: relative;
}
.modal h2 {
  font-family: var(--font-display);
  margin-top: 0;
}
.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
}
.modal form label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.modal form input,
.modal form select {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 11px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
}
.modal-total {
  display: flex;
  justify-content: space-between;
  padding: 14px 0;
  margin-bottom: 16px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 48px 24px 40px;
  border-top: 1px solid var(--border);
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}
.footer-logo {
  height: 80px;
  width: auto;
  border-radius: 10px;
}
.social-row-footer .social-icon {
  width: auto;
  height: auto;
  padding: 9px 16px;
  gap: 8px;
  border-radius: 999px;
}
.social-row-footer .social-icon span {
  font-size: 0.85rem;
  font-weight: 600;
}
.footer-copy {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 0;
}

/* ---------- Animaciones de entrada (hero, al cargar la página) ---------- */
.anim-in {
  opacity: 0;
  transform: translateY(18px);
  animation: fade-in-up 0.7s cubic-bezier(.16,1,.3,1) forwards;
}
.anim-delay-1 { animation-delay: 0.05s; }
.anim-delay-2 { animation-delay: 0.18s; }
.anim-delay-3 { animation-delay: 0.30s; }
.anim-delay-4 { animation-delay: 0.42s; }
@keyframes fade-in-up {
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Revelado al hacer scroll (catálogo, cuotas) ---------- */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(.16,1,.3,1), transform 0.6s cubic-bezier(.16,1,.3,1);
}
.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .anim-in, .reveal-on-scroll {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

@media (max-width: 780px) {
  .topnav { display: none; }
  .topbar-actions .social-row-header { display: none; }
  .hamburger { display: flex; }
}

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; padding-top: 56px; }
  .hero-art { order: -1; }
  .phone-illustration { width: 170px; height: 340px; }
}

@media (max-width: 560px) {
  .product-grid { grid-template-columns: 1fr; }
  .hero .btn-primary { width: 100%; }
  .social-icon { width: 40px; height: 40px; }
  .social-icon svg { width: 18px; height: 18px; }
  .cuotas-card { padding: 26px; }

  .photo-box { position: relative; }
.photo-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px; height: 34px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.photo-nav.prev { left: 8px; }
.photo-nav.next { right: 8px; }
}
