/* ==========================================
   1. VARIABLES & BASE (Reset)
   ========================================== */

:root {
  --bg: #0e0f14;
  --bg-soft: #141622;
  --primary: #e6003a;
  --secondary: #7a0cff;
  --muted: #b9b9c9;
  --glass: rgba(255,255,255,0.03);
  --accent-shadow: 0 8px 30px rgba(122,12,255,0.09);
  --max-width: 1100px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: radial-gradient(circle at top, #1b1e30 0%, var(--bg) 60%);
  color: #fff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-bottom: 120px;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}


/* ==========================================
   2. HERO & HEADINGS
   ========================================== */

header.hero {
  min-height: 72vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 0;
}

.hero-inner {
  width: 100%;
  display: flex;
  gap: 1.5rem;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.logo {
  max-width: 220px;
  width: 40%;
  height: auto;
  display: block;
  margin-bottom: 0.6rem;
}

h1 {
  font-size: clamp(1.8rem, 4.8vw, 3rem);
  line-height: 1.05;
  font-weight: 700;
  margin-bottom: 0.6rem;
}

h1 span {
  color: var(--primary);
}

.lead {
  color: var(--muted);
  max-width: 780px;
  font-size: 1.03rem;
  margin-bottom: 1.4rem;
}

.hero-ctas {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
  justify-content: center;
}

section {
  padding: 3.5rem 0;
}

section h2 {
  text-align: center;
  font-size: 1.9rem;
  margin-bottom: 1.6rem;
}

section h2 span {
  color: var(--primary);
}


/* ==========================================
   3. COMPONENTS (Cards, Buttons, Grids)
   ========================================== */

/* Grillas */
.services {
  display: grid;
  gap: 1.6rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  align-items: stretch;
}

.hardware-grid {
  display: grid;
  gap: 1.6rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  align-items: stretch;
}

/* Tarjetas */
.card {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.15));
  border-radius: 14px;
  padding: 1.1rem;
  border: 1px solid rgba(255,255,255,0.04);
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform 0.28s ease, box-shadow 0.28s ease;
  will-change: transform;
  position: relative;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 18px 60px rgba(2, 6, 23, 0.6);
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.card img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 0.9rem;
  background: linear-gradient(180deg, rgba(0,0,0,0.12), rgba(0,0,0,0.18));
}

.hardware-grid .card img {
  aspect-ratio: 1.2;
}

.card h3 {
  color: var(--primary);
  margin-bottom: 0.6rem;
  font-size: 1.05rem;
}

.card p {
  color: var(--muted);
  font-size: 1.05rem;
  margin-bottom: 0.6rem;
  flex-grow: 0;
}

.card ul {
  list-style: none;
  color: var(--muted);
  margin-bottom: 0.8rem;
  padding-left: 0;
}

.card ul li {
  margin-bottom: 0.35rem;
  font-size: 0.92rem;
}

.card-note {
  display: block;
  margin-top: 0.6rem;
  color: #ffbf24;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.2;
}

.card-footer {
  margin-top: auto;
  display: flex;
  gap: 0.6rem;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
}

.price {
  font-weight: 700;
  color: #fff;
  min-width: 110px;
}

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  padding: 0.9rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: 0 10px 30px rgba(230,0,58,0.14);
  transition: transform 0.18s ease, box-shadow .18s ease;
  border: none;
  cursor: pointer;
  line-height: 1;
}

.btn:active {
  transform: translateY(1px) scale(0.998);
}

.btn:focus {
  outline: 3px solid rgba(230,0,58,0.18);
  outline-offset: 3px;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.02);
  color: var(--muted);
  cursor: pointer;
  font-weight: 700;
  transition: all 0.12s ease;
}

.icon-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.6);
}

.btn-delete {
  color: #ff6b6b;
  border-color: rgba(255,107,107,0.12);
  background: rgba(255,107,107,0.03);
}


/* ==========================================
   4. SHOPPING CART (Panel & Floating Icons)
   ========================================== */

#cart-icon {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #e6003a, #7a0cff);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1200;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  transition: transform 0.15s ease;
}

#cart-icon:active {
  transform: scale(0.95);
}

#cart-icon img {
  width: 28px;
  height: 28px;
}

#cart-count {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #00ffcc;
  color: #000;
  font-size: 0.75rem;
  font-weight: bold;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#cart-panel {
  position: fixed;
  top: 80px;
  right: 20px;
  width: 300px;
  max-height: 80vh;
  background: var(--bg-soft);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.6);
  transform: translateX(120%);
  opacity: 0;
  transition: all 0.3s ease;
  overflow-y: auto;
  z-index: 1150;
}

#cart-panel.active {
  transform: translateX(0);
  opacity: 1;
}

.cart-item {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
  padding: 6px;
  border-radius: 10px;
  transition: all 0.2s ease;
}

.cart-item:hover {
  background: rgba(230,0,58,0.05);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.cart-item img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
}

.cart-item .info {
  flex: 1;
}

.cart-item .info span {
  display: block;
  font-weight: 600;
}

.cart-item .info small {
  color: var(--muted);
  font-size: 0.85rem;
}

.cart-item button {
  background: none;
  border: none;
  color: #ff4f4f;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.cart-item button:hover {
  transform: scale(1.2);
}

#cart-total {
  font-weight: bold;
  text-align: center;
  margin: 12px 0;
}

#checkout-btn {
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #e6003a, #7a0cff);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

#checkout-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(122,12,255,0.4);
}


/* ==========================================
   5. FORMS & CHECKOUT ELEMENTS
   ========================================= */

.contact-form {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.12));
  padding: 2rem;
  border-radius: 16px;
  margin: 3rem auto;
  max-width: 800px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}

.contact-form h2 {
  text-align: center;
  margin-bottom: 1.6rem;
  color: var(--primary);
}

.form-grid {
  display: grid;
  gap: 1.2rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--muted);
}

.form-group input,
.form-group textarea {
  padding: 0.8rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
  background: var(--bg-soft);
  color: #fff;
  font-size: 0.95rem;
}

.form-footer {
  text-align: center;
}

.form-footer .btn {
  width: 100%;
  max-width: 300px;
}

.pay-icon {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.04);
  background: linear-gradient(180deg, rgba(255,255,255,0.01), rgba(0,0,0,0.02));
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s, background 0.12s;
  text-align: left;
}

.pay-icon img {
  width: 44px;
  height: auto;
  display: block;
  border-radius: 6px;
}

.pay-icon .method-label {
  font-weight: 700;
  color: #fff;
  font-size: 0.95rem;
}

.pay-icon:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(0,0,0,0.6);
}

.pay-icon.active {
  box-shadow: 0 18px 40px rgba(0,170,255,0.12);
  border-color: rgba(0,170,255,0.12);
  transform: translateY(-4px);
}

.cart-row {
  display: flex;
  gap: 12px;
  align-items: center;
  background: rgba(255,255,255,0.01);
  padding: 10px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.02);
}

.cart-thumb {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  object-fit: cover;
  background: rgba(255,255,255,0.02);
  padding: 6px;
}

#paypal-container {
  margin-top: 12px;
}


/* ==========================================
   6. FOOTER & MISC
   ========================================= */

.pagos {
  padding: 2rem 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent);
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.pagos h4 {
  color: var(--primary);
  margin-bottom: 1rem;
  font-weight: 600;
  font-size: 1rem;
}

.payment-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  align-items: center;
}

.payment-cards img {
  height: 60px;
  object-fit: contain;
  filter: brightness(1.05);
  transition: transform 0.2s ease;
}

.payment-cards img:hover {
  transform: scale(1.1);
}

.accepted-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  opacity: 0.95;
}

.accepted-text {
  color: var(--muted);
  font-size: 0.9rem;
  margin-right: 6px;
}

.accepted-icons .card-icon {
  height: 28px;
  margin-right: 8px;
  opacity: 0.98;
}

.garantia {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent);
  border-radius: 12px;
  padding: 1.2rem;
  border: 1px solid rgba(255,255,255,0.03);
  color: var(--muted);
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
}

.contact {
  text-align: center;
  color: var(--muted);
}

.contact a {
  color: var(--primary);
  font-weight: 600;
}

footer {
  padding: 2rem 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.whatsapp {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 56px;
  height: 56px;
  background: linear-gradient(180deg, #28d66a, #05b86b);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 36px rgba(5,184,107,0.18);
  z-index: 1100;
  transition: transform 0.15s ease;
}

.whatsapp img {
  width: 28px;
  height: 28px;
  display: block;
}

.muted {
  color: var(--muted);
}

.sr-only {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}


/* ==========================================
   7. RESPONSIVE MEDIA QUERIES
   ========================================= */

@media (max-width: 880px) {
  .pay-icon img {
    width: 36px;
  }
  .cart-thumb {
    width: 48px;
    height: 48px;
  }
  .icon-btn {
    width: 32px;
    height: 32px;
  }
}

@media (max-width: 800px) {
  .logo {
    max-width: 160px;
    width: 34%;
  }
  .hero-inner {
    padding: 0 0.8rem;
  }
  .card-footer {
    min-height: 64px;
  }
  #cart-panel {
    transform: translateX(0);
    opacity: 1;
    top: 70px;
  }
}

@media (max-width: 500px) {
  #cart-panel {
    width: 90%;
    max-height: 60vh;
  }
  .cart-item img {
    width: 42px;
    height: 42px;
  }
}

@media (max-width: 460px) {
  .lead {
    font-size: 0.96rem;
  }
  header.hero {
    padding-top: 2rem;
    padding-bottom: 2rem;
    min-height: 62vh;
  }
  .card img {
    aspect-ratio: 4/3;
  }
}