/* Google Fonts cargado desde el <head> del HTML con preconnect para mejor rendimiento */

/* ===== DESIGN TOKENS ===== */
:root {
  --bg:          #faf8f5;
  --surface:     #ffffff;
  --text:        #1c1c1a;
  --text-muted:  #6e6a65;
  --accent:      #b07d4a;
  --accent-h:    #9a6c3b;
  --accent-light:#f5ede4;
  --nav-bg:      #ffffff;
  --footer-bg:   #f3f0ec;
  --nav-h:       72px;
  --radius:      12px;
  --shadow-sm:   0 1px 4px rgba(0,0,0,.07);
  --shadow-md:   0 4px 20px rgba(0,0,0,.1);
}

/* ===== RESET & BASE ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  max-width: 100%;
}

h1, h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 400;
  color: var(--text);
  line-height: 1.2;
}

h3, h4, h5, h6 {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  color: var(--text);
}

h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1rem; font-weight: 600; }

a { color: inherit; }

/* ===== NAV ===== */

header::before {
  content: '';
  display: block;
  height: var(--nav-h);
}

.header { display: flex; }

nav {
  position: fixed;
  top: 0;
  width: 100%;
  height: var(--nav-h);
  background: var(--nav-bg);
  border-bottom: 1px solid rgba(0,0,0,.07);
  box-shadow: var(--shadow-sm);
  z-index: 100;
  transition: top 0.3s ease;
}

.contenedor {
  width: 90%;
  max-width: 1400px;
  margin: 0 auto;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  width: 100%;
  padding: 0 40px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
}

.nav .logo { height: 52px; padding-top: 2px; }
.nav .logo img { height: 100%; width: auto; vertical-align: top; mix-blend-mode: multiply; }

ul.enlaces-header { list-style: none; padding: 0; margin: 0; }

.enlaces-header {
  display: flex;
  gap: 2px;
  align-items: center;
  font-weight: 400;
  transition: ease-in-out 0.5s;
}

.enlaces-header > li {
  float: left;
  list-style: none;
  position: relative;
}

.enlaces-header li a {
  color: var(--text);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 8px;
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  transition: background .2s, color .2s;
  white-space: nowrap;
}

.enlaces-header li a:hover {
  background: var(--accent-light);
  color: var(--accent);
}

.enlaces-header li ul {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 190px;
  background: var(--surface);
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 10px;
  box-shadow: var(--shadow-md);
  list-style: none;
  padding: 8px 6px 6px;
  z-index: 101;
}

.enlaces-header li:hover > ul { display: block; }
.enlaces-header li ul li { list-style: none; position: relative; }
.enlaces-header li ul li a { font-size: 14px; border-radius: 6px; }

.hamburguer {
  width: 44px;
  height: 44px;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 100;
  border-radius: 8px;
  transition: background .2s;
}

.hamburguer:hover { background: var(--accent-light); }
.hamburguer > i { font-size: 20px; line-height: 1; color: var(--text); }

/* ===== FLOATING BUTTONS ===== */

.btn-whatsapp,
.btn-ig {
  position: fixed;
  right: 14px;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .18s;
  -webkit-tap-highlight-color: transparent;
}

.btn-ig       { bottom: 14px;  }
.btn-whatsapp { bottom: 70px; }

.btn-whatsapp:hover,
.btn-ig:hover { transform: scale(1.12); }

.btn-whatsapp a,
.btn-ig a {
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-whatsapp img { width: 50px; height: 50px; border-radius: 50%; box-shadow: 0 4px 16px rgba(37,211,102,.45); }
.btn-ig img       { width: 46px; height: 46px; border-radius: 50%; box-shadow: 0 4px 14px rgba(180,40,100,.35); }

/* ===== HERO ===== */

.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  min-height: calc(100vh - var(--nav-h));
  max-width: 1400px;
  margin: 0 auto;
  padding: 60px 80px;
  gap: 60px;
}

.hero-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.hero-text h1 {
  margin-bottom: 22px;
  font-style: italic;
}

.hero-text h1 strong {
  font-style: normal;
  font-weight: 600;
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 400px;
  margin-bottom: 6px;
  font-weight: 300;
}

.hero-desc + .hero-desc { margin-top: 4px; }

.wp {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 34px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  padding: 13px 28px;
  background: var(--accent);
  color: #fff;
  border-radius: 50px;
  text-decoration: none;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 15px;
  transition: background .2s, transform .15s;
  box-shadow: 0 4px 16px rgba(176,125,74,.3);
}

.btn-primary:hover {
  background: var(--accent-h);
  transform: translateY(-1px);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  padding: 13px 24px;
  border: 1.5px solid rgba(0,0,0,.18);
  color: var(--text);
  border-radius: 50px;
  text-decoration: none;
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 15px;
  transition: border-color .2s, background .2s, color .2s;
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

/* Kept for backward compatibility */
.mas {
  display: inline-block;
  margin-top: 28px;
  padding: 12px 28px;
  background: var(--accent);
  color: #fff;
  border-radius: 50px;
  text-decoration: none;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 14px;
  box-shadow: 0 4px 16px rgba(176,125,74,.3);
  transition: background .2s;
}

.mas:hover { background: var(--accent-h); }

/* Hero slideshow */
.hero-slideshow {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 24px;
  overflow: hidden;
  background: #e8e0d8;
  box-shadow: var(--shadow-md);
}

.hero-slideshow img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  animation: slideshow 45s infinite;
  animation-fill-mode: backwards;
}

/* cada imagen es visible ~5s dentro de un ciclo de 45s = 11.1% */
.hero-slideshow .s1 { animation-delay: 0s; }
.hero-slideshow .s2 { animation-delay: 5s; }
.hero-slideshow .s3 { animation-delay: 10s; }
.hero-slideshow .s4 { animation-delay: 15s; }
.hero-slideshow .s5 { animation-delay: 20s; }
.hero-slideshow .s6 { animation-delay: 25s; }
.hero-slideshow .s7 { animation-delay: 30s; }
.hero-slideshow .s8 { animation-delay: 35s; }
.hero-slideshow .s9 { animation-delay: 40s; }

@keyframes slideshow {
  0%    { opacity: 0; }
  4%    { opacity: 1; }
  9%    { opacity: 1; }
  11%   { opacity: 0; }
  100%  { opacity: 0; }
}

/* ===== CATEGORIES SECTION ===== */

.categorias {
  padding: 80px 40px;
  max-width: 1400px;
  margin: 0 auto;
}

.categorias > h2 {
  text-align: center;
  margin-bottom: 8px;
}

.cat-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 44px;
}

.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.cat-card {
  position: relative;
  display: flex;
  align-items: flex-end;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  text-decoration: none;
  background-color: #c8bfb4;
  background-image: var(--img);
  background-size: cover;
  background-position: center;
  transition: box-shadow .25s;
}

.cat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.6) 0%, transparent 55%);
  transition: background .3s;
}

.cat-card:hover::before {
  background: linear-gradient(to top, rgba(0,0,0,.75) 0%, rgba(0,0,0,.1) 60%);
}

.cat-card:hover {
  box-shadow: 0 8px 28px rgba(0,0,0,.18);
}

.cat-label {
  position: relative;
  z-index: 1;
  padding: 18px 20px;
  color: #fff;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.05rem;
  font-weight: 400;
  transition: padding .2s;
}

.cat-card:hover .cat-label {
  padding-bottom: 22px;
}

/* ===== TABLE STYLES (Nosotros / other pages) ===== */

.tg { border-collapse: collapse; border-spacing: 0; margin: 0 auto; }

.tg td {
  border-color: #e8e2da;
  border-style: solid; border-width: 1px;
  font-family: 'Inter', sans-serif; font-size: 16px;
  line-height: 1.5; overflow: hidden;
  padding: 10px 20px; word-break: normal;
  color: var(--text);
}

.tg th {
  border-color: transparent;
  border-style: solid; border-width: 1px;
  font-family: 'Inter', sans-serif; font-size: 14px;
  font-weight: 500; overflow: hidden;
  padding: 10px 20px; word-break: normal;
}

.tg .tg-baqh {
  text-align: center; vertical-align: top;
  font-family: 'Playfair Display', serif;
  font-size: 32px; background-color: var(--accent-light);
  color: var(--text);
}

.tg .tg-0lax { text-align: left; vertical-align: top; background-color: #f8f5f1; }

/* ===== MISC ELEMENTS ===== */

.comprar { margin: 5%; width: 100%; height: 50px; }
.tablaChica { display: none; }
.articulo { width: 80%; }
.boton1 { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; }

/* ===== FOOTER ===== */

footer {
  background: var(--footer-bg);
  border-top: 1px solid rgba(0,0,0,.07);
  padding: 50px 0 30px;
  overflow: hidden;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-evenly;
  gap: 16px;
}

.partFooter  { width: 20%; text-align: left; }
.partFooterH { width: 15%; text-align: left; }
.partFooterS { width: 10%; text-align: left; }
.partFooterF { width: 20%; text-align: left; }

.partFooter h2, .partFooter h3,
.partFooterS h2, .partFooterS h3,
.partFooterF h2, .partFooterF h3,
.partFooterH h2, .partFooterH h3 {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: left;
  margin-bottom: 16px;
}

.partFooter a,
.partFooterS a,
.partFooterF a,
.partFooterH a {
  display: block;
  text-decoration: none;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 15px;
  transition: color 0.2s;
  margin-bottom: 8px;
}

.partFooter a:hover,
.partFooterF a:hover,
.partFooterS a:hover,
.partFooterH a:hover { color: var(--accent); }

.partFooter p,
.partFooterS p,
.partFooterF p,
.partFooterH p {
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 400;
  margin-bottom: 8px;
  text-align: left;
}

.social-media a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border: 1px solid rgba(0,0,0,.18);
  border-radius: 50%;
  color: var(--text-muted);
  font-size: 16px;
  margin-right: 6px;
  transition: all .2s;
  text-decoration: none;
}

.social-media a:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-light);
}

.forma-pago img {
  width: 36px; height: 36px;
  margin-right: 6px; margin-bottom: 6px;
  transition: opacity .2s;
}

.forma-pago img:hover { opacity: .75; }

/* Copyright bar */
.copyright-bar {
  background: var(--footer-bg);
  border-top: 1px solid rgba(0,0,0,.06);
  padding: 14px 40px;
  text-align: center;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Fallback for pages using old inline style copyright div */
div[style*="background-color: #f2f2f2"] {
  background: var(--footer-bg) !important;
  font-family: 'Inter', sans-serif !important;
  color: var(--text-muted) !important;
}

/* ===== BREAKPOINTS ===== */

@media screen and (max-width: 1024px) {
  .hero { padding: 60px 40px; gap: 40px; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .nav { justify-content: space-between; padding: 0 20px; }
  .partFooter, .partFooterS, .partFooterH, .partFooterF { width: 20%; margin-bottom: 20px; }
}

/* Botón cerrar menú — solo mobile */
.menu-close-item { display: none; }

.nav-hidden { top: -100px; }

@media screen and (max-width: 935px) {
  .hamburguer { display: flex; }
  .nav-hidden { top: 0; }
  .menu-close-item {
    display: flex;
    justify-content: flex-end;
    width: 100%;
    padding: 8px 12px 0;
    list-style: none;
  }
  .menu-close-btn {
    background: none;
    border: none;
    font-size: 22px;
    color: var(--text);
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
  }

  .hero {
    grid-template-columns: 1fr;
    padding: 40px 30px;
    min-height: auto;
    gap: 30px;
  }

  .hero-slideshow { max-height: 360px; aspect-ratio: 16/9; }
  .hero-desc { max-width: 100%; }

  h1 { font-size: 2rem; }

  .enlaces-header {
    position: fixed;
    background: var(--surface);
    top: 10px; right: 10px;
    width: 72%;
    max-height: 85vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    clip-path: circle(0% at 100% 0);
    -webkit-clip-path: circle(0% at 100% 0);
    border-radius: 14px;
    border: 1px solid rgba(0,0,0,.08);
    box-shadow: var(--shadow-md);
    padding: 16px 0;
    z-index: 200;
    font-size: 16px;
  }

  .nav .menudos {
    -webkit-clip-path: circle(230% at 100% 0);
    clip-path: circle(230% at 100% 0);
  }

  .nav { padding: 0 16px; }

  .enlaces-header li a { color: var(--text); width: 100%; text-align: center; }
  .enlaces-header li ul { display: none; position: static; box-shadow: none; border: none; background: var(--accent-light); border-radius: 8px; margin: 4px 10px 0; }
  .enlaces-header li.open > ul { display: block; }
  .enlaces-header li ul li a { font-size: 14px; text-align: center; color: var(--accent); }

  .articulo { width: 95%; }
}

@media screen and (max-width: 768px) {
  .cat-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .categorias { padding: 60px 20px; }

  .enlaces-header {
    position: fixed;
    background: var(--surface);
    top: 10px; right: 10px;
    width: 72%;
    max-height: 85vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    clip-path: circle(0% at 100% 0);
    -webkit-clip-path: circle(0% at 100% 0);
    border-radius: 14px;
    border: 1px solid rgba(0,0,0,.08);
    box-shadow: var(--shadow-md);
    padding: 16px 0;
    z-index: 200;
  }

  .nav .menudos {
    -webkit-clip-path: circle(230% at 100% 0);
    clip-path: circle(230% at 100% 0);
  }

  .hamburguer { display: flex; }

  .partFooter, .partFooterS, .partFooterH, .partFooterF, .social-media {
    width: 95%;
    margin-bottom: 30px;
    margin-left: 5%;
  }
}

@media screen and (max-width: 620px) {
  .contenedor { width: 100%; }
  .hero { padding: 28px 18px; }
  .hero-slideshow { max-height: 265px; aspect-ratio: 4/3; border-radius: 16px; }
  .cat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .cat-label { font-size: .9rem; padding: 14px 14px; }
  .tablaChica { display: block; margin-top: 10%; text-align: center; }
  .comprar { display: none; }
  .btn-whatsapp img { width: 40px; height: 40px; }
  .btn-ig img, .btn-fb img { width: 34px; height: 34px; }
}

@media screen and (max-width: 481px) {
  .hero-actions { flex-direction: column; }
  .btn-primary, .btn-outline { width: 100%; justify-content: center; text-align: center; }
  .hero-text h1 { font-size: 1.9rem; }
}

@media screen and (max-width: 320px) {
  .contenedor { width: 100%; max-width: 320px; }
}

/* ===== PAGE HERO (Nosotros, Contacto) ===== */

.page-hero {
  text-align: center;
  padding: 90px 20px 50px;
  background: var(--bg);
}

.page-hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 600;
  color: var(--text);
  margin: 0 0 12px;
}

.page-hero h1 span { color: var(--accent); }

.page-hero p {
  font-family: 'Inter', sans-serif;
  font-size: 1.1rem;
  color: var(--text-muted);
  margin: 0 auto;
  max-width: 480px;
}

/* ===== NOSOTROS ===== */

.about-section {
  padding: 50px 40px 90px;
  max-width: 1100px;
  margin: 0 auto;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-text p {
  font-family: 'Inter', sans-serif;
  font-size: 1.05rem;
  color: #444;
  line-height: 1.8;
  margin: 0 0 18px;
}

.about-text p:last-child { margin-bottom: 0; }

.about-img img {
  width: 100%;
  border-radius: 16px;
  object-fit: cover;
  display: block;
  box-shadow: 0 10px 36px rgba(0,0,0,.13);
}

@media (max-width: 760px) {
  .about-section { padding: 30px 20px 60px; }
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
}

/* ===== CONTACTO ===== */

.contact-section {
  padding: 40px 40px 90px;
  max-width: 1100px;
  margin: 0 auto;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: start;
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 18px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.07);
  text-decoration: none;
  color: #333;
  font-family: 'Inter', sans-serif;
  font-size: .95rem;
  transition: border-color .2s, box-shadow .2s;
}

.contact-item:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 14px rgba(0,0,0,.08);
}

.ci-icon {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.map-wrap {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(0,0,0,.12);
  aspect-ratio: 4 / 3;
}

.map-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

@media (max-width: 760px) {
  .contact-section { padding: 30px 20px 60px; }
  .contact-grid { grid-template-columns: 1fr; gap: 28px; }
}

/* ===== BACK TO TOP ===== */
.btn-top {
  position: fixed;
  bottom: 28px;
  left: 28px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s;
  z-index: 900;
  box-shadow: 0 4px 14px rgba(0,0,0,.2);
}
.btn-top.visible {
  opacity: 1;
  pointer-events: auto;
}
.btn-top:hover { transform: translateY(-3px); background: var(--accent-h); }
