/* Colores de la marca (rediseño A). Las variables se usan en todo este archivo. */
:root {
    --zx-purple: #854694;      /* principal: botones, enlaces, foco (6,4:1 sobre blanco) */
    --zx-purple-dark: #6d3879; /* hover */
    --zx-purple-50: #f6f0f8;
    --zx-purple-100: #ece3ef;
    --zx-orange: #F28E20;      /* solo acento: no usar con texto blanco encima (contraste 2,4:1) */
    --zx-orange-50: #fff4e5;
    --zx-orange-text: #8a4b00;
    --zx-text: #2b2b2b;
    --zx-muted: #666;
    --zx-border: #e7e2ea;
    --zx-field-border: #cfc6d3;
    --zx-bg: #f7f6f8;
    --zx-radius: 10px;
    --zx-radius-sm: 6px;
    --zx-focus: 0 0 0 3px rgba(133, 70, 148, .18);
    --zx-shadow: 0 1px 2px rgba(40, 20, 50, .06), 0 4px 16px rgba(40, 20, 50, .05);
}
body {
    background-color: var(--zx-bg) !important;
    color: var(--zx-text) !important; /* Asegurar un buen contraste con el fondo */
}
.cart-detailed-totals #cart-subtotal-shipping {
    display: none !important; 
}

.modal-overlay {
    position: fixed;
    z-index: 9999;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.8); /* Fondo oscuro */
    display: flex; align-items: center; justify-content: center;
	padding: 20px;
}
.modal-content-j {
    position: relative;
    max-width: 500px; /* Ancho de tu imagen */
    width: 100%;
	max-height: 90vh; /* No permite que sea más alto que el 90% de la pantalla */
    background: white; /* Por si la imagen tarda en cargar */
    line-height: 0;
}
.close-modal {
    position: absolute;
    right: 10px; top: 10px;
    color: white; font-size: 24px;
	font-weight: bold;
    cursor: pointer;
    background: rgba(0,0,0,0.5); /* Círculo oscuro de fondo para que se vea */
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    z-index: 10000;
    transition: background 0.3s;
}

/* ===== Alumnos (módulo ziemax_alumnos): Mi cuenta y home ===== */
.ziemax-schools__note,
.ziemax-schools__count { color: #555; font-size: .9rem; }
.ziemax-school-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}
.ziemax-school-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}
.ziemax-school-card__name { font-size: 1.1rem; margin: 0; }
.ziemax-school-card__meta { color: #666; margin: 2px 0 0; font-size: .85rem; }
.ziemax-school-card__remove,
.ziemax-student__remove { color: #b3261e; padding: 0; }
.ziemax-school-card__books { margin-top: 12px; }
.ziemax-school-card__books summary,
.ziemax-student__edit summary { cursor: pointer; color: #854694; }
.ziemax-school-card__grade { color: #666; font-size: .85rem; margin-left: 6px; }
.ziemax-school-card__nobooks { color: #666; margin: 12px 0 0; }
/* "Ver todos los libros del colegio": desplegable con los libros agrupados por curso */
.ziemax-school-card__books {
    margin-top: 16px;
    padding-top: 8px;
    border-top: 1px solid #f0f0f0;
}
.ziemax-school-card__books > summary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    list-style: none;
    color: var(--zx-purple);
    font-weight: 600;
}
.ziemax-school-card__books > summary::-webkit-details-marker { display: none; }
.ziemax-school-card__books > summary:hover span:first-of-type { text-decoration: underline; }
.ziemax-school-card__books-count {
    min-width: 22px;
    padding: 0 8px;
    background: var(--zx-purple-50);
    border-radius: 999px;
    font-size: .75rem;
    line-height: 20px;
    text-align: center;
}
.ziemax-school-card__chevron { margin-left: auto; color: var(--zx-muted); transition: transform .2s; }
.ziemax-school-card__books[open] .ziemax-school-card__chevron { transform: rotate(180deg); }
.ziemax-courses {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
    margin: 8px 0 4px;
}
.ziemax-course {
    padding: 12px;
    background: #fff;
    border: 1px solid var(--zx-border);
    border-radius: 8px;
}
/* Curso de alguno de sus alumnos */
.ziemax-course--mine { background: #faf7fb; border-color: #e6d9ea; }
.ziemax-course__title {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 8px;
    margin: 0 0 10px;
    font-size: .95rem;
    font-weight: 700;
    text-transform: none;
    color: var(--zx-text);
}
.ziemax-course__students { font-size: .8rem; font-weight: 600; color: var(--zx-purple); }
.ziemax-course__students::before { content: "· "; color: var(--zx-muted); }
.ziemax-course__books { display: flex; flex-direction: column; gap: 8px; }
.ziemax-course .ziemax-book { max-width: none; background: #fff; }
/* theme.css convierte todos los li en grilla de una columna; aquí se necesitan en fila */
.ziemax-student-list { list-style: none; padding: 0; margin: 12px 0; }
/* Fila de alumno: nombre y acciones a la izquierda, libros de su curso a la derecha, edición debajo */
.ziemax-student-list li.ziemax-student {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, auto);
    gap: 8px 24px;
    align-items: center;
    padding: 12px 0;
    border-top: 1px solid #f0f0f0;
}
.ziemax-student-list li.ziemax-student--empty { display: block; color: #888; }
.ziemax-student__info span { color: #666; margin-left: 6px; }
.ziemax-student__actions {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
    font-size: .85rem;
    color: #bbb;
}
.ziemax-student__actions form { margin: 0; }
.ziemax-student__actions .btn-link {
    padding: 0;
    border: 0;
    font-size: .85rem;
    text-transform: none;
    vertical-align: baseline;
}
.ziemax-student__edit-toggle { color: #854694; }
.ziemax-student__books {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}
.ziemax-book {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 260px;
    padding: 4px 10px 4px 4px;
    background: #faf7fb;
    border: 1px solid #ece3ef;
    border-radius: 6px;
    color: #333;
    text-decoration: none;
}
.ziemax-book:hover,
.ziemax-book:focus { border-color: #854694; color: #333; text-decoration: none; }
.ziemax-book img,
.ziemax-book__noimg {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    object-fit: contain;
    background: #fff;
    border-radius: 4px;
}
.ziemax-book__noimg {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b9a6c0;
    font-size: 24px;
}
.ziemax-book__name { font-size: .85rem; font-weight: 600; line-height: 1.3; }
.ziemax-student__books-none { color: #888; font-size: .85rem; }
.ziemax-student__edit { grid-column: 1 / -1; }
@media (max-width: 575px) {
    .ziemax-student-list li.ziemax-student { grid-template-columns: 1fr; }
    .ziemax-student__books { justify-content: flex-start; }
}
.ziemax-student--empty { color: #888; }
.ziemax-badge {
    display: inline-block;
    background: #fff4e5;
    color: #8a4b00 !important;
    border-radius: 10px;
    padding: 0 8px;
    font-size: .75rem;
}
.ziemax-student-add summary { display: inline-block; list-style: none; }
.ziemax-student-add summary::-webkit-details-marker { display: none; }
.ziemax-student-form {
    margin-top: 12px;
    padding: 16px;
    background: #faf7fb;
    border: 1px solid #ece3ef;
    border-radius: 8px;
}
.ziemax-student-form__fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px 16px;
    margin-bottom: 12px;
}
.ziemax-student-form__fields .form-group { margin: 0; min-width: 0; }
/* El tema alinea las etiquetas a la derecha y no usa border-box: el relleno sumado al 100 % de ancho
   metía cada campo en la columna vecina */
.ziemax-student-form__fields *,
.ziemax-school-panel * { box-sizing: border-box; }
.ziemax-student-form__fields label {
    text-align: left;
    display: block;
    margin-bottom: 4px;
    font-size: .85rem;
    font-weight: 600;
    color: #444;
}
/* Mismo alto y estilo para inputs y selects (Mi cuenta y panel de envío a colegio) */
.ziemax-student-form__fields .form-control,
.ziemax-school-panel .form-control {
    width: 100%;
    max-width: 100%;
    margin: 0;
    height: 42px;
    padding: 8px 12px;
    font-size: .95rem;
    line-height: 1.4;
    color: #333;
    background-color: #fff;
    border: 1px solid #cfc6d3;
    border-radius: 6px;
    box-shadow: none;
}
.ziemax-student-form__fields select.form-control,
.ziemax-school-panel select.form-control { padding-right: 32px; }
.ziemax-student-form__fields .form-control:focus,
.ziemax-school-panel .form-control:focus {
    border-color: #854694;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(133, 70, 148, .15);
}
.ziemax-student-form__fields .form-control::placeholder,
.ziemax-school-panel .form-control::placeholder { color: #9a9a9a; }
.ziemax-student-form .btn-primary { border-radius: 6px; }
.ziemax-student-form__help { color: #777; font-size: .8rem; margin: 8px 0 0; }

.ziemax-home-invite,
.ziemax-student-picker {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 12px 16px;
    margin: 0 0 20px;
}
.ziemax-student-picker__label { font-weight: 600; margin-right: 4px; }
.ziemax-chip {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    border: 1px solid #854694;
    color: #854694;
    border-radius: 999px;
    padding: 4px 12px;
    text-decoration: none;
}
.ziemax-chip small { color: inherit; opacity: .8; }
.ziemax-chip:hover,
.ziemax-chip:focus { background: #f3ebf5; color: #854694; text-decoration: none; }
.ziemax-chip.is-current { background: #854694; color: #fff; }
.ziemax-student-picker__manage { margin-left: auto; font-size: .85rem; }
.ziemax-group-subtitle { margin: -8px 0 16px; color: #555; }

/* Fase 2: panel del envío a colegio (checkout/_partials/ziemax-school-panel.tpl). El recuadro es el de
   siempre; adentro: colegio, pasos numerados y una fila por libro (o alumno) con su campo a la derecha. */
.ziemax-school-panel {
    background: #faf7fb;
    border: 1px solid #e6d9ea;
    border-radius: 8px;
    padding: 16px;
    margin: 8px 15px 16px;
}
/* custom.js oculta filas con [hidden]; sin esto el display:grid de abajo las dejaría visibles */
.ziemax-school-panel [hidden] { display: none !important; }
.ziemax-school-panel__school {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 18px;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid #e6d9ea;
    border-radius: 8px;
    color: var(--zx-text);
}
.ziemax-school-panel__school > .material-icons {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    background: var(--zx-purple);
    border-radius: 50%;
    color: #fff;
    font-size: 22px;
}
.ziemax-school-panel__school small { display: block; color: var(--zx-muted); font-size: .8rem; }
.ziemax-school-panel__school strong { display: block; font-size: 1rem; line-height: 1.3; }
.ziemax-school-panel__section + .ziemax-school-panel__section {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid #ece3ef;
}
.ziemax-school-panel__title {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    align-items: center;
    gap: 2px 10px;
    margin: 0 0 8px;
    font-size: 1rem;
    font-weight: 700;
    text-transform: none;
    color: var(--zx-text);
}
.ziemax-school-panel__title small { grid-column: 2; color: var(--zx-muted); font-size: .8rem; font-weight: 500; }
.ziemax-school-panel__step {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    background: var(--zx-purple);
    border-radius: 50%;
    color: #fff;
    font-size: .8rem;
    font-weight: 800;
}
.ziemax-school-panel__units { list-style: none; margin: 0; padding: 0; }
/* Fila: libro (o alumno) a la izquierda y su campo a la derecha */
.ziemax-school-panel .ziemax-school-panel__unit {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(200px, 300px);
    gap: 6px 16px;
    align-items: center;
    margin: 0;
    padding: 10px 0;
    border-bottom: 1px solid #ece3ef;
}
.ziemax-school-panel .ziemax-school-panel__unit:last-child { border-bottom: 0; }
.ziemax-school-panel__unit label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    text-align: left;
    font-weight: 600;
    color: var(--zx-text);
}
.ziemax-school-panel__unit label .material-icons { color: var(--zx-purple); font-size: 20px; }
.ziemax-school-panel__unit label small { display: block; color: var(--zx-muted); font-weight: 500; }
.ziemax-school-panel fieldset { margin-top: 16px; padding: 14px; background: #fff; border: 1px solid #ece3ef; border-radius: 8px; }
.ziemax-school-panel legend { width: auto; margin: 0; padding: 0 6px; border: 0; font-size: .95rem; font-weight: 700; }
.ziemax-school-panel__help {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 12px 0 0;
    color: var(--zx-muted);
    font-size: .8rem;
}
.ziemax-school-panel__help .material-icons { font-size: 16px; color: var(--zx-purple); }
@media (max-width: 575px) {
    .ziemax-school-panel .ziemax-school-panel__unit { grid-template-columns: 1fr; }
}
/* Colegio de entrega en el detalle del pedido (Mi cuenta) */
.ziemax-order-school__name {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 16px;
    padding: 10px 12px;
    background: #fff;
    border: 1px solid #e6d9ea;
    border-left: 4px solid #854694;
    border-radius: 6px;
    color: #333;
}
.ziemax-order-school__name .material-icons { color: #854694; }
.ziemax-order-school__name small { display: block; color: #777; }
.ziemax-order-school__help { color: #666; font-size: .85rem; margin: 0; }
/* theme.css pone todos los li en grilla "max-content": la línea del carro tomaba el ancho de su contenido
   y, con la fila "Para:", se salía de la tarjeta. Aquí vuelven a ocupar el ancho de la tarjeta (como classic). */
.cart-overview .cart-items > li.cart-item { display: block; }
.ziemax-line-extra { padding-top: 8px; }
.ziemax-assign {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 16px;
}
.ziemax-assign__unit {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-weight: normal;
}
/* form-control-sm del tema deja poca altura para el padding y el texto se cortaba */
.ziemax-assign__unit select.form-control {
    width: auto;
    min-width: 220px;
    max-width: 100%;
    height: auto;
    min-height: 34px;
    padding: 4px 28px 4px 10px;
    line-height: 1.4;
    font-size: .9rem;
    color: #333;
}
.ziemax-assign__status { color: #666; font-size: .8rem; }

/* =====================================================================================================
   Rediseño A · etapa 1: colores, botones, formularios, header y footer.
   Solo apariencia: los textos, enlaces y datos siguen saliendo del back office (Lista de enlaces,
   Parámetros de la tienda > Contacto, configuración de blockreassurance). Reemplaza el celeste #24b9d7
   de classic (theme.css) por el morado de la marca.
   ===================================================================================================== */

/* ---------- Base ---------- */
#wrapper { background: var(--zx-bg); }
a { color: var(--zx-purple); }
a:hover,
a:focus { color: var(--zx-purple-dark); }
.text-primary { color: var(--zx-purple) !important; }
.bg-primary,
.tag-primary { background-color: var(--zx-purple) !important; }
.btn:focus-visible,
a:focus-visible,
[role="link"]:focus-visible { outline: 2px solid var(--zx-purple); outline-offset: 2px; }

/* ---------- Botones ---------- */
.btn { border-radius: var(--zx-radius-sm); }
.btn-primary,
.btn-secondary { font-weight: 700; text-transform: none; }
.btn-primary,
.btn-primary:focus,
.btn-primary.focus { color: #fff; background-color: var(--zx-purple); border-color: transparent; }
.btn-primary:hover,
.btn-primary:active,
.btn-primary.active { color: #fff; background-color: var(--zx-purple-dark); border-color: transparent; }
.btn-primary.disabled,
.btn-primary:disabled,
.btn-primary.disabled:hover,
.btn-primary:disabled:hover,
.btn-primary.disabled:focus,
.btn-primary:disabled:focus { background-color: var(--zx-purple); opacity: .55; }
.btn-secondary,
.btn-secondary:focus,
.btn-secondary.focus { color: var(--zx-purple); background-color: #fff; border-color: var(--zx-purple); }
.btn-secondary:hover,
.btn-secondary:active { color: var(--zx-purple-dark); background-color: var(--zx-purple-50); border-color: var(--zx-purple); }
.btn-outline-primary { color: var(--zx-purple); border-color: var(--zx-purple); }
.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary.active,
.btn-outline-primary:active { color: #fff; background-color: var(--zx-purple); border-color: var(--zx-purple); }
.btn-link { color: var(--zx-purple); }

/* ---------- Formularios ---------- */
.form-control {
    color: var(--zx-text);
    background-color: #fff;
    border: 1px solid var(--zx-field-border);
    border-radius: var(--zx-radius-sm);
}
.form-control:focus,
.product-customization .product-message:focus {
    color: var(--zx-text);
    border-color: var(--zx-purple);
    outline: 0;
    box-shadow: var(--zx-focus);
}
.input-group.focus { outline: 0; box-shadow: var(--zx-focus); border-radius: var(--zx-radius-sm); }
/* Campo con botón pegado (contraseña con "Mostrar"): solo las esquinas de afuera van redondeadas */
.input-group .form-control:not(:last-child) { border-radius: var(--zx-radius-sm) 0 0 var(--zx-radius-sm); }
.input-group .input-group-btn > .btn { border-radius: 0 var(--zx-radius-sm) var(--zx-radius-sm) 0; }
/* Botón "Mostrar" de la contraseña (gris oscuro en classic) */
.input-group .input-group-btn > .btn[data-action="show-password"] {
    color: var(--zx-purple);
    background: var(--zx-purple-50);
    border: 1px solid var(--zx-field-border);
    border-left: 0;
    font-weight: 600;
    text-transform: none;
}
.input-group .input-group-btn > .btn[data-action="show-password"]:hover { background: var(--zx-purple-100); }
.custom-radio input[type="radio"]:checked + span { background-color: var(--zx-purple); }
.custom-radio input[type="radio"]:focus + span,
.custom-checkbox input[type="checkbox"]:focus + span { border-color: var(--zx-purple); }

/* ---------- Otros celestes de classic ---------- */
.product-price,
#blockcart-modal .product-name { color: var(--zx-text); }
.page-item.active .page-link,
.page-item.active .page-link:focus,
.page-item.active .page-link:hover { background-color: var(--zx-purple); border-color: var(--zx-purple); }
.page-link,
.pagination .current a,
.block-promo .promo-code-button.cancel-promo,
.tabs .nav-tabs .nav-link.active,
.dropdown-item:focus,
.dropdown-item:hover { color: var(--zx-purple); }
.tabs .nav-tabs .nav-link.active,
.tabs .nav-tabs .nav-link:hover { border-bottom-color: var(--zx-purple); }
.block-promo .promo-input + button { border-color: var(--zx-purple); }
body#checkout section.checkout-step .address-item.selected { border-color: var(--zx-purple); }
.product-images > li.thumb-container .thumb.selected,
.product-images > li.thumb-container .thumb:hover { border-color: var(--zx-purple); }
.account-list a:hover,
.footer-container li a:hover { color: var(--zx-purple); }

/* ---------- Banner del home (ps_banner) ---------- */
#content-wrapper .banner { border-radius: var(--zx-radius); overflow: hidden; box-shadow: var(--zx-shadow); }
#content-wrapper .banner img { width: 100%; height: auto; }

/* ---------- Header ---------- */
#header {
    color: var(--zx-muted);
    box-shadow: none;
    border-bottom: 1px solid var(--zx-border);
}
#header a:hover { color: var(--zx-purple); }
#header .header-nav { max-height: none; border-bottom: 1px solid var(--zx-border); }
@media (min-width: 768px) {
    body:not(#checkout) #header .header-nav .container > .row > .hidden-sm-down {
        display: flex;
        align-items: center;
        min-height: 52px;
    }
    body:not(#checkout) #header .header-nav .container > .row > .hidden-sm-down > [class*="col-"] { float: none; }
    /* Checkout (checkout/_partials/header.tpl de classic): logo a la izquierda y "Llámenos" a la derecha */
    body#checkout #header .header-nav .container > .row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-height: 72px;
    }
    body#checkout #header .header-nav .container > .row::before,
    body#checkout #header .header-nav .container > .row::after { display: none; }
    body#checkout #header .header-nav .container > .row > [class*="col-"] { float: none; width: auto; }
    body#checkout #header #_desktop_logo .logo { height: 48px; }
}
#header .header-nav #_desktop_contact_link #contact-link { margin-top: 0; font-size: .875rem; color: var(--zx-muted); }
#contact-link a { color: var(--zx-text); font-weight: 600; }
#header .header-nav .right-nav { align-items: center; gap: 6px; }
/* flex: los enlaces con y sin ícono quedaban a distinta altura */
#header .header-nav .user-info { display: flex; align-items: center; gap: 2px; margin: 0; }
#header .header-nav .user-info a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: var(--zx-radius-sm);
    color: var(--zx-text);
    font-weight: 500;
}
#header .header-nav .user-info a:hover { background: var(--zx-purple-50); color: var(--zx-purple); }
#header .header-nav .user-info .account { margin-left: 0; }
#header .header-nav .user-info .material-icons { font-size: 20px; }

/* Menú de cuenta (sesión iniciada): botón "Hola, <nombre>" + lista desplegable (ps_customersignin.tpl) */
#header .header-nav .ziemax-account { position: relative; }
#header .header-nav .ziemax-account__toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 6px 6px 10px;
    border-radius: var(--zx-radius-sm);
    color: var(--zx-text);
    font-weight: 600;
    cursor: pointer;
}
#header .header-nav .ziemax-account__toggle:hover,
#header .header-nav .ziemax-account.open .ziemax-account__toggle { background: var(--zx-purple-50); color: var(--zx-purple); }
#header .header-nav .ziemax-account__toggle:focus { outline: 0; }
#header .header-nav .ziemax-account__toggle:focus-visible { box-shadow: var(--zx-focus); }
#header .header-nav .ziemax-account__toggle .ziemax-account__chevron { font-size: 18px; color: var(--zx-muted); transition: transform .15s ease; }
#header .header-nav .ziemax-account.open .ziemax-account__chevron { transform: rotate(180deg); color: var(--zx-purple); }
#header .header-nav .ziemax-account__menu {
    min-width: 230px;
    margin-top: 6px;
    padding: 6px;
    border: 1px solid var(--zx-border);
    border-radius: var(--zx-radius);
    box-shadow: 0 10px 30px rgba(40, 20, 50, .14);
    z-index: 1050;
    text-align: left;
    white-space: normal;
}
#header .header-nav .ziemax-account__menu li { display: block; }
#header .header-nav .ziemax-account__who {
    padding: 6px 10px 8px;
    color: var(--zx-muted);
    font-size: .8125rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
#header .header-nav .user-info .ziemax-account__menu .dropdown-item {
    display: flex;
    gap: 10px;
    width: 100%;
    padding: 8px 10px;
    color: var(--zx-text);
    font-size: .9375rem;
    font-weight: 500;
}
#header .header-nav .user-info .ziemax-account__menu .dropdown-item .material-icons { color: var(--zx-purple); }
#header .header-nav .user-info .ziemax-account__menu .dropdown-item:hover,
#header .header-nav .user-info .ziemax-account__menu .dropdown-item:focus { background: var(--zx-purple-50); color: var(--zx-purple); outline: 0; }
#header .header-nav .ziemax-account__menu .dropdown-divider { margin: 6px 0; background: var(--zx-border); }
#header .header-nav .user-info .ziemax-account__menu .ziemax-account__logout,
#header .header-nav .user-info .ziemax-account__menu .ziemax-account__logout .material-icons { color: var(--zx-muted); }

/* Carrito: misma forma que "Iniciar sesión", en morado, con el número en un recuadro */
#header .header-nav .blockcart,
#header .header-nav .cart-preview.active {
    height: auto;
    padding: 0;
    margin: 0 0 0 6px;
    background: var(--zx-purple);
    border-radius: var(--zx-radius-sm);
}
#header .header-nav .blockcart.active:hover { background: var(--zx-purple-dark); }
#header .header-nav .blockcart .header { margin: 0; }
#header .header-nav .blockcart.inactive .header,
#header .header-nav .blockcart.active .header > a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    color: #fff;
    font-weight: 700;
}
#header .header-nav .blockcart a,
#header .header-nav .blockcart a:hover,
#header .header-nav .blockcart.active a:hover,
#header .header-nav .cart-preview .shopping-cart { color: #fff; text-decoration: none; }
#header .header-nav .cart-preview .shopping-cart { font-size: 20px; }
#header .header-nav .blockcart .cart-products-count {
    display: inline-grid;
    place-items: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    background: #fff;
    color: var(--zx-purple);
    border-radius: 4px;
    font-size: 12px;
    line-height: 1;
}

/* Logo: más visible (classic lo deja en una columna de 2/12) */
#header .header-top { padding: 16px 0; }
#header #_desktop_logo { flex: 0 0 auto; width: auto; max-width: none; }
#header #_desktop_logo .logo { height: 52px; width: auto; max-width: none; }

/* Móvil: el logo va en la franja superior (classic); la franja del logo de escritorio queda vacía */
@media (max-width: 767px) {
    #header .header-top { padding: 0; }
    #header .header-nav .mobile #_mobile_cart .blockcart { margin: 8px 12px 0 2px; }
    #header .header-nav .mobile #_mobile_user_info .user-info { margin-top: 8px; }
    #header .header-nav .mobile #_mobile_user_info .user-info a { padding: 6px; }
    #header .header-nav .mobile #_mobile_user_info .ziemax-account__toggle { padding: 6px; gap: 0; }
    /* checkout: classic deja el logo hasta 70 px de alto y tapaba los íconos */
    body#checkout #header .header-nav .top-logo .logo { max-height: 2rem; }
}

/* ---------- Ventana "Producto añadido al carrito" (modules/ps_shoppingcart/modal.tpl) ---------- */
#blockcart-modal .modal-dialog { max-width: 920px; }
#blockcart-modal .modal-content { border: 0; border-radius: var(--zx-radius); overflow: hidden; box-shadow: 0 10px 40px rgba(40, 20, 50, .2); }
#blockcart-modal .modal-header { padding: 14px 20px; border-bottom: 1px solid var(--zx-border); }
#blockcart-modal .modal-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 600;
    color: var(--zx-text);
}
#blockcart-modal .modal-title i.material-icons { margin-right: 0; color: #1e6b34; }
#blockcart-modal .divide-right { border-right-color: var(--zx-border); }
#blockcart-modal .product-name { color: var(--zx-text); font-weight: 700; text-transform: none; }
#blockcart-modal .product-price { color: var(--zx-muted); }
#blockcart-modal .cart-content p.cart-products-count { color: var(--zx-purple); font-weight: 600; }
#blockcart-modal .cart-content p.product-total { background: var(--zx-purple-50); border-radius: var(--zx-radius-sm); }
/* Botones del mismo alto, uno al lado del otro y a todo el ancho de la columna */
#blockcart-modal .cart-content .cart-content-btn {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
    margin-top: 8px;
}
#blockcart-modal .cart-content .cart-content-btn .btn {
    display: inline-flex;
    flex: 1 1 auto;
    align-items: center;
    white-space: nowrap;
    justify-content: center;
    gap: 6px;
    min-height: 44px;
    margin: 0;
    line-height: 1.2;
}
#blockcart-modal .cart-content .cart-content-btn .btn .material-icons { margin: 0; font-size: 20px; }

/* Aviso en lugar del total (carro, ventana "Producto añadido" y pasos 1-2 del checkout) */
.ziemax-shipping-note p,
p.ziemax-shipping-note {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 4px 0 12px;
    padding: 10px 12px;
    background: var(--zx-purple-50);
    border-radius: var(--zx-radius-sm);
    color: var(--zx-text);
    font-size: .875rem;
    line-height: 1.4;
}
.ziemax-shipping-note p::before,
p.ziemax-shipping-note::before {
    content: "local_shipping";
    font-family: "Material Icons";
    font-size: 20px;
    color: var(--zx-purple);
    -webkit-font-feature-settings: "liga";
    font-feature-settings: "liga";
}

/* classic pone los <p> de la ventana en "space-between": el aviso va alineado a la izquierda */
#blockcart-modal .cart-content p.ziemax-shipping-note { justify-content: flex-start; text-align: left; }

/* ---------- Footer ---------- */
#footer { padding: 0; background: #fff; color: var(--zx-muted); }
.footer-container {
    padding-top: 0;
    background: #fff;
    border-top: 1px solid var(--zx-border);
}
/* Franja de marca: morado y un toque de naranja */
.footer-container::before {
    content: "";
    display: block;
    height: 4px;
    background: linear-gradient(90deg, var(--zx-purple) 0 72%, var(--zx-orange) 72%);
}
.footer-container > .container { padding-top: 32px; }
.footer-container .h3,
.footer-container .h4,
.footer-container .block-contact-title,
.footer-container .myaccount-title,
.footer-container .myaccount-title a {
    margin: 0 0 12px;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.5;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--zx-text);
}
.footer-container .links ul { background: transparent; }
/* theme.css convierte todos los li en grilla "max-content"; en el pie vuelven a ser filas normales */
.footer-container .links ul > li {
    display: block;
    margin: 0 0 8px;
    padding: 0;
    border: 0;
    font-weight: 500;
}
.footer-container li a,
.footer-container .links ul > li a { color: var(--zx-muted); font-size: .9375rem; }
.footer-container li a:hover,
.footer-container .links ul > li a:hover { color: var(--zx-purple); }
.footer-container .block-contact { padding-left: 0; font-size: .9375rem; color: var(--zx-muted); }
.block-contact #contact-infos { padding: 0; }

/* Datos de la tienda con ícono (ps_contactinfo.tpl del tema) */
.footer-container .links ul.ziemax-contact { list-style: none; margin: 0; padding: 0; }
.footer-container .links ul.ziemax-contact > li { display: flex; align-items: flex-start; gap: 8px; }
.ziemax-contact a { color: var(--zx-purple) !important; }
.ziemax-ico {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    fill: none;
    stroke: var(--zx-purple);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Escritorio: las columnas se reparten parejo en todo el ancho, existan las que existan.
   (ps_linklist reserva media fila para dos bloques; con uno solo, el pie quedaba cargado a un lado) */
@media (min-width: 768px) {
    .footer-container > .container > .row:first-child {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-evenly;
        gap: 32px;
        margin: 0 0 24px;
    }
    .footer-container > .container > .row:first-child::before,
    .footer-container > .container > .row:first-child::after,
    .footer-container > .container > .row:first-child > .links.col-md-6 > .row::before,
    .footer-container > .container > .row:first-child > .links.col-md-6 > .row::after { display: none; }
    .footer-container > .container > .row:first-child > .links.col-md-6,
    .footer-container > .container > .row:first-child > .links.col-md-6 > .row { display: contents; }
    .footer-container > .container > .row:first-child .wrapper {
        float: none;
        flex: 0 1 auto;
        width: auto;
        max-width: 100%;
        padding: 0 !important;
    }
}

/* Móvil: se mantiene el acordeón de classic, con el estilo nuevo */
@media (max-width: 767px) {
    .footer-container > .container { padding-top: 12px; }
    .footer-container .links .title { padding: 12px 16px; border-bottom: 1px solid var(--zx-border); }
    .footer-container .links .title .h3 { margin: 0; }
    .footer-container .links ul { padding: 12px 16px 4px; }
    .footer-container .links ul > li { margin-bottom: 10px; }
}

/* Botones de política (blockreassurance, configurables en el back office) */
.footer-container .blockreassurance { padding: 0; }
.footer-container .blockreassurance > .row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin: 0 0 24px;
}
.footer-container .blockreassurance > .row::before,
.footer-container .blockreassurance > .row::after { display: none; }
.footer-container .blockreassurance > .row > div {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    float: none;
    width: auto;
    max-width: 100%;
    margin: 0;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid var(--zx-border);
    border-radius: var(--zx-radius-sm);
    text-align: left;
}
.footer-container .blockreassurance > .row > div:hover { border-color: var(--zx-purple); }
.footer-container .blockreassurance .block-icon {
    display: flex;
    float: none;
    width: auto;
    height: auto;
    margin: 0;
}
.footer-container .blockreassurance .block-icon img,
.footer-container .blockreassurance .block-icon svg {
    width: 22px;
    height: 22px;
    object-fit: contain;
    mix-blend-mode: multiply; /* los íconos JPG traen fondo gris claro */
}
.footer-container .blockreassurance .block-title {
    display: block;
    height: auto;
    max-width: none;
    padding: 0;
    margin: 0;
    font-size: .875rem;
    font-weight: 600;
    color: var(--zx-text) !important; /* el módulo escribe su color en el HTML */
}
.footer-container .blockreassurance p:empty { display: none; }
@media (max-width: 767px) {
    .footer-container .blockreassurance { padding: 16px 16px 0; }
    .footer-container .blockreassurance > .row { flex-direction: column; align-items: stretch; }
}

/* Copyright y lema (_partials/footer.tpl) */
.ziemax-copyright {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 12px;
    margin: 0;
    padding: 14px 0 20px;
    border-top: 1px solid var(--zx-border);
    font-size: 13px;
    color: var(--zx-muted);
    text-align: center;
}
.ziemax-copyright a,
.ziemax-copyright a:hover { color: var(--zx-muted); }
/* Móvil: espacio para que el botón del chat (abajo a la izquierda) no tape el copyright */
@media (max-width: 767px) {
    .ziemax-copyright { padding-bottom: 104px; }
}

/* =====================================================================================================
   Chat de ayuda (assets/js/chat.js): botón con la mascota y panel con el iframe de chat-carro.
   Lo de adentro del iframe (mensajes, colores, letra) es de la aplicación chat-carro, no del tema.
   ===================================================================================================== */
.zx-chat-launcher {
    position: fixed;
    left: 20px;
    bottom: 20px;
    z-index: 1040; /* sobre el header (999) y bajo las ventanas de Bootstrap (1050) */
    width: 72px;
    height: 72px;
    padding: 6px;
    background: var(--zx-purple);
    border: 0;
    border-radius: 50%;
    box-shadow: 0 6px 18px rgba(60, 20, 70, .3);
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.zx-chat-launcher img {
    display: block;
    width: 60px;
    height: 60px;
    object-fit: cover;
    background: #fff;
    border-radius: 50%;
}
.zx-chat-launcher:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(60, 20, 70, .35); background: var(--zx-purple-dark); }
.zx-chat-launcher:focus-visible { outline: 3px solid var(--zx-orange); outline-offset: 3px; }
.zx-chat-launcher[aria-expanded="true"] { background: var(--zx-purple-dark); }

/* Globo "¿Necesitas ayuda?" (una vez por sesión) */
.zx-chat-hint {
    position: fixed;
    left: 104px;
    bottom: 36px;
    z-index: 1040;
    max-width: 220px;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid var(--zx-border);
    border-radius: 12px;
    box-shadow: var(--zx-shadow);
    color: var(--zx-text);
    font-size: .875rem;
    line-height: 1.35;
    opacity: 0;
    transform: translateX(-6px);
    transition: opacity .25s ease, transform .25s ease;
    pointer-events: none;
}
.zx-chat-hint strong { display: block; color: var(--zx-purple); }
.zx-chat-hint::before {
    content: "";
    position: absolute;
    left: -7px;
    bottom: 16px;
    width: 12px;
    height: 12px;
    background: #fff;
    border-left: 1px solid var(--zx-border);
    border-bottom: 1px solid var(--zx-border);
    transform: rotate(45deg);
}
.zx-chat-hint.is-visible { opacity: 1; transform: none; }

/* Panel: se abre sobre el botón, abajo a la izquierda */
.zx-chat-panel {
    position: fixed;
    left: 20px;
    bottom: 104px;
    z-index: 1041;
    display: flex;
    flex-direction: column;
    width: 380px;
    max-width: calc(100vw - 40px);
    height: min(620px, calc(100vh - 128px));
    overflow: hidden;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 18px 48px rgba(40, 20, 50, .28);
    opacity: 0;
    transform: translateY(12px) scale(.98);
    transform-origin: bottom left;
    transition: opacity .2s ease, transform .2s ease;
}
.zx-chat-panel[hidden] { display: none; }
.zx-chat-panel:focus { outline: 0; }
.zx-chat-panel.is-open { opacity: 1; transform: none; }
.zx-chat-panel__header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 8px 10px 14px;
    background: var(--zx-purple);
    color: #fff;
}
.zx-chat-panel__avatar {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    object-fit: cover;
    background: #fff;
    border: 2px solid rgba(255, 255, 255, .7);
    border-radius: 50%;
}
.zx-chat-panel__title { flex: 1; min-width: 0; line-height: 1.25; }
.zx-chat-panel__title strong { display: block; font-size: 1rem; }
.zx-chat-panel__title span { font-size: .8rem; opacity: .85; }
.zx-chat-panel__action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    color: #fff !important;
    background: transparent;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
}
.zx-chat-panel__action:hover,
.zx-chat-panel__action:focus-visible { background: rgba(255, 255, 255, .18); text-decoration: none; }
.zx-chat-panel__action:focus-visible { outline: 2px solid #fff; outline-offset: 0; }
.zx-chat-panel__action .material-icons { font-size: 20px; }
.zx-chat-panel__body { position: relative; flex: 1; background: var(--zx-bg); }
.zx-chat-panel__body iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #fff; }
.zx-chat-panel__loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--zx-muted);
    font-size: .875rem;
}
.zx-chat-panel.is-loaded .zx-chat-panel__loading { display: none; }

/* Móvil: el panel ocupa toda la pantalla y el botón se esconde mientras está abierto */
@media (max-width: 575px) {
    .zx-chat-launcher { left: 16px; bottom: 16px; width: 64px; height: 64px; }
    .zx-chat-launcher img { width: 52px; height: 52px; }
    .zx-chat-hint { left: 92px; bottom: 28px; }
    .zx-chat-panel {
        left: 0;
        right: 0;
        top: 0;
        bottom: 0;
        width: 100%;
        max-width: none;
        height: 100%;
        border-radius: 0;
    }
    .zx-chat-open .zx-chat-launcher { display: none; }
    .zx-chat-open body { overflow: hidden; }
}
@media (prefers-reduced-motion: reduce) {
    .zx-chat-launcher, .zx-chat-hint, .zx-chat-panel { transition: none; }
}

/* =====================================================================================================
   Código de descuento aplicado (checkout/_partials/cart-voucher.tpl) y formulario del código
   ===================================================================================================== */
.block-promo .promo-name { margin: 0; padding: 0 1.25rem 12px; list-style: none; }
.block-promo .promo-name .cart-summary-line.ziemax-voucher {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 8px;
    padding: 8px 6px 8px 12px;
    background: #e6f4ea;
    border: 1px dashed #9ccaa9;
    border-radius: 8px;
}
.ziemax-voucher__icon { flex: 0 0 auto; color: #1e6b34; font-size: 18px; }
.block-promo .promo-name .ziemax-voucher__name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 700;
    color: #1e6b34;
    text-align: left;
}
.block-promo .promo-name .cart-summary-line span.ziemax-voucher__amount { flex: 0 0 auto; font-weight: 700; color: #1e6b34; }
.block-promo .promo-name a.ziemax-voucher__remove {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: #1e6b34;
}
.block-promo .promo-name a.ziemax-voucher__remove:hover { background: rgba(30, 107, 52, .12); color: #14481f; text-decoration: none; }
.block-promo .promo-name a.ziemax-voucher__remove .material-icons { margin: 0; font-size: 18px; }
/* Formulario "¿Tiene un código promocional?" */
.block-promo .promo-code form { display: flex; gap: 8px; }
.block-promo .promo-input {
    flex: 1;
    width: auto;
    min-width: 0;
    height: 42px;
    margin: 0;
    padding: 0 12px;
    text-indent: 0;
    border: 1px solid var(--zx-field-border);
    border-radius: var(--zx-radius-sm);
}
.block-promo .promo-input:focus { outline: 0; border-color: var(--zx-purple); box-shadow: var(--zx-focus); }
.block-promo .promo-input + button { height: 42px; margin: 0; border: 0; text-transform: none; }
