:root {
  --bg-main: #0B1C2D;
  --bg-secondary: #071524;
  --card-bg: #10283F;
  --card-hover: #133456;
  --accent: #FFC107;
  --accent-hover: #ffb300;
  --blue: #1E88E5;
  --blue-hover: #1565C0;
  --text-light: #ffffff;
  --text-muted: #aaa;
  --text-soft: #ccc;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background: radial-gradient(
      circle at 20% 0%, 
      #0f2740 0%, 
      var(--bg-main) 40%
    ),
    var(--bg-main);
  color: var(--text-light);
  padding-top: 45px;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
}

header {
  background: rgba(7, 21, 36, 0.8);
  margin-top: -2.4vh;
  backdrop-filter: blur(10px);
  height: 10vh;
  border-bottom: 4px solid rgba(255,255,255,0.05);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-weight: 800;
  font-size: 2.2rem;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
  margin-top: 3vh;
}

.logo span {
  color: var(--accent);
}

nav a {
  color: var(--text-soft);
  margin-left: 20px;
  text-decoration: none;
  transition: 0.3s;
}

nav a:hover {
  color: var(--accent);
}

.hero {
  padding: 100px 0;
  text-align: center;
  background: linear-gradient(135deg, #0D2A4A, var(--bg-secondary));
}

.hero h2 {
  font-size: 2.8rem;
  margin-bottom: 40px;
  letter-spacing: 0.5px;
}

.hero p {
  color: var(--text-muted);
  margin-top: 20px;
  font-size: 1.2rem;
  margin-bottom: 40px;
}

.h3 {
  font-size: 2.5rem;
  font-weight: 1400;
  color: var(--text-soft);
  margin-bottom: 20px;
}

.btn-primary {
  background: var(--accent);
  color: #000;
  padding: 15px 34px;
  border-radius: 40px;
  margin-top: 20px;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.6px;
  transition: all 0.3s ease;
  box-shadow: 0 10px 25px rgba(255,193,7,0.25);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-3px);
  box-shadow: 0 15px 35px rgba(255,193,7,0.35);
}

.products {
  padding: 80px 0;
}

.product-card {
  background: linear-gradient(
    145deg,
    rgba(16,40,63,0.95),
    rgba(12,32,52,0.95)
  );
  border-radius: 24px;
  position: relative;
  overflow: hidden;
  padding: 24px;
  min-width: 280px;
  width: 300px;
  flex: 0 0 300px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(255,255,255,0.05);
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
  transition: all 0.35s ease;
}

.product-card:hover {
  transform: translateY(-8px);
  border: 1px solid rgba(255,193,7,0.3);
  box-shadow:
    0 20px 50px rgba(0,0,0,0.5),
    0 0 40px rgba(255,193,7,0.08);
}

.product-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top left, rgba(255,255,255,0.08), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.product-card:hover::after {
  opacity: 1;
}

.product-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 15px;
  margin-bottom: 15px;
  transition: transform 0.4s ease;
}

.product-card:hover img {
  transform: scale(1.05);
}

.discount-badge {
  position: absolute;
  top: 15px;
  left: 25px;
  background: var(--accent);
  color: #000;
  padding: 6px 14px;
  font-weight: bold;
  border-radius: 8px;
  font-size: 13px;
  margin-top: 10px;
  z-index: 2;
}

.highlight {
  background: linear-gradient(90deg, #ff4d4d, #ff9900);
  color: white;
}

.price {
  margin: 18px 0;
}

.current {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 0.5px;
}

.old {
  text-decoration: line-through;
  margin-left: 10px;
  color: #888;
}

.installments {
  display: block;
  font-size: 14px;
  color: #9bb3ff;
  margin-top: 4px;
}

.btn-secondary {
  display: inline-block;
  padding: 10px 20px;
  background: var(--blue);
  color: white;
  border-radius: 25px;
  text-decoration: none;
  transition: 0.3s;
}

.btn-secondary:hover {
  background: var(--blue-hover);
}

.categories {
  padding: 80px 0;
  text-align: center;
  background: var(--bg-secondary);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.category-card {
  display: block;
  background: rgba(16,40,63,0.9);
  padding: 40px;
  border-radius: 22px;
  text-align: center;
  text-decoration: none;
  color: white;
  font-weight: 600;
  letter-spacing: 0.4px;
  border: 1px solid rgba(255,255,255,0.05);
  transition: all 0.3s ease;
}

.category-card:hover {
  transform: translateY(-6px);
  border: 1px solid rgba(255,193,7,0.4);
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

footer {
  background: var(--bg-secondary);
  padding: 40px 0;
  font-size: 0.9rem;
  text-align: center;
  color: var(--text-muted);
}

.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--card-bg);
  padding: 40px;
  border-radius: 20px;
  text-align: center;
  max-width: 500px;
  position: relative;
  font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
  animation: fadeIn 0.4s ease;
}

.close {
  position: absolute;
  top: 15px;
  right: 20px;
  cursor: pointer;
  font-size: 1.5rem;
}

.code-box {
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--bg-secondary);
  padding: 15px;
  border-radius: 12px;
  margin: 20px 0;
  font-size: 1.4rem;
  font-weight: bold;
}

.copy-btn {
  margin-left: 15px;
  background: var(--accent);
  border: none;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.3s;
}

.copy-btn:hover {
  transform: scale(1.1);
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.sticky-bar {
  position: fixed;
  top: 0;
  width: 100%;
  background: linear-gradient(90deg, var(--accent), #ffd54f);
  color: #000;
  text-align: center;
  padding: 10px;
  font-weight: 700;
  font-size: 1.1rem;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  z-index: 1000;
  letter-spacing: 0.5px;
}

.carousel {
  position: relative;
  overflow: hidden;
  margin-top: 40px;
}

.carousel-track {
  display: flex;
  gap: 30px;
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.carousel-prev,
.carousel-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(20, 30, 60, 0.7);
  border: none;
  color: white;
  font-size: 26px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: 0.3s ease;
  z-index: 10;
}

.carousel-prev:hover,
.carousel-next:hover {
  background: var(--accent);
  color: #000;
}

.carousel-prev {
  left: 10px;
}

.carousel-next {
  right: 10px;
}

.rating {
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 14px;
}

.product-info {
  list-style: none;
  margin: 10px 0;
  font-size: 13px;
  color: #cfd8ff;
}

.product-info li {
  margin-bottom: 4px;
}

footer {
  background: var(--bg-secondary);
  padding-top: 60px;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 40px;
  padding-bottom: 40px;
}

.footer-logo {
  font-weight: 800;
  font-size: 1.3rem;
}

.footer-logo span {
  color: var(--accent);
}

.footer-tagline {
  color: var(--text-muted);
  margin-top: 10px;
  font-size: 14px;
}

.footer-links a {
  display: block;
  margin-bottom: 8px;
  color: var(--text-soft);
  text-decoration: none;
  transition: 0.3s;
  font-size: 14px;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-social {
  display: flex;
  gap: 18px;
}

.footer-social a {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
  color: white;
  transition: all 0.3s ease;
}

.footer-social a:hover {
  background: var(--accent);
  color: #000;
  transform: translateY(-3px);
}

.footer-social svg {
  width: 18px;
  height: 18px;
}

.footer-bottom {
  text-align: center;
  padding: 20px 0;
  font-size: 13px;
  color: var(--text-muted);
  border-top: 1px solid rgba(255,255,255,0.05);
}

/* Responsive */
@media (max-width: 768px) {
  .footer-wrapper {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    margin-top: 20px;
  }
}

@media (max-width: 1024px) {
  .product-card {
    width: 260px;
    flex: 0 0 260px;
  }
}

@media (max-width: 768px) {
  .hero {
    padding: 70px 0;
  }

  .hero h2 {
    font-size: 2rem;
  }

  .nav {
    flex-direction: column;
    gap: 15px;
  }

  nav a {
    margin-left: 0;
  }

  .product-card {
    width: 90%;
    flex: 0 0 90%;
  }

  .carousel-track {
    gap: 20px;
  }
}

.codes-section {
  padding: 90px 0;
  text-align: center;
}

.codes-sub {
  color: var(--text-muted);
  margin-top: 10px;
  margin-bottom: 50px;
  font-size: 1.8vh;
}

.codes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 30px;
}

.code-card {
  background: linear-gradient(
    145deg,
    rgba(16,40,63,0.95),
    rgba(12,32,52,0.95)
  );
  padding: 35px;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,0.05);
  transition: all 0.3s ease;
}

.code-card:hover {
  transform: translateY(-6px);
  border: 1px solid rgba(255,193,7,0.3);
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.code-title {
  font-weight: 2.2vh;
  margin-bottom: 20px;
  letter-spacing: 0.5px;
  font-size: 15px;
  color: var(--text-soft);
}

.code-box-alt {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-secondary);
  padding: 14px 18px;
  border-radius: 14px;
  font-weight: 1.4vh;
  letter-spacing: 1px;
  color: var(--accent);
  font-size: 16px;
}

.copy-btn-alt {
  background: var(--accent);
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 1.8vh;
  cursor: pointer;
  transition: all 0.3s ease;
}

.copy-btn-alt:hover {
  background: var(--accent-hover);
  transform: scale(1.05);
}

/* ===== MOBILE OPTIMIZACIÓN REAL ===== */
@media (max-width: 480px) {

  body {
    padding-top: 60px;
  }

  .container {
    width: 92%;
  }

  /* NAV */
  .logo {
    font-size: 1.8rem;
  }

  .nav {
    flex-direction: column;
    gap: 10px;
  }

  nav {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
  }

  nav a {
    font-size: 14px;
  }

  /* HERO */
  .hero {
    padding: 60px 0;
  }

  .hero h2 {
    font-size: 1.6rem;
    line-height: 1.3;
  }

  .hero p {
    font-size: 1rem;
    margin-bottom: 25px;
  }

  .btn-primary {
    padding: 12px 24px;
    font-size: 14px;
  }

  /* CAROUSEL */
  .carousel {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
  }

  .carousel-track {
    gap: 16px;
  }

  .product-card {
    width: 85%;
    flex: 0 0 85%;
    padding: 18px;
    scroll-snap-align: center;
  }

  .product-card img {
    height: 170px;
  }

  .current {
    font-size: 1.4rem;
  }

  .product-info {
    font-size: 12px;
  }

  .discount-badge {
    font-size: 11px;
    padding: 4px 10px;
  }

  /* CATEGORIES */
  .category-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .category-card {
    padding: 25px;
    font-size: 15px;
  }

  /* CODES */
  .codes-grid {
    grid-template-columns: 1fr;
  }

  .code-box-alt {
    flex-direction: column;
    gap: 10px;
    font-size: 14px;
  }

  .copy-btn-alt {
    width: 100%;
  }

  /* FOOTER */
  .footer-wrapper {
    flex-direction: column;
    text-align: center;
    gap: 25px;
  }

  .footer-social {
    justify-content: center;
  }

  .footer-bottom {
    font-size: 12px;
  }

  /* STICKY BAR */
  .sticky-bar {
    font-size: 0.9rem;
    padding: 8px;
  }
}