/***********************************************/
/* 1. Importación de fuentes                    */
/***********************************************/

@font-face {
  font-family: 'Powerful_Rider_Demo';
  src: url('../../fonts/PowerfulRider.ttf') format('truetype');
}

@font-face {
  font-family: 'Nobel';
  src: url('../../fonts/MelunDisplayTRIAL-Regular.otf') format('opentype');
}

@font-face {
  font-family: 'Transcity';
  src: url(./../../fonts/Transcity.otf) format('opentype');
}

@font-face {
  font-family: 'Poppins Black';
  src: url(./../../fonts/Poppins-Black.ttf) format('truetype');
}

@font-face {
  font-family: 'Poppins';
  src: url(./../../fonts/Poppins-Regular.ttf) format('truetype');
}

/***********************************************/
/* 2. Variables y modo oscuro                  */
/***********************************************/
:root {
  /* Colores modo claro */
  --color-1: #F8F5FC;              /* Fondo muy claro violeta */
  --color-2: #F0E9FA;              /* Base claro */
  --color-3: #E2D4F5;              /* Borde claro */
  --color-4: #B399D4;              /* Violeta medio claro */
  --color-5: #7F58AF;              /* Violeta principal (tu color original) */
  --color-6: #5D3A8B;              /* Violeta oscuro */
  --color-7: #3A2257;              /* Violeta muy oscuro */
  --color-8: #1F0F3D;              /* Fondo oscuro */
  --color-9: #0F0624;              /* Texto oscuro */
  --color-10: #0A0418;             /* Fondo muy oscuro */
  --color-11: #1E0F3B;             /* Alternativo oscuro */
  --color-12: #331D5D;             /* Violeta/gris medio */
  --color-13: #4A2D7A;             /* Violeta/gris */
  --color-principal: #F39C12;      /* Naranja principal */
  --color-principal-dark: #D35400; /* Naranja oscuro */
  --color-principal-light: #F8C471; /* Naranja claro */
  
  /* Nueva paleta para modo oscuro */
  --dm-color-1: #121026;           /* Original: #0d1117 */
  --dm-color-2: #1A1735;           /* Original: #161b22 */
  --dm-color-3: #252147;           /* Original: #21262d */
  --dm-color-4: #3E386F;           /* Original: #30363d */
  --dm-color-5: #9B7CBC;           /* Original: #8b949e (violeta claro) */
  --dm-color-6: #C9B6E2;           /* Original: #c9d1d9 (violeta muy claro) */
  --dm-color-7: #ECE6F8;           /* Original: #ecf2f8 (casi blanco violeta) */
  --dm-color-8: #F39C12;           /* Original: #58a6ff (naranja en lugar de azul) */
  --dm-color-9: #FFA726;           /* Original: #1f6feb (naranja más claro) */
  --dm-color-10: #5D3A8B;          /* Original: #0c2d6b (violeta oscuro) */
  --dm-color-principal: #7F58AF;   /* Original: #3d7d8f (violeta principal) */
  --dm-color-principal-dark: #5D3A8B; /* Original: #2c5a67 (violeta más oscuro) */
  --dm-color-principal-light: #9B7CBC; /* Original: #6ba4b5 (violeta claro) */

  
  /* Variables responsivas */
  --header-height-min: 50px;
  --header-height-preferred: 8vw;
  --header-height-max: 80px;
  
  --logo-width-min: 30px;
  --logo-width-preferred: 15vw;
  --logo-width-max: 80px;
  
  --btn-padding-min: 0.4rem;
  --btn-padding-preferred: 1vw;
  --btn-padding-max: 0.75rem;
  
  --btn-padding-horizontal-min: 1rem;
  --btn-padding-horizontal-preferred: 2vw;
  --btn-padding-horizontal-max: 1.75rem;
  
  --hero-title-min: 1.6rem;
  --hero-title-preferred: 5vw;
  --hero-title-max: 3.2rem;
  
  --hero-subtitle-min: 1rem;
  --hero-subtitle-preferred: 3vw;
  --hero-subtitle-max: 1.5rem;
}



/***********************************************/
/* 3. Reseteo y tipografías                    */
/***********************************************/
html, body {
  max-width: 100vw;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

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

body {
  background-color: var(--color-1);
  color: var(--color-11);
  font-family: 'Nobel', sans-serif;
  line-height: 1.6;
}

/***********************************************/
/* 4. Header fijo (más pequeño)                */
/***********************************************/
/* Modern header style inspired by the provided image */
.header {
  align-items: center;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  display: flex;
  left: 0;
  min-height: 64px;
  padding: 0 2.5rem;
  position: fixed;
  top: 0;
  width: 100vw;
  z-index: 20;
}

.header__logo-search {
  align-items: center;
  display: flex;
  flex: 1;
  gap: 1.5rem;
}

.header__logo-link {
  align-items: center;
  display: flex;
  justify-content: center;
  margin-right: 1.5rem;
}

.header__logo-img {
  background: #fff;
  border: 2px solid #eee;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  height: 50px;
  object-fit: contain;
  width: 50px;
}

/* Botón de menú para dispositivos móviles */
.header__menu-toggle {
  align-items: center;
  background: none;
  border: none;
  color: #222;
  cursor: pointer;
  display: none;
  font-size: 1.7rem;
  justify-content: center;
  margin-right: 0.7rem;
}

.header__search {
  align-items: center;
  display: flex;
  flex: 1;
  max-width: 340px;
  position: relative;
}

.header__search-input {
  background: #fafafa;
  border: 1.5px solid #eee;
  border-radius: 2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  font-size: 1rem;
  outline: none;
  padding: 0.7rem 2.5rem 0.7rem 1.1rem;
  transition: border 0.15s;
  width: 100%;
}
.header__search-input:focus {
  background: #fff;
  border: 1.5px solid var(--color-4);
}

.header__search-btn {
  align-items: center;
  background: #fff;
  border: none;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  color: #888;
  cursor: pointer;
  display: flex;
  font-size: 1.1rem;
  height: 2.2rem;
  justify-content: center;
  left: 302px;
  position: absolute;
  transition: background 0.13s;
  width: 2.2rem;
}
.header__search-btn:hover {
  background: #f0f0f0;
}

.header__nav {
  align-items: center;
  display: flex;
  margin-left: auto;
}

.header__nav-list {
  align-items: center;
  background: #fff;
  border-radius: 2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  display: flex;
  gap: 0.7rem;
  list-style: none;
  margin: 0;
  padding: 0 0.7rem;
}

.header__nav-link {
  border-radius: 2rem;
  color: #888;
  display: inline-block;
  font-family: 'Poppins';
  font-size: 1rem;
  font-weight: 500;
  padding: 0.5rem 1.1rem;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.header__nav-link:hover,
.header__nav-link.active {
  background: #f5f5f5;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  color: #222;
  font-weight: 700;
}

.header__cart-link {
  align-items: center;
  background: var(--color-principal);
  border-radius: 2rem;
  color: #fff !important;
  display: flex;
  font-size: 1rem;
  font-weight: bold;
  gap: 0.3rem;
  padding: 0.5rem 1.1rem;
  transition: background 0.15s, color 0.15s;
}
.header__cart-link:hover {
  background: var(--color-principal-dark);
  color: #fff !important;
}
.header__cart-link i {
  font-size: 1.2rem;
  margin-right: 0.3rem;
}
#cart-count {
  background: #fff;
  border-radius: 50%;
  color: var(--color-principal-dark);
  display: inline-block;
  font-size: 0.95em;
  font-weight: bold;
  min-width: 1.5em;
  padding: 0 0.5em;
  text-align: center;
}

/* Botón agregar al carrito */
.add-to-cart-btn {
  align-items: center;
  background: var(--color-principal);
  border: none;
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  display: flex;
  font-size: 1rem;
  font-weight: 600;
  gap: 0.5em;
  padding: 0.5rem 1rem;
  transition: background 0.15s, color 0.15s;
}
.add-to-cart-btn:hover {
  background: var(--color-principal-dark);
  color: #fff;
}
.add-to-cart-btn i {
  font-size: 1.1em;
  margin-right: 0.5em;
}
.add-to-cart-btn.in-cart,
.add-to-cart-btn:disabled {
  background: #bbb;
  color: #fff;
  cursor: not-allowed;
  opacity: 0.85;
}
.add-to-cart-btn.in-cart i {
  color: #fff;
}

@media (max-width: 900px), (max-width: 768px), (max-width: 600px) {
  /* Header */
  .header {
    align-items: flex-start;
    flex-direction: column;
    min-height: 56px;
    padding: 0 1rem;
  }
  .header__logo-search {
    align-items: center;
    flex-direction: row;
    width: 100%;
  }
  .header__search {
    align-items: center;
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    margin-left: 0;
    max-width: 100%;
    width: 100%;
  }
  .header__search-input {
    flex: 1 1 auto;
    margin-right: 0.5rem;
    min-width: 200px;
    width: 100%;
  }
  .header__search-btn {
    color:var(--dm-color-9) ;
    flex-shrink: 0;
    height: 2.2rem;
    margin-left: 0;
    position: static;
    width: 2.2rem;
  }
  .header__nav-list {
    box-shadow: none;
    gap: 0.3rem;
    justify-content: flex-start;
    padding: 0.2rem 0.3rem;
    width: 100%;
  }
  .header__nav-link {
    font-size: 0.97rem;
    padding: 0.4rem 0.7rem;
  }
  .header__nav {
    justify-content: flex-start;
    margin-left: 0;
    width: 100%;
  }
  .header__logo-link {
    display: none;
  }
  .header__menu-toggle {
    display: flex;
  }
  .container {
    flex-direction: column;
    margin-top: 56px;
    min-height: unset;
  }
  /* Sidebar */
  .sidebar {
    border-radius: 12px 12px 0 0;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    margin-right: 0;
    min-height: unset;
    min-width: 0;
    padding: 1rem 0.5rem;
    position: static;
    width: 100%;
  }
  .sidebar__list {
    text-align: center;
  }
  .sidebar__link {
    text-align: center;
    white-space: normal;
    word-wrap: break-word;
  }
  /* Catalog */
  .catalog {
    padding: 1.2rem 0.5rem;
  }
  .catalog__header {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.7rem;
    padding: 0 0.5rem;
  }
  .catalog__filters {
    flex-wrap: wrap;
    gap: 0.7rem;
    width: 100%;
  }
  .catalog__grid {
    gap: 0.7rem;
    grid-template-columns: repeat(2, 1fr);
    padding: 0.7rem 0;
  }
  .catalog__card {
    font-size: 0.92rem;
    margin: 0 auto;
    max-width: 240px;
  }
  .catalog__card-image {
    aspect-ratio: 1/1;
    max-height: 140px;
    min-height: 110px;
  }
  .catalog__card-title {
    font-size: 0.97rem;
  }
  .catalog__card-details {
    padding: 0.7rem 0.5rem 0.7rem 0.5rem;
  }
  .catalog__card-actions {
    align-items: stretch;
    flex-direction: column; /* Botones en columna para que entren bien */
    gap: 0.3rem;
    margin: 1rem 0;
  }
  .catalog__card-button,
  .catalog__details-button {
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    font-size: 0.92rem;
    justify-content: center;
    padding: 0.35rem 0.7rem;
    width: 100%;
  }
}

@media (max-width: 600px) {
  .header__search {
    max-width: 120px;
  }
  .catalog__grid {
    gap: 0.7rem;
    grid-template-columns: repeat(2, 1fr);
    padding: 0.7rem 0;
  }
  .catalog {
    padding: 1rem 0.2rem;
  }
}

/***********************************************/
/* 5. Contenedor principal y sidebar           */
/***********************************************/
.container {
  align-items: stretch;
  display: flex;
  margin-top: 64px; /* igual a la altura mínima del header */
  min-height: calc(100vh - 64px); /* Ocupa toda la altura visible menos el header */
}

/* Sidebar ocupa todo el alto entre header y footer */
.sidebar {
  background-color: var(--color-2);
  display: flex;
  flex-direction: column;
  height: auto;
  margin-bottom: 0;
  min-height: calc(100vh - 64px); /* Altura desde debajo del header hasta el footer */
  min-width: 100px;
  padding: 1rem;
  transition: left 0.3s ease;
  width: 250px;
}

.sidebar.active::before {
  background: url('./../../images/logo-encabezado.png') no-repeat center;
  background-size: contain;
  content: "";
  display: block;
  height: 130px;
  margin: 0 auto 1rem auto;
  width: 90%;
  z-index: 1000;
}

/* Nueva sección: Mobile navigation links dentro del menú */
.mobile-nav {
  display: none;
}


.sidebar__title {
  color: var(--color-8);
  font-family: 'powerful_rider_demo';
  font-size: 1.4rem;
  margin-bottom: 0.8rem;
  margin-top: 1.3rem;
  text-align: center;
}

.sidebar__list {
  align-items: center;
  display: flex;
  flex-direction: column;
  font-family:Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;
  gap: 0.75rem;
  list-style: none;
  text-align: center; /* Centrar contenido de los <li> */
}

.sidebar__link {
  border-radius: 4px;
  color: var(--color-6);
  font-size: 1.2rem;
  padding: 0.25rem 0.5rem;
  text-align: center; /* Centrar texto */
  text-decoration: none;
  transition: color 0.3s ease, background-color 0.3s ease;
  white-space: normal; /* Permitir que el texto ocupe varias líneas */
  word-wrap: break-word; /* Ajustar palabras largas */
}
.sidebar__link:hover {
  background-color: transparent;
  color: var(--color-principal-light);
}

/***********************************************/
/* 6. Sección catálogo (main)                  */
/***********************************************/
.catalog {
  background-color: var(--color-1);
  flex: 1;
  margin: 0 20px;
  min-height: calc(100vh - 80px);
  text-align: center;
}

.catalog__title {
  color: var(--color-principal-dark);
  font-family: 'Transcity', sans-serif;
  font-size: clamp(1.8rem, 5vw, 3.2rem);
  margin-bottom: 2rem;
}

/* Catalog grid */
.catalog__grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(4, 1fr); /* 4 columnas por fila en desktop */
  padding: 2rem 0;
}

/* Catalog header and filters */
.catalog__header {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}
.catalog__title {
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
}
.catalog__filters {
  display: flex;
  gap: 1rem;
}
.catalog__filter {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
  padding: 0.5rem 1rem;
}

/* Product card */
.catalog__card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.catalog__card:hover {
  box-shadow: 0 4px 24px rgba(0,0,0,0.13);
}
.catalog__card-image {
  align-items: center;
  aspect-ratio: 1/1;
  background: #f7f7f7;
  display: flex;
  justify-content: center;
  overflow: hidden;
  width: 100%;
}
.catalog__card-image img {
  height: 100%;
  object-fit: contain;
  transition: transform 0.2s;
  width: 100%;
}
.catalog__card:hover .catalog__card-image img {
  transform: scale(1.05);
}
.catalog__card-details {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1.2rem 1rem 1rem 1rem;
}
.catalog__card-title {
  color: #222;
  font-family: 'Poppins', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
}
.catalog__card-price {
  color: var(--dm-color-principal);
  font-family: 'Poppins', sans-serif;
  font-size: 1.1rem;
  font-weight: 500;
}
.catalog__card-actions {
  align-items: stretch;
  display: flex;
  flex-direction: column; /* Siempre en columna */
  gap: 0.5rem;
  margin: 1rem auto;
}
.catalog__card-button,
.catalog__details-button,
.add-to-cart-btn {
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  padding: 0.5rem 1rem;
  transition: background 0.15s, color 0.15s;
}
.catalog__card-button {
  align-items: center;
  background: #25d366;
  color: #fff;
  display: flex;
  font-family: 'poppins';
  gap: 0.5em;
  text-decoration: none;
}
.catalog__card-button:hover {
  background: #1ebe57;
}
.catalog__details-button {
  background: #c4c4c430;
  color: #222;
}
.catalog__details-button:hover {
  background: #e0e0e0;
}
.add-to-cart-btn {
  align-items: center;
  background: var(--color-principal);
  color: #fff;
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}
.add-to-cart-btn:hover {
  background: var(--color-principal-dark);
}

/* Cart count badge */
.cart-count {
  background: var(--color-principal);
  border-radius: 50%;
  color: white;
  display: none;
  font-size: 0.8rem;
  font-weight: bold;
  min-width: 1.5rem;
  padding: 0.2rem 0.5rem;
  position: absolute;
  right: -0.5rem;
  text-align: center;
  top: -0.5rem;
}

.header__nav-link {
  position: relative;
}

/* Toast notifications */
.toast {
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  max-width: 300px;
  padding: 1rem 1.5rem;
  position: fixed;
  right: 20px;
  top: 100px;
  transform: translateX(400px);
  transition: transform 0.3s ease;
  z-index: 3000;
}

.toast.show {
  transform: translateX(0);
}

.toast-content {
  align-items: center;
  display: flex;
  gap: 0.75rem;
}

.toast-icon {
  font-size: 1.2rem;
}

.toast.success .toast-icon {
  color: #28a745;
}

.toast.error .toast-icon {
  color: #dc3545;
}

.toast.warning .toast-icon {
  color: #ffc107;
}

.toast-message {
  color: #222;
  font-weight: 500;
}

/* Botón de paginación "Ver más" */
.load-more-button {
  background: var(--color-principal);
  border: none;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  color: #fff;
  cursor: pointer;
  display: block;
  font-size: 1.1rem;
  font-weight: 600;
  margin: 2rem auto 0 auto;
  padding: 0.8rem 2.5rem;
  transition: background 0.18s, box-shadow 0.18s;
}
.load-more-button:hover:not(:disabled) {
  background: var(--color-principal-dark);
  box-shadow: 0 4px 16px rgba(0,0,0,0.13);
}
.load-more-button:disabled {
  background: var(--dm-color-8);
  cursor: not-allowed;
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .catalog__header {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.7rem;
  }
  .catalog__filters {
    flex-wrap: wrap;
    gap: 0.7rem;
    width: 100%;
  }
  .catalog__grid {
    gap: 0.7rem;
    grid-template-columns: repeat(2, 1fr); /* 2 columnas en tablets */
    padding: 0.7rem 0;
  }
}
@media (max-width: 600px) {
  .catalog__grid {
    gap: 0.7rem;
    grid-template-columns: repeat(2, 1fr); /* 2 columnas en móviles */
    padding: 0.7rem 0;
  }
  .catalog {
    padding: 1rem 0.2rem;
  }
}

/* Sidebar improvements */
.sidebar {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  margin-right: 2rem;
  min-height: 110%;
  min-width: 200px;
  padding: 1.5rem 1rem;
}
.sidebar__title {
  font-family: 'Poppins Black', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.7rem;
}
.sidebar__list {
  list-style: none;
  margin: 0 0 1.5rem 0;
  padding: 0;
}
.sidebar__link {
  border-radius: 5px;
  color: #222;
  display: block;
  font-family: 'poppins', sans-serif;
  padding: 0.5rem 0.7rem;
  text-decoration: none;
  transition: background 0.13s;
}
.sidebar__link:hover,
.sidebar__link.active {
  background: #f0f0f0;
  color: var(--color-principal);
}

/* Overlay for mobile sidebar */
.overlay.active {
  background: rgba(0,0,0,0.25);
  display: block;
  inset: 0;
  position: fixed;
  z-index: 10;
}

/***********************************************/
/* 8. Footer                                   */
/***********************************************/
.footer {
  background: #fff;
  border-top: 1px solid #ececec;
  color: #222;
  font-size: 1rem;
  margin-top: 0;
  padding: 1.5rem 0 1rem;
  text-align: center;
}

.footer__content {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin: 0 auto;
  max-width: 900px;
  padding: 0 1rem;
}

.footer__social {
  display: flex;
  gap: 1.2rem;
  margin-bottom: 0.5rem;
}

.footer__social-link {
  align-items: center;
  background: var(--color-5);
  border-radius: 50%;
  box-shadow: none;
  display: inline-flex;
  height: 38px;
  justify-content: center;
  margin: 0;
  padding: 0;
  text-decoration: none;
  transition: background 0.18s, transform 0.18s;
  width: 38px;
}
.footer__social-link:hover {
  background: var(--color-principal);
  transform: scale(1.08);
}
.footer__social-link img {
  filter: none;
  height: 22px;
  margin: 0;
  transition: filter 0.2s;
  width: 22px;
}

.footer__copy {
  background: none;
  box-shadow: none;
  color: #888;
  font-family: 'poppins';
  font-size: 0.97rem;
  letter-spacing: 0.01em;
  line-height: 1.5;
  margin: 0;
  opacity: 1;
  padding: 0;
}

.modal {
  align-items: center;
  display: none;
  inset: 0;
  justify-content: center;
  position: fixed;
  z-index: 2000;
}

.modal.show {
  display: flex;
}

/* Fondo difuminado con transición suave */
.modal__overlay {
  backdrop-filter: blur(6px);
  background: rgba(0, 0, 0, 0.4);
  inset: 0;
  opacity: 0;
  position: absolute;
  transition: opacity 0.4s ease;
}

.modal.show .modal__overlay {
  opacity: 1;
}

/* Contenedor con efecto glass */
.modal__content {
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.535);
  border: 1px solid var(--color-principal-light);
  border-radius: 24px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
  font-family: 'Powerful_Rider_Demo';
  height: 500px;
  max-width: 600px;
  opacity: 0;
  padding: 3rem 2.5rem;
  position: relative;
  text-align: center;
  transform: scale(0.8);
  transition: transform 0.4s cubic-bezier(0.2, 1, 0.3, 1), opacity 0.4s ease;
  width: 90%;
  z-index: 1001;
}

.modal.show .modal__content {
  opacity: 1;
  transform: scale(1);
}

/* Botón cerrar elegante */
.modal__close {
  align-items: center;
  background: var(--color-principal);
  border: none;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  display: flex;
  font-size: 1.4rem;
  height: 2.4rem;
  justify-content: center;
  line-height: 1;
  position: absolute;
  right: 0.8rem;
  top: 0.8rem;
  transition: background 0.3s, transform 0.2s;
  width: 2.4rem;
}

.modal__close:hover {
  background: var(--color-principal-dark);
  transform: scale(1.1);
}

/* Ajustes al login-card dentro del modal */
.modal__content .login-card {
  background: transparent;
  box-shadow: none;
  margin: 0;
  padding: 0;
}

/* Inputs y botones dentro del modal */
.modal__content .login-form input {
  background: rgb(255, 255, 255);
  border: 1px solid var(--color-3);
  transition: background 0.3s, border-color 0.3s;
}

.modal__content .login-form input:focus {
  background: rgba(255,255,255,0.35);
  border-color: var(--color-principal);
}

.modal__content .btn--primary {
  background: var(--color-principal);
  box-shadow: 0 8px 20px rgba(112, 144, 155, 0.4);
  margin-top: 30px;
  transition: background 0.3s, box-shadow 0.3s, transform 0.2s;
}

.modal__content .btn--primary:hover {
  background: var(--color-principal-dark);
  box-shadow: 0 12px 28px rgba(90, 121, 131, 0.5);
  transform: translateY(-2px);
}

.modal__content .login-form .form-group {
  margin-bottom: 1.5rem;
  position: relative;
}

.modal__content .login-form label {
  color: var(--color-11);
  display: block;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin: 1.5rem 0;
  text-transform: uppercase;
  transition: color 0.3s;
}

/* Input base */
.modal__content .login-form input {
  background: rgba(255,255,255,0.2);
  border: none;
  border-radius: 12px;
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.1);
  color: var(--color-texto);
  font-size: 1rem;
  padding: 0.85rem 1.2rem;
  transition: 
    background 0.3s, 
    box-shadow 0.3s, 
    transform 0.2s;
  width: 100%;
}

/* Placeholder más visible */
.modal__content .login-form input::placeholder {
  color: var(--color-3);
  opacity: 1;
}

/* Hover sutil */
.modal__content .login-form input:hover {
  background: rgba(255,255,255,0.3);
}

/* Focus destacado */
.modal__content .login-form input:focus {
  background: rgba(255,255,255,0.4);
  box-shadow: 0 0 0 3px var(--color-principal-light);
  outline: none;
  transform: translateY(-1px);
}

/* Cambio de color en label cuando el input está enfocado */
.modal__content .login-form input:focus + label,
.modal__content .login-form input:not(:placeholder-shown) + label {
  color: var(--color-principal);
}

/* ===== Estilos para los enlaces de login ===== */
.modal__content .login-links {
  align-items: center;
  display: flex;
  font-size: 0.95rem;
  justify-content: space-between;
  justify-content: center;
  margin-top: 1.8rem;
  width: 100%;
}

.modal__content .login-link {
  color: var(--color-5);
  padding: 0.2rem 0.4rem;
  position: relative;
  text-decoration: none;
  transition: color 0.3s;
}

/* Línea animada al pasar el ratón */
.modal__content .login-link::after {
  background: var(--color-principal);
  bottom: -2px;
  content: '';
  height: 2px;
  left: 0;
  position: absolute;
  transition: width 0.3s ease;
  width: 0;
}

.modal__content .login-link:hover {
  color: var(--color-principal);
}

.modal__content .login-link:hover::after {
  width: 100%;
}

/***********************************************/
/* 9. Responsive: vista Mobile                 */
/***********************************************/

/* === Agrupar todas las media queries aquí al final === */

@media (max-width: 900px), (max-width: 768px), (max-width: 600px) {
  /* Header */
  .header {
    align-items: flex-start;
    flex-direction: column;
    min-height: 56px;
    padding: 0 1rem;
  }
  .header__logo-search {
    align-items: center;
    flex-direction: row;
    width: 100%;
  }
  .header__search {
    align-items: center;
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    margin-left: 0;
    max-width: 100%;
    width: 100%;
  }
  .header__search-input {
    flex: 1 1 auto;
    margin-right: 0.5rem;
    min-width: 200px;
    width: 100%;
  }
  .header__search-btn {
    border-color: var(--dm-color-9);
    color: var(--dm-color-9);
    flex-shrink: 0;
    height: 2.2rem;
    margin-left: 0;
    position: static;
    width: 2.2rem;
  }
  .header__nav-list {
    box-shadow: none;
    gap: 0.3rem;
    justify-content: flex-start;
    padding: 0.2rem 0.3rem;
    width: 100%;
  }
  .header__nav-link {
    font-size: 0.97rem;
    padding: 0.4rem 0.7rem;
  }
  .header__nav {
    justify-content: flex-start;
    margin-left: 0;
    width: 100%;
  }
  .header__logo-link {
    display: none;
  }
  .header__menu-toggle {
    display: flex;
  }
  .container {
    flex-direction: column;
    margin-top: 56px;
    min-height: unset;
  }
  /* Sidebar */
  .sidebar {
    border-radius: 12px 12px 0 0;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    margin-right: 0;
    min-height: 100vh; /* Altura desde debajo del header hasta el footer */
    min-width: 0;
    padding: 1rem 0.5rem;
    position: static;
    width: 100%;
  }
  .sidebar__list {
    text-align: center;
  }
  .sidebar__link {
    text-align: center;
    white-space: normal;
    word-wrap: break-word;
  }
  /* Catalog */
  .catalog {
    padding: 1.2rem 0.5rem;
  }
  .catalog__header {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.7rem;
    padding: 0 0.5rem;
  }
  .catalog__filters {
    flex-wrap: wrap;
    gap: 0.7rem;
    width: 100%;
  }
  .catalog__grid {
    gap: 0.7rem;
    grid-template-columns: repeat(2, 1fr);
    padding: 0.7rem 0;
  }
  .catalog__card {
    font-size: 0.92rem;
    margin: 0 auto;
    max-width: 240px;
  }
  .catalog__card-image {
    aspect-ratio: 1/1;
    max-height: 140px;
    min-height: 110px;
  }
  .catalog__card-title {
    font-size: 0.97rem;
  }
  .catalog__card-details {
    padding: 0.7rem 0.5rem 0.7rem 0.5rem;
  }
  .catalog__card-actions {
    align-items: stretch;
    flex-direction: column; /* Botones en columna para que entren bien */
    gap: 0.3rem;
    margin: 1rem 0;
  }
  .catalog__card-button,
  .catalog__details-button {
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    font-size: 0.92rem;
    justify-content: center;
    padding: 0.35rem 0.7rem;
    width: 100%;
  }
}

@media (max-width: 900px) {
  .catalog__header {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.7rem;
  }
  .catalog__filters {
    flex-wrap: wrap;
    gap: 0.7rem;
    width: 100%;
  }
  .catalog__grid {
    gap: 0.7rem;
    grid-template-columns: repeat(2, 1fr); /* 2 columnas en tablets */
    padding: 0.7rem 0;
  }
}
@media (max-width: 768px) {
  /* Contenedor principal en columna */
  .mobile-nav {
    display: block;
    margin-bottom: 1rem;
  }
  .mobile-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    text-align: center;
  }
  .mobile-nav li {
    margin-bottom: 0.5rem;
  }
  .mobile-nav a {
    border-radius: 4px;
    color: var(--color-8);
    display: block;
    font-size: 1.2rem;
    font-weight: bold;
    padding: 0.5rem;
    text-decoration: none;
    transition: background-color 0.3s ease;
  }
  .mobile-nav a:hover {
    background-color: rgba(0,0,0,0.1);
  }

  .container {
    flex-direction: column;
  }

  .header__nav-list {
    display: none; /* Oculta la navegación principal en mobile */
  }
  
  /* Sidebar oculta y posicionada de forma fija */
  .sidebar {
    background-color: var(--color-2);
    height: 50%;
    left: -100%; /* Oculta fuera de la pantalla */
    max-width: 300px;
    overflow-y: auto;
    padding: 1rem;
    position: fixed;
    top: 0;
    transition: left 0.3s ease;
    width: 70%;
    z-index: 1000;
  }
  .sidebar.active {
    left: 0;
  }

  .sidebar::before {
    background: url('./../../images/logo-encabezado.png') no-repeat center;
    background-size: contain;
    content: "";
    display: block;
    height: 80px;
    margin: 0 auto 1rem auto;
    width: 80%;
  }
  
  /* Overlay para oscurecer el fondo al abrir el menú */
  .overlay {
    background: rgba(0,0,0,0.5);
    display: none;
    height: 100%;
    left: 0;
    position: fixed;
    top: 0;
    transition: opacity 0.3s ease;
    width: 100%;
    z-index: 900;
  }
  .overlay.active {
    display: block;
  }

  .sidebar.active {
    left: 0;
  }
  
  /* Mostrar botón de menú en el header */
  .header__menu-toggle {
    display: flex;
  }
  
  /* Ocultar la imagen del logo en el header */
  .header__logo-link {
    display: none;
  }
  
  /* Ajuste del header para vistas móviles */
  .header {
    justify-content: space-between;
  }

  .header__search-input {
    width: 200px;
    
  }
  
  .catalog__cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  /* Card en fila única, horizontal */
  .card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 4px var(--color-principal);
    display: flex;
    flex-direction: row;
    max-width: 100%;
    overflow: hidden;
    width: 100%;
  }


  /* Contenido a la derecha */
  .card__info {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 1rem; /* Reduced gap */
    padding: 0.75rem;
    text-align: center;
  }

  /* Título y descripción */
  .card__title {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
    text-align: center;
  }
  .card__description {
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;  /* sólo 2 líneas */
    color: var(--color-7);
    display: -webkit-box;
    font-size: 0.75rem;
    line-clamp: 2;
    margin: 0.5rem 0;
    overflow: hidden;
    
  }

  /* Footer: precio y botones alineados */
  .card__footer {
    align-items: center;
    display: flex;
    flex-direction: column;
    margin-top: 0.5rem;
  }
  .card__price {
    color: var(--color-principal-dark);
    font-size: 1.1rem;
    font-weight: bold;
  }

  /* Botones más compactos */
  .card__buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 70%;
    ;
  }
  .ver-detalles-btn,
  .card__whatsapp {
    font-family: 'Powerful_Rider_Demo';
    font-size: 0.85rem;
    justify-content: center;
    padding: 0.4rem 0.6rem;
    white-space: nowrap;
    width: 100%;
  }

  .sidebar__list {
    text-align: center; /* Centrar contenido en vista móvil */
  }

  .sidebar__link {
    text-align: center; /* Centrar texto en vista móvil */
    white-space: normal; /* Permitir varias líneas en vista móvil */
    word-wrap: break-word; /* Ajustar palabras largas en vista móvil */
  }

  .load-more-button {
    font-size: 0.9rem;
    margin: 1rem auto;
    padding: 0.5rem 1.5rem;
    width: 30%;
  }
}

/* Estilos adicionales para el catálogo */
.catalog__grid p,
.catalog__grid .loading-message {
  align-items: center;
  color: var(--color-6);
  display: flex;
  font-family: 'Poppins', sans-serif;
  font-size: 1.1rem;
  font-weight: bold;
  justify-content: center;
  margin: 0.5rem 0;
  text-align: center;
  width: 100%;
}

/* Contenedor de paginación */
.pagination {
  display: flex;
  flex-wrap: wrap;
  font-family: 'Poppins', sans-serif;
  gap: 0.5rem;
  justify-content: center;
  margin: 2rem 0;
}

/* Botones de página */
.pagination button {
  background: var(--color-5);       /* Violeta principal */
  border: none;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  min-width: 45px;
  padding: 0.55rem 1rem;
  transition: background 0.18s, transform 0.18s, box-shadow 0.18s;
}

/* Hover y activo */
.pagination button:hover:not(:disabled) {
  background: var(--color-6);       /* Violeta oscuro */
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transform: translateY(-2px);
}

/* Botón activo */
.pagination button.active {
  background: var(--color-principal);
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  color: #fff;
  font-weight: 700;
}

/* Botones deshabilitados */
.pagination button:disabled {
  background: #ccc;
  color: #fff;
  cursor: not-allowed;
  opacity: 0.7;
}

/* Ajustes responsive */
@media (max-width: 900px) {
  .pagination {
    gap: 0.4rem;
  }
  .pagination button {
    font-size: 0.95rem;
    min-width: 40px;
    padding: 0.45rem 0.9rem;
  }
}

@media (max-width: 600px) {
  .pagination {
    gap: 0.3rem;
  }
  .pagination button {
    font-size: 0.9rem;
    min-width: 35px;
    padding: 0.4rem 0.8rem;
  }
}