/* ==============================
   Variables globales
================================= */
:root {
    --color-rosa: #cf109c;
    --color-azul: #45aaaa;
}

/* ==============================
   Reset y estilos base
================================= */
* {
    font-family: "Montserrat", sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
}

body {
    color: #333;
    background-color: #fff;
}

/* ==============================
   Header
================================= */
header {
    display: flex;
    width: 100%;
    height: 80px;
    box-sizing: border-box;
}

header img {
    height: 60px;
    margin-left: 40px;
}

header nav {
    display: flex;
    align-items: center;
    margin: 0 auto;
}

header nav a {
    padding: 0 80px;
    text-decoration: none;
    color: #848484;
    font-weight: 600;
    font-size: 20px;
}

header div {
    display: flex;
    margin-right: 20px;
    margin-left: auto;
}

header div a img {
    width: 44px;
    height: 44px;
    margin: 10px auto;
    box-sizing: border-box;
}

/* ==============================
   Layout general
================================= */
main {
    width: 100%;
    padding: 40px;
}

.cabecera {
    display: flex;
    flex-direction: column;
}

.titulo-pagina {
    width: 100%;
    margin: 25px auto;
    text-align: center;
    font-size: 36px;
    color: var(--color-azul);
}

.inicio-page .cabecera .titulo-pagina {
    margin-bottom: 50px;
}

.fecha {
    margin: 20px 20px 6px auto;
    font-weight: 600;
    color: var(--color-rosa);
}

/* ==============================
   Páginas: Escritos
================================= */
.escritos {
    padding: 30px 120px;
}

.escritos p,
.inicio-page p,
.conversaciones-page p {
    text-indent: 2em;
    line-height: 1.8;
    margin-top: 13px;
    font-size: 18px;
    color: #666666;
    font-weight: 500;
}

.escritos-page {
    display: flex;
    flex-direction: row;
}

.escritos-page section {
    margin: 30px 80px auto auto;
    flex: 1;
}

.escritos-page ul {
    text-align: center;
}

.escritos-page ul li {
    padding: 8px 0;
    list-style: none;
}

.escritos-page ul li a {
    text-decoration: none;
    color: #717171;
    font-size: 20px;
}

.constante-cambio-page p a {
    text-decoration: none;
    color: var(--color-rosa);
}

/* ==============================
   Páginas: Conversaciones
================================= */
.conversaciones-page {
    margin: 2rem;
    background-color: #f9f9f9;
    color: #333;
}

.user {
    color: #0b5394;
    font-weight: bold;
    margin-top: 1.5rem;
}

.assistant {
    color: #38761d;
    font-weight: bold;
    margin-top: 1.5rem;
}

blockquote {
    background: #fff;
    border-left: 5px solid #ccc;
    margin: 1rem 0;
    padding: 1rem;
}

blockquote:hover {
    background: #f0f0f0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.message {
    margin-bottom: 1rem;
    white-space: pre-line;
}

/* ==============================
   Componentes
================================= */
.estrella {
    width: 60px;
    height: 60px;
    background-color: rgb(0, 204, 255);
    border: 1px solid rgba(0, 204, 255, 0.856);
    clip-path: polygon(
        50% 0%, 
        61% 35%, 
        98% 35%, 
        68% 57%, 
        79% 91%, 
        50% 70%, 
        21% 91%, 
        32% 57%, 
        2% 35%, 
        39% 35%
    );
    margin: 13px 0;
}

.tachado {
    text-decoration: line-through wavy rgb(180, 184, 127) 1px;
}

.disabled {
    pointer-events: none;
    cursor: default;
    color: grey;
}

canvas {
    display: block;
    margin: auto;
    width: 100%;
    max-width: 70vw;
    aspect-ratio: 2 / 1; /* círculo perfecto */
    background-color: black;
    border-radius: 50%;
}

/* ==============================
   Productos
================================= */

.productos-container {
    padding: 20px 40px;
    background-color: #f9f9f9;
}

/* --- Nuevo visor de zoom --- */
#zoom-viewer {
    position: absolute;
    display: none;
    z-index: 1000;
    background: white;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    pointer-events: none; /* evita que bloquee eventos del ratón */
}
#zoom-viewer.visible {
    display: block;
}
#zoom-viewer img {
    width: 100%;
    height: 100%;
    border-radius: 6px;
}

.productos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.producto-card {
    background: white;
    border: 1px solid #ccc;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%; /* todas las tarjetas ocupan la misma altura del grid */
}

.producto-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}

/* --- Imágenes con placeholder fijo --- */
.imagen-container {
    position: relative;
    width: 100%;
    height: 220px;              /* Altura fija para todas las tarjetas */
    background-color: #eee;     /* Placeholder si no hay imagen */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.imagen-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    transition: opacity 0.3s ease;
}

.producto-info {
    padding: 15px;
    text-align: center;
    flex-grow: 1; /* para que el contenido ocupe espacio y todas las tarjetas tengan altura consistente */
}

.producto-info h2 {
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--color-azul, #004d4d);
}

.precio {
    font-size: 16px;
    font-weight: bold;
    color: var(--color-rosa, #cc3366);
    margin-bottom: 10px;
}

.size-select {
    margin: 10px 0;
    padding: 6px;
    border-radius: 6px;
    border: 1px solid #ccc;
}

button {
    background-color: var(--color-azul, #004d4d);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

button:disabled {
    background-color: #aaa;
    cursor: not-allowed;
}

button:hover:enabled {
    background-color: #368f8f;
}

.sin-stock {
    display: inline-block;
    padding: 6px 10px;
    background: #ccc;
    border-radius: 6px;
    color: #555;
    font-size: 14px;
    margin-left: 6px;
}

/* ==============================
   Alerta Audio
================================= */

#popup {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0); /* totalmente transparente */
    display: block;
    z-index: 1000;
  }

  /* Caja en la esquina superior izquierda */
  #popup-content {
    position: absolute;
    top: 20px;
    left: 20px;
    background: #fff;
    padding: 15px 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  }

  /* ==============================
   Footer
================================= */

  footer {
    text-align: center;
    padding: 20px 0;
}

footer nav a {
    margin: 0 15px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem; /* mediana */
    color: #666; /* gris */
    transition: color 0.2s ease;
}

footer nav a:hover {
    color: #444; /* gris más oscuro */
    cursor: pointer;
}

  /* ==============================
   Politica de privacidad
================================= */

/* .bodi{font-family:system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;line-height:1.6;color:#111;margin:0;padding:0;background:#f7f7f7}
    h1,h2{color:#0b3b66}
    .muted{color:#555}
    footer{max-width:900px;margin:1rem auto;text-align:center;color:#666}
    .cookie-banner{position:fixed;right:1rem;bottom:1rem;background:#fff;border:1px solid #ddd;padding:1rem 1.2rem;border-radius:8px;box-shadow:0 6px 20px rgba(0,0,0,0.08);max-width:360px}
    .cookie-actions{display:flex;gap:.5rem;justify-content:flex-end;margin-top:.5rem}
    button{padding:.5rem .8rem;border-radius:6px;border:1px solid #0b3b66;background:#0b3b66;color:#fff;cursor:pointer}
    .btn-ghost{background:transparent;color:#0b3b66;border:1px solid #cfdfea}
    code{background:#f2f6fa;padding:.15rem .35rem;border-radius:4px}
    dl{margin:0}
    dt{font-weight:700}
    dd{margin:0 0 1rem 0} */

/* ==============================
   Responsive
================================= */

/* hasta 768px */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 15px 10px;
        height: auto;
        gap: 10px;
    }

    header img {
        height: 50px;
        margin: 0 auto;
    }

    header nav {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }

    header nav a {
        font-size: 16px;
        padding: 4px 0;
        text-align: center;
    }

    header div {
        margin: 0;
        justify-content: center;
    }

    header div a img {
        width: 36px;
        height: 36px;
    }

    .titulo-pagina {
        font-size: 22px;
        margin: 15px 0 10px;
    }

    h1, h2, .intro-text {
        font-size: 18px;
        margin: 8px 0;
        text-align: center;
    }

    main {
        padding: 15px;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .estrella, canvas, img.oval {
        margin: 15px auto;
        display: block;
    }

    /* textos en .escritos */
    .escritos {
        padding: 20px 30px; /* menos padding lateral */
    }

    .user, .assistant {
        text-align: left;
    }
    .escritos p, section p, .escritos .message {
        font-size: 16px;
        line-height: 1.6;
        margin-top: 10px;
        text-align: justify;
    }
}

/* hasta 600px */
@media (max-width: 600px) {
    .conversaciones-page {
        margin: 1rem;
        padding: 0.5rem;
        font-size: 14px;
    }

    .cabecera {
        text-align: center;
    }

    .cabecera .fecha {
        font-size: 12px;
        margin-bottom: 0.3rem;
    }

    .cabecera .titulo-pagina {
        font-size: 20px;
        line-height: 1.3;
    }

    blockquote {
        padding: 0.8rem;
        font-size: 14px;
    }

    .user, .assistant {
        font-size: 14px;
        margin-top: 1rem;
    }

    .escritos-page ul li a {
        font-size: 16px;
    }

    canvas {
        max-width: 90vw;
    }

    /* textos en .escritos */
    .escritos {
        padding: 15px 20px;
    }

    .escritos p, section p, .escritos .message {
        font-size: 15px;
        line-height: 1.5;
        margin-top: 8px;
        text-align: justify; /* lectura más cómoda en móviles */
        word-spacing: 0.1em;
        hyphens: auto;
    }

    .escritos-page {
        display: flex;
        flex-direction: column;
    }

    .escritos-page section {
        margin: 30px auto;
        flex: initial;

    }
}
