body {
  /* Fondo con imagen PLANTILLA 1 */
  background: url("img/PLANTILLA 1.webp") no-repeat center center fixed;
  background-size: cover;
  color: white;
  font-family: sans-serif;
}

.header-bar {
  display: flex;
  align-items: center; /* todo centrado vertical */
  gap: 2rem; /* espacio entre h1 y nav */
  padding: 0.5rem 1rem;

  /* Glassmorphism header */
  background: linear-gradient(
    135deg,
    rgba(0, 212, 255, 0.1) 0%,
    rgba(26, 77, 122, 0.35) 50%,
    rgba(0, 29, 61, 0.5) 100%
  );
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 2px solid rgba(255, 255, 255, 0.6);
  box-shadow: inset 0 0 30px rgba(0, 212, 255, 0.15),
    0 0 40px rgba(0, 212, 255, 0.25);
}

.nav-bar {
  display: flex;
  align-items: center;
  height: 100%; /* ocupa solo el alto del header */
}
.nav-bar {
  display: flex;
  align-items: center;
  color: white;
  text-decoration: none;
}
:root {
  /* Glassmorphism settings */
  --glass-blur: 35px;
  --glass-saturation: 100%;
  --glass-opacity: 0.08;

  /* Paleta de colores del logo - Tonos azules profundos */
  --bg-dark: #000814;
  --bg-navy: #001d3d;
  --bg-blue: #003566;
  --cyan-glow: #00d4ff;
  --cyan-light: #4dd4ff;
  --blue-glass: #1a4d7a;

  /* Colores glass con transparencia */
  --glass-blue-1: rgba(26, 77, 122, 0.6);
  --glass-blue-2: rgba(0, 212, 255, 0.15);
  --glass-border: rgba(255, 255, 255, 0.8);

  /* Configuración general */
  --text-color: #ffffff;
  --header-height: 70px;
  --player-height: 70px;
  --nav-height: 80px;
  --large-radius: 999px;
  --medium-radius: 20px;
  --nav-item-radius: 15px;
  --shadow-color: rgba(0, 0, 0, 0.25);
  --border-color: rgba(255, 255, 255, 0.2);
  --active-fill-color: rgba(255, 255, 255, 0.15);
  --active-text-color: #0b64a1;
  --text-muted-color: rgba(255, 255, 255, 0.6);
}

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

html {
  overflow-x: hidden;
  width: 100%;
}

body {
  min-height: 200vh;
  width: 100%;
  max-width: 100vw;
  background: url("img/PLANTILLA 1.webp") no-repeat center center fixed;
  background-size: cover;
  transition: background 1s ease-in-out;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  color: var(--text-color);
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

.glass-effect {
  /* Efecto glassmorphism mejorado con colores del logo */
  background: linear-gradient(
    135deg,
    rgba(0, 212, 255, 0.1) 0%,
    rgba(26, 77, 122, 0.4) 50%,
    rgba(0, 29, 61, 0.6) 100%
  );
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 2px solid rgba(255, 255, 255, 0.6);
  box-shadow: inset 0 0 40px rgba(0, 212, 255, 0.2),
    inset 0 0 80px rgba(26, 77, 122, 0.1), 0 0 60px rgba(0, 212, 255, 0.3),
    0 0 100px rgba(0, 212, 255, 0.1), 0 8px 30px var(--shadow-color);
}

/* Navbar authentication styles */
.btn-login {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: var(--nav-item-radius);
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-color);
  text-decoration: none;
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
}

.btn-login:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--active-text-color);
  color: var(--active-text-color);
}

.btn-login__label {
  font-size: 0.9rem;
  font-weight: 500;
}

@media (max-width: 768px) {
  .btn-login__label {
    display: none;
  }
}

header {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 95%;
  max-width: 1200px;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  z-index: 10;

  /* Glassmorphism con colores del logo */
  background: linear-gradient(
    135deg,
    rgba(0, 212, 255, 0.1) 0%,
    rgba(26, 77, 122, 0.35) 50%,
    rgba(0, 29, 61, 0.5) 100%
  );
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-radius: var(--medium-radius);
  border: 2px solid rgba(255, 255, 255, 0.6);
  box-shadow: inset 0 0 30px rgba(0, 212, 255, 0.15),
    0 0 40px rgba(0, 212, 255, 0.25), 0 20px 50px rgba(0, 0, 0, 0.3),
    0 0 80px rgba(0, 212, 255, 0.08);
}

header h1 {
  font-size: 1.5rem;
}

nav a {
  margin-left: 1rem;
  color: var(--text-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

nav a:hover {
  color: rgba(255, 255, 255, 0.8);
}

main {
  flex-grow: 1;
  padding-top: calc(var(--header-height) + 40px + 2rem);
  padding-bottom: calc(var(--nav-height) + 2rem);
  width: 90%;
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 3rem;
  position: relative;
  z-index: 1;
}

section {
  border-radius: 30px;
  padding: 2rem;
  overflow: hidden;

  /* Glassmorphism con colores del logo */
  background: linear-gradient(
    135deg,
    rgba(0, 212, 255, 0.1) 0%,
    rgba(26, 77, 122, 0.4) 50%,
    rgba(0, 29, 61, 0.6) 100%
  );
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 2px solid rgba(255, 255, 255, 0.6);
  box-shadow: inset 0 0 40px rgba(0, 212, 255, 0.2),
    inset 0 0 80px rgba(26, 77, 122, 0.1), 0 0 60px rgba(0, 212, 255, 0.3),
    0 0 100px rgba(0, 212, 255, 0.1), 0 8px 30px var(--shadow-color);
}

section h2 {
  margin-bottom: 1.5rem;
  font-size: 1.8rem;
  text-align: center;
  color: var(--text-color);
}

/* --- SECCIÓN "SOMOS ORIGAMI" CON GLASSMORPHISM ESPECIAL --- */
#info {
  border-radius: 30px;
  padding: 2.5rem;
  text-align: center;

  /* Glassmorphism premium con degradado especial */
  background: linear-gradient(
    160deg,
    rgba(0, 212, 255, 0.15) 0%,
    rgba(26, 77, 122, 0.5) 50%,
    rgba(0, 29, 61, 0.7) 100%
  );
  backdrop-filter: blur(25px) saturate(200%);
  -webkit-backdrop-filter: blur(25px) saturate(200%);
  border: 2px solid rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 0 50px rgba(0, 212, 255, 0.25),
    inset 0 0 100px rgba(26, 77, 122, 0.15), 0 0 80px rgba(0, 212, 255, 0.35),
    0 0 120px rgba(0, 212, 255, 0.15), 0 10px 40px rgba(0, 0, 0, 0.3);
}

/* --- MODIFIED MUSIC PLAYER STYLES --- */
.music-player {
  height: var(--player-height);
  border-radius: var(--large-radius);
  display: flex;
  align-items: center;
  padding: 0.5rem 1.5rem;
  gap: 1rem;
  margin-top: 1rem;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(15px) saturate(120%);
  border: 1px solid rgba(255, 255, 255, 0.25);
  /* FIXED SHADOW for better glass effect */
  box-shadow: 0 700px 12px rgba(0, 0, 0, 0.3),
    inset 0 1px 1px rgba(255, 255, 255, 0.3);
}

.music-player__album-art {
  width: calc(var(--player-height) - 1rem);
  height: calc(var(--player-height) - 1rem);
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
}

.music-player__album-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.music-player__info {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-player__song-title {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text-color);
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-player__artist {
  font-size: 0.9rem;
  color: var(--text-muted-color);
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-player__controls {
  display: flex;
  gap: 1.2rem;
  font-size: 1.5rem;
  color: var(--text-color);
  align-items: center;
  flex-shrink: 0;
}

.music-player__controls .fa-solid {
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.music-player__controls .fa-solid:hover {
  opacity: 1;
  transform: scale(1.1);
}

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0 1rem;
  z-index: 10;
  border-radius: 0;
  background: rgba(40, 40, 40, var(--glass-opacity));
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
  border-top: 1px solid var(--border-color);
  box-shadow: 0 -8px 30px var(--shadow-color);
}

.bottom-nav__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-muted-color);
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 500;
  transition: color 0.2s ease, background-color 0.2s ease;
  width: 100px;
  height: calc(var(--nav-height) - 30px);
  border-radius: var(--nav-item-radius);
  cursor: pointer;
  padding: 5px;
  position: relative;
}

.bottom-nav__item:hover {
  color: var(--text-color);
  background-color: rgba(255, 255, 255, 0.05);
}

.bottom-nav__item.active {
  color: var(--active-text-color);
  background-color: var(--active-fill-color);
  font-weight: 600;
}

.bottom-nav__item i {
  font-size: 1.4rem;
  margin-bottom: 5px;
  transition: color 0.2s ease;
}

.bottom-nav__search-icon {
  width: 60px;
  height: 60px;
  border-radius: var(--nav-item-radius);
  background-color: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: var(--text-color);
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
  flex-shrink: 0;
}

.bottom-nav__search-icon:hover {
  background-color: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

@media (max-width: 768px) {
  header {
    padding: 0 1rem;
    height: 60px;
    top: 10px;
  }
  header h1 {
    font-size: 1.2rem;
  }
  nav {
    display: none;
  }
  .music-player {
    padding: 0.5rem 1rem;
  }
  .music-player__album-art {
    width: 50px;
    height: 50px;
  }
  .music-player__song-title {
    font-size: 1rem;
  }
  .music-player__artist {
    font-size: 0.8rem;
  }
  .music-player__controls {
    font-size: 1.3rem;
    gap: 0.8rem;
  }
  .bottom-nav__item {
    font-size: 0.65rem;
    width: auto;
    flex-grow: 1;
    height: calc(var(--nav-height) - 25px);
  }
  .bottom-nav__item span {
    display: none;
  }
  .bottom-nav__item i {
    font-size: 1.5rem;
    margin-bottom: 0;
  }
  .bottom-nav__search-icon {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    flex-grow: 0;
  }
  main {
    padding-top: calc(var(--header-height) + 20px + 1rem);
    padding-bottom: calc(var(--nav-height) + 1rem);
    width: 95%;
  }
}
/* contenedor de cards: columnas parejas */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 1.5rem;
  width: 100%;
}

/* card: ancho/alto consistentes con glassmorphism */
.card {
  display: grid;
  grid-template-rows: auto 1fr auto auto; /* título / foto / desc / precio */
  height: 420px;
  padding: 1rem;
  border-radius: 20px;
  box-sizing: border-box;
  width: 100%;
  max-width: 300px;
  margin: 0 auto;

  /* Glassmorphism en las tarjetas */
  background: linear-gradient(
    140deg,
    rgba(0, 212, 255, 0.12) 0%,
    rgba(26, 77, 122, 0.35) 50%,
    rgba(0, 29, 61, 0.5) 100%
  );
  backdrop-filter: blur(15px) saturate(170%);
  -webkit-backdrop-filter: blur(15px) saturate(170%);
  border: 2px solid rgba(255, 255, 255, 0.5);
  box-shadow: inset 0 0 30px rgba(0, 212, 255, 0.15),
    0 0 40px rgba(0, 212, 255, 0.2), 0 8px 25px rgba(0, 0, 0, 0.25);
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  border-color: rgba(0, 212, 255, 0.8);
  box-shadow: inset 0 0 40px rgba(0, 212, 255, 0.25),
    0 0 60px rgba(0, 212, 255, 0.4), 0 12px 35px rgba(0, 0, 0, 0.35);
}

/* título y desc no empujan la imagen */
.card h3 {
  margin: 0 0 0.5rem;
  min-height: 3rem;
  text-align: center;
}
.card p {
  margin: 0.5rem 0 0;
  min-height: 1.6rem;
  text-align: center;
}

/* FOTO GRANDE, centrada, sin deformar */
.card__media {
  height: 200px; /* ↑ hace la imagen más grande */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.card__media img {
  max-height: 100%;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

/* mini-card de precio */
.card__price {
  margin-top: 0.5rem;
  padding: 0.4rem 0.8rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.15);
  font-weight: 600;
  text-align: center;
  justify-self: center;
}

.nav-search {
  position: relative;
  width: 44px; /* estado cerrado = solo círculo */
  height: 44px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  overflow: hidden;
  display: flex;
  align-items: center;
  transition: width 0.25s ease;
}
.nav-search__btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative; /* asegura capa propia */
  z-index: 2; /* por encima del input */
}
.nav-search__btn i {
  pointer-events: none;
  opacity: 0.9;
}

.nav-search__input {
  position: absolute;
  inset: 0;
  padding: 0 12px 0 44px; /* deja lugar a la lupa */
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  opacity: 0;
  z-index: 1; /* por debajo del botón */
  transition: opacity 0.2s ease;
}
.nav-search__input,
.nav-search__input::-webkit-search-cancel-button,
.nav-search__input::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
}
.nav-search__input::-ms-clear {
  display: none;
}
.nav-search__input::-webkit-search-cancel-button {
  display: none;
}
.nav-search__input::placeholder {
  opacity: 0.6;
  color: #cbd5e1;
}
.nav-search__input::placeholder {
  color: #cbd5e1;
  opacity: 0.6;
  height: 28px; /* más chico */
  font-size: 0.85rem;
  padding: 0 8px;
  border-radius: 8px;
}

/* abrir al pasar el mouse */
.nav-search:hover {
  width: 240px;
}
.nav-search:hover .nav-search__input {
  opacity: 1;
}

/* barra: respiración y separación global */
.header-bar {
  padding: 10px 14px; /* más aire */
  gap: 16px;
  justify-content: space-between;
  align-items: center;
  height: 70px; /* antes seguramente estaba en 100px+ */
  padding: 0 20px;
  display: flex;
  align-items: center; /* centra verticalmente */
  justify-content: space-between;
}

/* links del nav con espacio y hover suave */
.nav-bar {
  display: flex;
  align-items: center;
  gap: 18px; /* separa Tienda / Nosotros */
}

/* Ocultar menú hamburguesa en desktop */
.menu-toggle {
  display: none !important;
}

/* Menú móvil y overlay siempre en el DOM pero oculto por defecto */
.nav-mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: -280px;
  width: 280px;
  height: 100vh;
  transition: left 0.3s ease;
  z-index: 9999;
}

.nav-mobile-overlay {
  display: block;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s, visibility 0.3s;
}

/* En desktop, ocultar completamente el menú móvil y el botón hamburguesa */
@media (min-width: 769px) {
  .menu-toggle {
    display: none !important;
  }

  .nav-mobile-menu {
    left: -280px !important;
    pointer-events: none !important;
  }

  .nav-mobile-overlay {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
  }
}
.nav-bar a {
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 0.9rem;
  margin-left: 15px;
}
.nav-bar a:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* --- Carrito en navbar --- */
.carrito {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.carrito i {
  font-size: 1.1rem;
}
.cart-badge {
  position: absolute;
  top: -6px;
  right: -8px;
  background: #ef4444;
  color: #fff;
  border-radius: 999px;
  padding: 0 6px;
  height: 18px;
  min-width: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  line-height: 1;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

/* --- Modal de carrito --- */
.cart-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 2000;
}
.cart-modal.is-open {
  display: block;
}
.cart-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);
}
.cart-modal__panel {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: 380px;
  max-width: 92vw;
  border-radius: 20px 0 0 20px;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 0;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  overflow: hidden;

  /* Glassmorphism para el panel del carrito */
  background: linear-gradient(
    180deg,
    rgba(0, 212, 255, 0.12) 0%,
    rgba(26, 77, 122, 0.45) 50%,
    rgba(0, 29, 61, 0.65) 100%
  );
  backdrop-filter: blur(25px) saturate(180%);
  -webkit-backdrop-filter: blur(25px) saturate(180%);
  border-left: 2px solid rgba(255, 255, 255, 0.6);
  box-shadow: inset 0 0 50px rgba(0, 212, 255, 0.2),
    -20px 0 60px rgba(0, 0, 0, 0.35), 0 0 100px rgba(0, 212, 255, 0.15);
}
.cart-modal.is-open .cart-modal__panel {
  transform: translateX(0);
}
.cart-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0 16px 8px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}
.cart-modal__header h3 {
  font-size: 1.5rem;
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.3px;
}
.cart-modal__close {
  background: none;
  border: 0;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s;
  line-height: 1;
  flex-shrink: 0;
  padding: 0;
  margin-right: 12px;
}
.cart-modal__close:hover {
  background: rgba(255, 255, 255, 0.08);
}
.cart-modal__list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1 1 auto;
  padding: 4px 0 0 0;
  margin: 0;
  min-height: 0;
}
.cart-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.06);
}
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.cart-item:nth-child(1) {
  animation-delay: 0.05s;
}
.cart-item:nth-child(2) {
  animation-delay: 0.1s;
}
.cart-item:nth-child(3) {
  animation-delay: 0.15s;
}
.cart-item:nth-child(4) {
  animation-delay: 0.2s;
}
.cart-item:nth-child(5) {
  animation-delay: 0.25s;
}
.cart-item__img {
  width: 70px;
  height: 70px;
  border-radius: 8px;
  object-fit: contain;
  flex-shrink: 0;
}
.cart-item__info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.cart-item__title {
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.3;
}
.cart-item__meta {
  font-size: 0.8rem;
  opacity: 0.65;
  line-height: 1.3;
}
.cart-item__price {
  font-weight: 800;
  font-size: 1.1rem;
  margin: 2px 0;
}
.cart-item__qty {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}
.cart-item__qty button {
  width: 28px !important;
  height: 28px !important;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 0 !important;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}
.cart-item__qty button:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: scale(1.08);
}
.cart-item__qty span {
  min-width: 28px;
  text-align: center;
  font-weight: 700;
  font-size: 0.95rem;
}
.cart-modal__footer {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px 0 4px;
  border-top: 1px solid var(--border-color);
  margin-top: 16px;
  flex-shrink: 0;
}
.cart-modal__total {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 8px;
  padding: 0 4px;
  width: 100%;
  text-align: left;
}
.cart-modal__total span {
  opacity: 0.85;
  font-size: 1rem;
  font-weight: 500;
}
.cart-modal__total strong {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-left: 0;
}
.cart-modal__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  width: 100%;
}
.cart-modal__actions .detalle-btn {
  flex: 1;
  min-width: 100% !important;
  width: 100% !important;
  height: 80px !important;
  white-space: nowrap;
  font-size: 1.5rem !important;
  text-align: center !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 0 !important;
}
.cart-modal__actions button.detalle-btn {
  padding: 0 !important;
  margin: 0 !important;
}
.cart-modal__actions a.detalle-btn {
  text-decoration: none;
}

/* buscador: no pegado y expansión más ancha */
.nav-search {
  /* tu widget actual */
  margin-left: 16px; /* separa de los links */
  width: 44px; /* cerrado */
}
.nav-search:hover {
  width: 240px;
} /* abierto más cómodo */
.nav-search__input {
  padding: 0 12px 0 44px;
}

/* logo un poco más limpio */
.logo-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
}

.header-bar h1 a img {
  height: 100px;
  width: auto;
}

.header-bar h1 {
  font-size: 1.3rem; /* achicar título */
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px; /* espacio con el logo */
}

.header-bar img {
  width: 64px; /* tamaño logo */
  height: 64px;
  border-radius: 50%;
}

:root {
  --header-top: 20px; /* distancia desde arriba */
  --header-h: 64px; /* alto del navbar */
  --header-w: 1080px; /* ancho máx del navbar */
}

/* mismo header de la home */
.header-bar {
  position: fixed;
  top: var(--header-top);
  left: 50%;
  transform: translateX(-50%);
  width: min(92%, var(--header-w));
  height: var(--header-h);
  z-index: 1000;
}

.quickcats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.chip {
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 0.85rem;
  backdrop-filter: blur(10px) saturate(140%);
}
.chip.is-active {
  background: rgba(255, 255, 255, 0.22);
}

:root {
  --header-top: 20px; /* separación superior */
  --header-h: 76px; /* alto del navbar (antes 64) */
  --header-w: 1200px; /* ancho máx del navbar */
}

.header-bar {
  position: fixed;
  top: var(--header-top);
  left: 50%;
  transform: translateX(-50%);
  width: min(92%, var(--header-w));
  height: var(--header-h);
  padding: 0 20px; /* un poco más de aire */
  border-radius: 18px;
  z-index: 1000;
}

.header-bar h1 {
  font-size: 1.3rem;
}
.nav-bar a {
  font-size: 1rem;
}
.nav-search {
  height: 44px;
}
.nav-search__input {
  height: 44px;
}

/* empuja el contenido para que no quede debajo del header */
.store.wrap,
main.store {
  margin-top: calc(var(--header-top) + var(--header-h) + 16px);
}

/* ==================== RESPONSIVE NAVBAR ==================== */

/* Tablets y pantallas medianas */
@media (max-width: 900px) {
  :root {
    --header-h: 64px;
    --header-top: 16px;
  }

  .header-bar {
    width: min(95%, var(--header-w)) !important;
    padding: 0 16px !important;
    height: 64px !important;
    gap: 12px !important;
  }

  .header-bar h1 img {
    height: 80px;
  }

  .nav-bar {
    gap: 12px;
  }

  .nav-bar a {
    font-size: 0.85rem;
    margin-left: 8px;
    padding: 6px 8px;
  }

  .nav-search {
    width: 40px;
    height: 40px;
  }

  .nav-search:hover {
    width: 180px;
  }
}

/* Móviles */
@media (max-width: 768px) {
  :root {
    --header-h: 50px;
    --header-top: 10px;
  }

  .header-bar {
    height: 50px !important;
    padding: 0 12px !important;
    gap: 6px !important;
    flex-wrap: nowrap;
    width: min(96%, 100%) !important;
    justify-content: space-between;
    overflow: hidden;
  }

  .header-bar h1 {
    font-size: 0.85rem;
    flex-shrink: 1;
    min-width: 0;
    gap: 4px;
  }

  .header-bar h1 {
    display: flex !important;
    align-items: center;
    gap: 4px;
    margin: 0 auto 0 8px !important;
  }

  .header-bar h1 .logo-circle {
    width: 32px !important;
    height: 32px !important;
    flex-shrink: 0;
  }

  .header-bar h1 img {
    height: 40px !important;
    width: auto;
    max-width: 70px;
    flex-shrink: 1;
  }

  /* Ocultar links del navbar en móvil, mantener solo iconos */
  .nav-bar > a:not(.carrito):not(.btn-login):not(.menu-toggle) {
    display: none !important;
  }

  /* Ocultar la búsqueda en móvil */
  .nav-search {
    display: none !important;
  }

  /* Botón hamburguesa al final */
  .menu-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 4px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    cursor: pointer;
    flex-shrink: 0;
    order: 3;
    color: white;
    text-decoration: none;
  }

  .menu-toggle i {
    font-size: 0.9rem;
  }

  .nav-bar {
    gap: 5px;
    margin-left: auto;
    flex-shrink: 0;
    display: flex !important;
    align-items: center;
    padding-right: 0;
    overflow: hidden;
    position: relative;
    flex-wrap: nowrap;
  }

  /* Menú lateral (sidebar) */
  .nav-mobile-menu {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    background: linear-gradient(
      180deg,
      rgba(10, 22, 40, 0.98) 0%,
      rgba(0, 29, 61, 0.98) 100%
    );
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    padding: 20px;
    z-index: 9999;
    transition: left 0.3s ease;
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.5);
  }

  .nav-mobile-menu.is-open {
    left: 0;
  }

  .nav-mobile-menu__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .nav-mobile-menu__logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: 700;
  }

  .nav-mobile-menu__logo img {
    width: 40px;
    height: auto;
  }

  .nav-mobile-menu__close {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
  }

  .nav-mobile-menu__links {
    display: flex;
    flex-direction: column;
    gap: 5px;
  }

  .nav-mobile-menu__links a {
    padding: 12px 16px;
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-size: 1rem;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .nav-mobile-menu__links a:hover {
    background: rgba(255, 255, 255, 0.1);
  }

  .nav-mobile-menu__links a i {
    width: 20px;
    text-align: center;
    opacity: 0.8;
  }

  /* Divisor */
  .nav-mobile-menu__divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 15px 0;
  }

  /* Carrito en menú móvil */
  .nav-mobile-menu__cart {
    position: relative;
  }

  .nav-mobile-badge {
    position: absolute;
    right: 16px;
    background: var(--glow-blue, #00a8ff);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
  }

  /* Login en menú móvil */
  .nav-mobile-menu__login {
    background: rgba(0, 168, 255, 0.15);
    border: 1px solid rgba(0, 168, 255, 0.3);
  }

  .nav-mobile-menu__login:hover {
    background: rgba(0, 168, 255, 0.25);
    border-color: rgba(0, 168, 255, 0.5);
  }

  .nav-mobile-menu__login:active,
  .nav-mobile-menu__login:focus {
    background: rgba(0, 168, 255, 0.15);
    border-color: rgba(0, 168, 255, 0.3);
    outline: none;
  }

  /* Overlay para cerrar el menú */
  .nav-mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 9998;
  }

  .nav-mobile-overlay.is-open {
    display: block;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  /* Carrito primero después del logo */
  .carrito {
    order: 1;
  }

  /* Login en el medio */
  .btn-login {
    order: 2;
  }

  /* Hamburger al final (ya definido arriba con order: 3) */

  /* Carrito más pequeño */
  .carrito {
    padding: 4px;
    min-width: 30px !important;
    height: 30px !important;
    width: 30px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    flex-shrink: 0 !important;
    position: relative;
  }

  /* Botón de login más compacto */
  .btn-login {
    padding: 4px !important;
    font-size: 0.85rem;
    min-width: 30px !important;
    height: 30px !important;
    width: 30px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    flex-shrink: 0 !important;
    visibility: visible !important;
    opacity: 1 !important;
    background: rgba(255, 255, 255, 0.15) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 8px !important;
  }

  .btn-login__label {
    display: none !important;
  }

  .btn-login i {
    font-size: 0.9rem;
    margin: 0;
  }

  .carrito i {
    font-size: 0.9rem;
  }

  .cart-badge {
    top: -2px;
    right: -2px;
    font-size: 0.6rem;
    min-width: 14px;
    height: 14px;
    padding: 2px 3px;
  }
}

/* Móviles pequeños */
@media (max-width: 480px) {
  :root {
    --header-h: 48px;
    --header-top: 8px;
  }

  .header-bar {
    height: 48px !important;
    padding: 0 10px !important;
    gap: 4px !important;
    width: min(98%, 100%) !important;
    justify-content: space-between;
    overflow: hidden;
  }

  .header-bar h1 {
    font-size: 0.8rem;
    gap: 3px;
  }

  .header-bar h1 .logo-circle {
    width: 28px !important;
    height: 28px !important;
  }

  .header-bar h1 img {
    height: 36px !important;
    max-width: 60px;
  }

  .nav-bar {
    gap: 4px;
    padding-right: 2px;
  }

  /* Botón hamburguesa más pequeño */
  .menu-toggle {
    width: 28px !important;
    height: 28px !important;
    padding: 4px !important;
  }

  .menu-toggle i {
    font-size: 0.85rem !important;
  }

  .carrito {
    padding: 4px;
    min-width: 28px !important;
    height: 28px !important;
    width: 28px;
  }

  .carrito i {
    font-size: 0.85rem;
  }

  .btn-login {
    padding: 4px !important;
    min-width: 28px !important;
    height: 28px !important;
    width: 28px !important;
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .btn-login i {
    font-size: 0.85rem;
  }

  .cart-badge {
    font-size: 0.55rem;
    min-width: 12px;
    height: 12px;
    padding: 1px 2px;
    top: -2px;
    right: -2px;
  }
}

/* ==================== RESPONSIVE MAIN CONTENT ==================== */

/* Ajustes para tablets */
@media (max-width: 900px) {
  body {
    padding: 0 12px;
  }

  main {
    padding: 0 12px;
  }

  section {
    padding: 1.5rem 1rem;
    margin: 1rem 0;
  }

  section h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
  }

  /* Secciones de productos */
  #home-iphone,
  #home-products {
    gap: 0.8rem !important;
    padding: 1rem 0.5rem !important;
  }

  #home-iphone h2,
  #home-products h2 {
    font-size: 1.6rem !important;
  }

  /* Ajustar grid de productos a 2 columnas */
  .product-card {
    flex: 0 1 calc(50% - 0.5rem);
    min-width: 160px;
  }
}

/* Ajustes para móviles */
@media (max-width: 768px) {
  body {
    padding: 0 8px;
    margin-top: 80px;
  }

  main {
    padding: 0 8px;
    margin-top: 20px;
  }

  section {
    padding: 1.2rem 0.8rem;
    margin: 0.8rem 0;
    border-radius: 16px;
  }

  section h2 {
    font-size: 1.5rem;
    margin-bottom: 0.8rem;
  }

  /* Secciones de productos */
  #home-iphone,
  #home-products {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.6rem !important;
    padding: 0.8rem 0.4rem !important;
    justify-content: center !important;
  }

  #home-iphone h2,
  #home-products h2 {
    font-size: 1.4rem !important;
    text-align: center;
  }

  /* Productos en 2 columnas más compactas */
  .product-card {
    flex: 0 1 calc(50% - 0.5rem);
    min-width: 140px;
    max-width: none;
    margin: 0;
  }

  .product-card__img {
    height: 160px;
  }

  .product-card__title {
    font-size: 0.9rem;
  }

  .product-card__price {
    font-size: 1rem;
  }

  .product-card__meta {
    font-size: 0.8rem;
  }

  /* Sección info más compacta */
  #info {
    padding: 1.5rem 1rem;
  }

  #info h2 {
    font-size: 1.6rem;
  }

  #info p {
    font-size: 1rem !important;
    line-height: 1.5;
  }

  /* Modal del carrito responsive */
  .cart-modal__panel {
    width: 100%;
    max-width: 100%;
    border-radius: 20px 20px 0 0;
  }

  .cart-modal__header h3 {
    font-size: 1.3rem;
  }

  .cart-item {
    padding: 12px;
    gap: 10px;
  }

  .cart-item__img {
    width: 60px;
    height: 60px;
  }

  .cart-item__title {
    font-size: 0.9rem;
  }

  .cart-item__meta {
    font-size: 0.75rem;
  }

  .cart-item__price {
    font-size: 0.95rem;
  }
}

/* Ajustes para móviles pequeños */
@media (max-width: 480px) {
  body {
    padding: 0 6px;
    margin-top: 70px;
  }

  main {
    padding: 0 6px;
  }

  section {
    padding: 1rem 0.6rem;
    margin: 0.6rem 0;
    border-radius: 14px;
  }

  section h2 {
    font-size: 1.3rem;
    margin-bottom: 0.6rem;
  }

  /* Secciones de productos muy compactas */
  #home-iphone,
  #home-products {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
    padding: 0.6rem 0.3rem !important;
    justify-content: center !important;
  }

  #home-iphone h2,
  #home-products h2 {
    font-size: 1.2rem !important;
  }

  /* Productos en 2 columnas para móviles pequeños */
  .product-card {
    flex: 0 1 calc(50% - 0.4rem);
    min-width: 130px;
    max-width: none;
    margin: 0;
  }

  .product-card__img {
    height: 140px;
  }

  .product-card__title {
    font-size: 0.85rem;
    line-height: 1.2;
  }

  .product-card__price {
    font-size: 0.95rem;
  }

  .product-card__meta {
    font-size: 0.75rem;
  }

  /* Sección info */
  #info {
    padding: 1.2rem 0.8rem;
  }

  #info h2 {
    font-size: 1.4rem;
  }

  #info p {
    font-size: 0.9rem !important;
    line-height: 1.4;
  }

  /* Modal del carrito */
  .cart-modal__panel {
    border-radius: 16px 16px 0 0;
  }

  .cart-modal__header {
    padding: 16px 18px;
  }

  .cart-modal__header h3 {
    font-size: 1.2rem;
  }

  .cart-item {
    padding: 10px;
    gap: 8px;
  }

  .cart-item__img {
    width: 50px;
    height: 50px;
  }

  .cart-item__title {
    font-size: 0.85rem;
  }

  .cart-item__meta {
    font-size: 0.7rem;
  }

  .cart-item__price {
    font-size: 0.9rem;
  }

  .cart-modal__total {
    font-size: 1rem;
  }

  /* Botones más accesibles en móvil */
  button,
  .detalle-btn {
    min-height: 44px;
    padding: 12px 16px;
  }
}

/* Landscape en móviles */
@media (max-width: 900px) and (orientation: landscape) {
  .header-bar {
    height: 56px;
    top: 8px;
  }

  body {
    margin-top: 70px;
  }

  #home-iphone,
  #home-products {
    flex-direction: row;
  }

  .product-card {
    flex: 0 1 calc(33.333% - 0.6rem);
  }
}
