/*
 * UI/UX Improvements & Responsive Design
 * Creativo Merida - v1.0
 */

/* ==========================================================================
   Base & General Styles
   ========================================================================== */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   Navbar Responsive Adjustments
   ========================================================================== */
.catalog-navbar .navbar-brand-img {
  max-height: 36px;
  transition: max-height 0.3s ease;
}

.catalog-navbar .nav-access .text-truncate {
  max-width: 140px;
  display: inline-block !important; /* Override bootstrap if needed */
  vertical-align: middle;
}

/* ==========================================================================
   Chat Widget (Valentina AI) Styles
   ========================================================================== */
#chatBackdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(5px);
  z-index: 9999;
  display: none;
  transition: opacity 0.3s ease;
}

#chatWidget {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 10000;
}

#assistToggle {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #ff6b35 0%, #ff8c42 100%);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(255, 107, 53, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: all 0.3s ease;
}

#assistToggle:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 25px rgba(255, 107, 53, 0.6);
}

#assistPanel {
  position: fixed;
  right: 24px;
  bottom: 70px;
  width: 560px;
  max-width: calc(100vw - 48px);
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  border: 1px solid #e9ecef;
  overflow: hidden;
  display: none;
  max-height: 600px;
  transition: all 0.3s ease;
}

.chat-panel-header {
  padding: 16px 20px;
  background: linear-gradient(135deg, #ff6b35 0%, #ff8c42 100%);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-panel-title {
  font-weight: 600;
  display: flex;
  align-items: center;
}

.chat-panel-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.chat-panel-actions button {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.3s ease;
  font-size: 16px;
  padding: 6px;
}

.chat-panel-actions button.chat-close-btn {
  font-size: 18px;
  padding: 4px 6px;
}

.chat-panel-actions button:hover {
  background: rgba(255, 255, 255, 0.3);
}

#assistMessages {
  height: 350px;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-quick-actions {
  padding: 0 16px;
  margin-bottom: 12px;
}

.chat-quick-actions .actions-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chat-quick-actions .actions-list button,
.chat-quick-actions .actions-list a {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
  color: #495057;
  text-decoration: none;
}

.chat-quick-actions .actions-list a.login-prompt {
  background: #fff3cd;
  border-color: #ffe69c;
  color: #b4690e;
  font-weight: 600;
}

.chat-input-area {
  padding: 0 16px 16px;
}

.chat-input-wrapper {
  display: flex;
  gap: 8px;
}

#assistEvent {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #dee2e6;
  border-radius: 20px;
  outline: none;
  font-size: 14px;
}

.chat-send-btn {
  width: 40px;
  height: 40px;
  background: #0d6efd;
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}


/* ==========================================================================
   Segment Hero Carousel Refinements
   ========================================================================== */
  .segment-hero-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(2rem, 4vw, 3rem);
  align-items: start;
  max-width: 1200px;
  margin: 0 auto;
}

.segment-hero-content {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 640px;
  align-self: flex-start;
}

.segment-hero-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 520px;
}

.segment-hero-list li {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: rgba(19, 86, 196, 0.45);
  padding: 0.7rem 1.4rem;
  border-radius: 14px;
  font-size: 0.96rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 10px 25px rgba(5, 9, 32, 0.35);
}

.segment-hero-list i {
  color: #7fffd4;
  font-size: 1rem;
}

.segment-hero-side {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  align-items: stretch;
}

.segment-hero-carousel-panel {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
}

.segment-hero-carousel {
  width: 100%;
  border-radius: 36px;
  padding: 0.35rem;
  /*background: linear-gradient(145deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0));*/
  border: none;
}

.segment-hero-carousel .carousel-inner {
  border-radius: 28px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 25px 50px rgba(6, 7, 40, 0.35);
}

#segment-hero .hero-product-card {
  border-radius: 32px;
  overflow: hidden;
  background: #fff;
}

#segment-hero .hero-product-image-wrapper img {
  height: 360px;
  object-fit: cover;
}

#segment-hero .hero-product-info-overlay {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, 0.6) 100%);
  padding: 1.5rem;
}

#segment-hero .btn-hero-cta {
  background: #fff;
  color: #0f172a;
  border-radius: 999px;
  padding-inline: 1.5rem;
}

.segment-hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.segment-hero-cta-group .btn {
  min-width: 180px;
  font-weight: 600;
  border-radius: 999px;
  padding-inline: 1.75rem;
  box-shadow: 0 10px 25px rgba(2, 4, 30, 0.35);
}

.segment-hero-cta-group .btn-outline-light {
  border-color: rgba(255, 255, 255, 0.9);
  color: #fff;
  background: transparent;
}

.segment-hero-cta-group .btn:first-child {
  background: #e5e7ee;
  color: #0b1650;
  border-color: transparent;
}

.segment-hero-metrics-row {
  width: 100%;
  max-width: 420px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.segment-hero-metric {
  background: #123c8a;
  border-radius: 16px;
  padding: 0.9rem 1rem;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 8px 20px rgba(4, 6, 22, 0.35);
}

.segment-hero-metric .value {
  display: block;
  font-size: 1.4rem;
  font-weight: 700;
}

.segment-hero-metric .label {
  display: block;
  font-size: 0.85rem;
  opacity: 0.85;
}

.segment-hero-carousel .carousel-indicators {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.segment-hero-carousel .carousel-control-prev,
.segment-hero-carousel .carousel-control-next {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  top: 50%;
  transform: translateY(-50%);
  border: none;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.35);
}

.segment-hero-carousel .carousel-control-prev .hero-carousel-control-icon,
.segment-hero-carousel .carousel-control-next .hero-carousel-control-icon {
  background: transparent;
  box-shadow: none;
  color: #0f172a;
}

.segment-hero-carousel .carousel-control-prev {
  left: 0.75rem;
}

.segment-hero-carousel .carousel-control-next {
  right: 0.75rem;
}

#segment-hero .hero-product-card {
  min-height: 340px;
}

@media (max-width: 991.98px) {
  .segment-hero-shell {
    grid-template-columns: 1fr;
  }

  .segment-hero-side {
    align-items: flex-start;
  }

  .segment-hero-metrics-row {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    width: 100%;
    max-width: 100%;
  }

  .segment-hero-carousel-panel {
    justify-content: flex-start;
  }
}

@media (max-width: 575.98px) {
  .segment-hero-list li {
    font-size: 0.9rem;
  }
  .segment-hero-carousel {
    padding: 0.75rem;
  }
  .segment-hero-cta-group .btn {
    min-width: auto;
    flex: 1 1 140px;
  }
}


/* ==========================================================================
   Mobile-Specific Overrides (max-width: 991.98px)
   ========================================================================== */
@media (max-width: 991.98px) {
  .catalog-navbar .navbar-brand-img.logo-mobile {
    max-height: 32px;
  }

  /* Mejora el espaciado y la alineación en la barra de navegación móvil */
  .catalog-navbar .container-fluid.d-lg-none .d-flex.align-items-center.justify-content-between {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }

  .catalog-navbar .nav-search.mobile {
    margin-top: 0.5rem;
  }
}

/* ==========================================================================
   Small Mobile Devices (max-width: 575.98px)
   ========================================================================== */
@media (max-width: 575.98px) {
  .catalog-navbar .navbar-brand span {
    display: none; /* Oculta el texto del logo en pantallas muy pequeñas */
  }

  /* Ajusta el tamaño de los botones de acción rápida en móvil */
  .bottom-nav-link {
    font-size: 0.75rem;
  }

  .bottom-nav-link i {
    font-size: 1.1rem;
  }
}
