/* Fuentes y variables globales */
/*@font-face {
  font-family: "TrebuchetMS";
  src: url("../fonts/TrebuchetMS.ttf");
}
@font-face {
  font-family: "BebasNeue";
  src: url("../fonts/BebasNeue.otf");
}
@font-face {
  font-family: "WebSymbolsRegular";
  src: url("../fonts/websymbols-regular-webfont.eot");
  src: url("../fonts/websymbols-regular-webfont.eot?#iefix") format("embedded-opentype"),
       url("../fonts/websymbols-regular-webfont.woff") format("woff"),
       url("../fonts/websymbols-regular-webfont.ttf") format("truetype"),
       url("../fonts/websymbols-regular-webfont.svg#WebSymbolsRegular") format("svg");
}
*/
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Cardo:wght@700&display=swap');

/* Variables de color y tamaño */
:root {
  --max-width: 1500px;
  --max-width-tablet: 1024px;
  --max-width-mobile: 600px;

  --color-primary: #007acc;
  --color-secondary: #ffffff;
  --color-accent: #ffb74d;
  --color-dark: #2e1a12;
  --color-medium: #5d3720;
  --color-light: #8d5d33;
  --color-highlight: #ffd368;

  --color-bg: #f4f4f4;
  --color-footer: #6d502e;
  --color-text: #333;
  --color-title: #00538c;
  --color-shadow: rgba(0, 0, 0, 0.1);
}

/* Estilos generales para html y body */
html,
body {
  font-family: 'Inter', sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text);
  margin: 0;
  padding: 0;
}

/* Fuente Cardo para títulos */
.cardo-title {
  font-family: 'Cardo', serif
}

/* Subtítulo del banner */
.banner-subtext {
  color: #fff !important;
  font-size: 1rem;
}

/* Botón del banner */
.banner-btn {
  font-size: 0.95rem;
}

/* Navbar principal */
.navbar {
  background: rgba(0, 0, 0, 0.5) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25) !important;
  backdrop-filter: blur(4px);
  padding: 6px 16px;
  min-height: 60px;
  height: 60px;
  transition: background 0.8s ease-in-out, box-shadow 0.8s ease-in-out;
}

/* Navbar transparente para la home */
.navbar.navbar-home {
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none;
  transition: background 0.8s, box-shadow 0.8s;
}

/* Espaciado para el contenido principal según la página */
body:not(.navbar-home-body) .main-content {
  margin-top: 80px;
  /* Igual a la altura del navbar normal */
}

body.navbar-home-body .main-content {
  margin-top: 60px;
  /* Igual a la altura del navbar-home */
}

/* Colores de texto e iconos en navbar */
.navbar,
.navbar * {
  color: #fff !important;
  fill: #fff !important;
}

/* Marca de la navbar */
.navbar-brand {
  color: var(--color-highlight);
  text-shadow: 2px 2px 3px #000;
  transition: transform 0.3s ease;
}

.navbar-brand span {
  text-shadow: none !important;
  font-size: 1rem !important;
  /* Tamaño más pequeño */
  letter-spacing: 2px;
}

/* Navegación centrada */
.navbar-nav {
  width: 100%;
  justify-content: center;
  align-items: center;
  display: flex;
}

/* Logo de la navbar */
.navbar-brand img {
  height: 40px;
  /* Ajusta el logo para que no sobresalga */
  max-height: 36px;
}

/* Enlaces de la navbar */
.nav-link {
  padding-top: 2px;
  padding-bottom: 2px;
  font-size: 1rem;
  /* Opcional: tamaño de fuente más pequeño */
}

.nav-link:hover {
  color: var(--color-accent);
}

/* Navbar scrolled */
.navbar.scrolled {
  background: rgba(0, 0, 0, 0.5) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25) !important;
  backdrop-filter: blur(4px);
}

/* Subrayado animado para enlaces */
.subraya {
  position: relative;
  overflow: hidden;
  transition: color 0.3s;
}

.subraya::before {
  content: "";
  position: absolute;
  left: 10%;
  /* Centra la línea (100%-80%)/2 = 10% */
  bottom: 0;
  width: 0%;
  height: 2px;
  background-color: var(--color-accent, #ffb74d);
  transition: width 0.3s;
  z-index: 1;
}

.subraya:hover::before,
.subraya.active::before {
  width: 80%;
  /* Solo 80% del ancho */
}

.subraya:hover {
  color: var(--color-accent, #ffb74d) !important;
  transform: none;
}

/* Efecto de crecimiento para iconos */
.icon-grow {
  transition: transform 0.3s;
  display: inline-flex;
  align-items: center;
}

.icon-grow:hover,
.icon-grow:focus {
  transform: scale(1.15);
}

/* Banner principal */
.index-section {
  background-image: url("../img/portada-samas.png");
  background-size: cover;
  background-position: center;
  height: 87vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Texto del banner */
.section-banner {
  color: #fff !important;
  font-size: 2rem;
  text-align: center;
  text-shadow: 2px 2px 3px #000;
}

.banner-subtext {
  color: #fff !important;
}

/* Carrusel de imágenes */
.carousel-control-prev-icon,
.carousel-control-next-icon {
  background-color: #000;
}

/* Tarjetas de productos */
.product-card {
  box-shadow: 0 4px 6px var(--color-shadow);
  border-radius: 10px;
  overflow: hidden;
}

.card-img-top {
  height: 200px;
  object-fit: cover;
}

/* Footer */
footer {
  background-color: var(--color-footer);
  color: var(--color-secondary);
  text-align: center;
  padding: 20px 0;
}

.footer-link {
  color: var(--color-secondary);
  text-decoration: none;
  transition: transform 0.3s ease;
}

.footer-link:hover {
  color: var(--color-highlight);
  text-decoration: underline;
}

.footer-title {
  transform: scale(1.2);
  color: var(--color-accent);
  text-shadow: 1px 1px 2px #000;
}

/* Subrayado amarillo para títulos principales */
.titulo-subrayado {
  display: inline-block;
  position: relative;
  padding-bottom: 0.2em;
  z-index: 1;
}

.titulo-subrayado::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 35%;
  /* Más corta inicialmente */
  height: 0.22em;
  background: var(--color-accent, #ffb74d);
  border-radius: 2px;
  z-index: -1;
  transition: width 1.5s cubic-bezier(.77, 0, .18, 1);
  /* Más lento */
}

.titulo-subrayado.animar-subrayado::after {
  width: 100%;
}

/* --- NUEVO ESTILO PARA PRODUCTOS NUEVOS --- */
.nuevos-productos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
}

/* Tarjeta de producto nuevo */
.nuevo-producto-card {
  background: #fff;
  border-radius: 1.3rem;
  box-shadow: 0 4px 18px rgba(60, 60, 60, 0.10);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s, box-shadow 0.18s;
  border: none;
  position: relative;
}

.nuevo-producto-card:hover {
  transform: translateY(-6px) scale(1.03);
  box-shadow: 0 8px 32px rgba(60, 60, 60, 0.13);
}

.nuevo-producto-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: #f7f7f7;
  border-top-left-radius: 1.3rem;
  border-top-right-radius: 1.3rem;
}

.nuevo-producto-body {
  padding: 1.2rem 1.2rem 1.5rem 1.2rem;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}

.nuevo-producto-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--color-medium);
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

.nuevo-producto-desc {
  font-size: 0.97rem;
  color: #888;
  margin-bottom: 0.7rem;
  min-height: 2.2em;
  text-overflow: ellipsis;
  overflow: hidden;
}

.nuevo-producto-precio {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--color-accent);
  margin-bottom: 0.7rem;
}

.nuevo-producto-btn {
  margin-top: auto;
  border-radius: 2rem;
  font-weight: 500;
  background: var(--color-dark);
  color: #fff;
  border: none;
  transition: background 0.2s, color 0.2s;
  padding: 0.5rem 1.2rem;
}

.nuevo-producto-btn:hover,
.nuevo-producto-btn:focus {
  background: var(--color-accent);
  color: #222;
}

/* Categorías con scroll horizontal y tarjetas grandes */
.categorias-scroll {
  display: flex;
  flex-direction: row;
  gap: 2rem;
  overflow-x: auto;
  padding-bottom: 1rem;
  scrollbar-width: thin;
  scrollbar-color: #bbb #eee;
  padding-left: 8px;
  padding-right: 8px;
}

.categorias-scroll::-webkit-scrollbar {
  height: 12px;
}

.categorias-scroll::-webkit-scrollbar-thumb {
  background: #bbb;
  border-radius: 6px;
}

.categorias-scroll::-webkit-scrollbar-track {
  background: #eee;
  border-radius: 6px;
}

/* Tarjeta de categoría grande */
.categoria-card-lg {
  width: 260px;
  height: 320px;
  min-width: 260px;
  min-height: 320px;
  max-width: 90vw;
  background: #f8f8f8;
  border-radius: 1.5rem;
  box-shadow: 0 2px 12px rgba(60, 60, 60, 0.10);
  transition: transform 0.18s, box-shadow 0.18s;
  display: flex;
  align-items: flex-end;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.categoria-card-lg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.categoria-card-lg:hover {
  transform: translateY(-6px) scale(0.97);
  box-shadow: 0 8px 24px rgba(60, 60, 60, 0.13);
  -webkit-transform: translateY(-6px) scale(0.97);
  -moz-transform: translateY(-6px) scale(0.97);
  -ms-transform: translateY(-6px) scale(0.97);
  -o-transform: translateY(-6px) scale(0.97);
}

.categoria-label {
  background: rgba(255, 255, 255, 0.97);
  color: #222;
  font-size: 1.15rem;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
  pointer-events: none;
  min-width: 70%;
  max-width: 90%;
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* Responsive para móvil / Navbar */
@media (max-width: 991.98px) {
  .navbar-collapse {
    background: linear-gradient(135deg, var(--color-footer) 0%, #a67c52 100%) !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
    border-radius: 0 0 18px 18px;
    transition: padding 0s;
    transition: 0.3s;
  }

  .navbar-collapse.show {
    padding-bottom: 1.2rem;
    padding-top: 1.2rem;
  }

  .util-nav-icons {
    color: #fff !important;
    font-size: 1.15rem;
    text-align: right;
  }

  .navbar-collapse .d-flex {
    justify-content: right !important;
    margin-top: 1rem;
    gap: 1rem;
  }

  .carousel-control-prev {
    display: none !important;
  }

  .carousel-control-next {
    display: none !important;
  }
}

/* Responsive para tarjetas y categorías en móvil */
@media (max-width: 600px) {
  .categoria-card-lg {
    width: 170px;
    height: 180px;
    min-width: 170px;
    min-height: 180px;
  }

  .categoria-label {
    font-size: 1rem;
    padding: 0.5rem 1rem;
  }

  .nuevos-productos-grid {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }

  .nuevo-producto-img {
    height: 120px;
  }
}