:root {
  --bg: #0b1220;
  --card: #111a2e;
  --muted: #9db0d1;
  --text: #f3f6ff;
  --primary: #2e7dff;
  --secondary: #00b894;
  --accent: #1f2a44;
  --danger: #ff5c5c;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(180deg, #080d18, #0f1a30);
  color: var(--text);
  scroll-behavior: smooth;
  overflow-x: hidden;
}

.container {
  width: min(1120px, 92%); /* Regresamos al ancho de 1120px para que no se vea gigante */
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  background: rgba(8, 13, 24, 0.82);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 1px 18px rgba(0, 0, 0, 0.35);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.25rem 0;
  min-height: 44px;
}

.brand {
  text-decoration: none;
  color: inherit;
}

.brand h1 {
  margin: 0;
  font-size: 1.35rem;
}

.brand p {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.brand-with-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
}

.brand-logo {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  display: block;
  object-fit: contain;
  object-position: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.brand-logo:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 14px rgba(46, 125, 255, 0.35);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  width: 36px;
  height: 36px;
  padding: 4px;
  position: relative;
  z-index: 110;
  flex-shrink: 0;
  touch-action: manipulation;
  gap: 5px;
  border-radius: 6px;
  transition: background 0.2s ease;
}

.nav-toggle:hover,
.nav-toggle:active {
  background: rgba(255, 255, 255, 0.1);
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background-color: #ffffff;
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  flex-shrink: 0;
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
  transform: translateX(-10px);
}

.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.main-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-left: auto;
}

.main-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
  letter-spacing: 0.2px;
}

.main-nav a:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
}

.main-nav .auth-link {
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.3px;
  padding: 0.3rem 0.75rem;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.main-nav .auth-register {
  background: linear-gradient(135deg, #2e7dff, #61a4ff);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
}

.main-nav .auth-login {
  background: linear-gradient(135deg, #00b894, #29d6b4);
  color: #06241c;
  border-color: rgba(255, 255, 255, 0.2);
}

.main-nav .auth-register:hover,
.main-nav .auth-login:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.3);
}

.main-nav .auth-user-greeting {
  background: linear-gradient(135deg, #00b894, #00cec9);
  color: #04130f;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.3px;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  white-space: nowrap;
}

.main-nav .auth-logout {
  background: linear-gradient(135deg, #ff5c5c, #ff7b7b);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.3px;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.main-nav .auth-logout:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.3);
}

.hero {
  padding: 2.5rem 0 1rem;
  text-align: center;
  background: radial-gradient(circle at 20% 20%, rgba(46, 125, 255, 0.35), transparent 40%),
    radial-gradient(circle at 80% 0%, rgba(0, 184, 148, 0.25), transparent 38%);
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-content h2 {
  font-size: clamp(1.5rem, 4vw, 2.3rem);
  margin: 0 0 0.6rem;
}

.hero-content p {
  color: var(--muted);
  max-width: 760px;
  margin: 0 auto;
}

.quick-buttons {
  margin-top: 1.1rem;
  display: flex;
  justify-content: center;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.section {
  padding: 2.6rem 0;
}

h2 {
  margin: 0 0 1rem;
  font-size: 1.5rem;
}

.grid {
  display: grid;
  gap: 1rem;
}

.services-grid {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.products-grid {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  margin-bottom: 1.8rem;
}

.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
  border-color: rgba(46, 125, 255, 0.4);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
}

.product-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.product-desc {
  max-height: 140px;
  overflow-y: auto;
  margin: 0.25rem 0 0.75rem;
  color: #d5e0f5;
  padding-right: 5px;
}
.product-desc::-webkit-scrollbar {
  width: 5px;
}
.product-desc::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}
.product-desc::-webkit-scrollbar-thumb {
  background: rgba(0, 210, 211, 0.5);
  border-radius: 10px;
}

.product-card img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 0.7rem;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.product-card:hover img {
  transform: scale(1.05);
}

.product-card h3 {
  margin: 0.3rem 0 0.45rem;
}

.product-card p {
  margin: 0.25rem 0;
  color: #d5e0f5;
}

.price {
  font-weight: bold;
  color: #80ffe2 !important;
}

/* ── Slider de imágenes de producto ── */
.img-slider {
  position: relative;
  width: 100%;
  height: 170px;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 0.7rem;
}

.img-slider .slide-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.6s ease;
  margin-bottom: 0;
  border-radius: 0;
}

.img-slider .slide-img.active {
  opacity: 1;
}

.slider-dots {
  position: absolute;
  bottom: 7px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 5;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: background 0.25s ease, transform 0.2s ease;
}

.dot.active {
  background: #fff;
  transform: scale(1.25);
}

/* ── SKU del producto ── */
.product-sku {
  font-size: 0.78rem;
  color: #e8f0ff !important;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin: -0.1rem 0 0.3rem !important;
}

.btn {
  border: none;
  border-radius: 10px;
  cursor: pointer;
  padding: 0.68rem 0.95rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: transform 0.15s ease, opacity 0.2s ease;
  touch-action: manipulation;
}

.btn:hover {
  transform: translateY(-1px);
  opacity: 0.93;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.product-card .btn {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  width: 100% !important;
  gap: 8px;
  border-radius: 30px !important;
  font-weight: bold;
}

.btn-secondary {
  background: var(--secondary);
  color: #04130f;
}

.btn-whatsapp {
  background: #25d366;
  color: #03220f;
}

.cart-section #cart-items .cart-item,
.cart-item {
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
  padding: 10px 0;
  flex-wrap: nowrap;
}

/* Miniatura del producto */
.cart-item-thumb {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: #111a2e;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.cart-item-no-img {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

/* Nombre y precio unitario */
.cart-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.cart-item-name {
  font-size: 0.82rem;
  color: #f3f6ff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item-price {
  font-size: 0.72rem;
  color: #7a96c2;
}

/* Controles de cantidad */
.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.qty-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #f3f6ff;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s ease, transform 0.12s ease;
  flex-shrink: 0;
}

.qty-btn:hover {
  background: rgba(46, 125, 255, 0.35);
  transform: scale(1.1);
}

.qty-value {
  font-size: 0.88rem;
  font-weight: 700;
  min-width: 20px;
  text-align: center;
  color: #f3f6ff;
}

/* Subtotal + eliminar */
.cart-item-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.cart-item-subtotal {
  font-size: 0.82rem;
  font-weight: 700;
  color: #80ffe2;
}


.remove-item {
  background: transparent;
  color: #ff7070;
  border: 1px solid rgba(255, 92, 92, 0.3);
  border-radius: 6px;
  padding: 3px 7px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
  line-height: 1;
}

.remove-item:hover {
  background: rgba(255, 92, 92, 0.2);
  color: #ff5c5c;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

form label {
  display: block;
  margin-bottom: 0.7rem;
  color: #dbe7ff;
}

input,
textarea {
  width: 100%;
  margin-top: 0.35rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: #0d1730;
  color: var(--text);
  border-radius: 10px;
  padding: 0.62rem 0.7rem;
}

/* ── Toggle Password ── */
.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-wrapper input {
  padding-right: 40px;
}

.toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  padding: 0;
  margin-top: 2px;
  transition: opacity 0.2s;
}

.toggle-password:hover {
  opacity: 0.8;
}

/* ── Botón de Google ── */
.btn-google {
  background: #ffffff;
  color: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-top: 0.8rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: background 0.2s ease, transform 0.15s ease;
}

.btn-google:hover {
  background: #f1f5f9;
  transform: translateY(-1px);
}

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 1.5rem;
}

.site-footer p {
  margin: 0;
  padding: 1rem 0;
  color: var(--muted);
  text-align: center;
}

.auth-header .header-content {
  justify-content: flex-start;
}

/* ── SEARCH, CAROUSEL & FLOATING WHATSAPP ── */

/* Header Search */
.header-search {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 0.2rem 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.header-search:hover,
.header-search:focus-within {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(46, 125, 255, 0.4);
  box-shadow: 0 0 15px rgba(46, 125, 255, 0.15);
}

.header-search input {
  background: transparent;
  border: none;
  color: #fff;
  width: 110px; /* Base width */
  padding: 0.3rem 0.4rem;
  outline: none;
  font-size: 0.82rem;
  margin: 0;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.header-search input:focus {
  width: 180px; /* Expands on focus */
}

.header-search input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.header-search button {
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 0 0.2rem;
  font-size: 1.05rem;
  transition: transform 0.2s;
}

.header-search button:hover {
  transform: scale(1.1);
}

/* 🔍 Live Search Results */
.live-search-results {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 320px;
  background: #111a2e;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.6);
  z-index: 9999;
  display: none; /* Hidden by default */
  overflow: hidden;
  animation: searchAppear 0.2s ease-out;
}

@keyframes searchAppear {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.live-search-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: background 0.2s;
}

.live-search-item:last-child {
  border-bottom: none;
}

.live-search-item:hover {
  background: rgba(46, 125, 255, 0.15);
}

.live-search-item img {
  width: 38px;
  height: 38px;
  object-fit: cover;
  border-radius: 6px;
  background: #000;
}

.live-search-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.live-search-name {
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.live-search-price {
  font-size: 0.75rem;
  color: #80ffe2;
  font-weight: bold;
}

@media (max-width: 900px) {
  .header-search input {
    width: 90px;
  }
  .header-search input:focus {
    width: 130px;
  }
  .live-search-results {
    width: 280px;
    right: -20px;
  }
}

@media (max-width: 480px) {
  .header-search input:focus {
    width: 110px;
  }
  .live-search-results {
    width: 90vw;
    right: -40px;
    position: fixed;
    top: 60px;
    left: 5vw;
  }
}

/* Main Carousel */
.main-carousel {
  width: 100%;
  max-width: 1120px;
  margin: 0.5rem auto 1.5rem;
  padding: 0 1rem;
}

.carousel-container {
  position: relative;
  width: 100%;
  height: 400px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.5);
  background: #0b1220;
}

.carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.carousel-slide {
  min-width: 100%;
  height: 100%;
  position: relative;
  display: block;
  overflow: hidden;
}

/* 🟢 Efecto Ambient Blur (Fondo Difuminado Elegante) */
.carousel-slide::before {
  content: '';
  position: absolute;
  top: -10px; left: -10px; right: -10px; bottom: -10px; /* sangría para ocultar bordes del filtro blur */
  background-image: var(--bg-img);
  background-size: cover;
  background-position: center;
  filter: blur(25px) brightness(0.4) saturate(1.2);
  z-index: 1;
  pointer-events: none;
}

.carousel-slide img {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.9;
  transition: opacity 0.3s;
  background-color: rgba(11, 18, 32, 0.4);
}

/* Imágenes de producto (retrato/cuadradas) → mostrar completas sin recorte */
.carousel-slide.slide-producto img {
  object-fit: cover;
}

.carousel-slide:hover img {
  opacity: 1;
}

.carousel-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2.5rem 1.5rem 1.5rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
  color: #fff;
  font-size: 1.6rem;
  font-weight: 700;
  text-align: center;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
  z-index: 3;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.4);
  color: white;
  border: none;
  width: 44px;
  height: 44px;
  font-size: 1.3rem;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  transition: background 0.3s, transform 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.carousel-btn:hover {
  background: var(--primary);
  transform: translateY(-50%) scale(1.1);
}

.carousel-btn.prev {
  left: 15px;
}

.carousel-btn.next {
  right: 15px;
}

.carousel-container .carousel-dots {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}

.carousel-container .carousel-dots .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.carousel-container .carousel-dots .dot.active {
  background: #fff;
  transform: scale(1.3);
}

/* Floating WhatsApp */
.wa-widget-container {
  position: fixed;
  bottom: 95px; /* Arriba de la Flecha (30px + 48px + 17px) */
  right: 30px;
  z-index: 1000;
}

/* Floating Facebook */
.fb-widget-container {
  position: fixed;
  bottom: 170px; /* Arriba de WhatsApp (95px + 60px + 15px) */
  right: 30px;
  z-index: 1000;
}

.floating-facebook {
  width: 60px;
  height: 60px;
  background-color: #1877F2;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
  padding: 0;
  outline: none;
  margin-left: auto;
  text-decoration: none;
}

.floating-facebook:hover {
  transform: scale(1.15) rotate(5deg);
  box-shadow: 0 8px 20px rgba(24, 119, 242, 0.6);
}

.floating-facebook svg {
  width: 32px;
  height: 32px;
  fill: #fff;
}

.floating-whatsapp {
  width: 60px;
  height: 60px;
  background-color: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
  padding: 0;
  outline: none;
  margin-left: auto;
}

.floating-whatsapp:hover {
  transform: scale(1.15) rotate(-5deg);
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.6);
}

.floating-whatsapp svg {
  width: 36px;
  height: 36px;
  fill: #fff;
}

.floating-whatsapp .wa-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: #ff3b30;
  color: white;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #080d18;
}

.wa-chat-box {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 320px;
  background: #1e293b;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform-origin: bottom right;
  transform: scale(0);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease, visibility 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.wa-chat-box.open {
  transform: scale(1);
  opacity: 1;
  visibility: visible;
}

.wa-chat-header {
  background: #25d366;
  color: #fff;
  padding: 16px;
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wa-chat-close {
  background: rgba(0, 0, 0, 0.15);
  border: none;
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.wa-chat-close:hover {
  background: rgba(0, 0, 0, 0.3);
}

.wa-chat-body {
  padding: 24px 16px;
  background: #111a2e;
  /* matches card dark */
}

.wa-chat-message {
  background: #475569;
  color: #fff;
  padding: 12px 16px;
  border-radius: 18px;
  border-top-left-radius: 4px;
  font-size: 0.95rem;
  display: inline-block;
  max-width: 85%;
  position: relative;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.wa-chat-message::before {
  content: "";
  position: absolute;
  top: 0;
  left: -8px;
  width: 0;
  height: 0;
  border-top: 10px solid #475569;
  border-left: 10px solid transparent;
}

.wa-chat-footer {
  padding: 14px 16px;
  background: #1a2234;
  display: flex;
  justify-content: flex-end;
}

.wa-chat-btn {
  background: #25d366;
  color: #fff;
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  transition: background 0.2s, transform 0.2s;
  font-size: 0.95rem;
}

.wa-chat-btn:hover {
  background: #20b858;
  transform: translateY(-2px);
}


/* ── TABLET & MOBILE (≤ 900px) ── */
@media (max-width: 900px) {

  /* Mostrar el botón hamburguesa con las 3 líneas apiladas */
  .nav-toggle {
    display: -webkit-flex !important;
    display: -ms-flexbox !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    order: 0;
    flex-shrink: 0;
  }

  /* Header: hamburguesa | logo | [search] carrito */
  .header-content {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap;
    align-items: center;
    padding: 0.45rem 0;
    gap: 0.5rem;
    min-height: 48px;
  }

  .brand {
    font-size: 1.05rem;
  }

  /* Logo ocupa el espacio central sobrante */
  .brand-with-logo {
    flex: 1;
    gap: 0.3rem;
    min-width: 0;
  }

  .brand-logo {
    width: 44px;
    height: 44px;
    border-radius: 5px;
  }

  /* Ocultar el nav por defecto en móvil */
  .main-nav {
    display: none;
    flex-direction: column;
    width: 100%;
    margin-left: 0;
    gap: 0.4rem;
    padding: 0.6rem 0.3rem 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    margin-top: 0.4rem;
    order: 3;
    animation: navFadeIn 0.25s ease;
  }

  /* Mostrar nav cuando esté abierto */
  .main-nav.open {
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex !important;
  }

  @keyframes navFadeIn {
    from {
      opacity: 0;
      transform: translateY(-8px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .main-nav a {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text);
    padding: 0.55rem 1rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    background: rgba(255, 255, 255, 0.04);
    width: 100%;
    text-align: left;
    white-space: nowrap;
    box-sizing: border-box;
  }

  .main-nav a:hover,
  .main-nav a:active {
    background: rgba(46, 125, 255, 0.15);
    border-color: rgba(46, 125, 255, 0.35);
    color: #fff;
  }

  .main-nav .auth-register,
  .main-nav .auth-login,
  .main-nav .auth-user-greeting,
  .main-nav .auth-logout {
    text-align: left;
  }

  .hero {
    padding: 3rem 0 2rem;
  }

  .hero-content h2 {
    font-size: clamp(1.2rem, 6vw, 1.8rem);
  }

  .quick-buttons {
    flex-direction: column;
    gap: 0.5rem;
  }

  .quick-buttons .btn {
    width: 100%;
    text-align: center;
  }

  .two-col {
    grid-template-columns: 1fr;
  }

  .services-grid,
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }

  .product-card img {
    height: 140px;
  }

  h2 {
    font-size: 1.25rem;
  }

  .section {
    padding: 1.5rem 0;
  }

  .cart-item {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ── MÓVIL MUY PEQUEÑO (≤ 380px) ── */
@media (max-width: 380px) {
  .brand-logo {
    width: 40px;
    height: 40px;
    border-radius: 4px;
  }

  .main-nav a {
    font-size: 0.8rem;
    padding: 0.5rem 0.7rem;
  }

  .btn {
    padding: 0.52rem 0.7rem;
    font-size: 0.85rem;
  }

  .header-content {
    min-height: 38px;
  }
}

/* ── MÓVIL Y MODAL RESPONSIVE (≤ 480px) ── */
@media (max-width: 480px) {
  .checkout-buttons {
    flex-direction: column;
  }

  .split-inputs {
    flex-direction: column;
    gap: 0;
  }

  .customer-info-form input {
    margin-bottom: 5px;
  }

  .cart-modal {
    padding: 0;
    /* Aseguramos que no haya padding global */
  }

  .cart-modal-content {
    margin: 0;
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    height: auto;
    border-radius: 0;
    border: none;
    padding: 20px 15px 100px 15px;
    /* Mucho padding abajo para las barras de navegación/teclados */
    box-sizing: border-box;
  }
}

/* ── MODAL DEL CARRITO ── */
.cart-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

.cart-modal-content {
  background: var(--card);
  margin: 10% auto;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  width: 90%;
  max-width: 500px;
  max-height: 95vh;
  overflow-y: auto;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
  position: relative;
  color: var(--text);
}

.cart-modal-content #cart-items {
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 20px;
}

.close-cart {
  color: var(--muted);
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.2s;
  position: absolute;
  right: 15px;
  top: 10px;
  z-index: 2;
  line-height: 1;
  padding: 4px 8px;
  touch-action: manipulation;
}

.close-cart:hover {
  color: var(--danger);
}

.cart-modal-content {
  margin: 5% auto;
  /* Ajuste para móviles para que no se esconda abajo */
  max-height: 90vh;
  overflow-y: auto;
}

.customer-info-form {
  margin-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 15px;
}

.customer-info-form h3 {
  margin: 0 0 8px 0;
  font-size: 1.1rem;
  color: #80ffe2;
}

.customer-info-form p {
  font-size: 0.85rem;
  color: #dbe7ff;
  margin-bottom: 12px;
  margin-top: 0;
}

.customer-info-form input {
  margin-bottom: 8px;
  margin-top: 0;
}

.split-inputs {
  display: flex;
  gap: 8px;
  margin-bottom: 0;
}

.split-inputs input {
  margin-bottom: 8px;
  flex: 1;
}

.checkout-buttons {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.checkout-buttons button {
  flex: 1;
  padding: 0.8rem 0.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 0.95rem;
  min-height: 44px;
}

.header-cart-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  font-size: 1.4rem;
  color: var(--text);
  position: relative;
  transition: transform 0.2s ease;
  margin-left: 0.8rem;
  z-index: 120;
  touch-action: manipulation;
}

.header-cart-link:hover {
  transform: scale(1.1);
}

.cart-link {
  display: inline-flex;
  align-items: center;
}

.cart-badge {
  background: var(--danger);
  color: white;
  border-radius: 50%;
  padding: 2px 6px;
  font-size: 0.75rem;
  font-weight: bold;
  position: absolute;
  top: -8px;
  right: -10px;
}

/* ── ESTILOS DE AUTENTICACION TIPO IMAGEN (NUEVO) ── */
body.auth-theme {
  background: url('../img/autenticacion/autenticacion.jpg') no-repeat center center fixed;
  background-size: cover;
  color: var(--text);
  margin: 0;
  padding: 20px;
  font-family: inherit;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-container {
  background: rgba(11, 18, 32, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  width: 100%;
  max-width: 380px;
  padding: 30px 20px;
  margin: 0 auto;
  position: relative;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
  animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(15px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-header-box {
  text-align: center;
  margin-bottom: 20px;
}

.auth-header-box img.logo {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: contain;
  background: #fff;
  padding: 4px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  margin-bottom: 10px;
}

.auth-header-box h2 {
  font-size: 22px;
  color: var(--text);
  display: block;
  margin: 0;
  font-weight: 600;
}

.auth-card {
  background-color: transparent;
  padding: 0 10px;
  width: 100%;
  margin: 0 auto;
}

.auth-card label {
  display: block;
  color: #dbe7ff;
  font-size: 13px;
  margin-bottom: 6px;
  margin-top: 15px;
}

.auth-card input {
  background-color: #0d1730;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  color: var(--text);
  padding: 10px 12px;
  width: 100%;
  margin-top: 0;
  font-size: 14px;
  margin-bottom: 5px;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.auth-card input:focus {
  border-color: var(--primary);
}

.auth-card .password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 5px;
}

.auth-card .password-wrapper input {
  margin-bottom: 0;
  padding-right: 60px;
}

.toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 600;
  padding: 0;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toggle-password:hover {
  color: var(--text);
}

.toggle-password svg {
  width: 20px;
  height: 20px;
}

.btn-mint {
  background: var(--primary);
  color: #fff;
  border-radius: 10px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  width: 100%;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.2s ease;
  margin-top: 15px;
  display: block;
  text-align: center;
}

.btn-mint:hover {
  transform: translateY(-1px);
  opacity: 0.93;
}

.auth-footer {
  text-align: center;
  margin-top: 25px;
  font-size: 13px;
}

.auth-footer a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.auth-footer a:hover {
  color: var(--text);
  text-decoration: underline;
}

/* ══════════════════════════════════════════
   NUEVO CARRITO — TABLA TU PEDIDO
══════════════════════════════════════════ */

/* Caja principal del pedido */
.cart-order-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 18px;
}

.cart-order-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #f3f6ff;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Encabezados de tabla */
.cart-table-header {
  display: grid;
  grid-template-columns: 56px 1fr 80px;
  gap: 8px;
  padding: 6px 0;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: #2e7dff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 4px;
}

/* Fila de producto */
.cart-row {
  display: grid;
  grid-template-columns: 56px 1fr 80px;
  gap: 8px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.07);
}

.cart-row-img {
  display: flex;
  align-items: center;
}

.cart-row-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.cart-item-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: #f3f6ff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item-uprice {
  font-size: 0.72rem;
  color: #7a96c2;
}

.cart-row-sub {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

/* Total */
.cart-total-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0 4px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #80ffe2;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin-top: 4px;
}

.cart-folio {
  font-size: 0.75rem;
  color: #7a96c2;
  margin-top: 6px;
}

.cart-empty {
  text-align: center;
  color: #9db0d1;
  padding: 16px 0;
  font-size: 0.9rem;
}

/* ── SPEI Banorte ── */
.spei-info-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
}

.spei-info-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #f3f6ff;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.spei-bank-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.spei-bank-logo {
  width: 110px;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  flex-shrink: 0;
}

.spei-bank-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.spei-bank-details p {
  font-size: 0.82rem;
  color: #c5d5ee;
  margin: 0;
}

.spei-label {
  color: #7a96c2;
  font-weight: 600;
  margin-right: 4px;
}

.spei-bank-details strong {
  color: #f3f6ff;
  font-size: 0.88rem;
  letter-spacing: 0.3px;
}

.spei-note {
  font-size: 0.75rem;
  color: #ffea00;
  margin-top: 10px;
  line-height: 1.45;
}

/* ── Subtítulo de sección del formulario ── */
.form-section-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #80ffe2;
  margin: 14px 0 6px;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(128, 255, 226, 0.2);
  letter-spacing: 0.3px;
}

/* ── Textarea referencia de entrega ── */
.cust-textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: #f3f6ff;
  padding: 10px 12px;
  font-size: 0.88rem;
  font-family: inherit;
  resize: vertical;
  min-height: 52px;
  box-sizing: border-box;
  transition: border-color 0.2s ease;
  line-height: 1.45;
}

.cust-textarea::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.cust-textarea:focus {
  outline: none;
  border-color: rgba(46, 125, 255, 0.6);
  background: rgba(255, 255, 255, 0.09);
}

/* ── Responsive móvil ── */
@media (max-width: 480px) {

  .cart-table-header,
  .cart-row {
    grid-template-columns: 46px 1fr 70px;
    gap: 6px;
  }

  .cart-item-thumb {
    width: 40px;
    height: 40px;
  }

  .spei-bank-logo {
    width: 85px;
  }

  .cart-order-box,
  .spei-info-box {
    padding: 12px;
  }
}

/* ── RESPONSIVE MOBILE SLIDER, SEARCH & WHATSAPP ── */
@media (max-width: 900px) {
  .header-actions {
    order: 2;
    margin-left: auto;
    gap: 0.4rem;
  }

  .header-search {
    padding: 0.2rem 0.4rem;
  }

  .header-search input {
    width: 90px;
    font-size: 0.8rem;
    padding: 0.2rem;
  }

  .carousel-container {
    height: 220px;
    border-radius: 12px;
  }

  .carousel-caption {
    font-size: 1.1rem;
    padding: 1rem;
  }

  .carousel-btn {
    width: 34px;
    height: 34px;
    font-size: 1rem;
  }

  .wa-widget-container {
    bottom: 75px; /* Arriba de la Flecha (20px + 42px + 13px) */
    right: 20px;
  }

  .floating-whatsapp {
    width: 50px;
    height: 50px;
  }

  .floating-whatsapp svg {
    width: 28px;
    height: 28px;
  }

  .floating-whatsapp .wa-badge {
    width: 18px;
    height: 18px;
    font-size: 10px;
  }

  .wa-chat-box {
    width: 280px;
    bottom: 65px;
  }
}

.auth-user-greeting {
  text-decoration: none !important;
}

.review-card {
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.review-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary) !important;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ═══════════════════════════════════════════════════
   VIDEO PUBLICITARIO — Responsivo
═══════════════════════════════════════════════════ */
.video-spot-section {
  margin: 1rem auto 1rem;
  padding: 0 1rem;
  box-sizing: border-box;
  width: 100%;
}

.video-spot-wrapper {
  background: linear-gradient(145deg, #0d1a2f, #111e35);
  border: 1px solid rgba(0, 210, 211, 0.25);
  border-radius: 16px;
  padding: 1rem;
  text-align: center;
  box-shadow: 0 0 30px rgba(0, 210, 211, 0.08), 0 8px 30px rgba(0,0,0,0.4);
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.video-spot-wrapper::before {
  content: '';
  position: absolute;
  top: -60px; left: 50%;
  transform: translateX(-50%);
  width: 300px; height: 120px;
  background: radial-gradient(ellipse, rgba(0,210,211,0.12), transparent 70%);
  pointer-events: none;
}

.video-spot-label {
  display: inline-block;
  background: rgba(0, 210, 211, 0.12);
  border: 1px solid rgba(0, 210, 211, 0.35);
  color: #00d2d3;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 0.35rem 1rem;
  border-radius: 50px;
  margin-bottom: 1rem;
  text-transform: uppercase;
}

.video-spot-title {
  font-size: clamp(1.1rem, 3vw, 1.8rem);
  font-weight: 800;
  color: #fff;
  margin: 0 0 0.4rem;
  word-break: break-word;
}

.video-spot-sub {
  font-size: clamp(0.78rem, 2vw, 0.9rem);
  color: #7a96c2;
  margin: 0 0 1.4rem;
  line-height: 1.5;
  word-break: break-word;
}

/* ── Contenedor del player — se ajusta al tamaño natural del video ── */
.video-spot-player {
  position: relative;
  width: 100%;
  max-width: 1120px; /* Igualamos el ancho máximo al del carrusel (1120px) */
  margin: 0 auto;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 0 30px rgba(0, 210, 211, 0.15), 0 8px 32px rgba(0,0,0,0.5);
  background: #000;
  line-height: 0; /* elimina espacio extra debajo del video */
}

/* El video conduce su propio alto — sin aspect-ratio forzado */
.video-spot-player video {
  width: 100%;
  height: auto;          /* se adapta al aspect ratio real del video */
  max-height: 80vh;      /* nunca excede la altura de la pantalla */
  border-radius: 14px;
  display: block;
  background: #000;
}

/* ── Mobile ───────────────────────────────────────── */
@media (max-width: 768px) {
  .video-spot-wrapper {
    padding: 0.6rem;
    border-radius: 10px;
  }
  .video-spot-player {
    border-radius: 8px;
    max-width: 100%;
  }
  .video-spot-player video {
    border-radius: 8px;
    max-height: 75vw;
  }
}

@media (max-width: 480px) {
  .video-spot-section {
    padding: 0 0.4rem;
  }
  .video-spot-wrapper {
    padding: 0.4rem;
    border-radius: 8px;
  }
  .video-spot-player video {
    max-height: 85vw;
  }
}

/* ═══════════════════════════════════════════════════
   SLIDER DE SERVICIOS
═══════════════════════════════════════════════════ */
.services-slider-wrapper {
  position: relative;
  width: 100%;
}

.services-grid {
  display: flex !important; /* Forza flex para la fila de scroll */
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  gap: 20px;
  padding: 1.5rem 0.5rem;
  -ms-overflow-style: none; /* MS IE */
  scrollbar-width: none;    /* Firefox */
}

.services-grid::-webkit-scrollbar {
  display: none !important; /* Chrome/Safari */
}

/* 4 columnas en pantallas grandes */
.services-grid .product-card {
  flex: 0 0 calc(25% - 15px) !important; /* Cambiado de 33.333% a 25% (4 items) */
  scroll-snap-align: start;
}

/* Flechas de navegación del Slider */
.services-slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(11, 26, 46, 0.85);
  color: #fff;
  border: 1px solid rgba(0, 210, 211, 0.2);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(5px);
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 5px 20px rgba(0,0,0,0.6);
}

.services-slider-btn:hover {
  background: var(--primary);
  border-color: rgba(255,255,255,0.4);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 0 15px rgba(46, 125, 255, 0.4);
}

.services-slider-btn.prev {
  left: -22px;
}

.services-slider-btn.next {
  right: -22px;
}

/* ── Responsivo Slider ────────────────────────────── */
@media (max-width: 960px) {
  .services-grid .product-card {
    flex: 0 0 calc(50% - 10px) !important; /* 2 columnas */
  }
}

@media (max-width: 600px) {
  .services-grid .product-card {
    flex: 0 0 calc(85% - 5px) !important; /* 1.2 columnas para que se vea el vecino */
  }
  .services-slider-btn {
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
  }
  .services-slider-btn.prev { left: -10px; }
  .services-slider-btn.next { right: -10px; }
}

/* FIX: Facebook Floating Button on Mobile */
.fb-widget-container {
  width: 60px !important;
  height: 60px !important;
  max-width: 60px !important;
  max-height: 60px !important;
  display: block !important;
  overflow: visible !important;
}

.floating-facebook {
  width: 60px !important;
  height: 60px !important;
  max-width: 60px !important;
  max-height: 60px !important;
  display: flex !important;
  border-radius: 50% !important;
}

.floating-facebook svg {
  width: 32px !important;
  height: 32px !important;
  max-width: 32px !important;
  max-height: 32px !important;
}

@media (max-width: 900px) {
  .fb-widget-container {
    bottom: 140px; /* Arriba de WhatsApp (75px + 50px + 15px) */
    right: 20px !important;
    width: 50px !important;
    height: 50px !important;
    max-width: 50px !important;
    max-height: 50px !important;
  }

  .floating-facebook {
    width: 50px !important;
    height: 50px !important;
    max-width: 50px !important;
    max-height: 50px !important;
  }

  .floating-facebook svg {
    width: 28px !important;
    height: 28px !important;
    max-width: 28px !important;
    max-height: 28px !important;
  }
}

/* ═══════════════════════════════════════════════════
   BOTÓN VOLVER ARRIBA (Scroll to Top)
   ═══════════════════════════════════════════════════ */
.scroll-top-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  background: rgba(46, 125, 255, 0.85); /* Incrementada opacidad para mejor visibilidad */
  color: #fff;
  border-radius: 50%;
  display: flex !important; /* Forzar flex */
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  cursor: pointer;
  z-index: 99999; /* Máximo nivel de z-index */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), visibility 0.3s;
  border: 1px solid rgba(255, 255, 255, 0.2);
  user-select: none;
}

.scroll-top-btn.show {
  opacity: 1; /* Muestra el botón con su transparencia base */
  visibility: visible;
  transform: translateY(0);
}

.scroll-top-btn:not(.show) {
  transform: translateY(20px);
}

.scroll-top-btn:hover {
  background: var(--primary); /* Se enfoca al estilo de la página (azul sólido) */
  opacity: 1 !important;
  transform: scale(1.1) translateY(-5px);
  box-shadow: 0 8px 25px rgba(46, 125, 255, 0.5);
}

.scroll-top-btn:active {
  transform: scale(0.95);
  background: var(--secondary); /* Verde turquesa para feedback táctil */
}

/* Responsivo para móviles (Orden Requerido: Flecha abajo, WA centro, FB arriba) */
@media (max-width: 900px) {
  .scroll-top-btn {
    bottom: 25px; /* Ligeramente más arriba por si hay barras de nav del navegador */
    right: 20px;
    width: 46px; /* Un poco más grande para ser más fácil de tocar */
    height: 46px;
    font-size: 1.3rem;
    opacity: 0;
  }
}

/* ═══════════════════════════════════════════════════
   FILTER BAR & DRAWER STYLES
   ═══════════════════════════════════════════════════ */
.filter-compact-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 0;
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin: 1.5rem auto;
  gap: 15px;
}

.filter-compact-bar .catalog-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.filter-right-side {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.filter-btn-trigger {
  background: rgba(46, 125, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(46, 125, 255, 0.2);
  padding: 8px 15px;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
  font-size: 0.85rem;
}

.filter-btn-trigger:hover {
  background: var(--primary);
  border-color: var(--primary);
}

/* Label real para mayor compatibilidad */
.sort-label {
  color: #7a96c2;
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
  pointer-events: none;
  margin-right: -5px; /* Ajuste fino para acercarlo al select sin chocar */
  z-index: 2;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

.sort-wrapper-minimal {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 0 10px 0 15px; /* Espacio real para el span */
  transition: all 0.2s ease;
}

.filter-select-minimal {
  background: transparent !important;
  border: none !important;
  color: #fff;
  padding: 10px 40px 10px 12px !important; /* Espacio lateral normalizado */
  outline: none;
  font-size: 0.85rem;
  appearance: none;
  cursor: pointer;
  min-width: 140px;
  max-width: 180px;
  width: auto;
  transition: all 0.2s ease;
  color-scheme: dark;
  -webkit-font-smoothing: antialiased;
}

.filter-select-minimal:hover {
  border-color: var(--primary);
}

.product-count-badge {
    color: #7a96c2;
    font-size: 0.85rem;
    white-space: nowrap;
}

@media (max-width: 900px) {
  .filter-compact-bar {
    flex-direction: column !important;
    align-items: center !important;
    padding: 0.5rem 1rem !important;
    gap: 6px !important;
    margin-bottom: 10px !important;
    border-bottom: none !important;
  }

  .filter-compact-bar .catalog-title {
    font-size: 1.15rem;
    margin-bottom: 0;
  }
  
  /* Ocultar botón de ajustes */
  .filter-btn-trigger {
    display: none !important;
  }

  /* Barra tipo pill: [Ordenar por: Relevancia ▼ | 6 Artículos] */
  .filter-right-side {
    width: auto;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0 !important;
    flex-wrap: nowrap !important;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    padding: 0;
    overflow: hidden;
  }
  
  .sort-wrapper-minimal {
    flex: 1 !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    background: transparent;
    border-radius: 0;
    border-top: none;
    border-bottom: none;
    border-left: none;
    padding: 0 5px 0 0;
  }
  
  .filter-select-minimal {
    width: 100% !important;
    padding: 10px 20px 10px 90px !important;
    font-size: 0.8rem !important;
    min-width: 0 !important;
  }
  
  .sort-label {
    font-size: 0.7rem !important;
    left: 12px !important;
  }

  .product-count-badge {
    padding: 10px 16px !important;
    font-size: 0.78rem !important;
    white-space: nowrap;
    flex-shrink: 0;
  }
}


@media (max-width: 480px) {
  .filter-select-minimal {
    padding: 10px 18px 10px 85px !important;
    font-size: 0.78rem !important;
  }
  .sort-label { font-size: 0.68rem !important; }
}

/* Drawer Overlay */
.filter-drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 100000;
  display: none; /* Controlado por JS */
  opacity: 0;
  transition: opacity 0.3s;
}

.filter-drawer-overlay.active {
  display: block;
  opacity: 1;
}

.filter-drawer {
  position: fixed;
  top: 0;
  right: -340px;
  width: 340px;
  height: 100%;
  background: rgba(13, 21, 38, 0.98);
  backdrop-filter: blur(20px);
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 999999;
  padding: 1.5rem;
  box-shadow: -15px 0 50px rgba(0, 0, 0, 0.8);
  transition: right 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), visibility 0s linear 0.4s;
  overflow-y: auto;
  color: #fff;
  display: none; /* Oculto por defecto - no ocupa espacio */
}

.filter-drawer.active {
  display: block; /* Mostrar solo cuando está activo */
  right: 0;
}


.filter-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.filter-drawer-header h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: 0.5px;
}

.filter-close-btn {
  background: none;
  border: none;
  color: #7a96c2;
  font-size: 1.6rem;
  cursor: pointer;
  transition: all 0.3s;
}
.filter-close-btn:hover { color: #fff; transform: rotate(90deg); }

.drawer-filter-group {
  margin-bottom: 2rem;
}

.drawer-filter-title {
  font-size: 0.85rem;
  font-weight: 750;
  color: #7a96c2;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.drawer-filter-content {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* Custom Checkboxes Premium */
.custom-checkbox {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-size: 0.95rem;
  color: #e0e6ed;
  transition: all 0.2s ease;
  padding: 5px 0;
}

.custom-checkbox:hover {
  color: #fff;
  transform: translateX(5px);
}

.custom-checkbox input[type="checkbox"] {
  appearance: none;
  width: 22px;
  height: 22px;
  border: 2px solid rgba(122, 150, 194, 0.3);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
}

.custom-checkbox input[type="checkbox"]:checked {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 15px rgba(0, 115, 230, 0.4);
}

.custom-checkbox input[type="checkbox"]:checked::after {
  content: '✔';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 0.85rem;
}

.apply-filters-btn {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, var(--primary), #5a9fff);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  margin-top: 1.5rem;
  box-shadow: 0 4px 15px rgba(0, 115, 230, 0.3);
}

.apply-filters-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 115, 230, 0.5);
  filter: brightness(1.1);
}

@media (max-width: 900px) {
  .filter-drawer {
    width: 290px;
    right: -290px;
  }
  .filter-drawer.active {
    right: 0;
  }
}

/* ── CINTA DE ANUNCIOS (MARQUEE) ── */
.announcement-bar {
  background: #f3821a !important;
  color: #fff !important;
  overflow: hidden !important;
  height: 34px !important;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  position: relative;
  border-bottom: 2px solid rgba(0, 0, 0, 0.1);
  z-index: 1001;
  font-size: 0.8rem;
  width: 100% !important;
}

.announcement-content {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  white-space: nowrap !important;
  width: max-content !important;
  animation: marquee 45s linear infinite;
  will-change: transform;
}

.announcement-item {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 10px;
  padding: 0 40px; /* Reducido un poco para que no sea tan largo el loop */
  letter-spacing: 0.3px;
  white-space: nowrap !important;
}

.announcement-item span {
  font-size: 1.1rem;
}

.announcement-item strong {
  font-weight: 600;
  white-space: nowrap !important;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@media (max-width: 600px) {
  .announcement-bar { height: 30px !important; font-size: 0.7rem !important; }
  .announcement-item { padding: 0 25px !important; gap: 6px; }
}

