/*
Casa de Cerezo · Home
CSS aislado con prefijo cdc- para evitar choques en WordPress.
Ubicación recomendada: /wp-content/themes/TU-CHILD-THEME/assets/css/cdc-home.css
*/

:root {
  --cdc-wine-950: #210204;
  --cdc-wine-900: #330407;
  --cdc-wine-800: #4a070b;
  --cdc-wine-700: #620f14;
  /* WCAG 1.4.3 — #9d7840 daba 3,47:1 sobre los cremas del sitio, por debajo del
     4,5:1 exigido para texto normal. Este tono conserva el matiz dorado y rinde
     4,8:1 en el peor de los cuatro fondos claros de la paleta. */
  --cdc-gold-700: #795F34;
  --cdc-gold-600: #b99455;
  --cdc-gold-500: #c9a967;
  --cdc-cream-50: #fffaf2;
  --cdc-cream-100: #f7efe3;
  --cdc-cream-200: #efe2ce;
  --cdc-paper: #f4eadc;
  --cdc-ink: #241612;
  --cdc-muted: #6f5c51;
  --cdc-line: rgba(108, 68, 45, 0.22);
  --cdc-white: #ffffff;
  --cdc-serif: "Cormorant Garamond", "EB Garamond", Garamond, Georgia, serif;
  --cdc-sans: "Montserrat", "Inter", Arial, sans-serif;
  --cdc-container: min(100% - 40px, 1160px);
  --cdc-radius-sm: 2px;
  --cdc-radius-md: 8px;
  --cdc-shadow-soft: 0 18px 50px rgba(42, 18, 8, .14);
  --cdc-shadow-card: 0 12px 28px rgba(38, 17, 8, .10);
}

html {
  scroll-behavior: smooth;
}

body.cdc-page,
.cdc-page-shell {
  margin: 0;
  color: var(--cdc-ink);
  background: var(--cdc-cream-100);
  font-family: var(--cdc-sans);
  font-size: 16px;
  line-height: 1.55;
}

.cdc-page-shell * {
  box-sizing: border-box;
}

.cdc-page-shell img {
  max-width: 100%;
  display: block;
}

.cdc-container {
  width: var(--cdc-container);
  margin-inline: auto;
}

.cdc-eyebrow {
  margin: 0 0 12px;
  color: var(--cdc-gold-700);
  font-family: var(--cdc-sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.cdc-title,
.cdc-section-title {
  margin: 0;
  font-family: var(--cdc-serif);
  font-weight: 500;
  letter-spacing: -.025em;
  line-height: .96;
}

.cdc-title {
  color: var(--cdc-wine-800);
  font-size: clamp(58px, 8vw, 100px);
}

.cdc-section-title {
  color: var(--cdc-ink);
  font-size: clamp(36px, 4.2vw, 56px);
}

.cdc-lead {
  font-family: var(--cdc-serif);
  font-size: clamp(24px, 2.25vw, 36px);
  line-height: 1.1;
}

.cdc-copy {
  margin: 0;
  color: var(--cdc-muted);
  font-size: 16px;
}

.cdc-btn,
.cdc-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  transition: transform .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
}

.cdc-btn {
  min-height: 48px;
  padding: 0 24px;
  border: 1px solid transparent;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.cdc-btn:hover,
.cdc-link:hover {
  transform: translateY(-1px);
}

.cdc-btn--wine {
  color: var(--cdc-white);
  background: var(--cdc-wine-800);
}

.cdc-btn--wine:hover {
  background: var(--cdc-wine-700);
}

.cdc-btn--outline-gold {
  color: var(--cdc-gold-500);
  border-color: var(--cdc-gold-600);
  background: rgba(30, 8, 6, .22);
}

.cdc-btn--outline-gold:hover {
  color: var(--cdc-wine-950);
  background: var(--cdc-gold-500);
}

.cdc-link {
  color: var(--cdc-wine-800);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.cdc-link--gold {
  color: var(--cdc-gold-500);
}

.cdc-rule {
  width: 148px;
  height: 18px;
  margin: 28px 0;
  position: relative;
}

.cdc-rule::before,
.cdc-rule::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 62px;
  height: 1px;
  background: var(--cdc-gold-500);
  opacity: .75;
}

.cdc-rule::before { left: 0; }
.cdc-rule::after { right: 0; }

.cdc-rule span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 10px;
  border: 1px solid var(--cdc-gold-500);
  transform: translate(-50%, -50%) rotate(45deg);
}

/* Header — los estilos viven ahora en assets/css/cdc-header.css, que se encola
   en TODAS las páginas para que el header sea idéntico en la Home y en el resto
   del sitio. No añadir aquí reglas de .cdc-site-header / .cdc-nav /
   .cdc-header-actions / .cdc-menu-toggle: se pisarían entre archivos. */

/* Hero */
.cdc-hero {
  position: relative;
  overflow: hidden;
  min-height: 720px;
  background: radial-gradient(circle at 0 0, rgba(201,169,103,.16), transparent 36%), var(--cdc-paper);
}

.cdc-hero::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 45%;
  background: linear-gradient(90deg, rgba(255,250,242,.94), rgba(255,250,242,.68), transparent);
  z-index: 1;
  pointer-events: none;
}

.cdc-hero__media {
  position: absolute;
  inset: 0 0 0 auto;
  width: 63%;
  height: 100%;
}

.cdc-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.cdc-hero__content {
  position: relative;
  z-index: 2;
  width: min(600px, 50%);
  padding: clamp(90px, 11vw, 150px) 0 80px;
}

.cdc-hero .cdc-lead {
  max-width: 520px;
  margin: 24px 0 0;
  color: var(--cdc-ink);
}

.cdc-hero .cdc-copy {
  max-width: 480px;
}

.cdc-hero__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 34px;
}

/* Heritage */
.cdc-heritage {
  padding: 72px 0 76px;
  background: linear-gradient(180deg, var(--cdc-cream-50), var(--cdc-cream-100));
  border-top: 1px solid var(--cdc-line);
  border-bottom: 1px solid var(--cdc-line);
}

.cdc-heritage__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px minmax(0, 1.35fr);
  gap: 56px;
  align-items: center;
}

.cdc-heritage__text .cdc-copy {
  max-width: 500px;
  margin-top: 24px;
}

.cdc-timeline {
  display: grid;
  justify-items: center;
  color: var(--cdc-gold-700);
  text-align: center;
}

.cdc-timeline__crest {
  width: 48px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 4px 4px 16px 16px;
  opacity: .62;
}

.cdc-timeline__year {
  margin: 12px 0 8px;
  color: var(--cdc-ink);
  font-family: var(--cdc-serif);
  font-size: 44px;
  line-height: 1;
}

.cdc-timeline__items {
  margin: 0;
  padding: 0;
  list-style: none;
}

.cdc-timeline__items li {
  position: relative;
  padding: 18px 0;
  font-family: var(--cdc-serif);
  font-size: 15px;
}

.cdc-timeline__items li::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -8px;
  width: 1px;
  height: 16px;
  background: var(--cdc-gold-500);
}

.cdc-heritage__photo {
  position: relative;
  padding: 10px;
  border: 1px solid rgba(157, 120, 64, .55);
  background: var(--cdc-cream-50);
  box-shadow: var(--cdc-shadow-soft);
}

.cdc-heritage__photo img {
  width: 100%;
  aspect-ratio: 16 / 10.5;
  object-fit: cover;
  filter: sepia(.35) saturate(.8) contrast(.95);
}

/* Products */
.cdc-products {
  padding: 78px 0 90px;
  color: var(--cdc-cream-100);
  background: radial-gradient(circle at 85% 16%, rgba(185,148,85,.12), transparent 22%), linear-gradient(90deg, var(--cdc-wine-950), var(--cdc-wine-800));
}

.cdc-products__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  margin-bottom: 34px;
}

.cdc-products .cdc-section-title {
  max-width: 460px;
  color: var(--cdc-cream-100);
}

.cdc-product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.cdc-product-card {
  position: relative;
  min-height: 376px;
  display: flex;
  flex-direction: column;
  padding: 18px;
  color: var(--cdc-ink);
  background: var(--cdc-cream-50);
  border: 1px solid rgba(201, 169, 103, .32);
  box-shadow: var(--cdc-shadow-card);
}

.cdc-product-card__flag {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  color: var(--cdc-gold-700);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.cdc-product-card__image {
  display: grid;
  place-items: center;
  height: 190px;
  margin-bottom: 18px;
}

.cdc-product-card__image img {
  max-height: 180px;
  width: 100%;
  object-fit: contain;
}

.cdc-product-card h3 {
  margin: 0;
  font-family: var(--cdc-serif);
  font-size: 24px;
  font-weight: 500;
  line-height: 1.05;
}

.cdc-product-card p {
  margin: 8px 0 0;
  color: var(--cdc-muted);
  font-size: 13px;
  line-height: 1.45;
}

.cdc-price {
  display: block;
  margin: 14px 0 18px;
  color: var(--cdc-ink);
  font-size: 18px;
  font-weight: 700;
}

.cdc-product-card .cdc-btn {
  width: 100%;
  margin-top: auto;
  min-height: 42px;
}

/* Region + Bulletin */
.cdc-region-news {
  padding: 74px 0 70px;
  background: var(--cdc-cream-100);
}

.cdc-region-news__grid {
  display: grid;
  grid-template-columns: minmax(260px, .8fr) minmax(0, 1.25fr) minmax(260px, .85fr);
  gap: 42px;
  align-items: center;
}

.cdc-region-news__image img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  box-shadow: var(--cdc-shadow-soft);
}

.cdc-article-card {
  background: var(--cdc-cream-50);
  border: 1px solid var(--cdc-line);
  padding: 0 0 20px;
}

.cdc-article-card img {
  width: 100%;
  aspect-ratio: 16 / 8.5;
  object-fit: cover;
}

.cdc-article-card__body {
  padding: 22px 24px 0;
}

.cdc-article-card h3 {
  margin: 0 0 8px;
  font-family: var(--cdc-serif);
  font-size: 25px;
  font-weight: 500;
  line-height: 1.08;
}

.cdc-article-card p {
  margin: 0 0 14px;
  color: var(--cdc-muted);
  font-size: 14px;
}

.cdc-slider-dots {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 18px;
}

.cdc-slider-dots button {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--cdc-gold-500);
  opacity: .5;
}

.cdc-slider-dots button[aria-current="true"] {
  background: var(--cdc-wine-800);
  opacity: 1;
}

/* Experiences */
.cdc-experiences {
  position: relative;
  overflow: hidden;
  min-height: 310px;
  color: var(--cdc-cream-100);
  background: var(--cdc-wine-950);
}

.cdc-experiences__bg {
  position: absolute;
  inset: 0;
}

.cdc-experiences__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .62;
}

.cdc-experiences::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15,3,2,.75), rgba(15,3,2,.54) 48%, rgba(15,3,2,.74));
}

.cdc-experiences__inner {
  position: relative;
  z-index: 2;
  min-height: 310px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 60px;
  align-items: center;
}

/* El eyebrow de esta sección va sobre fondo burdeos, no crema: aquí el dorado
   oscurecido de --cdc-gold-700 restaría contraste en lugar de sumarlo, así que
   se mantiene el dorado claro. */
.cdc-experiences .cdc-eyebrow {
  color: var(--cdc-gold-500);
}

.cdc-experiences .cdc-section-title,
.cdc-experiences .cdc-copy {
  color: var(--cdc-cream-100);
}

.cdc-experience-icons {
  display: grid;
  grid-template-columns: repeat(4, max-content);
  gap: 28px;
  margin-top: 24px;
}

.cdc-experience-icon {
  display: grid;
  justify-items: center;
  gap: 8px;
  color: var(--cdc-gold-500);
  font-size: 12px;
  text-align: center;
}

.cdc-experience-icon span:first-child {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid currentColor;
  border-radius: 999px;
}

.cdc-experiences__actions {
  display: grid;
  gap: 22px;
}

/* Newsletter */
.cdc-newsletter {
  padding: 42px 0;
  background: var(--cdc-cream-50);
  border-bottom: 1px solid var(--cdc-line);
}

.cdc-newsletter__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 520px);
  gap: 48px;
  align-items: center;
}

.cdc-newsletter h2 {
  margin: 0;
  font-family: var(--cdc-serif);
  font-size: clamp(34px, 4vw, 48px);
  font-weight: 500;
  line-height: 1;
}

.cdc-newsletter p {
  margin: 8px 0 0;
  color: var(--cdc-muted);
}

.cdc-newsletter form {
  display: flex;
  gap: 12px;
}

.cdc-newsletter input {
  width: 100%;
  height: 48px;
  border: 1px solid rgba(157, 120, 64, .45);
  padding: 0 16px;
  background: var(--cdc-white);
  color: var(--cdc-ink);
}

/* Footer */
.cdc-site-footer {
  color: var(--cdc-cream-100);
  background: linear-gradient(90deg, var(--cdc-wine-950), var(--cdc-wine-800));
  padding: 54px 0 28px;
}

.cdc-footer__grid {
  display: grid;
  grid-template-columns: minmax(260px, 1.5fr) repeat(2, minmax(170px, 1fr));
  gap: 44px;
}

/* Emblemas de la financiacion: fila propia bajo las columnas Tienda y
   Atencion al cliente, no bajo la marca. */
.cdc-footer__kitdigital {
  grid-column: 2 / -1;
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  gap: 28px;
  margin-top: 8px;
}

.cdc-footer__kitdigital a {
  display: block;
  flex: 0 0 auto;
  max-width: 230px;
}

.cdc-footer__kitdigital img {
  display: block;
  width: 100%;
  height: auto;
}

.cdc-footer__brand .cdc-logo {
  min-width: 0;
  margin-bottom: 16px;
}

.cdc-footer__brand .cdc-logo__wordmark {
  font-size: 30px;
}

.cdc-footer__brand p,
.cdc-footer__col a,
.cdc-footer__bottom {
  color: rgba(247, 239, 227, .78);
  font-size: 14px;
}

.cdc-footer__col h3 {
  margin: 0 0 14px;
  color: var(--cdc-gold-500);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.cdc-footer__col ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.cdc-footer__col li + li {
  margin-top: 7px;
}

.cdc-footer__col a {
  text-decoration: none;
}

.cdc-footer__col a:hover {
  color: var(--cdc-gold-500);
}

.cdc-footer__bottom a {
  color: inherit;
  text-decoration: none;
}

.cdc-footer__bottom a:hover {
  color: var(--cdc-gold-500);
}

.cdc-footer__bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 46px;
  padding-top: 22px;
  border-top: 1px solid rgba(201, 169, 103, .16);
}

/* Responsive */
@media (max-width: 1120px) {
  .cdc-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cdc-region-news__grid {
    grid-template-columns: 1fr 1fr;
  }

  .cdc-region-news__text {
    grid-column: 1 / -1;
  }

  .cdc-footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cdc-footer__kitdigital {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  /* El bloque móvil del header se ha trasladado a cdc-header.css. */

  .cdc-hero {
    min-height: auto;
  }

  .cdc-hero::before {
    width: 100%;
    background: linear-gradient(180deg, rgba(255,250,242,.9), rgba(255,250,242,.72), rgba(255,250,242,.94));
  }

  .cdc-hero__media {
    width: 100%;
    opacity: .58;
  }

  .cdc-hero__content {
    width: 100%;
    min-height: 650px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  /* Estas rejillas se apoyan en `min-height` + `align-items:center` para
     respirar en escritorio. Al colapsar a una columna el contenido supera esa
     altura mínima, el centrado deja de aportar aire y el texto queda pegado a
     los bordes de la banda (se veía en "Experiencias": el eyebrow tocando el
     borde superior y "Ver próximos eventos" el inferior). En móvil el aire lo
     da un padding vertical explícito. */
  .cdc-heritage__grid,
  .cdc-experiences__inner,
  .cdc-newsletter__inner {
    grid-template-columns: 1fr;
    min-height: 0;
    padding-block: 56px;
  }

  .cdc-timeline {
    order: 3;
  }

  .cdc-experience-icons {
    grid-template-columns: repeat(2, max-content);
  }
}

@media (max-width: 640px) {
  :root {
    --cdc-container: min(100% - 28px, 1160px);
  }

  .cdc-title {
    font-size: clamp(48px, 15vw, 70px);
  }

  .cdc-hero__actions,
  .cdc-products__header,
  .cdc-footer__bottom {
    align-items: flex-start;
    flex-direction: column;
  }

  .cdc-product-grid,
  .cdc-region-news__grid,
  .cdc-footer__grid {
    grid-template-columns: 1fr;
  }

  .cdc-footer__kitdigital {
    grid-column: 1 / -1;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .cdc-newsletter form {
    flex-direction: column;
  }

  .cdc-newsletter .cdc-btn {
    width: 100%;
  }

  /* El ancho móvil de .cdc-article-card se corrige en cerezo-visual-system.css,
     que es donde se declara su max-width y quien manda por orden de carga. */
}

.cdc-page-shell .screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ------------------------------------------------------------------
   Overrides del proyecto (drb-cdc-home): logo real en lugar del
   escudo tipográfico CDC del kit.
   ------------------------------------------------------------------ */
.cdc-logo__img {
  display: block;
  height: 54px;
  width: auto;
}

.cdc-site-footer .cdc-logo__img {
  height: 48px;
}

.cdc-timeline__crest--img {
  background: transparent;
  border: none;
}

.cdc-timeline__crest--img img {
  display: block;
  width: 72px;
  height: 72px;
  object-fit: contain;
  margin: 0 auto;
}

@media (max-width: 720px) {
  .cdc-logo__img {
    height: 42px;
  }
}

/* ------------------------------------------------------------------
   Iteración: hero sin solapes + logos contenidos
   ------------------------------------------------------------------ */
/* Degradado más ancho y sólido: el texto nunca pisa zonas cargadas */
.cdc-hero::before {
  width: 56%;
  background: linear-gradient(90deg, rgba(255,250,242,.97) 30%, rgba(255,250,242,.82) 62%, transparent);
}

/* El producto queda anclado a la derecha del encuadre */
.cdc-hero__media img {
  object-position: right center;
}

/* Logo con presencia pero sin dominar el header */
.cdc-logo__img {
  height: 44px;
}

.cdc-site-footer .cdc-logo__img {
  height: 40px;
}

@media (max-width: 720px) {
  .cdc-logo__img {
    height: 36px;
  }
}

/* =========================================================================
   Banner de consentimiento (Complianz) — identidad Casa de Cerezo
   Sustituye la paleta de fábrica y equipara visualmente "Aceptar" y
   "Rechazar" (misma superficie, mismo peso), como exige la guía de la AEPD.
   ========================================================================= */
:root {
  --cmplz_banner_background_color: #f7efe3 !important;
  --cmplz_banner_border_color: rgba(74, 7, 11, .20) !important;
  --cmplz_banner_border_width: 1px 1px 1px 1px !important;
  --cmplz_banner_border_radius: 2px 2px 2px 2px !important;
  --cmplz_text_color: #241612 !important;
  --cmplz_hyperlink_color: #4a070b !important;
  --cmplz_title_font_size: 22px !important;
  --cmplz_text_font_size: 13px !important;
  --cmplz_link_font_size: 13px !important;
  --cmplz_button_font_size: 13px !important;
  --cmplz_button_border_radius: 2px 2px 2px 2px !important;
  --cmplz_button_accept_background_color: #4a070b !important;
  --cmplz_button_accept_border_color: #4a070b !important;
  --cmplz_button_accept_text_color: #f7efe3 !important;
  --cmplz_button_deny_background_color: #4a070b !important;
  --cmplz_button_deny_border_color: #4a070b !important;
  --cmplz_button_deny_text_color: #f7efe3 !important;
  --cmplz_button_settings_background_color: transparent !important;
  --cmplz_button_settings_border_color: #4a070b !important;
  --cmplz_button_settings_text_color: #4a070b !important;
  --cmplz_slider_active_color: #4a070b !important;
  --cmplz_slider_inactive_color: #a08b7d !important;
  --cmplz_category_header_always_active_color: #795f34 !important;
}

.cmplz-cookiebanner .cmplz-title {
  font-family: var(--cdc-serif);
  font-weight: 600;
  letter-spacing: .01em;
}

.cmplz-cookiebanner .cmplz-message,
.cmplz-cookiebanner .cmplz-btn,
.cmplz-cookiebanner .cmplz-link,
.cmplz-cookiebanner .cmplz-category-title,
.cmplz-cookiebanner .cmplz-description {
  font-family: var(--cdc-sans);
}

/* Aceptar y Rechazar: idéntica prominencia. Preferencias queda como
   terciario, sin restar visibilidad a ninguna de las dos anteriores. */
.cmplz-cookiebanner .cmplz-buttons .cmplz-btn.cmplz-accept,
.cmplz-cookiebanner .cmplz-buttons .cmplz-btn.cmplz-deny {
  flex: 1 1 0;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.cmplz-cookiebanner .cmplz-buttons .cmplz-btn.cmplz-view-preferences {
  flex: 1 1 0;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.cmplz-cookiebanner .cmplz-categories .cmplz-category {
  background-color: rgba(74, 7, 11, .05);
}
