/*
Theme Name: Super Tiendas El Agachón V10
Description: Sitio profesional para Super Tiendas El Agachón y La Tómbola Americana.
Version: 10.0.0
Requires at least: 6.4
Requires PHP: 8.0
Text Domain: elagachon
*/

:root{
  --azul:#0b3e83;
  --azul2:#102b55;
  --oscuro:#06172f;
  --rojo:#d31932;
  --blanco:#fff;
  --gris:#f4f6f9;
  --texto:#172033;
  --verde:#20b858;
  --amarillo:#f4c64f;
  --radio:20px;
  --sombra:0 14px 34px rgba(8,24,55,.11)
}

*{box-sizing:border-box}

html{scroll-behavior:smooth}

body{
  margin:0;
  font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  color:var(--texto);
  background:#fff;
  line-height:1.55
}

a{text-decoration:none;color:inherit}

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

.container{
  width:min(1180px,92%);
  margin:auto
}

/* ===== BARRA SUPERIOR ===== */

.topbar{
  background:var(--oscuro);
  color:#fff;
  font-size:.9rem
}

.topbar .container{
  display:flex;
  justify-content:space-between;
  gap:16px;
  padding:9px 0;
  flex-wrap:wrap
}

.topbar .wa{
  background:var(--amarillo);
  color:#111;
  padding:5px 12px;
  border-radius:999px;
  font-weight:900
}

/* ===== CABECERA ===== */

.site-header{
  position:sticky;
  top:0;
  z-index:50;
  background:rgba(255,255,255,.98);
  border-bottom:1px solid #e8edf3;
  box-shadow:0 5px 22px rgba(7,27,56,.05)
}

.header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  min-height:94px
}

.brand{
  display:flex;
  align-items:center;
  min-width:295px
}

.brand img{
  width:285px;
  max-height:70px;
  object-fit:contain;
  object-position:left center
}

.brand-fallback{
  font-weight:950;
  color:var(--oscuro)
}

.main-nav{
  display:flex;
  gap:18px;
  align-items:center;
  font-weight:800;
  font-size:.93rem
}

.main-nav a{
  padding:10px 0;
  position:relative
}

.main-nav a:hover:after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:2px;
  height:3px;
  background:var(--rojo);
  border-radius:4px
}

.header-cta{
  background:var(--verde);
  color:#fff;
  padding:11px 16px;
  border-radius:999px;
  font-weight:900;
  white-space:nowrap
}

/* ===== HERO ===== */

.hero{
  position:relative;
  min-height:570px;
  overflow:hidden;
  color:#fff;
  background:
    linear-gradient(
      90deg,
      rgba(6,23,47,.97) 0%,
      rgba(6,23,47,.88) 34%,
      rgba(11,62,131,.42) 58%,
      rgba(6,23,47,.10) 100%
    ),
    url('assets/images/hospital-1.jpg') center 42%/cover no-repeat;
  display:flex;
  align-items:center
}

.hero:after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(180deg,rgba(0,0,0,.04),rgba(0,0,0,.10));
  pointer-events:none
}

.hero .container{
  position:relative;
  z-index:2
}

.hero-content{
  max-width:650px;
  padding:88px 0
}

.eyebrow{
  display:inline-flex;
  background:rgba(255,255,255,.11);
  border:1px solid rgba(255,255,255,.22);
  padding:8px 13px;
  border-radius:999px;
  font-weight:900;
  margin-bottom:18px
}

.hero h1{
  font-size:clamp(3.2rem,6.3vw,5.8rem);
  line-height:.93;
  margin:0 0 18px;
  font-weight:950;
  letter-spacing:-.045em
}

.hero h1 span{color:var(--amarillo)}

.hero p{
  font-size:1.18rem;
  max-width:610px;
  color:#edf3ff
}

.hero-actions{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin-top:25px
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:12px 18px;
  border-radius:999px;
  font-weight:900;
  border:2px solid transparent
}

.btn-primary{
  background:var(--rojo);
  color:#fff
}

.btn-secondary{
  border-color:#fff;
  color:#fff;
  background:rgba(255,255,255,.06)
}

.hero-badges{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:25px
}

.hero-badges div{
  background:rgba(255,255,255,.11);
  border:1px solid rgba(255,255,255,.16);
  padding:8px 11px;
  border-radius:12px;
  font-size:.9rem
}

/* ===== FILA DE CONFIANZA ===== */

.trust-row{
  background:#fff;
  border-bottom:1px solid #e9edf3
}

.trust-row .container{
  display:grid;
  grid-template-columns:repeat(4,1fr)
}

.trust-item{
  padding:22px 18px;
  text-align:center;
  border-right:1px solid #edf0f4
}

.trust-item:last-child{border-right:0}

.trust-item strong{
  display:block;
  color:var(--oscuro);
  font-size:1rem
}

.trust-item span{
  color:#707b8c;
  font-size:.87rem
}

/* ===== SECCIONES ===== */

.section{padding:68px 0}

.section.alt{background:var(--gris)}

.section-head{
  display:flex;
  justify-content:space-between;
  align-items:end;
  gap:20px;
  margin-bottom:28px
}

.section-head h2{
  margin:0;
  font-size:clamp(2rem,4vw,3rem);
  letter-spacing:-.03em;
  color:var(--oscuro);
  font-weight:900
}

.section-head p{
  margin:8px 0 0;
  color:#657084
}

.link-arrow{
  font-weight:900;
  color:var(--azul)
}

/* ===== GRIDS ===== */

.grid{
  display:grid;
  gap:20px
}

.cards-4{grid-template-columns:repeat(4,1fr)}
.cards-3{grid-template-columns:repeat(3,1fr)}
.news-grid{grid-template-columns:repeat(3,1fr)}

/* ===== TARJETAS ===== */

.cat-card,
.store-card,
.news-card,
.promo-card,
.branch-detail{
  background:#fff;
  border-radius:var(--radio);
  overflow:hidden;
  box-shadow:var(--sombra);
  border:1px solid #e7ebf1
}

.cat-card{
  min-height:220px;
  position:relative
}

.cat-card .fake-photo{
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  font-size:4.6rem;
  background:linear-gradient(145deg,#edf2f9,#c6d2e1)
}

.cat-card .overlay{
  position:absolute;
  inset:0;
  background:linear-gradient(180deg,transparent 32%,rgba(7,27,56,.9));
  display:flex;
  align-items:flex-end;
  padding:20px;
  color:#fff
}

.cat-card h3{
  margin:0;
  font-size:1.2rem
}

.store-photo{
  height:205px;
  background:#e9edf3 center/cover no-repeat;
  position:relative
}

.store-photo.pending:after{
  content:"Fachada pendiente de confirmar";
  position:absolute;
  inset:auto 12px 12px 12px;
  background:rgba(6,23,47,.85);
  color:#fff;
  padding:8px 10px;
  border-radius:10px;
  font-size:.82rem;
  font-weight:800
}

.card-body{padding:19px}

.card-body h3{
  margin:0 0 8px;
  font-size:1.22rem
}

.meta{
  color:#687386;
  font-size:.94rem;
  margin:6px 0
}

.legal-badge{display:none}

.card-actions{
  display:flex;
  gap:8px;
  margin-top:16px;
  flex-wrap:wrap
}

.card-actions .btn{
  padding:9px 12px;
  font-size:.88rem
}

.btn-map{
  background:var(--oscuro);
  color:#fff
}

.btn-wa{
  background:var(--verde);
  color:#fff
}

.btn-social{
  background:#eef3fb;
  color:var(--azul)
}

/* ===== NOVEDADES ===== */

.news-card .thumb{
  height:180px;
  background:linear-gradient(135deg,var(--azul),var(--oscuro));
  display:grid;
  place-items:center;
  color:#fff;
  font-size:4rem
}

.tag{
  display:inline-block;
  background:#eaf1fb;
  color:var(--azul);
  font-weight:900;
  font-size:.77rem;
  padding:5px 9px;
  border-radius:999px;
  margin-bottom:9px
}

/* ===== PROMOCIONES ===== */

.promo-card{
  min-height:245px;
  display:flex;
  align-items:flex-end;
  padding:24px;
  color:#fff;
  background:
    linear-gradient(180deg,rgba(0,0,0,.05),rgba(7,27,56,.88)),
    linear-gradient(135deg,var(--rojo),var(--azul))
}

.promo-card:nth-child(2){
  background:
    linear-gradient(180deg,rgba(0,0,0,.05),rgba(7,27,56,.88)),
    linear-gradient(135deg,#d79b10,#8c5100)
}

.promo-card:nth-child(3){
  background:
    linear-gradient(180deg,rgba(0,0,0,.05),rgba(7,27,56,.88)),
    linear-gradient(135deg,#16945a,#0b5536)
}

/* ===== PAGOS ===== */

.payment-strip{
  padding:28px 0;
  background:#fff;
  border-top:1px solid #edf0f4;
  border-bottom:1px solid #edf0f4
}

.payment-strip .container{
  display:flex;
  justify-content:center;
  gap:20px;
  flex-wrap:wrap;
  font-weight:900;
  color:var(--oscuro)
}

.payment-pill{
  background:var(--gris);
  padding:10px 15px;
  border-radius:999px
}

/* ===== PÁGINAS ===== */

.page-hero{
  padding:70px 0;
  background:linear-gradient(135deg,var(--oscuro),var(--azul));
  color:#fff
}

.page-hero h1{
  font-size:clamp(2.4rem,5vw,4rem);
  margin:0
}

.content-wrap{
  padding:58px 0;
  min-height:460px
}

/* ===== SUCURSALES ===== */

.branch-detail{padding:26px}

.branch-layout{
  display:grid;
  grid-template-columns:1.2fr .8fr;
  gap:28px
}

.branch-main-image{
  height:420px;
  border-radius:18px;
  background:#e9edf3 center/cover no-repeat
}

.branch-info h2{
  margin-top:0;
  color:var(--oscuro)
}

.branch-info .big-meta{
  font-size:1.05rem;
  margin:12px 0
}

.gallery{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:14px;
  margin-top:25px
}

.gallery img{
  width:100%;
  height:220px;
  object-fit:cover;
  border-radius:14px
}

/* ===== CTA ===== */

.cta-strip{
  background:var(--azul);
  color:#fff;
  padding:38px 0
}

.cta-strip .container{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:22px;
  flex-wrap:wrap
}

.cta-strip h2{
  margin:0;
  font-size:2rem
}

.cta-strip p{
  margin:6px 0 0;
  color:#dce9ff
}

/* ===== FOOTER ===== */

.site-footer{
  background:var(--oscuro);
  color:#dce3ef;
  padding:48px 0 24px
}

.footer-grid{
  display:grid;
  grid-template-columns:2fr 1fr 1fr 1fr;
  gap:30px
}

.site-footer h3,
.site-footer h4{
  color:#fff;
  margin-top:0
}

.site-footer ul{
  list-style:none;
  padding:0;
  margin:0
}

.site-footer li{margin:7px 0}

.copyright{
  border-top:1px solid rgba(255,255,255,.14);
  margin-top:32px;
  padding-top:18px;
  font-size:.88rem;
  color:#9eabc1
}

/* ===== RESPONSIVE ORIGINAL ===== */

@media(max-width:1050px){
  .main-nav{display:none}
  .brand{min-width:auto}
  .cards-4,
  .cards-3,
  .news-grid{grid-template-columns:repeat(2,1fr)}
  .branch-layout{grid-template-columns:1fr}
  .footer-grid{grid-template-columns:1fr 1fr}
}

@media(max-width:700px){
  .trust-row .container{grid-template-columns:1fr 1fr}
  .trust-item:nth-child(2){border-right:0}

  .cards-4,
  .cards-3,
  .news-grid,
  .footer-grid,
  .gallery{
    grid-template-columns:1fr
  }

  .brand img{width:215px}

  .header-cta{
    font-size:.8rem;
    padding:9px 12px
  }

  .hero{
    min-height:630px;
    background-position:65% center
  }

  .hero-content{padding:58px 0}

  .section{padding:48px 0}

  .branch-main-image{height:290px}
}

/* ===== V5: enlaces externos y fachadas reales ===== */

.external-note{
  margin-top:12px;
  padding:10px 12px;
  border-radius:12px;
  background:#f5f7fb;
  color:#657084;
  font-size:.84rem
}

/* ===== V6: imágenes reales en Novedades ===== */

.news-card .thumb{
  height:220px;
  background:#0b3e83 center/cover no-repeat;
  display:grid;
  place-items:center;
  color:#fff;
  font-size:4rem;
  overflow:hidden
}

.news-card .thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block
}

.news-card .thumb.no-image{
  background:linear-gradient(135deg,#0b3e83,#06172f)
}

/* ===== V7: páginas terminadas ===== */

.info-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:20px
}

.info-card{
  background:#fff;
  border:1px solid #e4e9f1;
  border-radius:18px;
  padding:24px;
  box-shadow:0 10px 26px rgba(7,27,56,.07)
}

.info-card h3{
  margin:0 0 8px;
  color:#06172f;
  font-size:1.25rem
}

.info-card p{
  margin:0;
  color:#647084
}

.category-full-grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:18px
}

.category-full-card{
  background:#fff;
  border:1px solid #e4e9f1;
  border-radius:18px;
  padding:24px;
  box-shadow:0 10px 26px rgba(7,27,56,.07)
}

.category-full-card .icon{
  font-size:3rem;
  margin-bottom:12px
}

.category-full-card h3{
  margin:0 0 8px;
  color:#06172f
}

.category-full-card p{
  margin:0;
  color:#667285
}

.about-hero-card{
  background:linear-gradient(135deg,#071b38,#0c3f86);
  color:#fff;
  border-radius:24px;
  padding:38px;
  margin-bottom:28px
}

.about-hero-card h2{
  font-size:2.1rem;
  margin:0 0 12px
}

.about-hero-card p{
  font-size:1.08rem;
  color:#dfeaff;
  max-width:850px
}

.contact-grid{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:20px
}

.contact-card{
  background:#fff;
  border:1px solid #e4e9f1;
  border-radius:18px;
  padding:24px;
  box-shadow:0 10px 26px rgba(7,27,56,.07)
}

.contact-card h3{
  margin:0 0 10px;
  color:#06172f
}

.contact-line{
  margin:8px 0;
  color:#5f6b7d
}

.notice-box{
  background:#f4f7fb;
  border-left:5px solid #0c3f86;
  border-radius:14px;
  padding:18px 20px;
  color:#42506a
}

@media(max-width:900px){
  .info-grid,
  .category-full-grid,
  .contact-grid{
    grid-template-columns:repeat(2,1fr)
  }
}

@media(max-width:650px){
  .info-grid,
  .category-full-grid,
  .contact-grid{
    grid-template-columns:1fr
  }
}

/* ===== V8: Nosotros profesional ===== */

.about-intro{
  display:grid;
  grid-template-columns:1.2fr .8fr;
  gap:28px;
  align-items:stretch;
  margin-bottom:30px
}

.about-story{
  background:#fff;
  border:1px solid #e4e9f1;
  border-radius:22px;
  padding:30px;
  box-shadow:0 12px 30px rgba(7,27,56,.07)
}

.about-story h2{
  margin:0 0 16px;
  color:#06172f;
  font-size:clamp(1.8rem,3.4vw,2.6rem)
}

.about-story p{
  color:#566277;
  font-size:1.05rem;
  margin:0 0 15px
}

.about-photo{
  min-height:360px;
  border-radius:22px;
  background:url('assets/images/hospital-2.jpg') center/cover no-repeat;
  box-shadow:0 12px 30px rgba(7,27,56,.10)
}

.value-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:20px
}

.value-card{
  background:#fff;
  border:1px solid #e4e9f1;
  border-radius:18px;
  padding:24px;
  box-shadow:0 10px 26px rgba(7,27,56,.07)
}

.value-card h3{
  margin:0 0 8px;
  color:#06172f;
  font-size:1.18rem
}

.value-card p{
  margin:0;
  color:#647084
}

@media(max-width:900px){
  .about-intro{grid-template-columns:1fr}
  .value-grid{grid-template-columns:repeat(2,1fr)}
}

@media(max-width:650px){
  .value-grid{grid-template-columns:1fr}
  .about-photo{min-height:260px}
}

/* ===== V9: video en publicaciones ===== */

.ea-video-wrap{
  margin-top:16px;
  border-radius:16px;
  overflow:hidden;
  background:#08182d
}

.ea-video-wrap video{
  display:block;
  width:100%;
  max-height:520px;
  background:#000
}

.news-card .ea-video-wrap{
  margin:0;
  border-radius:0
}

.promo-card.has-photo{
  background-size:cover;
  background-position:center
}

.promo-video-card{
  background:#fff;
  color:#06172f;
  padding:0;
  display:block
}

.promo-video-card .card-body{padding:20px}

.promo-date{
  font-size:.86rem;
  opacity:.85;
  margin-top:8px
}

/* ===== V10: tarjetas de promociones limpias ===== */

.promo-clean-card{
  background:#fff;
  border:1px solid #e4e9f1;
  border-radius:18px;
  overflow:hidden;
  box-shadow:0 10px 26px rgba(7,27,56,.08);
  color:#06172f
}

.promo-clean-card .promo-image{
  position:relative;
  aspect-ratio:4/3;
  background:#eef2f7;
  overflow:hidden
}

.promo-clean-card .promo-image img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block
}

.promo-clean-card .promo-badge{
  position:absolute;
  top:14px;
  left:14px;
  background:#d4192f;
  color:#fff;
  font-weight:900;
  font-size:.78rem;
  letter-spacing:.03em;
  border-radius:999px;
  padding:7px 10px
}

.promo-clean-card .card-body{
  padding:20px
}

.promo-clean-card h3{
  margin:0 0 10px;
  color:#06172f;
  font-size:1.18rem;
  line-height:1.3
}

.promo-clean-card h3 a{
  color:inherit;
  text-decoration:none
}

.promo-clean-card p{
  margin:0 0 10px;
  color:#5c687a;
  line-height:1.55
}

.promo-clean-card .promo-store{
  display:inline-block;
  font-size:.85rem;
  font-weight:800;
  color:#0c3f86;
  background:#edf4ff;
  border-radius:999px;
  padding:6px 9px;
  margin-bottom:10px
}

.promo-clean-card .promo-validity{
  margin-top:12px;
  padding-top:12px;
  border-top:1px solid #edf0f4;
  color:#667285;
  font-size:.9rem
}

.promo-clean-card .ea-video-wrap{
  margin:0 20px 20px;
  border-radius:12px
}

/* =========================================================
   V11: CORRECCIONES MÓVILES
   ========================================================= */

@media(max-width:700px){

  /* Barra superior */
  .topbar{
    font-size:.76rem
  }

  .topbar .container{
    display:grid;
    grid-template-columns:1fr;
    justify-items:center;
    gap:6px;
    padding:7px 0;
    text-align:center
  }

  .topbar .container > *{
    max-width:100%
  }

  .topbar .wa{
    display:inline-flex;
    width:auto;
    padding:5px 10px;
    white-space:nowrap;
    line-height:1.2
  }

  /* Cabecera móvil */
  .header-inner{
    min-height:82px;
    gap:10px
  }

  .brand{
    flex:1 1 auto;
    min-width:0
  }

  .brand img{
    width:190px;
    max-height:58px
  }

  .header-cta{
    flex:0 0 auto;
    font-size:.78rem;
    padding:10px 12px;
    white-space:nowrap
  }

  /* Portada móvil */
  .hero{
    min-height:560px;
    background-position:62% center
  }

  .hero-content{
    padding:46px 0
  }

  .eyebrow{
    font-size:.86rem;
    padding:7px 10px;
    margin-bottom:16px
  }

  .hero h1{
    font-size:2.85rem;
    line-height:.96;
    letter-spacing:-.035em;
    margin-bottom:16px
  }

  .hero p{
    font-size:1rem;
    line-height:1.5
  }

  .hero-actions{
    gap:10px;
    margin-top:22px
  }

  .hero-actions .btn{
    width:100%;
    max-width:340px;
    min-height:52px
  }

  .hero-badges{
    gap:8px;
    margin-top:20px
  }

  .hero-badges div{
    font-size:.82rem;
    padding:8px 10px
  }

  /* Bloques inferiores del hero */
  .trust-item{
    padding:19px 10px
  }

  .trust-item strong{
    font-size:.95rem
  }

  .trust-item span{
    font-size:.82rem
  }

  /* Secciones */
  .section{
    padding:42px 0
  }

  .container{
    width:calc(100% - 30px)
  }

  /* Corrige "Lo que puedes encontrar" y "Ver todas" */
  .section-head{
    display:flex;
    flex-direction:column;
    align-items:flex-start;
    justify-content:flex-start;
    gap:10px;
    margin-bottom:22px
  }

  .section-head > div{
    width:100%
  }

  .section-head h2{
    width:100%;
    font-size:2.05rem;
    line-height:1.08;
    overflow-wrap:normal;
    word-break:normal
  }

  .section-head p{
    margin-top:6px;
    font-size:.95rem
  }

  .link-arrow{
    display:inline-flex;
    width:auto;
    white-space:nowrap;
    align-self:flex-start;
    font-size:.95rem;
    line-height:1.2
  }

  /* Categorías */
  .cat-card{
    min-height:250px
  }

  .cat-card .fake-photo{
    font-size:4rem
  }

  .cat-card .overlay{
    padding:22px
  }

  .cat-card h3{
    font-size:1.35rem
  }

  /* Sucursales */
  .store-photo{
    height:230px
  }

  .card-body{
    padding:18px
  }

  .card-body h3{
    font-size:1.35rem
  }

  .meta{
    font-size:.95rem
  }

  .card-actions{
    gap:10px
  }

  .card-actions .btn{
    flex:1 1 140px;
    min-height:48px;
    font-size:.9rem
  }

  /* Novedades */
  .news-card .thumb{
    height:230px
  }

  /* Página interior */
  .page-hero{
    padding:46px 0
  }

  .page-hero h1{
    font-size:2.5rem;
    line-height:1.05
  }

  .content-wrap{
    padding:42px 0
  }

  /* CTA */
  .cta-strip{
    padding:30px 0
  }

  .cta-strip .container{
    align-items:flex-start;
    flex-direction:column
  }

  .cta-strip h2{
    font-size:1.7rem
  }

  /* Footer */
  .site-footer{
    padding:40px 0 22px
  }
}

@media(max-width:420px){

  .container{
    width:calc(100% - 24px)
  }

  .brand img{
    width:170px
  }

  .header-cta{
    font-size:.72rem;
    padding:9px 10px
  }

  .hero{
    min-height:535px
  }

  .hero h1{
    font-size:2.55rem
  }

  .hero p{
    font-size:.96rem
  }

  .section-head h2{
    font-size:1.9rem
  }

  .card-actions .btn{
    flex-basis:100%
  }
}
/* ===== V11.2: arreglo barra superior móvil ===== */
@media(max-width:700px){

  .topbar .container{
    display:flex !important;
    flex-direction:column !important;
    align-items:center !important;
    justify-content:center !important;
    gap:6px !important;
    padding:9px 14px !important;
    text-align:center !important;
  }

  .topbar .container > *{
    width:100% !important;
    text-align:center !important;
  }

  .topbar .wa{
    display:flex !important;
    width:max-content !important;
    max-width:calc(100vw - 40px) !important;
    margin:8px auto 0 !important;
    padding:7px 14px !important;
    white-space:nowrap !important;
    justify-content:center !important;
    align-items:center !important;
    line-height:1.15 !important;
  }
}