/* ============================================================
   YAGARO · Home (front-page) — rediseño editorial
   Se carga solo en is_front_page() (ver functions.php).
   Reutiliza tokens: .yagaro-btn-primary / .yagaro-btn-outline,
   headings serif del tema con <em> en cursiva, eyebrows uppercase.
   ============================================================ */

:root {
    --yg-ink: #1a1a1a;
    --yg-muted: #888;
    --yg-cream: #f6f1ea;
    --yg-line: #e7e0d6;
    /* Degradado de marca (fallback cuando no hay foto subida) */
    --yg-gradient: linear-gradient(155deg, #f3ccb0 0%, #db8c66 48%, #b8502e 100%);
}

/* Full-bleed: la home rompe el contenedor estrecho de .content_inner */
.yagaro-home {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    overflow-x: hidden;
    background: #fff;
    color: var(--yg-ink);
    -webkit-font-smoothing: antialiased;
}

/* Eyebrow compartido */
.yg-eyebrow {
    margin: 0 0 16px;
    font-size: 11px;
    color: var(--yg-muted);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-weight: 600;
}
.yg-eyebrow--light { color: rgba(255, 255, 255, 0.75); }

/* Título de sección editorial (serif del tema + em cursiva) */
.yg-section-title {
    margin: 0;
    font-size: 44px;
    line-height: 1.05;
    font-weight: 400;
    color: var(--yg-ink);
    text-transform: none;
    letter-spacing: 0;
}
.yg-section-title em { font-style: italic; font-weight: 400; }

/* Botón outline en versión clara para fondos con foto */
.yagaro-home .yagaro-btn-outline--lg { background: #fff; }

/* Tamaño --lg de botones para la home (hero / banner / "ver colección").
   La definición de --lg vive en cart.css, que NO se carga en la portada, así
   que sin esto los botones caían al tamaño base (más estrechos que el mockup)
   y el outline quedaba más pequeño que el primary. Replicamos el tamaño aquí
   para que ambos botones tengan el ancho/padding del mockup. */
.yagaro-btn-primary--lg,
.yagaro-btn-outline--lg {
    padding: 16px 30px !important;
    font-size: 12px;
    letter-spacing: 0.08em;
}

/* ============================ HERO ============================ */
.yg-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 560px;
    border-bottom: 1px solid var(--yg-line);
}
.yg-hero__media {
    position: relative;
    background: var(--yg-gradient);
    background-size: cover;
    background-position: center top;
    min-height: 420px;
}
.yg-hero__content {
    align-self: center;
    padding: 64px clamp(28px, 5vw, 80px);
    max-width: 620px;
}
.yg-hero__title {
    margin: 0 0 22px;
    font-size: clamp(38px, 4.4vw, 60px);
    line-height: 1.04;
    font-weight: 400;
    color: var(--yg-ink);
    text-transform: none;
    letter-spacing: 0;
}
.yg-hero__title em { font-style: italic; font-weight: 400; }
.yg-hero__sub {
    margin: 0 0 32px;
    max-width: 440px;
    font-size: 15px;
    line-height: 1.6;
    color: #555;
}
.yg-hero__ctas {
    display: flex;
    justify-content: flex-start;
    gap: 12px;
    flex-wrap: wrap;
    margin: 0 0 44px;
}
.yg-hero__stats {
    list-style: none;
    margin: 0;
    padding: 28px 0 0;
    border-top: 1px solid var(--yg-line);
    display: flex;
    gap: 48px;
}
.yg-hero__stats li { display: flex; flex-direction: column; gap: 6px; }
.yg-hero__stats .yg-eyebrow { margin: 0; }
.yg-hero__stats strong { font-size: 14px; font-weight: 600; color: var(--yg-ink); }

/* ============================ MARQUEE ============================ */
.yg-marquee {
    background: var(--yg-ink);
    color: #fff;
    overflow: hidden;
    padding: 14px 0;
    white-space: nowrap;
}
.yg-marquee__track {
    display: inline-flex;
    align-items: center;
    animation: yg-scroll 60s linear infinite;
}
.yg-marquee__item,
.yg-marquee__sep {
    font-size: 12px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-weight: 600;
    padding: 0 18px;
}
.yg-marquee__sep { opacity: 0.5; padding: 0; }
@keyframes yg-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
    .yg-marquee__track { animation: none; }
}

/* ============================ COLECCIÓN ============================ */
.yg-collection {
    background: var(--yg-cream);
    padding: clamp(56px, 7vw, 96px) clamp(24px, 5vw, 80px);
}
.yg-collection__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 32px;
    flex-wrap: wrap;
    margin: 0 0 44px;
}
.yg-collection__lead {
    margin: 0;
    max-width: 360px;
    font-size: 14px;
    line-height: 1.6;
    color: #555;
}
.yg-collection__grid {
    display: flex;
    gap: 22px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 14px;
    /* margen negativo + padding para que las tarjetas sangren al borde al hacer scroll */
    margin: 0 calc(-1 * clamp(24px, 5vw, 80px));
    padding-left: clamp(24px, 5vw, 80px);
    padding-right: clamp(24px, 5vw, 80px);
    scroll-padding-left: clamp(24px, 5vw, 80px);
    scrollbar-width: none;          /* Firefox */
    -ms-overflow-style: none;       /* IE/Edge */
}
.yg-collection__grid::-webkit-scrollbar { display: none; } /* Chrome/Safari */
.yg-collection__grid .yg-card {
    flex: 0 0 clamp(220px, 24vw, 300px);
    scroll-snap-align: start;
}
.yg-card__media {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    background: var(--yg-gradient);
    background-size: cover;
    background-position: center;
    overflow: hidden;
}
.yg-card__plus {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 30px;
    height: 30px;
    box-sizing: border-box;
    padding-bottom: 3px;        /* sube ópticamente el "+" al centro del círculo */
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: var(--yg-ink);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 0;
}
.yg-card__meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin: 14px 0 2px;
}
.yg-card__name {
    font-size: 14px;
    font-weight: 600;
    color: var(--yg-ink);
    text-decoration: none;
}
.yg-card__name:hover { opacity: 0.65; color: var(--yg-ink); }
.yg-card__price { font-size: 14px; color: var(--yg-ink); white-space: nowrap; }
.yg-card__price .amount { font-weight: 400; }
.yg-card__sub {
    margin: 0;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--yg-muted);
}
.yg-collection__foot { margin: 48px 0 0; text-align: center; }

/* ============================ MANIFESTO ============================ */
.yg-manifesto {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(40px, 6vw, 90px);
    padding: clamp(56px, 7vw, 96px) clamp(24px, 5vw, 80px);
    max-width: 1280px;
    margin: 0 auto;
}
.yg-manifesto__list { list-style: none; margin: 0; padding: 0; }
.yg-manifesto__list li {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 20px;
    padding: 22px 0;
    border-top: 1px solid var(--yg-line);
}
.yg-manifesto__list li:last-child { border-bottom: 1px solid var(--yg-line); }
.yg-manifesto__key {
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--yg-ink);
}
.yg-manifesto__val { font-size: 15px; line-height: 1.55; color: #555; }

/* ============================ BANNER CTA ============================ */
.yg-banner {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* eyebrow + botón hacia abajo */
    align-items: center;
    min-height: clamp(420px, 52vw, 680px);
    background: var(--yg-gradient);
    background-size: cover;
    background-position: center top;
    text-align: center;
    padding: clamp(48px, 8vw, 96px) 24px clamp(40px, 6vw, 72px);
    color: #fff;
}
.yg-banner::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(40, 18, 10, 0.22);
}
.yg-banner__content { position: relative; max-width: 680px; margin: 0 auto; }
.yg-banner__title {
    margin: 0 0 28px;
    font-size: clamp(30px, 4vw, 52px);
    line-height: 1.08;
    font-weight: 400;
    color: #fff;
    text-transform: none;
    letter-spacing: 0;
}
.yg-banner__title em { font-style: italic; font-weight: 400; }
.yagaro-home .yg-banner__btn {
    background: #fff;
    color: var(--yg-ink) !important;
}
.yagaro-home .yg-banner__btn:hover { background: #fff; opacity: 0.88; }

/* ============================ COMPRA EL LOOK ============================ */
.yg-look {
    padding: clamp(56px, 7vw, 96px) clamp(24px, 5vw, 80px);
}
.yg-look__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    flex-wrap: wrap;
    margin: 0 0 28px;
}
.yg-look__link {
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--yg-ink);
    text-decoration: none;
    white-space: nowrap;
}
.yg-look__link:hover { opacity: 0.6; color: var(--yg-ink); }

/* Píldoras de filtro por categoría */
.yg-look__filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 32px;
}
.yg-look__pill {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    border: 1px solid var(--yg-line);
    background: #fff;
    color: var(--yg-ink);
    border-radius: 999px;
    padding: 9px 20px;
    font-size: 12px;
    letter-spacing: 0.04em;
    font-weight: 600;
    line-height: 1;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.yg-look__pill:hover { border-color: var(--yg-ink); }
.yg-look__pill.is-active {
    background: var(--yg-ink);
    border-color: var(--yg-ink);
    color: #fff;
}
.yg-look__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.yg-look__tile {
    position: relative;
    display: flex;
    align-items: flex-end;
    aspect-ratio: 4 / 5;
    background: var(--yg-gradient);
    background-size: cover;
    background-position: center;
    overflow: hidden;
    text-decoration: none;
}
.yg-look__tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0) 45%);
    opacity: 0;
    transition: opacity 0.2s ease;
}
.yg-look__tile:hover::after { opacity: 1; }
.yg-look__caption {
    position: relative;
    z-index: 1;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    padding: 14px;
    color: #fff;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.yg-look__tile:hover .yg-look__caption { opacity: 1; transform: none; }
.yg-look__name { font-size: 13px; font-weight: 600; }
.yg-look__price { font-size: 13px; white-space: nowrap; }
.yg-look__price .amount { font-weight: 400; }

/* ============================ RESPONSIVE ============================ */
@media (max-width: 1024px) {
    .yg-look__grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
    .yg-hero { grid-template-columns: 1fr; }
    .yg-hero__media { min-height: 340px; order: -1; }
    .yg-hero__content { padding: 40px 24px 48px; }
    .yg-hero__stats { gap: 28px; flex-wrap: wrap; }
    .yg-manifesto { grid-template-columns: 1fr; }
    .yg-manifesto__list li { grid-template-columns: 1fr; gap: 6px; }
    .yg-section-title { font-size: 34px; }
}
@media (max-width: 560px) {
    .yg-look__grid { grid-template-columns: repeat(2, 1fr); }
    .yg-hero__ctas .yagaro-btn-primary--lg,
    .yg-hero__ctas .yagaro-btn-outline--lg { width: 100%; text-align: center; }
}

/* =========================================================================
   Arreglos visuales de interfaz (home + carrito).
   Genéricos: NO dependen de ninguna colección concreta.
   Se cargan vía snippet (Code Snippets) para no modificar home.css / cart.css.
   Al cargarse después, sus reglas prevalecen.
   ========================================================================= */

/* --- HOME: hover del botón outline grande ("Ver toda la colección", etc.) -
   Sin esto queda texto blanco sobre fondo blanco (invisible), porque el
   override .yagaro-home .yagaro-btn-outline--lg fija background:#fff. */
.yagaro-home .yagaro-btn-outline--lg:hover {
    background: #1a1a1a;
    color: #fff !important;
    border-color: #1a1a1a;
}

/* --- HOME: producto en oferta — precio actual + tachado en UNA sola línea -
   Evita que la fila crezca a 2 líneas y deje hueco con la categoría. */
.yg-card__price,
.yg-look__price {
    display: inline-flex;
    flex-direction: row-reverse;   /* muestra el precio actual y luego el tachado */
    align-items: baseline;
    gap: 6px;
}
.yg-card__price del, .yg-card__price ins,
.yg-look__price del, .yg-look__price ins { display: inline; }
.yg-card__price ins, .yg-look__price ins { text-decoration: none; }
.yg-card__price del, .yg-look__price del { opacity: 0.6; }

/* --- CARRITO: "Cambiar dirección" a la derecha y en una sola línea -------- */
p.yagaro-calc-heading {
    display: flex !important;
    justify-content: flex-end !important;
    text-align: right !important;
    width: 100% !important;
}
a.yagaro-calc-toggle {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    white-space: nowrap !important;   /* evita que se parta en 2 líneas */
    text-align: right !important;
}
