* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", sans-serif;
  background: #f4f9fe;
  color: #1a2c3e;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

:root {
  --primary: #3496c3;
  --primary-light: #bbfbfb;
  --primary-dark: #022a68;
  --glass-bg: rgba(255, 255, 255, 0.85);
  --shadow-sm: 0 8px 20px rgba(0, 0, 0, 0.05);

  --btn-text-size: 0.95rem;
  --btn-text-weight: 100;
  --btn-height: 44px;
  --btn-border-radius: 16px;
}

.base-button {
  font-size: var(--btn-text-size);
  font-weight: var(--btn-text-weight);
  height: var(--btn-height);
  border-radius: var(--btn-border-radius);
}

/* CATEGORÍAS */
.categories-wrapper {
  background: rgba(255, 255, 255, 0.96);
  position: sticky;
  z-index: 105;
}

.categories-scroll {
  display: flex;
  gap: 10px;
  padding: 8px 16px;
  padding-top: 5px;
  scroll-behavior: smooth;
  cursor: grab;
}

@media (max-width: 991px) {
  .categories-scroll {
    overflow-x: auto;
    scrollbar-width: none;
  }

  .categories-scroll::-webkit-scrollbar {
    display: none;
  }
}

@media (min-width: 992px) {
  .categories-scroll {
    overflow-x: visible;
    flex-wrap: wrap;
    justify-content: center;
    cursor: default;
  }
}

.cat-btn {
  display: inline-flex;
  background: #f0f5f9;
  padding: 8px 18px;
  border-radius: 60px;
  font-size: 0.85rem;
  font-weight: 500;
  color: #1e3a5f;
  border: 1px solid #e2edf2;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.cat-btn.active {
  background: #022a68;
  color: white;
  border-color: #022a68;
}

/* BANNER CARRUSEL */
.banner-carousel {
  max-width: 1400px;
  margin: 16px auto 24px;
  border-radius: 24px;
  overflow: hidden;
  position: relative;
}

.carousel-container {
  position: relative;
  width: 100%;
  height: 350px;
  background: #cbdde6;
}

.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
  background-size: cover;
  background-position: center;
}

.carousel-slide.active {
  opacity: 1;
  z-index: 2;
}

.slide-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(2, 42, 104, 0.7) 0%,
    rgba(255, 255, 255, 0) 60%
  );
  display: flex;
  align-items: center;
}

.slide-text {
  max-width: 450px;
  margin-left: 8%;
  color: white;
}

.slide-text h2 {
  font-size: 2rem;
  margin-bottom: 12px;
}

.btn-ver-mas {
  background: #bbfbfb;
  padding: 10px 24px;
  border-radius: 40px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  margin-top: 20px;
}
.ver-mas-txt {
  color: #022a68;
  text-decoration: none;
}

.carousel-controls {
  position: absolute;
  bottom: 15px;
  right: 20px;
  z-index: 10;
  display: flex;
  gap: 10px;
}

.carousel-btn {
  background: rgba(255, 255, 255, 0.7);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 40px;
  cursor: pointer;
}

.dots {
  position: absolute;
  bottom: 15px;
  left: 20px;
  display: flex;
  gap: 8px;
  z-index: 10;
}

.dot {
  width: 8px;
  height: 8px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 20px;
  transition: 0.2s;
  cursor: pointer;
}

.dot.active-dot {
  background: #bbfbfb;
  width: 24px;
}

/* SECCIONES CARRUSEL POR CATEGORÍA */
.category-section {
  scroll-margin-top: 180px;
  margin: 48px 0 32px;
  position: relative;
}

.category-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}

.section-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: #022a68;
  border-left: 5px solid #3496c3;
  padding-left: 12px;
  margin: 0;
}

.btn-view-all {
  /* background: transparent; */
  border: 1px solid #cbdde6;
  color: #7f8c8d;
  padding: 6px 16px;
  border-radius: 60px;
  font-size: 0.8rem;
  font-weight: 500;
  /* cursor: default; */
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  /* opacity: 0.7; */
  text-decoration: none;
}

.btn-view-all:hover {
  border: 1px solid #3496c3;
  color: #3496c3;
}

/* Carrusel horizontal con grid auto-flow */
.carousel-products-container {
  position: relative;
  display: flex;
  align-items: center;
}

.products-scroll {
  overflow-x: hidden;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  padding: 8px 4px 16px;
  width: 100%;
}

.products-scroll::-webkit-scrollbar {
  height: 6px;
}

.products-scroll::-webkit-scrollbar-track {
  background: #e2edf2;
  border-radius: 10px;
}

.products-scroll::-webkit-scrollbar-thumb {
  background: #3496c3;
  border-radius: 10px;
}

.products-grid-carousel {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: hidden;
  gap: 20px;
}

.product-card {
  background: white;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(52, 150, 195, 0.2);
  transition: 0.2s;
  position: relative;
  /* height: 100%; */
  height: 315px;
  display: flex;
  flex-direction: column;
  flex: 0 0 calc((100% - 60px) / 4);
}

@media (max-width: 991px) {
  .product-card {
    flex: 0 0 calc((100% - 40px) / 3);
  }
}

@media (max-width: 575px) {
  .products-grid-carousel {
    gap: 10px;
  }
  .product-card {
    flex: 0 0 calc((100% - 10px) / 2);
    height: 300px;
  }
}

.product-card:hover {
  transform: translateY(-4px);
}

.card-img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  background: #eef4f9;
  cursor: pointer;
}

.card-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;

  font-weight: 700;
  font-size: 0.9rem;
  color: #022a68;
  margin-bottom: 6px;
}

.price {
  font-weight: 700;
  font-size: 1.2rem;
  color: #022a68;
}

@media (max-width: 575px) {
  .product-name {
    font-size: 0.8rem;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
  }
  .price {
    font-size: 0.9rem;
  }
}

.product-desc {
  font-size: 0.75rem;
  color: #5a6e7c;
  margin-bottom: 14px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

.btn-circle {
  background: #3496c3;
  width: 40px;
  height: 40px;
  border-radius: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  color: white;
  cursor: pointer;
  transition: 0.2s;
}
.btn-circle.disabled-btn, .btn-circle:disabled {
    background: #b0c4de;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Botones laterales alargados (tipo píldora vertical) */
.carousel-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 80px;
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  border-radius: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(52, 150, 195, 0.3);
  cursor: pointer;
  z-index: 5;
  transition: all 0.2s;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  color: #022a68;
  font-size: 1.2rem;
}

.carousel-nav-btn:hover {
  background: white;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
  transform: translateY(-50%) scale(1.02);
}

.carousel-nav-left {
  left: -12px;
}

.carousel-nav-right {
  right: -12px;
}

@media (max-width: 768px) {
  .carousel-nav-btn {
    width: 28px;
    height: 60px;
    font-size: 0.9rem;
  }

  .carousel-nav-left {
    left: -8px;
  }

  .carousel-nav-right {
    right: -8px;
  }
}

/* MODAL PRODUCTO */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  opacity: 0;
  transition: 0.25s;
  padding: 16px;
}

.modal-overlay.active {
  visibility: visible;
  opacity: 1;
}

.modal-content {
  background: white;
  max-width: 800px;
  width: 100%;
  min-height: 38vh;
  border-radius: 32px;
  padding: 24px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.modal-flex {
  display: flex;
  min-height: 38vh;
  flex-direction: column;
  gap: 20px;
}

@media (min-width: 700px) {
  .modal-flex {
    flex-direction: row;
    align-items: flex-start;
  }

  .modal-img-wrapper {
    flex: 0 0 260px;
  }

  .modal-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 38vh;
    justify-content: space-between;
  }
}

.modal-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 24px;
  background: #eef4f9;
}

.modal-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: #022a68;
  padding-right: 20px;
}

.modal-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: #3496c3;
  margin: 12px 0;
}

.modal-desc {
  color: #3a5e7a;
  line-height: 1.4;
  margin-bottom: 16px;
}

.close-modal {
  position: absolute;
  top: 16px;
  right: 20px;
  background: #f0f4f9;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 30px;
  cursor: pointer;
  z-index: 10;
}
.close-modal:hover {
  background: #e7e7e7;
}

.qty-row {
  display: flex;
  gap: 16px;
  margin: 20px 0 0;
  flex-wrap: wrap;
  align-items: center;
}

.qty-control {
  display: flex;
  align-items: center;
  background: #f0f5f9;
  border-radius: 18px;
  border: 1px solid #dce5ec;
  overflow: hidden;
}

.qty-btn {
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  font-size: 1.4rem;
  font-weight: 600;
  color: #022a68;
  cursor: pointer;
  transition: background 0.2s;
}

.qty-num {
  min-width: 50px;
  text-align: center;
  font-weight: var(--btn-text-weight);
  font-size: var(--btn-text-size);
  color: #022a68;
}

.add-to-cart-modal {
  background: #022a68;
  color: white;
  border: none;
  flex: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-whatsapp {
  background: #25d366;
}

.stock-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 8px;
  border-radius: var(--btn-border-radius);
  background-color: var(--primary-dark);
  color: white;
  font-size: 0.8rem;
  font-weight: 600;
}
.stock-agotado {
  background-color: crimson;
}

textarea {
  font-family: "Inter", sans-serif;
  width: 100%;
  padding: 12px;
  border-radius: 20px;
  border: 1px solid #cbdde6;
  resize: vertical;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/*

.stock-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 8px;
  border-radius: var(--btn-border-radius);
  background-color: var(--primary-dark);
  color: white;
  font-size: 0.8rem;
  font-weight: 600;
}*/

.badge-container {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.badge-glass {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 40px;
  font-size: 0.72rem;
  font-weight:700;
  backdrop-filter: blur(8px);
  background: rgba(0, 0, 0, 0.55);
  color: white;
  border: 0.5px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  text-transform: uppercase;
}
.badge-out {
  background: rgba(190, 30, 45, 0.9);
}
.badge-high {
  background: rgba(34, 139, 34, 0.9);
}
/* Badge consultar moderno: gris sutil, texto azul, icono */
.badge-consult-modern {
  background: rgba(240, 246, 252, 0.95);
  backdrop-filter: blur(4px);
  color: #0a5c8e;
  border: 1px solid rgba(52, 150, 195, 0.4);
  font-weight: 600;
  text-transform: none;
  font-size: 0.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.badge-consult-modern i {
  font-size: 0.7rem;
  color: #3496c3;
}

/* FOOTER AESTHETIC (monocromático, sin colores estridentes) */
footer {
  background: #022a68;
  color: white;
  margin-top: 48px;
  padding: 40px 20px 28px;
}

.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 32px;
}

.footer-col {
  flex: 1;
  min-width: 200px;
}

.footer-col h4 {
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #bbfbfb;
  margin-bottom: 20px;
  position: relative;
  display: inline-block;
}

.footer-col h4:after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 32px;
  height: 2px;
  background: #5f9cb9;
  border-radius: 4px;
}

.footer-col p {
  margin: 10px 0;
  opacity: 0.85;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #f0f7fc;
}

.footer-col i {
  width: 22px;
  font-size: 0.95rem;
  color: #bbfbfb;
}

/* iconos monocromáticos */
.social-icons {
  display: flex;
  gap: 16px;
  margin-top: 16px;
}

.social-icons a {
  color: white;
  background: rgba(255, 255, 255, 0.08);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s;
  font-size: 1.2rem;
  text-decoration: none;
}

.social-icons i {
  width: auto !important;
}

.social-icons a:hover {
  background: #3496c3;
  transform: translateY(-2px);
  color: white;
}

.copyright {
  text-align: center;
  padding-top: 32px;
  margin-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.75rem;
  opacity: 0.7;
}
.copyright a {
  color: white;
  /* text-decoration: none; */
}

@media (max-width: 600px) {
  .footer-grid {
    flex-direction: column;
    gap: 28px;
  }
}

@media (max-width: 560px) {
  .slide-text h2 {
    font-size: 1.4rem;
  }
  .carousel-container {
    height: 280px;
  }
}
