:root {
  --primary-color: #333;
  --accent-color: #d4a373; /* Un tono dorado/tierra suave para detalles */
  --bg-light: #fdfdfd;
  --text-muted: #777;
}

body {
  font-family: 'Poppins', sans-serif;
  margin: 0;
  background: #fcfcfc;
  color: var(--primary-color);
}

/* TOPBAR */
.topbar {
  background: #1a1a1a;
  color: #fff;
}

.topbar p {
  margin: 0;
  padding: 8px 50px;
  text-align: center;
  /* font-size: 12px; */
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* NAVBAR */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 50px;
  background: white;
  border-bottom: 1px solid #f0f0f0;
  height: 100px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.nav-left, .nav-right {
  flex: 1;
  display: flex;
  align-items: center;
}

.nav-center {
  flex: 2;
  text-align: center;
}

.nav-logo {
  height: 65px;
  transition: transform 0.3s ease;
}

.nav-logo:hover {
  transform: scale(1.05);
}

.nav-title {
  margin: 0;
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--primary-color);
  font-size: 32px;
  text-transform: uppercase;
}

.menu {
  list-style: none;
  display: flex;
  gap: 25px;
  margin: 0;
  padding: 0;
  align-items: center;
}

.menu a {
  text-decoration: none;
  color: var(--primary-color);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: color 0.3s;
}

.menu a:hover {
  color: var(--accent-color);
  text-decoration: none;
}

.login-btn {
  padding: 10px 22px;
  border: 1.5px solid var(--primary-color);
  background: transparent;
  color: var(--primary-color);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  text-decoration: none;
  margin-left: 20px;
}

.login-btn:hover {
  background: var(--primary-color);
  color: white;
  text-decoration: none;
}

/* SUBTÍTULOS */
.subtitle {
  text-align: center;
  color: var(--text-muted);
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1.2rem;
}

.main-subtitle {
  margin: 30px 0;
}

.section-title {
  font-size: 1.8rem;
  margin-bottom: 40px;
  color: var(--primary-color);
}

/* CAROUSEL / HERO */
.hero-carousel {
  max-width: 1000px;
  margin: 0 auto;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.carousel-item img {
  height: 450px;
  object-fit: cover;
}

.cta-btn {
  padding: 12px 30px;
  background: white;
  color: black;
  border-radius: 0;
  text-transform: uppercase;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 2px;
  text-decoration: none;
  transition: 0.3s;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.cta-btn:hover {
  background: var(--primary-color);
  color: white;
  text-decoration: none;
}

/* PRODUCTOS GRID */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 40px;
  padding-bottom: 50px;
}

.card {
  border: none;
  background: white;
  border-radius: 15px;
  padding: 25px;
  text-align: center;
  box-shadow: 0 5px 20px rgba(0,0,0,0.05);
  transition: all 0.4s ease;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.card img {
  width: 100%;
  height: 240px;
  object-fit: contain;
  margin-bottom: 20px;
  border-radius: 10px;
  transition: transform 0.3s;
}

.card:hover img {
  transform: scale(1.03);
}

.card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  margin-bottom: 10px;
}

.card .precio {
  font-weight: 500;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.card button {
  width: 100%;
  padding: 12px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 5px;
  font-weight: 500;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 1px;
  cursor: pointer;
  transition: background 0.3s;
}

.card button:hover {
  background-color: #555;
}

/* FOOTER */
footer {
  text-align: center;
  padding: 40px;
  background: white;
  border-top: 1px solid #eee;
  margin-top: 60px;
  font-size: 13px;
  color: var(--text-muted);
}

/* Botón flotante de WhatsApp */
.whatsapp-btn {
    position: fixed;    /* Esto hace que flote */
    bottom: 30px;       /* Distancia del borde inferior */
    right: 30px;        /* Distancia del borde derecho */
    width: 60px;
    height: 60px;
    background-color: #25d366;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    z-index: 1000;      /* Para que esté siempre al frente */
    transition: transform 0.3s ease;
}

/* Botón de WhatsApp Rectangular y Fijo */
.whatsapp-btn {
    position: fixed;         /* Lo mantiene fijo aunque el usuario baje */
    bottom: 20px;            /* Distancia desde abajo */
    right: 20px;             /* Distancia desde la derecha */
    background-color: #000;  /* Color negro como en tu ejemplo */
    color: white;
    padding: 8px 15px;       /* Tamaño más compacto */
    border-radius: 8px;      /* Bordes ligeramente redondeados */
    display: flex;
    align-items: center;
    gap: 10px;               /* Espacio entre icono y texto */
    text-decoration: none;
    font-size: 14px;         /* Texto pequeño y discreto */
    font-weight: 500;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    z-index: 1000;           /* Siempre al frente */
    transition: 0.3s;
}

/* Estilos para el botón flotante de WhatsApp */
.whatsapp-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px; /* Tamaño del botón */
    height: 60px;
    background-color: #25d366;
    color: white;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 3px #999;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.whatsapp-btn:hover {
    background-color: #128c7e;
    transform: scale(1.1);
}

/* AQUÍ CONTROLAS EL TAMAÑO DE LA IMAGEN */
.whatsapp-btn img {
    width: 35px; /* Ajusta este valor para que el logo se vea bien dentro del círculo */
    height: auto;
}

.filter-btn {
  padding: 8px 20px;
  border: 1px solid var(--primary-color);
  background: white;
  color: var(--primary-color);
  cursor: pointer;
  transition: 0.3s;
  margin: 5px;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 1px;
}

.filter-btn.active, .filter-btn:hover {
  background: var(--primary-color);
  color: white;
}

/* Asegúrate de que tu .product-grid use display: grid como ya lo tienes */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.cta-btn {
    padding: 15px 35px;
    background: #000; /* Negro elegante */
    color: #fff;
    border: none;
    text-transform: uppercase;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 2px;
    text-decoration: none;
    transition: 0.4s;
    display: inline-block;
}

.cta-btn:hover {
    background: var(--accent-color); /* El tono dorado que ya definiste */
    color: white;
    text-decoration: none;
    transform: translateY(-3px);
}

.img-studio {
  width: 100%;
  max-width: 500px;
  height: auto;
  border-radius: 15px;
  display: block;
  margin: 0 auto;
  transition: transform 0.3s ease;
}

.img-studio:hover {
  transform: scale(1.05);
}

.cta-buy-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background-color: var(--primary-color); /* Color negro de tu raíz */
    color: white !important;
    text-align: center;
    border-radius: 5px;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 1px;
    text-decoration: none;
    transition: background 0.3s;
}

.cta-buy-btn:hover {
    background-color: var(--accent-color); /* El tono dorado que ya definiste */
    text-decoration: none;
}

/* Estilo para el botón de compra */
.btn-agregar {
    background-color: #333333; /* El color oscuro de tu imagen */
    color: #ffffff !important;   /* Texto blanco */
    padding: 12px 20px;
    border-radius: 8px;        /* Bordes redondeados sutiles */
    text-decoration: none;
    display: block;            /* Para que ocupe el ancho deseado */
    text-align: center;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    text-transform: uppercase; /* Letras mayúsculas como en la foto */
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
    border: none;
    margin-top: 10px;
}

/* Efecto al pasar el mouse */
.btn-agregar:hover {
    background-color: #000000; /* Se oscurece un poco más */
    color: #ffffff;
    text-decoration: none;
}

.hero-section{
    display:flex;
    align-items:center;
    gap:50px;
    max-width:1200px;
    margin:auto;
    padding:40px 20px;
}

.hero-carousel{
    flex:1.1;
    border-radius:20px;
    overflow:hidden;
    box-shadow:0 15px 35px rgba(0,0,0,.12);
}

.carousel-item img{
    height:460px;
    object-fit:cover;
}

.hero-text{
    flex:0.9;
}

.subtitle{
    font-family:'Playfair Display',serif;
    font-style:italic;
    color:#7a7a7a;
    margin-bottom:10px;
    font-size:28px;
}

.hero-text h2{
    font-family:'Playfair Display',serif;
    font-size:55px;
    margin-bottom:20px;
}

.hero-copy{
    font-family:'Poppins',sans-serif;
    line-height:1.8;
    color:#666;
    margin-bottom:30px;
}

.cta-btn{
    background:#000;
    color:#fff;
    padding:15px 35px;
    text-decoration:none;
    display:inline-block;
    font-weight:600;
    letter-spacing:2px;
    transition:.3s;
}

.cta-btn:hover{
    background:#d4a373;
    color:#fff;
}

.reserva-btn{
    align-self:flex-start;
}

@media(max-width:900px){

.hero-section{
    flex-direction:column;
}

.hero-text{
    text-align:center;
}

.reserva-btn{
    align-self:center;
}

}

/* ===== SECCIÓN ===== */

.categorias{
    max-width:1200px;
    margin:60px auto;
    padding:0 20px;

    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:30px;
}


/* ===== TARJETA ===== */

.categoria-card{
    text-align:center;
}


/* ===== IMAGEN ===== */

.categoria-card img{

    width:100%;
    height:220px;

    object-fit:cover;

    border-radius:15px;

    background:#ececec;

    box-shadow:0 8px 25px rgba(0,0,0,.08);

    transition:.4s;
}


/* Hover */

.categoria-card:hover img{

    transform:translateY(-8px) scale(1.03);

    box-shadow:0 15px 35px rgba(0,0,0,.15);

}


/* ===== TEXTO ===== */

.categoria-card h3{

    margin-top:18px;

    font-family:'Playfair Display', serif;

    font-size:34px;

    font-weight:600;

    color:#222;
}

/* CONTENEDOR */

.categorias{
    max-width:1200px;
    margin:60px auto;
    padding:0 20px;

    display:flex;
    justify-content:center;
    gap:30px;
    flex-wrap:wrap;
}


/* TARJETA */

.categoria-card{
    width:350px;          /* Siempre el mismo ancho */
    text-align:center;
}


/* CUADRO */

.categoria-img{
    width:350px;          /* Ancho fijo */
    height:220px;         /* Alto fijo */

    overflow:hidden;

    border-radius:15px;

    background:#ececec;

    box-shadow:0 8px 25px rgba(0,0,0,.08);
}


/* IMAGEN */

.categoria-img img{

    width:100%;
    height:100%;

    object-fit:cover;

    transition:.4s;
}


/* EFECTO */

.categoria-card:hover img{

    transform:scale(1.08);

}


/* TEXTO */

.categoria-card h3{

    margin-top:18px;

    font-size:32px;

    font-family:'Playfair Display', serif;

    font-weight:600;

}


/* RESPONSIVE */

@media(max-width:1150px){

    .categoria-card,
    .categoria-img{

        width:320px;

    }

}

@media(max-width:768px){

    .categoria-card,
    .categoria-img{

        width:100%;
        max-width:400px;

    }

    .categoria-img{

        height:240px;

    }

}

/* --- NUEVA ESTRUCTURA DEL BRAND (LOGO + TÍTULO) --- */
.nav-brand-container {
  display: flex;
  align-items: center;
  gap: 15px;
  justify-content: center;
}

/* Ocultar botones de control en versión de escritorio */
.menu-toggle-btn, .close-menu-btn, .sidebar-overlay {
  display: none;
}

/* Compatibilidad con la lista en Desktop (reutiliza tus estilos previos) */
.sidebar-menu .menu-links {
  list-style: none;
  display: flex;
  gap: 25px;
  margin: 0;
  padding: 0;
  align-items: center;
}

.sidebar-menu .menu-links a {
  text-decoration: none;
  color: var(--primary-color);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: color 0.3s;
}

/* --- MEDIA QUERY PARA VISTA MÓVIL (Menor a 768px) --- */
@media (max-width: 767px) {
  .navbar {
    position: relative;
    padding: 0 20px;
    height: 100px;
    display: flex;
    justify-content: center; /* Centra el contenedor del brand */
    align-items: center;
  }

  /* El contenedor centralizado */
  .nav-brand-container {
    margin: 0 auto;
  }

  .nav-logo {
    height: 50px;
  }

  .nav-title {
    font-size: 24px;
  }

  /* BOTÓN HAMBURGUESA (3 líneas manuales elegantes) */
  .menu-toggle-btn {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 26px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    position: absolute;
    left: 20px;
    padding: 0;
    z-index: 10;
  }

  .menu-toggle-btn span {
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
    transition: all 0.3s ease;
  }

  /* SIDEBAR: PANEL FLOTANTE LATERAL DERECHO */
  .sidebar-menu {
    position: fixed;
    top: 0;
    right: -300px; /* Escondido por defecto a la derecha */
    width: 280px;
    height: 100vh;
    background-color: #ffffff; /* Puedes cambiarlo a #000 si deseas fondo negro tipo Nexus */
    box-shadow: -5px 0 25px rgba(0,0,0,0.1);
    z-index: 2000;
    padding: 80px 40px;
    display: flex;
    flex-direction: column;
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1); /* Animación suave */
  }

  /* Clase que activa el menú lateral mediante JS */
  .sidebar-menu.active {
    right: 0; /* Se desliza a la vista */
  }

  /* BOTÓN CERRAR (X) */
  .close-menu-btn {
    display: block;
    position: absolute;
    top: 25px;
    right: 30px;
    font-size: 36px;
    background: transparent;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    line-height: 1;
  }

  /* Lista de enlaces vertical dentro del Sidebar */
  .sidebar-menu .menu-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 30px;
    margin-top: 20px;
  }

  .sidebar-menu .menu-links a {
    font-size: 16px; /* Más grande y cómodo para el dedo en celular */
    display: block;
    width: 100%;
  }

  /* CAPA OSCURA DE FONDO (Overlay) */
  .sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
  }

  .sidebar-overlay.active {
    display: block;
    opacity: 1;
    pointer-events: auto;
  }
}

/* --- NUEVA ESTRUCTURA DEL BRAND (LOGO + TÍTULO) --- */
.nav-brand-container {
  display: flex;
  align-items: center;
  gap: 15px;
  justify-content: center;
}

/* Ocultar botones de control en versión de escritorio */
.menu-toggle-btn, .close-menu-btn, .sidebar-overlay {
  display: none;
}

/* Compatibilidad con la lista en Desktop (reutiliza tus estilos previos) */
.sidebar-menu .menu-links {
  list-style: none;
  display: flex;
  gap: 25px;
  margin: 0;
  padding: 0;
  align-items: center;
}

.sidebar-menu .menu-links a {
  text-decoration: none;
  color: var(--primary-color);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: color 0.3s;
}

/* --- MEDIA QUERY PARA VISTA MÓVIL (Menor a 768px) --- */
@media (max-width: 767px) {
  .navbar {
    position: relative;
    padding: 0 20px;
    height: 100px;
    display: flex;
    justify-content: center; /* Centra el contenedor del brand */
    align-items: center;
  }

  /* El contenedor centralizado */
  .nav-brand-container {
    margin: 0 auto;
  }

  .nav-logo {
    height: 50px;
  }

  .nav-title {
    font-size: 24px;
  }

  /* BOTÓN HAMBURGUESA (3 líneas manuales elegantes) */
  .menu-toggle-btn {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 26px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    position: absolute;
    left: 20px;
    padding: 0;
    z-index: 10;
  }

  .menu-toggle-btn span {
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
    transition: all 0.3s ease;
  }

  /* SIDEBAR: PANEL FLOTANTE LATERAL DERECHO */
  .sidebar-menu {
    position: fixed;
    top: 0;
    right: -300px; /* Escondido por defecto a la derecha */
    width: 280px;
    height: 100vh;
    background-color: #ffffff; /* Puedes cambiarlo a #000 si deseas fondo negro tipo Nexus */
    box-shadow: -5px 0 25px rgba(0,0,0,0.1);
    z-index: 2000;
    padding: 80px 40px;
    display: flex;
    flex-direction: column;
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1); /* Animación suave */
  }

  /* Clase que activa el menú lateral mediante JS */
  .sidebar-menu.active {
    right: 0; /* Se desliza a la vista */
  }

  /* BOTÓN CERRAR (X) */
  .close-menu-btn {
    display: block;
    position: absolute;
    top: 25px;
    right: 30px;
    font-size: 36px;
    background: transparent;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    line-height: 1;
  }

  /* Lista de enlaces vertical dentro del Sidebar */
  .sidebar-menu .menu-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 30px;
    margin-top: 20px;
  }

  .sidebar-menu .menu-links a {
    font-size: 16px; /* Más grande y cómodo para el dedo en celular */
    display: block;
    width: 100%;
  }

  /* CAPA OSCURA DE FONDO (Overlay) */
  .sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
  }

  .sidebar-overlay.active {
    display: block;
    opacity: 1;
    pointer-events: auto;
  }
}

/* ==========================================
   PANTALLA DE CARGA (PRELOADER) - FONDO BLANCO
   ========================================== */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #ffffff; /* Fondo blanco */
  z-index: 99999;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

/* Contenedor vertical para alinear el logo y el texto abajo */
.loader-container {
  display: block;
  text-align: center;
}

.loader-content {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto 20px auto;
  width: 120px;
  height: 120px;
}

/* Giro y pulso fluido integrado en el logo circular negro */
.rotating-logo {
  width: 100px;
  height: 100px;
  object-fit: contain;
  border-radius: 50%;
  animation: spinAndPulse 2.5s ease-in-out infinite; /* Animación combinada */
}

/* Tipografía y estilo de la palabra Cargando */
.loader-text {
  font-family: 'Poppins', sans-serif;
  font-size: 14pt;
  letter-spacing: 2px;
  color: #111111;
  text-transform: uppercase;
  font-weight: 500;
  margin-top: 10px;
}

/* Animación secuencial de 1 a 3 puntos (...) */
.animated-dots::after {
  content: '';
  animation: dotsSequence 1.5s steps(4, end) infinite;
}

/* ==========================================
   KEYFRAMES (ANIMACIONES DEL PRELOADER)
   ========================================== */

/* Efecto de puntos suspensivos secuenciales */
@keyframes dotsSequence {
  0% { content: ''; }
  25% { content: '.'; }
  50% { content: '..'; }
  75% { content: '...'; }
  100% { content: ''; }
}

/* Fusión de giro de 360° con efecto de escala/salto elástico */
@keyframes spinAndPulse {
  0% {
    transform: rotate(0deg) scale(0.9);
  }
  50% {
    transform: rotate(180deg) scale(1.15); /* Punto máximo del salto hacia el frente */
  }
  100% {
    transform: rotate(360deg) scale(0.9);
  }
}

/* Clase de salida controlada por JavaScript */
#preloader.fade-out {
  opacity: 0;
  visibility: hidden;
}