/* ============================================================
   BASE.CSS — Halloween Crochet Colombia
   Lo común a la tienda y al panel: variables, reset, accesibilidad, pie de página
   y lo que usan los dos lados. Se carga primero en TODAS las páginas.

   ÍNDICE
    1. Variables, reset y elementos básicos
    2. Accesibilidad
    3. Animaciones compartidas
    4. Compartido entre la tienda y el panel
    5. Pie de página

   AL FINAL, LOS TAMAÑOS DE PANTALLA (RESPONSIVE):
   - Hasta 1280px (portátil pequeño) — solo pantalla
   - Hasta 1080px (tableta horizontal) — solo pantalla
   - Hasta 768px (tableta y celular) — solo pantalla
   - Hasta 480px (celular) — solo pantalla
   - Con animaciones activadas
   ============================================================ */

/* ============================================================
   1. VARIABLES, RESET Y ELEMENTOS BÁSICOS
   ============================================================ */

html {
    scrollbar-gutter: stable;
}

body {
    margin: 0;
    padding: 0;
    width: 100%;
    font-family: "Quicksand", sans-serif;
    font-weight: 400;
}

* {
    -webkit-tap-highlight-color: transparent;
}

/* Íconos: mientras carga su fuente (o si no carga), cada ícono se ve como
   su nombre en letras («local_shipping») y ensancha la página en el
   celular. Se les deja siempre el ancho de un ícono. */
.material-icons {
    display: inline-block;
    width: 1em;
    flex-shrink: 0;
    overflow: hidden;
    white-space: nowrap;
}

/* TIPOGRAFÍA GLOBAL — con clamp() */
h1 {
    text-align: center;
    margin: 30px 0;
    font-weight: 400;
    font-size: clamp(1.6rem, 4vw, 2.8rem);
}

h2 {
    text-align: center;
    margin: 15px 0 45px;
    font-weight: 400;
    font-size: clamp(1.3rem, 3vw, 2.2rem);
}

input[type="submit"] {
    width: 100%;
    background-color: antiquewhite;
    color: rgb(105, 105, 105);
    padding: 14px 20px;
    margin: 8px 0;
    border: none;
    cursor: pointer;
}

input[type="submit"]:hover {
    background-color: #f4a5bc;
    color: azure;
}

header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.03);
    isolation: isolate;
}

/* ============================================================
   2. ACCESIBILIDAD
   ============================================================ */

.skip-to-content {
    position: absolute;
    top: -100px;
    left: 0;
    background: #9dbce4;
    color: white;
    padding: 10px 20px;
    font-size: 14px;
    font-family: "Quicksand", sans-serif;
    text-decoration: none;
    border-radius: 0 0 6px 0;
    z-index: 99999;
    transition: top 0.2s;
}

.skip-to-content:focus {
    top: 0;
}

/* ============================================================
   3. ANIMACIONES COMPARTIDAS
   ============================================================ */

@keyframes fadeInPopup {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes escribiendo {
    0%,
    60%,
    100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-6px);
    }
}

@keyframes seguimiento-pulso {
    0%,
    100% {
        box-shadow: 0 0 0 5px rgba(244, 165, 188, 0.25);
    }
    50% {
        box-shadow: 0 0 0 9px rgba(244, 165, 188, 0.12);
    }
}

/* ============================================================
   4. COMPARTIDO ENTRE LA TIENDA Y EL PANEL
   ============================================================ */

.foto img {
    width: 100%;
    overflow: hidden;
    display: inline-block;
}

/* Badge descuento en card */
.card-badge-descuento {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #f4a5bc;
    color: white;
    font-size: 16px;
    font-weight: bold;
    padding: 4px 8px;
    z-index: 2;
}

/* Badge entrega inmediata en card */
.card-badge-entrega-inmediata {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #f4a5bc;
    color: white;
    font-size: 14px;
    font-weight: bold;
    padding: 4px 8px;
    z-index: 2;
}

/* Precios con descuento en card */
.precios-descuento-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
}

.precio-tachado-texto {
    text-decoration: line-through;
    color: #767676;
    font-size: 16px;
}

.precio-descuento-activo {
    text-decoration: none;
    color: #9dbce4;
    font-weight: bold;
    font-size: 16px;
}

/* Campos flotantes checkout */
.campo-flotante {
    position: relative;
    margin-bottom: 26px;
}

.campo-flotante label {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #767676;
    pointer-events: none;
    transition: 0.2s;
    background: white;
    padding: 0px 4px;
}

.campo-flotante textarea ~ label {
    top: 18px;
    transform: none;
}

.campo-flotante input:focus ~ label,
.campo-flotante input:not(:placeholder-shown) ~ label,
.campo-flotante textarea:focus ~ label,
.campo-flotante textarea:not(:placeholder-shown) ~ label {
    top: 10px;
    left: 10px;
    transform: translateY(-50%);
    font-size: 11px;
    color: #1a4fa0;
}

.input-checkout {
    width: 100%;
    height: 52px;
    padding: 22px 14px 8px;
    border: 1px solid #ddd;
    font-size: 14px;
    outline: none;
    transition:
        border-color 0.2s,
        box-shadow 0.2s;
    box-sizing: border-box;
    background: white;
}

.input-checkout:focus {
    border-color: #9dbce4;
    box-shadow: 0 0 0 3px rgba(157, 188, 228, 0.2);
}

.input-checkout:disabled {
    background: #f5f5f5;
    color: #aaa;
}

.input-checkout:disabled ~ label {
    background: #f5f5f5;
    color: #bbb;
}

/* Autocompletar del navegador: sin el fondo azul (o amarillo). El campo
   queda blanco como siempre, y la etiqueta que flota encima ya no se ve
   como un recuadro blanco sobre azul. El fondo se pinta con una sombra
   interior porque el navegador no deja cambiar el background. */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #fff inset;
    box-shadow: 0 0 0 1000px #fff inset;
    -webkit-text-fill-color: #1a1a1a;
    caret-color: #1a1a1a;
    transition: background-color 9999s ease-out 0s;
}

input:autofill,
textarea:autofill,
select:autofill {
    box-shadow: 0 0 0 1000px #fff inset;
    filter: none;
}

/* Con el foco, también el borde suave azul de siempre */
.input-checkout:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #fff inset, 0 0 0 3px rgba(157, 188, 228, 0.2);
    box-shadow: 0 0 0 1000px #fff inset, 0 0 0 3px rgba(157, 188, 228, 0.2);
}

/* Timeline de progreso — el corazón visual de la página */
.linea-progreso {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    margin-top: 48px;
    margin-bottom: 40px;
    padding-top: 8px;
    width: 100%;
    overflow-x: auto;
    gap: 0;
}

.paso {
    position: relative;
    flex: 1;
    min-width: 110px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.circulo {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e8e8e8;
    border: 3px solid #e8e8e8;
    z-index: 2;
    position: relative;
    transition:
        background 0.3s ease,
        border-color 0.3s ease,
        box-shadow 0.3s ease;
}

.linea {
    position: absolute;
    top: 13px;
    left: 50%;
    width: 100%;
    height: 3px;
    background: #e8e8e8;
    z-index: 1;
    transition: background 0.3s ease;
}

.paso p {
    margin-top: 12px;
    font-size: 13px;
    text-align: center;
    width: 100px;
    height: 34px;
    line-height: 1.3;
    word-break: break-word;
    color: #999;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.paso.completado .circulo {
    background: #9dbce4;
    border-color: #9dbce4;
}

.paso.completado .circulo::after {
    content: "✓";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 13px;
    font-weight: bold;
}

.paso.actual .circulo {
    background: #f4a5bc;
    border-color: #f4a5bc;
    box-shadow: 0 0 0 5px rgba(244, 165, 188, 0.25);
}

.paso.completado .linea {
    background: #9dbce4;
}

.paso.completado p,
.paso.actual p {
    color: #1a1a1a;
    font-weight: 700;
}

.paso.actual p {
    color: #f4a5bc;
}

.paso-fecha {
    font-size: 11px;
    color: #bbb;
    margin-top: 3px;
    line-height: 1.3;
    font-weight: 400 !important;
}

.paso.completado .paso-fecha,
.paso.actual .paso-fecha {
    color: #1a4fa0;
}

/* ============================================================
   5. PIE DE PÁGINA
   ============================================================ */

.info-footer {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    padding: 32px 4%;
    background-color: #9dbce4;
    box-sizing: border-box;
    width: 100%;
    overflow: hidden;
}

.col-footer {
    padding: 0 50px 0 70px;
    line-height: 1.6;
    font-size: 15px;
    min-width: 0;
}

.col-footer a {
    color: #000;
    text-decoration: none;
    display: inline;
}

.col-footer a:hover {
    color: #4b4b4b;
}

.col-footer h4 {
    margin: 0 0 10px;
    font-size: 15px;
}

.col-footer p {
    margin: 4px 0;
    display: flex;
    align-items: center;
    gap: 4px;
    line-height: 1.4;
}

.col-footer i {
    font-size: 16px;
    flex-shrink: 0;
}

.footer-redes {
    display: flex;
    flex-direction: row;
    gap: 20px;
    margin-top: 15px;
    align-items: center;
}

#col-footer-redes p {
    line-height: 2.1;
}

.footer-redes a {
    color: #000;
    font-size: 18px;
    display: inline-flex;
    text-decoration: none;
}

.footer-redes i:hover {
    color: #1a4fa0;
}

.col-footer ul {
    list-style: none;
    padding-inline-start: 0;
}

/* Copyright */
#creditcards {
    vertical-align: middle;
    height: 30px;
    max-width: 100%;
    padding-left: 0;
}

.copyright {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    text-align: center;
    color: #767676;
    padding: 12px 4%;
    box-sizing: border-box;
    width: 100%;
}

/* ============================================================
   RESPONSIVE: LOS TAMAÑOS DE PANTALLA VAN AL FINAL
   Del más grande al más pequeño. Dentro de cada uno, en el orden de las secciones.
   «Solo pantalla» = no se aplica al imprimir.
   ============================================================ */

/* ============================================================
   RESPONSIVE — HASTA 1280px (PORTÁTIL PEQUEÑO) — SOLO PANTALLA
   ============================================================ */
@media screen and (max-width: 1280px) {
    /* ---------- Compartido entre la tienda y el panel ---------- */

    .copyright {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .copyright p {
        order: 1;
    }

    /* ---------- Pie de página ---------- */

    .copyright #creditcards {
        order: -1;
        max-width: 100%;
        height: auto;
    }
}

/* ============================================================
   RESPONSIVE — HASTA 1080px (TABLETA HORIZONTAL) — SOLO PANTALLA
   ============================================================ */
@media screen and (max-width: 1080px) {
    /* ---------- Pie de página ---------- */

    .info-footer {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px 0;
    }

    .col-footer {
        text-align: left;
        width: 100%;
        padding: 0 20px;
    }
}

/* ============================================================
   RESPONSIVE — HASTA 768px (TABLETA Y CELULAR) — SOLO PANTALLA
   ============================================================ */
@media screen and (max-width: 768px) {
    /* ---------- Compartido entre la tienda y el panel ---------- */

    .linea-progreso {
        flex-direction: column;
        align-items: flex-start;
        overflow-x: visible;
        gap: 0;
        margin-top: 24px;
        padding-left: 4px;
    }

    .paso {
        flex-direction: row;
        align-items: flex-start;
        width: 100%;
        min-width: 0;
        padding-bottom: 28px;
        position: relative;
    }

    .paso:last-child {
        padding-bottom: 0;
    }

    .circulo {
        flex-shrink: 0;
        margin-top: 2px;
    }

    .linea {
        position: absolute;
        top: 26px;
        left: 13px;
        width: 3px;
        height: calc(100% - 20px);
        transform: none;
    }

    .paso p {
        margin-top: 0;
        margin-left: 16px;
        text-align: left;
        width: auto;
        height: auto;
        display: block;
        font-size: 14px;
    }

    .paso-fecha {
        margin-left: 16px;
        margin-top: 3px;
        text-align: left;
    }

    /* ---------- Pie de página ---------- */

    .info-footer {
        grid-template-columns: 1fr;
    }

    .col-footer {
        padding: 0 16px;
        width: 100%;
        box-sizing: border-box;
    }
}

/* ============================================================
   RESPONSIVE — HASTA 480px (CELULAR) — SOLO PANTALLA
   ============================================================ */
@media screen and (max-width: 480px) {
    /* ---------- Compartido entre la tienda y el panel ---------- */

    .precio-descuento-activo,
    .precio-tachado-texto {
        font-size: 13px;
    }

    .precios-descuento-wrapper {
        gap: 3px;
    }

    .linea-progreso {
        gap: 0;
    }

    .circulo {
        width: 24px;
        height: 24px;
    }

    .paso p {
        font-size: 11px;
        width: 70px;
    }

    .paso-fecha {
        font-size: 10px;
    }

    /* ---------- Pie de página ---------- */

    .col-footer {
        padding: 0 12px;
    }
}

/* ============================================================
   RESPONSIVE — CON ANIMACIONES ACTIVADAS
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
    /* ---------- Compartido entre la tienda y el panel ---------- */

    .paso.actual .circulo {
        animation: seguimiento-pulso 2s ease-in-out infinite;
    }
}
