/*
Theme Name: ColagenoYDHA Modern
Theme URI: https://colagenoydha.com/
Author: ColagenoYDHA
Description: Tema ligero y compatible con WooCommerce para sustituir Elgrande sin cambiar las URLs ni el contenido del sitio.
Version: 0.7.5
Requires at least: 6.6
Tested up to: 6.9
Requires PHP: 7.4
Text Domain: colagenoydha-modern
*/

:root {
  --brand: #669900;
  --brand-dark: #4d7500;
  --ink: #292929;
  --muted: #666;
  --line: #e5e5e5;
  --soft: #f5f5f3;
  --white: #fff;
  --shadow: 0 12px 35px rgba(0, 0, 0, .09);
  --radius: 12px;
  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--muted); background: var(--white); font: 16px/1.65 Arial, Helvetica, sans-serif; }
img { max-width: 100%; height: auto; }
a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--brand); }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.18; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.wrap { width: min(calc(100% - 36px), var(--wrap)); margin-inline: auto; }

.topbar { background: #2d2d2d; color: #fff; font-size: 13px; }
.topbar .wrap { min-height: 38px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.topbar a { color: #fff; }
.topbar__right { display: flex; gap: 18px; align-items: center; }
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: relative; z-index: 20; }
.site-header__inner { min-height: 104px; display: grid; grid-template-columns: 240px 1fr auto; gap: 24px; align-items: center; }
.custom-logo { max-height: 72px; width: auto; }
.brand-text { display: block; font-size: 29px; font-weight: 800; letter-spacing: -.04em; }
.brand-tagline { display: block; color: var(--muted); font-size: 12px; letter-spacing: .08em; }
.menu-toggle { display: none; border: 1px solid var(--line); background: #fff; padding: 10px 12px; border-radius: 6px; font-weight: 700; }
.primary-menu, .primary-menu ul { list-style: none; padding: 0; margin: 0; }
.primary-menu { display: flex; align-items: center; justify-content: flex-end; gap: 28px; }
.primary-menu > li { position: relative; }
.primary-menu > li > a { display: block; padding: 39px 0 35px; color: #111; font-size: 13px; font-weight: 700; text-transform: uppercase; border-bottom: 3px solid transparent; }
.primary-menu > li:hover > a, .primary-menu > .current-menu-item > a { border-color: var(--brand); color: var(--brand); }
.primary-menu .sub-menu { display: none; position: absolute; top: 100%; min-width: 245px; padding: 10px; background: #fff; border-top: 3px solid var(--brand); box-shadow: var(--shadow); }
.primary-menu li:hover > .sub-menu { display: block; }
.primary-menu .sub-menu a { display: block; padding: 9px 11px; font-size: 13px; }
.header-cart { display: flex; align-items: center; gap: 8px; padding: 12px 14px; background: var(--soft); border-radius: 7px; font-size: 13px; font-weight: 700; }
.cart-count { min-width: 22px; height: 22px; display: grid; place-items: center; background: var(--brand); color: #fff; border-radius: 50%; }

.hero { background: radial-gradient(circle at 80% 20%, #e8f3cf 0, transparent 34%), linear-gradient(135deg, #f8f8f4, #ecefe5); border-bottom: 1px solid var(--line); }
.hero.has-background { position: relative; overflow: hidden; }
.hero.has-background::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(255,255,255,var(--hero-overlay, .58)) 0%, rgba(255,255,255,var(--hero-overlay, .58)) 32%, rgba(255,255,255,.04) 75%, rgba(255,255,255,0) 100%); }
.hero.has-background .hero__inner { position: relative; z-index: 1; }
.hero-slides { position: absolute; inset: 0; z-index: 0; }
.hero-slide { position: absolute; inset: 0; opacity: 0; background-position: var(--hero-position, center); background-size: var(--hero-fit, cover); background-repeat: no-repeat; transition: opacity .8s ease; }
.hero-slide img { display: none; }
.hero-slide.is-active { opacity: 1; }
.hero.fit-adaptive .hero-slides { position: relative; }
.hero.fit-adaptive .hero-slide:first-child { position: relative; inset: auto; }
.hero.fit-adaptive .hero-slide img { display: block; width: 100%; height: auto; }
.hero.fit-adaptive .hero__inner { position: absolute; inset: 0; min-height: 0; padding-block: 22px; }
.hero.fit-adaptive .hero__content { min-height: 100%; }
.hero-dots { position: absolute; z-index: 3; left: 50%; bottom: 18px; display: flex; gap: 8px; transform: translateX(-50%); }
.hero-dot { min-height: 0; width: 11px; height: 11px; padding: 0; border: 2px solid #fff; border-radius: 50%; background: rgba(0,0,0,.35); box-shadow: 0 1px 5px rgba(0,0,0,.2); }
.hero-dot.is-active { background: var(--brand); }
.hero__inner { min-height: 455px; display: grid; grid-template-columns: 1.05fr .95fr; gap: 45px; align-items: center; padding-block: 58px; }
.eyebrow { color: var(--brand-dark); font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.hero h1 { max-width: 760px; margin: 8px 0 18px; font-size: clamp(38px, 5vw, 65px); letter-spacing: -.045em; }
.hero p { max-width: 650px; font-size: 18px; }
.hero__content { min-height: 345px; display: flex; flex-direction: column; align-items: flex-start; }
.hero__copy { max-width: 720px; padding: 0; }
.hero__content.copy-top .hero__copy { margin-bottom: auto; }
.hero__content.copy-center .hero__copy { margin-block: auto; }
.hero__content.copy-bottom .hero__copy { margin-top: auto; }
.hero__copy.text-panel { padding: 20px 24px; border: 1px solid rgba(255,255,255,.7); border-radius: 10px; background: rgba(255,255,255,.82); box-shadow: 0 10px 30px rgba(0,0,0,.12); backdrop-filter: blur(5px); }
.hero__copy.text-shadow h1, .hero__copy.text-shadow p, .hero__copy.text-shadow .eyebrow { text-shadow: 0 0 4px #fff, 0 0 9px #fff, 0 2px 12px rgba(255,255,255,.95); }
.button, button, input[type="submit"], .woocommerce a.button, .woocommerce button.button, .woocommerce input.button { display: inline-flex; align-items: center; justify-content: center; min-height: 45px; padding: 10px 22px; border: 1px solid var(--brand); border-radius: 5px; color: #fff; background: var(--brand); font-weight: 700; cursor: pointer; }
.button:hover, button:hover, input[type="submit"]:hover, .woocommerce a.button:hover, .woocommerce button.button:hover { color: #fff; background: var(--brand-dark); border-color: var(--brand-dark); }
.button--ghost { color: var(--ink); background: transparent; border-color: #aaa; }
.button--ghost:hover { color: var(--brand); background: #fff; border-color: var(--brand); }
.hero__actions .button--ghost { color: #1d1d1d; background: #fff; border: 2px solid #1d1d1d; box-shadow: 0 5px 16px rgba(0,0,0,.18); }
.hero__actions .button--ghost:hover { color: #fff; background: var(--brand-dark); border-color: var(--brand-dark); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 25px; }
.hero__content .hero__actions { margin-top: auto; }
.hero__content.copy-is-below { justify-content: flex-end; }
.hero-copy-below { padding: 35px 0 15px; background: #fff; border-bottom: 1px solid var(--line); }
.hero-copy-below__inner { max-width: 950px; }
.hero-copy-below h1 { margin: 6px 0 12px; font-size: clamp(34px, 4vw, 52px); }
.hero-copy-below p { max-width: 780px; margin: 0; font-size: 18px; }
.hero-products { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; align-items: center; }
.hero-product { padding: 14px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); text-align: center; }
.hero-product:first-child { transform: translateY(25px); }
.hero-product img { aspect-ratio: 1; object-fit: contain; }
.hero-product span { display: block; color: var(--ink); font-size: 14px; font-weight: 700; }

.section { padding: 70px 0; }
.section--soft { background: var(--soft); }
.section-title { max-width: 720px; margin: 0 auto 35px; text-align: center; }
.section-title h2 { margin: 6px 0 12px; font-size: clamp(29px, 4vw, 44px); }
.section-title p { margin: 0; }
.benefit-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.benefit-card { padding: 29px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.benefit-card h3 { margin-top: 0; font-size: 20px; }
.benefit-card .number { color: var(--brand); font-size: 34px; font-weight: 800; }
.category-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.category-card { position: relative; min-height: 230px; padding: 28px; display: flex; align-items: flex-end; overflow: hidden; border-radius: var(--radius); background: #e8ebdf; }
.category-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .35; transition: transform .3s ease; }
.category-card:hover img { transform: scale(1.04); }
.category-card__content { position: relative; z-index: 1; }
.category-card h3 { margin: 0 0 6px; font-size: 25px; }
.trust-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.trust-row > div { padding: 25px 18px; background: #fff; text-align: center; }
.trust-row strong { display: block; color: var(--ink); }
.info-tabs { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; overflow: hidden; }
.tab-list { display: flex; gap: 0; overflow-x: auto; background: #eee; border-bottom: 1px solid var(--line); }
.tab-button { min-height: 50px; padding: 13px 20px; border: 0; border-right: 1px solid #ddd; border-radius: 0; color: var(--ink); background: #eee; font-size: 13px; text-transform: uppercase; white-space: nowrap; }
.tab-button:hover, .tab-button[aria-selected="true"] { color: var(--brand-dark); background: #fff; }
.tab-button[aria-selected="true"] { box-shadow: inset 0 3px 0 var(--brand); }
.tab-panel { padding: 34px; }
.tab-panel[hidden] { display: none; }
.tab-columns { display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: 34px; }
.tab-panel h3 { margin-top: 0; font-size: 19px; text-transform: uppercase; }
.tab-panel h4 { margin: 0 0 10px; font-size: 15px; text-transform: uppercase; }
.tab-panel ul { margin-top: 0; padding-left: 20px; }
.tab-panel li { margin-bottom: 8px; }
.health-note { margin: 25px 0 0; padding-top: 18px; border-top: 1px solid var(--line); font-size: 13px; color: #777; }
.home-sections { display: flex; flex-direction: column; }
.home-categories { order: 1; }
.home-benefits { order: 2; }
.home-info { order: 3; }
.home-products { order: 4; }
.home-trust { order: 5; }
.home-sections.layout-sales-first .home-products { order: 1; }
.home-sections.layout-sales-first .home-info { order: 2; }
.home-sections.layout-sales-first .home-categories { order: 3; }
.home-sections.layout-sales-first .home-benefits { order: 4; }
.home-sections.layout-info-first .home-info { order: 1; }
.home-sections.layout-info-first .home-products { order: 2; }
.home-sections.layout-info-first .home-categories { order: 3; }
.home-sections.layout-info-first .home-benefits { order: 4; }

.content-area { padding: 52px 0 72px; }
.content-area h1 { font-size: clamp(32px, 5vw, 52px); }
.entry-content { max-width: 900px; }
.entry-content > * { max-width: 100%; }
.site-footer { background: #242424; color: #ccc; }
.footer-grid { padding: 48px 0; display: grid; grid-template-columns: 1.25fr 1fr; gap: 70px; }
.site-footer h2, .site-footer h3, .site-footer a { color: #fff; }
.site-footer ul { padding: 0; margin: 0; list-style: none; }
.site-footer li { margin: 7px 0; }
.footer-bottom { padding: 18px 0; border-top: 1px solid #3b3b3b; font-size: 13px; }

.woocommerce ul.products { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.woocommerce ul.products::before, .woocommerce ul.products::after { display: none; }
.woocommerce ul.products li.product { float: none !important; width: auto !important; margin: 0 !important; padding: 14px 14px 18px; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.woocommerce ul.products li.product .woocommerce-loop-product__title { color: var(--ink); font-size: 15px; line-height: 1.4; }
.woocommerce ul.products li.product .price { color: var(--brand-dark); font-weight: 800; }
.woocommerce div.product div.images img { border-radius: var(--radius); }
.woocommerce-message, .woocommerce-info { border-top-color: var(--brand); }
.woocommerce-message::before, .woocommerce-info::before { color: var(--brand); }
.cyd-loop-cart { display: flex; align-items: stretch; gap: 8px; margin-top: auto; padding-top: 12px; }
.cyd-loop-cart .quantity { float: none !important; margin: 0 !important; }
.cyd-loop-cart .qty { width: 68px; height: 45px; padding: 7px; border: 1px solid #bbb; border-radius: 5px; text-align: center; }
.cyd-loop-cart .button { margin: 0 !important; flex: 1; white-space: nowrap; }
.cyd-loop-cart.is-loading { opacity: .65; pointer-events: none; }
.cyd-products-carousel { position: relative; padding: 0 42px; }
.cyd-products-viewport { overflow: hidden; }
.cyd-products-carousel .woocommerce ul.products { display: flex; gap: 18px; overflow-x: auto; scroll-behavior: smooth; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-inline: contain; }
.cyd-products-carousel .woocommerce ul.products::-webkit-scrollbar { display: none; }
.cyd-products-carousel .woocommerce ul.products li.product { flex: 0 0 calc((100% - 36px) / 3); scroll-snap-align: start; }
.cyd-carousel-arrow { position: absolute; z-index: 3; top: 50%; width: 38px; min-height: 54px; padding: 0; border: 0; border-radius: 999px; transform: translateY(-50%); box-shadow: 0 3px 14px rgba(0,0,0,.18); font-size: 34px; line-height: 1; }
.cyd-carousel-prev { left: 0; }
.cyd-carousel-next { right: 0; }
.cyd-carousel-arrow:disabled { opacity: .3; cursor: default; }

@media (max-width: 900px) {
  .topbar__right span:not(:last-child) { display: none; }
  .site-header__inner { min-height: 80px; grid-template-columns: 1fr auto auto; }
  .menu-toggle { display: block; }
  .site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; padding: 12px 18px 20px; background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .site-nav.is-open { display: block; }
  .primary-menu { display: block; }
  .primary-menu > li > a { padding: 11px 0; border: 0; }
  .primary-menu .sub-menu { display: block; position: static; padding: 0 0 0 18px; border: 0; box-shadow: none; }
  .hero__inner { grid-template-columns: 1fr; min-height: 0; }
  .hero__content { min-height: 360px; }
  .hero__copy.text-panel { padding: 16px 18px; }
  .hero.fit-adaptive .hero__inner { padding-block: 14px; }
  .hero.fit-adaptive .hero__content { min-height: 100%; }
  .hero.fit-adaptive .hero__actions .button { min-height: 38px; padding: 7px 12px; font-size: 12px; }
  .benefit-grid, .category-grid { grid-template-columns: 1fr; }
  .tab-columns { grid-template-columns: 1fr; }
  .trust-row { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .woocommerce ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 540px) {
  .topbar .wrap { padding-block: 7px; }
  .topbar__right { display: none; }
  .header-cart .cart-label { display: none; }
  .hero__inner { padding-block: 40px; }
  .hero-products { grid-template-columns: 1fr 1fr; }
  .section { padding: 52px 0; }
  .woocommerce ul.products { grid-template-columns: 1fr; }
  .trust-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .trust-row > div { padding: 10px 4px; }
  .trust-row strong { font-size: 11px; line-height: 1.2; }
  .trust-row span { display: block; margin-top: 3px; font-size: 9px; line-height: 1.2; }
  .home-trust.section { padding: 24px 0; }
}

@media (max-width: 767px) {
  .hero.has-background .hero-slides { position: relative; inset: auto; }
  .hero.has-background .hero-slide { background-image: none !important; }
  .hero.has-background .hero-slide:first-child { position: relative; inset: auto; }
  .hero.has-background .hero-slide img { display: block; width: 100%; height: auto; }
  .hero.has-background .hero__inner { position: absolute; inset: 0; min-height: 0; padding-block: 10px; }
  .hero.has-background .hero__content { min-height: 100%; }
  .hero.has-background .hero__actions { gap: 7px; margin-top: auto; margin-bottom: 8px; }
  .hero.has-background .hero__actions .button { min-height: 34px; padding: 6px 10px; font-size: 11px; }
  .hero.has-background .hero-dots { bottom: 7px; }
  .cyd-mobile-cols-1 .woocommerce ul.products { grid-template-columns: 1fr; }
  .cyd-mobile-cols-2 .woocommerce ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cyd-mobile-cols-3 .woocommerce ul.products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cyd-mobile-cols-4 .woocommerce ul.products { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cyd-products-carousel { padding: 0 28px; }
  .cyd-products-carousel .woocommerce ul.products { gap: 8px; }
  .cyd-mobile-cols-1 .cyd-products-carousel .woocommerce ul.products li.product { flex-basis: 100%; }
  .cyd-mobile-cols-2 .cyd-products-carousel .woocommerce ul.products li.product { flex-basis: calc((100% - 8px) / 2); }
  .cyd-mobile-cols-3 .cyd-products-carousel .woocommerce ul.products li.product { flex-basis: calc((100% - 16px) / 3); }
  .cyd-mobile-cols-4 .cyd-products-carousel .woocommerce ul.products li.product { flex-basis: calc((100% - 24px) / 4); }
  .cyd-carousel-arrow { width: 25px; min-height: 46px; font-size: 27px; }
  .woocommerce ul.products { gap: 9px; }
  .woocommerce ul.products li.product { padding: 7px 7px 10px; border-radius: 7px; }
  .woocommerce ul.products li.product .woocommerce-loop-product__title { padding: 7px 0 4px; font-size: 12px; line-height: 1.25; }
  .woocommerce ul.products li.product .price { margin-bottom: 4px; font-size: 12px; }
  .woocommerce ul.products li.product .onsale { min-width: 34px; min-height: 34px; margin: -5px -5px 0 0; padding: 0; font-size: 10px; line-height: 34px; }
  .cyd-loop-cart { display: grid; grid-template-columns: 1fr; gap: 5px; padding-top: 6px; }
  .cyd-loop-cart .quantity, .cyd-loop-cart .qty { width: 100%; }
  .cyd-loop-cart .qty { height: 34px; padding: 4px; }
  .cyd-loop-cart .button, .woocommerce ul.products li.product .button { width: 100%; min-height: 36px; padding: 6px 5px; font-size: 10px; line-height: 1.15; white-space: normal; }
}
