/*
 * Elche SaaS Child — main stylesheet
 *
 * Estética: moderno-vintage. Combina espacios amplios y bordes nítidos
 * (moderno) con tipografía display semi-serif y paleta cálida saturada
 * tipo cartelería de pizzería clásica (vintage).
 *
 * Tokens del brand inyectados inline desde functions.php según lo que
 * el cliente configuró en el plugin Settings.
 *
 *   --brand           color primario (default #007FFF azul SaaS)
 *   --brand-accent    color CTA/cartelería (default #FF8732 naranja)
 *   --brand-dark      hover del primario (default #005FCC)
 */

:root {
    --brand-light: color-mix(in srgb, var(--brand) 12%, white);
    --accent-light: color-mix(in srgb, var(--brand-accent) 14%, white);
    --accent-dark:  color-mix(in srgb, var(--brand-accent) 80%, #1f1300);

    /* Paleta neutra cálida (vintage paper) en lugar de gris frío */
    --cream-50:  #FFFBF5;
    --cream-100: #FAF3E7;
    --cream-200: #EEE3CF;
    --ink-700:   #44342B;
    --ink-900:   #1F1410;
    --gray-500:  #7A6C63;

    --success: #2E7D32;
    --danger:  #C62828;

    /* Bordes y radios con personalidad — más sutiles que el SaaS estándar */
    --radius:    14px;
    --radius-sm: 10px;
    --radius-xs: 6px;
    --border:    2px solid var(--ink-900);
    --border-thin: 1px solid var(--cream-200);

    --shadow:    0 4px 0 0 var(--ink-900);          /* sombra "stamp" vintage */
    --shadow-md: 0 6px 0 0 var(--ink-900);
    --shadow-soft: 0 8px 24px rgba(31, 20, 16, 0.08);

    --font-display: "Fraunces", "Georgia", "Times New Roman", serif;
    --font-body:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ───────── Base ───────── */

body.elche-saas {
    background: var(--cream-50);
    color: var(--ink-900);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.elche-saas a { color: var(--brand-accent); text-decoration: none; transition: color 0.15s; }
.elche-saas a:hover { color: var(--accent-dark); }

h1, h2, h3 { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.01em; }

.elche-skip-link {
    position: absolute; left: -9999px; top: -9999px;
    padding: 0.5rem 1rem; background: var(--ink-900); color: #fff;
    border-radius: var(--radius-xs);
}
.elche-skip-link:focus { left: 1rem; top: 1rem; z-index: 99999; }

/* ───────── Header ───────── */

.elche-header {
    background: var(--cream-50);
    border-bottom: var(--border-thin);
    position: sticky; top: 0; z-index: 100;
}
.elche-header__inner {
    max-width: 1280px; margin: 0 auto;
    padding: 0.9rem 1.5rem;
    display: flex; align-items: center; gap: 1.5rem;
}
.elche-header__brand { display: flex; flex-direction: column; gap: 0.1rem; }
.elche-header__brand-link {
    display: inline-flex; align-items: center;
}
.elche-header__logo { height: 52px; width: auto; }
.elche-header__name {
    font-family: var(--font-display);
    font-size: 1.5rem; font-weight: 900;
    color: var(--brand-accent); letter-spacing: -0.02em;
}
.elche-header__address {
    display: block; font-size: 0.75rem;
    color: var(--gray-500); margin-top: 0.1rem;
    font-weight: 500;
}
.elche-header__nav { flex: 1; }
.elche-nav {
    list-style: none; margin: 0; padding: 0;
    display: flex; gap: 1.75rem; justify-content: center;
}
.elche-nav a {
    color: var(--ink-900); font-weight: 600; font-size: 0.95rem;
    padding: 0.25rem 0; border-bottom: 2px solid transparent;
    text-transform: uppercase; letter-spacing: 0.06em;
    transition: all 0.18s;
}
.elche-nav a:hover {
    color: var(--brand-accent);
    border-bottom-color: var(--brand-accent);
}

.elche-header__actions { display: flex; align-items: center; gap: 0.75rem; }
.elche-header__mobile-toggle {
    display: none; background: none; border: 0; padding: 0.5rem; cursor: pointer;
}
.elche-header__mobile-toggle span {
    display: block; width: 24px; height: 2px;
    background: var(--ink-900); margin: 5px 0; transition: 0.2s;
}

/* ───────── Branch bar (top bar de sucursal) ───────── */

.elche-branch-bar {
    background: var(--brand-accent);
    color: #fff;
    display: flex; justify-content: center;
    padding: 0.55rem 1rem;
    border-bottom: var(--border-thin);
}
.elche-branch-bar__chip {
    background: var(--ink-900);
    border: 0;
    color: #fff;
    border-radius: 999px;
    padding: 0.45rem 1.1rem;
    font-family: var(--font-body);
    font-weight: 700; font-size: 0.78rem;
    letter-spacing: 0.6px;
    cursor: pointer;
    display: inline-flex; align-items: center; gap: 0.5rem;
    transition: transform 0.15s, background 0.15s;
}
.elche-branch-bar__chip:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
}
.elche-branch-bar__label { opacity: 0.85; font-weight: 600; }
.elche-branch-bar__name { font-weight: 900; }
.elche-branch-bar__hours {
    opacity: 0.78; font-weight: 500;
    font-size: 0.72rem; letter-spacing: 0.3px;
}
.elche-branch-bar__chevron { font-size: 0.7rem; opacity: 0.7; }

/* ───────── Hero flyer (1 imagen full-width) ───────── */

.elche-hero-flyer {
    background: var(--cream-100);
    display: block;
}
.elche-hero-flyer__link {
    display: block;
    overflow: hidden;
    text-decoration: none;
}
.elche-hero-flyer img {
    width: 100%; height: auto; display: block;
    max-height: 560px;
    object-fit: cover;
    object-position: center;
    transition: transform 0.4s ease;
}
a.elche-hero-flyer__link:hover img { transform: scale(1.02); }

/* ───────── Hero placeholder (sin imagen — solo texto) ───────── */

.elche-hero {
    background: var(--brand-accent);
    color: #fff;
    padding: 5rem 1.5rem;
    min-height: 380px;
    display: flex; align-items: center;
    border-bottom: var(--border);
}
.elche-hero__inner {
    max-width: 1280px; margin: 0 auto;
    text-align: center; width: 100%;
}
.elche-hero__title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw + 1rem, 4.5rem);
    font-weight: 900; line-height: 0.95; margin: 0 0 1rem;
    letter-spacing: -0.03em;
    text-transform: uppercase;
}
.elche-hero__subtitle {
    font-size: clamp(1rem, 1vw + 0.75rem, 1.4rem);
    opacity: 0.95; margin: 0 0 2rem;
    font-weight: 500;
}

/* ───────── Hero slider (banners rotativos) ───────── */

.elche-hero-slider {
    position: relative;
    overflow: hidden;
    background: var(--cream-100);
    border-bottom: var(--border-thin);
}
.elche-hero-slider__track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}
.elche-hero-slider__slide {
    min-width: 100%;
    display: flex; align-items: center; justify-content: center;
}
.elche-hero-slider__slide img {
    width: 100%; height: auto; display: block;
    max-height: 560px; object-fit: cover; object-position: center;
}
.elche-hero-slider__link { display: block; width: 100%; }

.elche-hero-slider__nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 44px; height: 44px;
    background: var(--ink-900); color: var(--cream-50);
    border: 0; border-radius: 50%;
    font-size: 1.4rem; cursor: pointer;
    display: none; align-items: center; justify-content: center;
    transition: transform 0.15s;
}
.elche-hero-slider__nav:hover { transform: translateY(-50%) scale(1.08); }
.elche-hero-slider__nav--prev { left: 1.25rem; }
.elche-hero-slider__nav--next { right: 1.25rem; }

@media (hover: hover) {
    .elche-hero-slider:hover .elche-hero-slider__nav { display: flex; }
}

.elche-hero-slider__dots {
    position: absolute; bottom: 1.25rem; left: 50%; transform: translateX(-50%);
    display: flex; gap: 0.5rem;
    padding: 0.4rem 0.7rem;
    background: rgba(31, 20, 16, 0.55);
    border-radius: 999px;
    backdrop-filter: blur(4px);
}
.elche-hero-slider__dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.45);
    border: 0;
    cursor: pointer; padding: 0;
    transition: all 0.2s;
}
.elche-hero-slider__dot.is-active {
    background: #fff; width: 22px; border-radius: 4px;
}

/* ───────── Buttons (estilo "stamp" vintage) ───────── */

.elche-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    padding: 0.85rem 1.65rem; border-radius: var(--radius-xs);
    font-family: var(--font-body);
    font-weight: 700; font-size: 0.92rem;
    letter-spacing: 0.04em; text-transform: uppercase;
    border: var(--border); cursor: pointer; transition: all 0.15s;
    text-decoration: none;
    background: #fff; color: var(--ink-900);
    box-shadow: var(--shadow);
}
.elche-btn:hover { transform: translate(0, -2px); box-shadow: 0 6px 0 0 var(--ink-900); }
.elche-btn:active { transform: translate(0, 1px); box-shadow: 0 1px 0 0 var(--ink-900); }

.elche-btn--accent  { background: var(--brand-accent); color: #fff; }
.elche-btn--brand   { background: var(--brand); color: #fff; }
.elche-btn--success { background: var(--success); color: #fff; }
.elche-btn--ghost   { background: var(--cream-50); color: var(--ink-900); }

.elche-btn--lg { padding: 1.1rem 2.2rem; font-size: 1.05rem; }
.elche-btn--sm { padding: 0.5rem 1rem; font-size: 0.8rem; }

/* ───────── Branch modal ───────── */

.elche-saas-branch-modal {
    position: fixed; inset: 0; z-index: 9999;
    display: none; align-items: flex-start; justify-content: center;
    padding: 4rem 1rem 2rem;
    overflow-y: auto;
}
.elche-saas-branch-modal.is-open { display: flex; }
.elche-saas-branch-modal__backdrop {
    position: fixed; inset: 0;
    background: rgba(31, 20, 16, 0.65);
    backdrop-filter: blur(4px);
    cursor: pointer;
}
.elche-saas-branch-modal__panel {
    position: relative;
    background: var(--cream-50);
    border: var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    width: 100%; max-width: 460px;
    padding: 1.75rem;
    z-index: 1;
}
.elche-saas-branch-modal__header { position: relative; margin-bottom: 1.5rem; }
.elche-saas-branch-modal__title {
    font-family: var(--font-display);
    font-size: 1.75rem; font-weight: 900; margin: 0 0 0.35rem;
    color: var(--ink-900);
    letter-spacing: -0.02em;
}
.elche-saas-branch-modal__subtitle {
    color: var(--gray-500); margin: 0; font-size: 0.95rem;
    font-weight: 500;
}
.elche-saas-branch-modal__close {
    position: absolute; top: -0.5rem; right: -0.5rem;
    background: none; border: 0;
    width: 36px; height: 36px;
    font-size: 1.6rem; color: var(--gray-500);
    border-radius: 50%; cursor: pointer;
}
.elche-saas-branch-modal__close:hover { background: var(--cream-100); color: var(--ink-900); }
.elche-saas-branch-modal__list {
    list-style: none; margin: 0; padding: 0;
    display: flex; flex-direction: column; gap: 0.6rem;
}
.elche-saas-branch-modal__option {
    width: 100%;
    background: #fff;
    border: 1.5px solid var(--cream-200);
    border-radius: var(--radius-sm);
    padding: 0.95rem 1rem;
    display: flex; align-items: center; gap: 0.85rem;
    text-align: left; cursor: pointer;
    transition: all 0.15s;
    font-family: var(--font-body);
}
.elche-saas-branch-modal__option:hover {
    border-color: var(--brand-accent);
    background: var(--accent-light);
    transform: translateX(2px);
}
.elche-saas-branch-modal__option-icon { font-size: 1.3rem; }
.elche-saas-branch-modal__option-body { flex: 1; display: flex; flex-direction: column; gap: 0.1rem; }
.elche-saas-branch-modal__option-name {
    font-size: 1rem; font-weight: 800; color: var(--ink-900);
    font-family: var(--font-display);
}
.elche-saas-branch-modal__option-address,
.elche-saas-branch-modal__option-hours {
    color: var(--gray-500); font-size: 0.85rem; font-weight: 500;
}
.elche-saas-branch-modal__option-arrow {
    color: var(--brand-accent); font-size: 1.4rem; font-weight: 900;
}

/* ───────── Sections genéricas ───────── */

.elche-section { padding: 4rem 1.5rem; }
.elche-section:nth-child(even) { background: var(--cream-100); }
.elche-section__inner { max-width: 1280px; margin: 0 auto; }
.elche-section__header {
    display: flex; align-items: baseline; justify-content: space-between;
    margin-bottom: 2rem; gap: 1rem;
}
.elche-section__title {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 2vw + 1rem, 2.5rem);
    font-weight: 900; color: var(--ink-900); margin: 0;
    letter-spacing: -0.02em;
}
.elche-section__link {
    color: var(--brand-accent); font-weight: 700;
    text-transform: uppercase; font-size: 0.85rem; letter-spacing: 0.08em;
}

/* ───────── Sección Menú (título + SPA) ───────── */

.elche-menu-section {
    padding: 3rem 1.5rem;
    background: var(--cream-50);
    border-top: var(--border-thin);
}
.elche-menu-section__header {
    margin-bottom: 1.5rem;
    /* Línea ornamental tipo cartelería vintage */
    position: relative;
    padding-bottom: 1rem;
    border-bottom: 3px double var(--brand-accent);
}
.elche-menu-section__title {
    font-family: var(--font-display);
    font-size: clamp(2.25rem, 4vw + 1rem, 3.75rem);
    font-weight: 900; color: var(--brand-accent);
    margin: 0; line-height: 0.95;
    letter-spacing: -0.03em;
    text-transform: uppercase;
}
.elche-menu-section__subtitle {
    font-size: 1.1rem; color: var(--brand);
    margin: 0.4rem 0 0; font-weight: 600;
    font-style: italic;
}
.elche-menu-section__spa { min-height: 200px; }
.elche-menu-section__fallback { color: var(--gray-500); }

/* ───────── Products grid (archive WC) ───────── */

.elche-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
}
.elche-product-card {
    background: #fff; border: 1.5px solid var(--cream-200);
    border-radius: var(--radius-sm); overflow: hidden;
    transition: all 0.15s;
}
.elche-product-card:hover {
    border-color: var(--brand-accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}
.elche-product-card__img {
    display: block; aspect-ratio: 1 / 1; overflow: hidden;
    background: var(--accent-light);
}
.elche-product-card__img img { width: 100%; height: 100%; object-fit: cover; }
.elche-product-card__placeholder {
    display: flex; align-items: center; justify-content: center;
    height: 100%; font-size: 3.5rem;
}
.elche-product-card__body { padding: 1rem; }
.elche-product-card__title {
    font-family: var(--font-display);
    font-size: 1.05rem; font-weight: 800;
    margin: 0 0 0.4rem; line-height: 1.15;
}
.elche-product-card__title a { color: var(--ink-900); }
.elche-product-card__price {
    display: block; color: var(--brand-accent); font-weight: 800;
    font-size: 1.15rem; margin-bottom: 0.75rem;
}
.elche-product-card .button {
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--ink-900); color: #fff !important;
    padding: 0.55rem 1rem; border-radius: var(--radius-xs);
    font-size: 0.78rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.05em;
    border: 0;
    text-decoration: none; transition: 0.15s;
}
.elche-product-card .button:hover { background: var(--brand-accent); }

/* ───────── Branches grid ───────── */

.elche-branches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}
.elche-branch-card {
    background: #fff;
    border: 1.5px solid var(--cream-200);
    border-radius: var(--radius-sm);
    padding: 1.5rem;
    transition: 0.15s;
}
.elche-branch-card:hover {
    border-color: var(--brand-accent);
    box-shadow: var(--shadow);
}
.elche-branch-card__name {
    font-family: var(--font-display);
    font-size: 1.2rem; font-weight: 900;
    margin: 0 0 0.5rem; color: var(--ink-900);
}
.elche-branch-card__address,
.elche-branch-card__phone,
.elche-branch-card__hours {
    margin: 0.25rem 0; color: var(--gray-500); font-size: 0.92rem;
}
.elche-branch-card__map { margin-top: 1rem; }

/* ───────── About ───────── */

.elche-about__grid {
    display: grid; gap: 2.5rem;
    grid-template-columns: 1fr 1fr; align-items: center;
}
.elche-about__image img {
    width: 100%;
    border: var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* ───────── Contact ───────── */

.elche-contact { background: var(--ink-900) !important; color: #fff; }
.elche-contact__inner { text-align: center; padding: 2rem 0; }
.elche-contact__title { color: #fff; }
.elche-contact__text {
    font-size: 1.1rem; opacity: 0.92; margin: 1rem 0 2rem;
    font-style: italic;
}
.elche-contact__ctas {
    display: inline-flex; gap: 1rem; flex-wrap: wrap; justify-content: center;
}

/* ───────── Footer ───────── */

.elche-footer {
    background: var(--ink-900); color: var(--cream-50);
    padding: 3rem 1.5rem 1.5rem;
    border-top: 4px solid var(--brand-accent);
}
.elche-footer__inner {
    max-width: 1280px; margin: 0 auto;
    display: grid; gap: 2rem;
    grid-template-columns: 2fr 1fr 1fr;
}
.elche-footer__heading {
    font-family: var(--font-display);
    font-size: 1.05rem; font-weight: 900;
    margin: 0 0 0.75rem; color: var(--brand-accent);
    text-transform: uppercase; letter-spacing: 0.04em;
}
.elche-footer__tagline { opacity: 0.7; margin: 0; font-style: italic; }
.elche-footer__list { list-style: none; margin: 0; padding: 0; }
.elche-footer__list li { margin: 0.3rem 0; opacity: 0.88; }
.elche-footer__list a { color: var(--cream-50); }
.elche-footer__list a:hover { color: var(--brand-accent); }
.elche-footer__social {
    list-style: none; margin: 0; padding: 0;
    display: flex; gap: 0.6rem;
}
.elche-footer__social a {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px;
    background: rgba(255, 251, 245, 0.06);
    border: 1px solid rgba(255, 251, 245, 0.18);
    border-radius: 50%;
    color: var(--cream-50); transition: 0.15s;
}
.elche-footer__social a:hover {
    background: var(--brand-accent);
    border-color: var(--brand-accent);
    color: #fff;
}
.elche-footer__bottom {
    max-width: 1280px; margin: 2rem auto 0;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 251, 245, 0.12);
    display: flex; justify-content: space-between; flex-wrap: wrap;
    font-size: 0.85rem; opacity: 0.7;
}
.elche-footer__powered a {
    color: var(--cream-50); border-bottom: 1px dotted rgba(255, 251, 245, 0.5);
}

/* ───────── Pages (page.php + page templates) ───────── */

.elche-page { padding: 2rem 1.5rem 4rem; background: var(--cream-50); }
.elche-page__inner { max-width: 880px; margin: 0 auto; }
.elche-page__inner--wide { max-width: 1280px; }
.elche-page__header { margin: 1rem 0 2rem; }
.elche-page__header--center { text-align: center; }
.elche-page__title {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 2vw + 1rem, 2.75rem);
    font-weight: 900; color: var(--ink-900); margin: 0;
    letter-spacing: -0.02em;
}
.elche-page__content { font-size: 1rem; line-height: 1.65; color: var(--ink-700); }
.elche-page__content h2,
.elche-page__content h3 { color: var(--ink-900); font-family: var(--font-display); }
.elche-page__content a { color: var(--brand-accent); }

.elche-page--checkout .elche-page__inner { max-width: 1080px; }
.elche-page--checkout .woocommerce { margin-top: 1rem; }
.elche-page--menu .elche-page__inner { padding: 0 0.5rem; }

/* ───────── Responsive ───────── */

@media (max-width: 900px) {
    .elche-about__grid { grid-template-columns: 1fr; }
    .elche-footer__inner { grid-template-columns: 1fr; }
    .elche-footer__bottom { justify-content: center; text-align: center; gap: 0.5rem; }
}

@media (max-width: 720px) {
    .elche-header__nav { display: none; }
    .elche-header__mobile-toggle { display: block; }
    .elche-section { padding: 2.5rem 1rem; }
    .elche-menu-section { padding: 2rem 1rem; }
    .elche-hero { padding: 3rem 1rem; min-height: 320px; }
    .elche-section__header { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
    .elche-branch-bar__chip {
        font-size: 0.72rem; padding: 0.4rem 0.85rem;
    }
    .elche-branch-bar__hours { display: none; }
}
