/* ============================
   VARIABLES Y TIPOGRAFÍA
============================ */
:root {
  --bg: #0f1724;
  --card: #0b1220;
  --muted: #9aa4b2;
  --accent: #5F85DB;
  --success: #3CB371;
  --danger: #FF6B6B;
  --glass: rgba(255, 255, 255, 0.03);
  --radius: 12px;
  --gap: 18px;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

/* ============================
   RESET Y BASE
============================ */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  background: linear-gradient(180deg, #071226 0%, #071725 100%);
  color: #e6eef6;
  font-family: var(--font-family);
}

/* ============================
   CONTENEDOR PRINCIPAL
============================ */
.wrap {
  max-width: 1100px;
  margin: 24px auto;
  padding: 20px;
}

/* ============================
   HEADER MODERNO
============================ */
.modern-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  background: rgba(15,23,36,0.85);
  backdrop-filter: blur(12px);
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.5);
  position: relative;
  z-index: 50;
  transition: background 0.3s ease;
  flex-wrap: wrap;
}

.modern-header:hover {
  background: rgba(15,23,36,0.95);
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 12px; /* si quieres redondeado */
  background: var(--glass);
  padding: 4px;
}

.logo-text h1 {
  font-size: 22px;
  font-weight: 700;
  background: linear-gradient(90deg,#7aa0ff,#5f85db);
  color: transparent; /* color base */
  -webkit-background-clip: text; /* necesario para Chrome/Safari */
  -webkit-text-fill-color: transparent; /* necesario para Chrome/Safari */
  background-clip: text; /* para Firefox */
  margin: 0;
  display: inline-block; /* importante para background-clip */
}

.logo-text p {
  font-size: 13px;
  color: var(--muted);
  margin: 2px 0 0 0;
}

/* Responsive logo */
@media (max-width: 520px) {
  .logo {
    gap: 8px;
  }
  .logo-img {
    width: 36px;
    height: 36px;
  }
  .logo-text h1 {
    font-size: 18px;
  }
  .logo-text p {
    font-size: 12px;
  }
}


/* ============================
   BURGER MODERNO
============================ */
.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 60;
}

.burger span {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--accent);
  border-radius: 3px;
  transition: all 0.35s ease;
}

.burger.open span:nth-child(1) {
  transform: rotate(45deg) translate(6px,6px);
}
.burger.open span:nth-child(2) {
  opacity: 0;
}
.burger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(6px,-6px);
}


/* ============================
   NAV MODERNO
============================ */
.nav-menu {
  display: flex;
  gap: 24px;
  align-items: center;
}

.nav-menu ul {
  display: flex;
  list-style: none;
  gap: 24px;
}

.nav-menu a {
  text-decoration: none;
  font-weight: 600;
  color: #e6eef6;
  padding: 8px 12px;
  border-radius: 12px;
  transition: all 0.25s ease;
  position: relative;
}

.nav-menu a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg,#7aa0ff,#5f85db);
  transition: width 0.25s ease;
  border-radius: 2px;
}

.nav-menu a:hover::after {
  width: 100%;
}

.nav-menu a:hover {
  color: #7aa0ff;
  transform: translateY(-2px);
}




/* ============================
   RESPONSIVE HERO
============================ */
@media (max-width: 992px) {
  .hero {
    flex-direction: column;
    text-align: center;
    padding: 40px 16px;
  }

  .hero-content h1 {
    font-size: 2.2rem;
  }

  .hero-content p {
    font-size: 1.1rem;
  }

  .hero .logo-img {
    width: 48px;
    height: 48px;
  }

  .hero .logo-text h1 {
    font-size: 20px;
  }

  .hero .logo-text p {
    font-size: 11px;
  }
}

/* ============================
   RESPONSIVE HERO PARA MÓVIL
============================ */
@media (max-width: 520px) {
  .hero {
    padding: 24px 12px;
    justify-content: center;
    flex-direction: column;
    text-align: center;
  }

  /* Logo arriba del h1 */
  .hero .logo {
    order: -1; /* mueve el logo antes que el h1 */
    margin-bottom: 16px;
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .hero-content {
    flex: 1 1 100%;
  }

  .hero-content h1 {
    font-size: 1.8rem;
  }

  .hero-content p {
    font-size: 1rem;
  }

  /* Logo más pequeño */
  .hero .logo-img {
    width: 30px;
    height: 30px;
  }

  .hero .logo-text h1 {
    font-size: 16px;
  }

  .hero .logo-text p {
    font-size: 9px;
  }
}


/* ============================
   PRODUCTOS
============================ */
.products {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--gap);
}

.card {
  background: var(--card);
  padding: 16px;
  border-radius: var(--radius);
  box-shadow: 0 6px 18px rgba(3, 6, 12, 0.6);
  transition: transform 0.2s ease;
}

.card:hover {
  transform: translateY(-6px);
}

.thumb {
  height: 160px;
  border-radius: 12px;
  background: var(--glass);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  overflow: hidden;
}

.thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.title {
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 15px;
}

.price {
  font-weight: 700;
}

.desc {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
}

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ============================
   BOTONES
============================ */
button {
  cursor: pointer;
  border: 0;
  padding: 8px 14px;
  border-radius: 12px;
  background: linear-gradient(90deg, var(--accent), #7aa0ff);
  color: white;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(122,160,255,0.5);
}

.btn-ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--muted);
  padding: 8px 12px;
}

/* ============================
   CARRITO FLOTANTE
============================ */
.cart-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  background: linear-gradient(90deg, #7aa0ff, var(--accent));
  color: #fff;
  border-radius: 999px;
  padding: 12px 18px;
  display: flex;
  gap: 10px;
  align-items: center;
  box-shadow: 0 8px 30px rgba(31, 49, 80, 0.6);
  z-index: 60;
}

.cart-fab .count {
  background: rgba(255, 255, 255, 0.12);
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 700;
}

/* ============================
   MODAL DEL CARRITO
============================ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 6, 12, 0.7);
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 20px;
  z-index: 70;
}

.modal {
  width: 100%;
  max-width: 760px;
  background: linear-gradient(180deg, #081225, #071224);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 20px 60px rgba(2, 6, 12, 0.7);
  animation: modalIn 0.25s ease;
}

@keyframes modalIn {
  from { transform: translateY(50px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.cart-items {
  max-height: 380px;
  overflow-y: auto;
  margin-top: 12px;
}

.cart-item {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  margin-bottom: 10px;
}

.cart-item img {
  width: 64px;
  height: 48px;
  object-fit: contain;
  border-radius: 6px;
}

.cart-item .meta {
  flex: 1;
}

.qty {
  display: flex;
  gap: 6px;
  align-items: center;
}

.qty button {
  padding: 6px 8px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--muted);
}

/* ============================
   TOTAL Y FOOTER
============================ */
.total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
}

.muted {
  color: var(--muted);
  font-size: 13px;
}

footer {
  margin-top: 28px;
  color: var(--muted);
  font-size: 13px;
}

/* ============================
   RESPONSIVE
============================ */
@media (max-width: 992px) {
  .wrap { padding: 16px; }
  .products { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
  .thumb { height: 140px; }
}

@media (max-width: 768px) {
  .burger { display: flex; }
  .nav-menu {
    position: absolute;
    top: 60px;
    right: 0;
    background: rgba(15,23,36,0.95);
    flex-direction: column;
    width: 220px;
    padding: 16px;
    border-radius: 16px;
    gap: 12px;
    display: none;
    box-shadow: 0 12px 28px rgba(0,0,0,0.5);
  }
  .nav-menu.active { display: flex; }
  .nav-menu ul { flex-direction: column; gap: 12px; }
  .nav-menu a { font-size: 15px; }
}

@media (max-width: 520px) {
  .thumb { height: 120px; }
  header, .modern-header { flex-direction: column; align-items: flex-start; gap: 10px; }
  .modal-backdrop { align-items: flex-end; padding: 12px; }
  .modal { padding: 16px; }
  .cart-fab { padding: 10px 14px; gap: 6px; font-size: 14px; }
}




.filter-section {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 20px 0;
}

.filter-section label {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #1a1c2b;
  padding: 6px 12px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  color: #fff;
  transition: background 0.25s ease;
}

.filter-section input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #5F85DB; /* Color moderno */
  cursor: pointer;
}

.filter-section label:hover {
  background: #272a3b;
}


/* ============================
   FOOTER FULL WIDTH
============================ */
.footer {
  background: #0f1724;
  color: var(--muted);
  padding: 40px 24px 20px; /* padding arriba y abajo, horizontal lo reducimos */
  font-family: sans-serif;
  width: 100%; /* ocupar todo el ancho */
  box-sizing: border-box; /* incluye padding en el ancho */
  margin: 0; /* eliminar cualquier margen externo */
}

.footer-top {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 20px;
  align-items: flex-start;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-logo img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(255,255,255,0.03);
  padding: 4px;
}

.footer-logo .logo-text h2 {
  font-size: 20px;
  margin: 0;
  background: linear-gradient(90deg,#7aa0ff,#5f85db);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.footer-logo .logo-text p {
  font-size: 12px;
  margin: 0;
  color: var(--muted);
}

.footer-links a {
  display: block;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 6px;
  transition: color 0.25s;
}

.footer-links a:hover {
  color: #5f85db;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 16px;
  font-size: 12px;
  width: 100%;
}

.social-icons a {
  margin-left: 12px;
  display: inline-block;
  transition: transform 0.2s;
}

.social-icons a img {
  width: 20px;
  height: 20px;
}

.social-icons a:hover {
  transform: scale(1.2);
}

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

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

  .footer-bottom {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }

  .social-icons a {
    margin-left: 6px;
    margin-right: 6px;
  }
}



