/*
Theme Name: Optica Diana
Description: Tema personalizado para Optica Diana (Denia). Paleta del logo: espresso #3B3130 y beige #B8B19F.
Author: Optica Diana
Version: 1.1
Text Domain: optica-diana
*/

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600&family=Inter:wght@400;500;600&display=swap');

:root{
  --od-dark: #3B3130;
  --od-dark-2: #2C2423;
  --od-beige: #B8B19F;
  --od-beige-light: #EFEBE4;
  --od-bg: #FAF8F5;
  --od-card: #FFFFFF;
  --od-border: #E5E0D6;
  --od-text: #3B3130;
  --od-text-soft: #6B6259;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

*{ box-sizing: border-box; }

body{
  background: var(--od-bg);
  color: var(--od-text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

img{ max-width: 100%; height: auto; display: block; }

a{ color: var(--od-dark); text-decoration: none; }
a:hover{ color: #8A7A63; }

h1,h2,h3,h4{
  font-family: var(--serif);
  color: var(--od-dark);
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 0.6em;
}
h1{ font-size: clamp(28px, 4vw, 42px); }
h2{ font-size: clamp(22px, 3vw, 30px); }
h3{ font-size: 20px; }
p{ margin: 0 0 1.2em; color: var(--od-text); }
strong{ color: var(--od-dark); }
ul{ padding-left: 1.2em; }
li{ margin-bottom: 0.4em; }

/* Header */
.site-header{
  background: var(--od-dark);
  color: var(--od-beige);
  padding: 14px 32px;
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.header-row{
  display: flex;
  align-items: center;
}
.site-header .brand{
  display: flex;
  align-items: center;
  gap: 10px;
}
.site-header .brand img{
  height: 34px;
  width: auto;
}
.site-header .site-title{
  color: var(--od-beige-light);
  font-family: var(--serif);
  font-size: 19px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  text-decoration: none;
  font-weight: 600;
}
.site-header nav{
  display: flex;
  align-items: center;
}
.site-header nav ul{
  list-style: none;
  display: flex;
  gap: 26px;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.site-header nav a{
  color: var(--od-beige);
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.3px;
}
.site-header nav a:hover{ color: #fff; }
.header-cta{
  background: var(--od-beige);
  color: var(--od-dark) !important;
  font-size: 13px;
  padding: 9px 20px;
  border-radius: 3px;
  font-weight: 600;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.header-cta:hover{ background: #cfc7b4; color: var(--od-dark) !important; }
.header-cta--mobile{ display: none; }

/* Hamburger toggle - hidden on desktop */
.menu-toggle{
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px;
  height: 34px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}
.menu-toggle span{
  display: block;
  height: 2px;
  width: 100%;
  background: var(--od-beige-light);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.menu-toggle.is-open span:nth-child(1){ transform: translateY(7px) rotate(45deg); }
.menu-toggle.is-open span:nth-child(2){ opacity: 0; }
.menu-toggle.is-open span:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }

/* Hero */
.hero{
  background: var(--od-dark);
  color: var(--od-beige-light);
  text-align: center;
  padding: 80px 24px 72px;
}
.hero .hero-logo{
  height: 64px;
  margin: 0 auto 22px;
}
.hero h1{ color: var(--od-beige-light); margin-bottom: 14px; }
.hero p{ color: var(--od-beige); max-width: 540px; margin: 0 auto 28px; font-size: 17px; }

.btn{
  display: inline-block;
  background: transparent;
  color: var(--od-beige-light);
  padding: 12px 28px;
  border-radius: 3px;
  text-decoration: none;
  letter-spacing: 0.6px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--od-beige);
  text-transform: uppercase;
}
.btn:hover{ background: var(--od-beige); color: var(--od-dark) !important; }

.wp-block-button__link{
  display: inline-block;
  background: var(--od-dark) !important;
  color: var(--od-beige-light) !important;
  padding: 12px 26px !important;
  border-radius: 3px !important;
  text-decoration: none;
  font-size: 14px;
  border: 1px solid var(--od-dark);
}
.wp-block-button__link:hover{ background: transparent !important; color: var(--od-dark) !important; }

/* Services strip */
.services-strip{
  padding: 44px 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
  max-width: 1040px;
  margin: 0 auto;
}
.service-card{
  background: var(--od-card);
  border: 1px solid var(--od-border);
  border-radius: 8px;
  padding: 26px 20px;
  text-align: center;
}
.service-card .icon{
  width: 42px; height: 42px;
  margin: 0 auto 14px;
  border: 1.5px solid var(--od-dark);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--od-dark);
  font-size: 18px;
}
.service-card h3{ margin-bottom: 6px; font-size: 17px; }
.service-card p{ font-size: 14px; color: var(--od-text-soft); margin: 0; }

/* Content wrap */
.content-wrap{
  max-width: 820px;
  margin: 0 auto;
  padding: 56px 24px;
}
.content-wrap > *:first-child{ margin-top: 0; }
.content-wrap img{ border-radius: 8px; margin: 1.5em 0; }
.content-wrap hr{ border: none; border-top: 1px solid var(--od-border); margin: 2.5em 0; }

/* Enlaces dentro del contenido (texto de paginas/posts) - distinguibles del texto normal */
.content-wrap a:not(.btn):not(.btn-whatsapp):not(.btn-whatsapp-cta):not(.wp-block-button__link),
.post-card a:not(.read-more){
  text-decoration: underline;
  text-decoration-color: var(--od-beige);
  text-underline-offset: 3px;
  font-weight: 500;
  color: var(--od-dark);
}
.content-wrap a:not(.btn):not(.btn-whatsapp):not(.btn-whatsapp-cta):not(.wp-block-button__link):hover,
.post-card a:not(.read-more):hover{
  color: #8A7A63;
  text-decoration-color: #8A7A63;
}

.entry-meta{
  font-size: 13px;
  color: var(--od-text-soft);
  letter-spacing: 0.3px;
  margin-bottom: 1.5em;
  text-transform: uppercase;
}

/* Blog / archive cards */
.post-list{
  display: grid;
  gap: 22px;
}
.post-card{
  background: var(--od-card);
  border: 1px solid var(--od-border);
  border-radius: 8px;
  padding: 24px 26px;
  overflow: hidden;
}
.post-card-thumb{
  margin: -24px -26px 20px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--od-border);
}
.post-card-thumb img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  margin: 0;
}
.view-all-posts{
  text-align: center;
  margin-top: 28px;
}
.view-all-posts a{
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--od-dark);
  border-bottom: 1px solid var(--od-beige);
  padding-bottom: 2px;
  text-decoration: none;
}
.view-all-posts a:hover{
  color: #8A7A63;
  border-bottom-color: #8A7A63;
}
.post-card h2{ font-size: 22px; margin-bottom: 8px; }
.post-card .entry-meta{ margin-bottom: 10px; }
.post-card a.read-more{
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--od-dark);
  border-bottom: 1px solid var(--od-dark);
}

/* Footer */
.site-footer{
  background: var(--od-dark);
  color: var(--od-beige);
  padding: 40px 24px 28px;
  text-align: center;
  font-size: 13px;
}
.foot-logo{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  text-decoration: none;
}
.foot-logo img{
  height: 34px;
  width: auto;
}
.foot-logo span{
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--od-beige-light);
}
.site-footer .foot-links{
  margin-bottom: 18px;
  display: flex;
  justify-content: center;
  gap: 22px;
  flex-wrap: wrap;
}
.site-footer .foot-links a{
  color: var(--od-beige);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
}
.site-footer .foot-links a:hover{ color: #fff; }
.site-footer .foot-links a:hover .icon-badge{ border-color: #fff; }
.icon-badge{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--od-beige);
  flex-shrink: 0;
}
.icon-badge svg{
  width: 16px;
  height: 16px;
}
.site-footer .foot-links .label{ font-size: 13px; }
.site-footer p{ color: var(--od-beige); opacity: 0.85; margin: 0; }

@media (max-width: 480px){
  .site-footer .foot-links{ gap: 16px; }
  .site-footer .foot-links .label{ display: none; }
}

/* Mobile */
@media (max-width: 780px){
  .site-header{
    flex-wrap: wrap;
    padding: 14px 18px;
  }
  .header-row{ width: 100%; justify-content: space-between; }
  .header-cta--desktop{ display: none; }
  .menu-toggle{ display: flex; }

  .site-header nav{
    max-height: 0;
    overflow: hidden;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    transition: max-height 0.25s ease;
  }
  .site-header nav#primary-menu.is-open{
    max-height: 400px;
    margin-top: 16px;
  }
  .site-header nav ul{
    flex-direction: column;
    gap: 4px;
    width: 100%;
  }
  .site-header nav ul li{ width: 100%; }
  .site-header nav ul a{
    display: block;
    padding: 10px 0;
    border-bottom: 1px solid rgba(184,177,159,0.15);
    font-size: 15px;
  }
  .header-cta--mobile{
    display: inline-block;
    margin-top: 14px;
  }

  .hero{ padding: 56px 20px 48px; }
  .content-wrap{ padding: 40px 18px; }
  .services-strip{ padding: 32px 18px; }
}

/* Breadcrumbs (Yoast SEO) */
.optica-breadcrumbs{
  background: #FAF8F5;
  border-bottom: 1px solid var(--od-border);
  padding: 12px 32px;
}
.optica-breadcrumbs #breadcrumbs{
  max-width: 820px;
  margin: 0 auto;
  font-size: 13px;
  color: var(--od-text-soft);
}
.optica-breadcrumbs #breadcrumbs a{
  color: var(--od-text-soft);
  text-decoration: none;
  border-bottom: none;
}
.optica-breadcrumbs #breadcrumbs a:hover{
  color: var(--od-dark);
  text-decoration: underline;
}
.optica-breadcrumbs #breadcrumbs span{
  color: var(--od-dark);
}
@media (max-width: 680px){
  .optica-breadcrumbs{ padding: 10px 18px; }
  .optica-breadcrumbs #breadcrumbs{ font-size: 12px; }
}

/* Boton de WhatsApp */
.btn-whatsapp{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--od-dark);
  color: var(--od-beige-light);
  padding: 13px 26px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.2px;
  border: 1px solid var(--od-dark);
}
.btn-whatsapp:hover{
  background: transparent;
  color: var(--od-dark) !important;
}
.btn-whatsapp svg{
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Boton flotante de WhatsApp (todas las paginas) */
.whatsapp-float{
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 56px;
  height: 56px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 12px rgba(0,0,0,0.25);
  z-index: 100;
  transition: transform 0.15s ease, opacity 0.2s ease;
}
.whatsapp-float:hover{
  transform: scale(1.08);
}
.whatsapp-float.is-hidden{
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
}
.whatsapp-float svg{
  width: 30px;
  height: 30px;
  color: #fff;
}
@media (max-width: 680px){
  .whatsapp-float{
    right: 16px;
    bottom: 16px;
    width: 50px;
    height: 50px;
  }
  .whatsapp-float svg{ width: 26px; height: 26px; }
}

/* CTA grande de WhatsApp (para la pagina de Contacto) */
.btn-whatsapp-cta{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: #25D366;
  color: #fff !important;
  padding: 20px 32px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.2px;
  max-width: 420px;
  margin: 24px 0;
  box-shadow: 0 3px 14px rgba(37,211,102,0.28);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-whatsapp-cta:hover{
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(37,211,102,0.35);
  color: #fff !important;
}
.btn-whatsapp-cta svg{
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}
@media (max-width: 480px){
  .btn-whatsapp-cta{
    max-width: 100%;
    padding: 18px 20px;
    font-size: 17px;
  }
}

/* Badges de marcas (pagina Productos) */
.brand-badges{
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0 32px;
  padding: 0;
  list-style: none;
}
.brand-badges li{
  margin: 0;
}
.brand-badges span{
  display: inline-block;
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--od-dark);
  background: var(--od-card);
  border: 1px solid var(--od-border);
  padding: 10px 20px;
  border-radius: 30px;
}
