@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,600;1,400&family=Nunito:wght@300;400;600&display=swap');

:root {
    --bg-hueso: #F9F6EE; /* Color principal de fondo (hueso) */
    --bordo-principal: #38030e; /* Color predominante (bordó) */
    --bordo-oscuro: #b83851;
    --bordo-claro: #a32c45;
    --texto-oscuro: #3A2E2B; /* Para leer cómodamente sobre hueso */
    --texto-claro: #F9F6EE; /* Para leer sobre bordó */
    --card-bg: #FFFFFF;
    --primary: var(--bordo-claro);
    --primary-hover: var(--bordo-oscuro);
    --bg-card-rosary: #FFFFFF;
    --border-color: #e2e8f0;
    --text-muted: #64748b;
    --radius: 12px;
    --gold-accent: #c9a94e;
    --gold-light: #e8d48b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-hueso);
    color: var(--texto-oscuro);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden; /* Prevenir scroll horizontal en móviles */
    /* Nunito da un toque muy amigable y suave a los textos */
    font-family: 'Nunito', sans-serif; 
}

/* Tipografía para Títulos (Elegante y clásica) */
h1, h2, h3, .logo {
    font-family: 'Lora', serif;
    color: var(--bordo-principal);
}

/* Navbar Bordó */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background-color: rgb(74, 14, 16); /* Tono exacto del fondo de logo.jpeg */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.logo {
    font-size: 2.2rem;
    font-weight: 600;
    color: var(--texto-claro);
    text-decoration: none;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.logo-img {
    height: 70px; /* Logo más grande para mayor protagonismo */
    width: auto;
    object-fit: contain;
    border-radius: 4px;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--texto-claro);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

.nav-links a:hover, .nav-links a.active {
    background-color: var(--texto-claro);
    color: var(--bordo-principal);
}

.nav-quote {
    font-family: 'Lora', serif;
    font-style: italic;
    color: var(--texto-claro);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    max-width: 320px;
    text-align: right;
    opacity: 0.9;
}

/* Contenido Principal */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 7rem 5% 4rem; /* Ajustado por el nav fixed */
    text-align: center;
    animation: fadeIn 0.8s ease-out;
}

/* =============================================
   RESPONSIVE — MOBILE FIXES
   ============================================= */
@media (max-width: 768px) {
    /* --- Nav compacto --- */
    nav {
        flex-direction: column;
        padding: 0.8rem 1rem;
        gap: 0.5rem;
    }

    .logo-img {
        height: 40px;
    }

    .logo {
        font-size: 1.5rem;
        gap: 0.5rem;
    }

    .nav-links {
        gap: 0.5rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-links a {
        padding: 0.3rem 0.6rem;
        font-size: 0.85rem;
    }

    .nav-quote {
        width: 100%;
        max-width: 100%;
        text-align: center;
        justify-content: center;
        font-size: 0.85rem;
        margin-top: 0.3rem;
        padding: 0 0.5rem;
    }

    /* --- Desactivar snap scroll en móviles (el contenido es más largo que la pantalla) --- */
    html.snap-scroll-page {
        scroll-snap-type: none;
    }

    /* --- Secciones: auto-height en vez de 100vh para evitar overflow --- */
    .product-section,
    .about-section {
        min-height: auto;
        padding: 3rem 1rem 2rem;
        align-items: stretch; /* Forzar hijos a ancho completo en móvil */
    }

    .snap-scroll-page .home-hero,
    .snap-scroll-page .animated-section,
    .snap-scroll-page .product-section,
    .snap-scroll-page .about-section {
        min-height: auto;
        scroll-snap-align: none;
        padding-top: 2rem;
    }

    /* --- Carruseles de productos: convertir a lista vertical en móvil --- */
    /* El carrusel EXTERIOR de productos se vuelve vertical */
    .product-section > .carousel {
        max-width: 100%;
        overflow: visible; /* Permitir que se muestre todo */
    }

    .product-section > .carousel > .carousel-viewport {
        overflow: visible;
    }

    .product-section > .carousel > .carousel-viewport > .carousel-track {
        display: flex;
        flex-direction: column; /* Apilar productos verticalmente */
        transform: none !important; /* Desactivar el slide horizontal */
        gap: 2rem;
    }

    .product-section > .carousel > .carousel-viewport > .carousel-track > .carousel-slide {
        min-width: 100%;
        width: 100%;
        position: relative !important; /* Anula el position: absolute del JS para el modo fade */
        opacity: 1 !important;
        pointer-events: auto !important;
        padding: 0;
    }

    /* Ocultar flechas y dots del carrusel EXTERIOR en móvil */
    .product-section > .carousel > .carousel-arrow,
    .product-section > .carousel .carousel-dots {
        display: none;
    }

    .carousel-slide .card {
        max-width: 100%;
        box-sizing: border-box;
    }

    /* --- Fix para carrusel anidado en WebKit / iOS Safari --- */
    .product-image-carousel {
        aspect-ratio: 4 / 3;
        width: 100%;
        max-width: 100%;
        position: relative;
        overflow: hidden;
        /* Evita bugs de composición de capas en Safari */
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        -webkit-mask-image: -webkit-radial-gradient(white, black); /* Fuerza el corte por overflow en iOS */
    }

    /* Forzar al viewport y track anidados a no expandirse por el tamaño intrínseco */
    .product-image-carousel .carousel-viewport {
        width: 100%;
        height: 100%;
        min-width: 0;
        overflow: hidden;
    }

    .product-image-carousel .carousel-track {
        height: 100%;
        display: flex;
        flex-direction: row; /* Asegurar que el anidado siga horizontal */
    }

    .product-image-carousel .carousel-slide {
        min-width: 100%;
        width: 100%;
        height: 100%;
        flex-shrink: 0;
        min-height: 0;
        position: relative;
    }

    /* Regla crítica para la imagen en Safari */
    .product-image-carousel img {
        width: 100%;
        height: 100%;
        max-width: 100%;
        max-height: 100%;
        object-fit: cover;
        display: block;
    }

    .product-image-carousel .carousel-arrow {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }

    /* --- Carruseles normales (stickers etc.) se adaptan bien --- */
    .carousel {
        max-width: 100%;
        margin: 0 auto;
    }

    .carousel-viewport {
        width: 100%;
    }

    /* --- Flechas más pequeñas en móviles --- */
    .carousel-arrow {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .carousel-prev { left: 4px; }
    .carousel-next { right: 4px; }

    /* --- Títulos reducidos --- */
    h1 {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    /* --- Rosario y historia grids ya colapsan (max-width: 900px) --- */

    /* --- Card grid: una columna --- */
    .card-grid {
        grid-template-columns: 1fr;
    }

    .card {
        padding: 1.5rem;
    }

    /* --- Instagram button más pequeño --- */
    .instagram-float {
        width: 48px;
        height: 48px;
        bottom: 16px;
        right: 16px;
    }

    .instagram-float svg {
        width: 24px;
        height: 24px;
    }
}

main.home-main {
    padding: 0;
    align-items: stretch;
}

/* =============================================
   APPLE STYLE SNAP SCROLLING
   ============================================= */
html.snap-scroll-page {
    scroll-snap-type: y proximity;
    scroll-behavior: smooth;
}

.snap-scroll-page .home-hero,
.snap-scroll-page .animated-section,
.snap-scroll-page .product-section,
.snap-scroll-page .about-section {
    scroll-snap-align: start;
    scroll-snap-stop: always;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 80px; /* Compensa el nav fixed */
    padding-bottom: 2rem;
    box-sizing: border-box;
}

.home-hero {
    padding: 0 5%;
    text-align: center;
    background-color: var(--bg-hueso);
    position: relative;
}

/* =============================================
   SCROLL-DOWN ARROW (Hero → Rosario)
   ============================================= */
.scroll-down-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: var(--bordo-principal);
    background: rgba(56, 3, 14, 0.06);
    border: 1.5px solid rgba(56, 3, 14, 0.15);
    text-decoration: none;
    cursor: pointer;
    position: absolute;
    bottom: 2.5rem;
    left: 0;
    right: 0;
    margin: 0 auto;
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
    animation: scrollArrowBounce 2s ease-in-out infinite;
    flex-shrink: 0;
}

.scroll-down-arrow svg {
    width: 22px;
    height: 22px;
}

.scroll-down-arrow:hover {
    background: rgba(56, 3, 14, 0.12);
    border-color: rgba(163, 44, 69, 0.4);
    box-shadow: 0 0 16px rgba(163, 44, 69, 0.2);
    animation-play-state: paused;
    transform: translateY(2px);
}

@keyframes scrollArrowBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(8px);
    }
}

/* Mobile adjustments for scroll arrow */
@media (max-width: 768px) {
    .scroll-down-arrow {
        width: 36px;
        height: 36px;
        bottom: 3.5rem;
    }

    .scroll-down-arrow svg {
        width: 18px;
        height: 18px;
    }
}

/* =============================================
   FULL WIDTH ANIMATED SECTIONS
   ============================================= */
.animated-section {
    width: 100%;
    padding: 0 5%;
}

.section-rosary {
    background-color: #fdf8f0;
}

.section-history {
    background-color: #f0e0ce;
}

/* =============================================
   ANIMATED SECTION BACKGROUNDS (scroll-driven)
   ============================================= */
.product-section,
.about-section,
.animated-section,
.home-hero {
    transition: background-color 2s ease;
}

.product-section,
.about-section {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 80px 5% 2rem; /* 80px top para compensar el nav fixed */
    text-align: center;
    background-color: var(--bg-hueso);
    box-sizing: border-box;
    position: relative;
}

.product-section[data-section-bg],
.about-section[data-section-bg] {
    background-color: var(--bg-hueso); /* Default, overridden by JS on scroll */
}

/* When the section becomes visible via IntersectionObserver */
.product-section.section-bg-active,
.about-section.section-bg-active,
.animated-section.section-bg-active,
.home-hero.section-bg-active {
    /* The actual color is set by JS inline */
    transition: background-color 2s ease;
}

.content-wrapper {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    width: 100%;
}

.align-right {
    justify-content: flex-end;
}

h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.subtitle {
    font-size: 1.3rem;
    color: #554845;
    max-width: 700px;
    margin-bottom: 3rem;
    line-height: 1.6;
}

/* Tarjetas (Estilo cálido y suave) */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    width: 100%;
    max-width: 1100px;
}

.card {
    background: linear-gradient(135deg, #ffffff, #faecd9, #ffffff, #f7dfdf);
    background-size: 300% 300%;
    animation: bg-pan 14s ease infinite;
    border-top: 5px solid var(--bordo-principal);
    border-radius: 12px;
    padding: 2.5rem 2rem;
    text-align: center;
    box-shadow: 0 10px 20px rgba(138, 28, 49, 0.08);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 25px rgba(138, 28, 49, 0.15);
    animation: bg-pan 4s ease infinite;
}

.card h3 {
    font-size: 1.6rem;
    margin-bottom: 1rem;
    color: var(--bordo-principal);
}

.card p {
    color: var(--texto-oscuro);
    line-height: 1.6;
    font-size: 1.05rem;
}

/* Imagen del Producto */
.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1.2rem;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    display: block; /* Elimina espacio inferior extra */
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =============================================
   SCROLL-TRIGGERED ANIMATIONS
   ============================================= */
[data-animate] {
    opacity: 0;
    transition: opacity 0.7s ease, transform 0.7s ease, filter 0.7s ease;
    will-change: opacity, transform;
}

[data-animate="fade-up"] {
    transform: translateY(50px);
}

[data-animate="fade-in-left"] {
    transform: translateX(-60px);
}

[data-animate="fade-in-right"] {
    transform: translateX(60px);
}

[data-animate="scale-in"] {
    transform: scale(0.85);
}

[data-animate="blur-in"] {
    filter: blur(8px);
    transform: translateY(20px);
}

/* When visible */
[data-animate].is-visible {
    opacity: 1;
    transform: translateY(0) translateX(0) scale(1);
    filter: blur(0);
}

/* Stagger children delay */
[data-animate-delay="1"] { transition-delay: 0.1s; }
[data-animate-delay="2"] { transition-delay: 0.2s; }
[data-animate-delay="3"] { transition-delay: 0.3s; }
[data-animate-delay="4"] { transition-delay: 0.4s; }
[data-animate-delay="5"] { transition-delay: 0.5s; }

/* =============================================
   CAROUSEL
   ============================================= */
.carousel {
    position: relative;
    width: 100%;
    max-width: 1100px;
    overflow: hidden;
    border-radius: var(--radius);
    margin: 0 auto; /* Centrar carrusel */
}

.carousel-viewport {
    width: 100%;
    overflow: hidden;
    border-radius: var(--radius);
}

.carousel-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.carousel-track--fade {
    display: block;
}

.carousel-slide {
    min-width: 100%;
    flex-shrink: 0;
    padding: 1rem;
}

.carousel-slide .card {
    max-width: 420px;
    margin: 0 auto;
}

/* Arrow buttons */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: var(--bordo-principal);
    color: var(--texto-claro);
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 1.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(56, 3, 14, 0.3);
    transition: background 0.3s, transform 0.2s;
}

.carousel-arrow:hover {
    background: var(--bordo-oscuro);
    transform: translateY(-50%) scale(1.1);
}

.carousel-prev { left: 12px; }
.carousel-next { right: 12px; }

/* Dots */
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.2rem;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--bordo-principal);
    background: transparent;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    padding: 0;
}

.carousel-dot:hover {
    transform: scale(1.3);
}

.carousel-dot.active {
    background: var(--bordo-principal);
}

/* Section titles for productos */
.section-title {
    font-size: 2.5rem;
    margin: 1rem 0 2rem 0;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--bordo-claro), var(--gold-accent));
    border-radius: 2px;
}

/* =============================================
   ROSARY INTERACTIVE — VISUAL UPGRADE
   ============================================= */
.rosary-container {
    width: 100%;
    max-width: none;
    overflow: hidden;
    padding: 2rem;
    transition: all 0.3s ease;
}

.rosary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.day-selector-group select {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-card-rosary);
    color: var(--texto-oscuro);
    font-size: 0.875rem;
    cursor: pointer;
    font-family: 'Nunito', sans-serif;
    transition: border-color 0.2s;
}

.day-selector-group select:focus {
    border-color: var(--bordo-claro);
    outline: none;
    box-shadow: 0 0 0 3px rgba(163, 44, 69, 0.15);
}

.status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    width: 100%;
}

.status-badge {
    background: linear-gradient(135deg, var(--bordo-principal), var(--bordo-claro));
    color: #fff;
    padding: 0.3rem 0.8rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.3px;
}

.step-indicator {
    color: var(--text-muted);
    font-weight: 600;
}

.progress-track {
    width: 100%;
    height: 6px;
    background-color: var(--border-color);
    border-radius: 9999px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--bordo-principal), var(--bordo-claro), var(--gold-accent));
    transition: width 0.25s ease;
    border-radius: 9999px;
}

.prayer-card {
    min-height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    padding: 1.5rem;
    background: rgba(249, 246, 238, 0.5);
    border-radius: var(--radius);
    border: 1px solid rgba(226, 232, 240, 0.5);
}

.prayer-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.prayer-instruction {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    font-style: italic;
}

.prayer-body {
    font-size: 1rem;
    line-height: 1.6;
    white-space: pre-line;
}

.rosary-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1.25rem;
}

.btn {
    cursor: pointer;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    border: none;
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    font-family: 'Nunito', sans-serif;
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(135deg, var(--bordo-claro), var(--bordo-principal));
    color: #fff;
    box-shadow: 0 2px 8px rgba(163, 44, 69, 0.3);
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--bordo-principal), var(--bordo-oscuro));
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(163, 44, 69, 0.4);
}

.btn-secondary {
    background-color: var(--border-color);
    color: var(--texto-oscuro);
}

.btn-secondary:hover:not(:disabled) {
    background-color: #cbd5e1;
    transform: translateY(-1px);
}

.btn-text {
    background: transparent;
    color: var(--text-muted);
}

.btn-text:hover {
    text-decoration: underline;
}

/* --- SVG Rosary Visual --- */
.rosary-visual-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 1.5rem 0;
}

.rosary-svg {
    width: 100%;
    max-width: 320px;
    height: auto;
    overflow: visible;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.08));
}

/* Estilos de las cuentas — paleta cálida */
.bead {
    fill: #f1e8d8;
    stroke: #c9a94e;
    stroke-width: 1.5;
    cursor: pointer;
    transition: transform 0.15s ease, fill 0.2s ease, filter 0.2s ease;
}

.bead:hover {
    fill: var(--gold-light);
    filter: drop-shadow(0 0 4px rgba(201, 169, 78, 0.5));
}

.bead.large {
    stroke-width: 2;
    fill: #ede0c8;
    stroke: #b8942e;
}

.bead.active {
    fill: var(--bordo-claro);
    stroke: var(--bordo-principal);
    filter: drop-shadow(0 0 8px rgba(163, 44, 69, 0.6));
}

.bead.completed {
    fill: var(--bordo-principal);
    opacity: 0.55;
    stroke: var(--bordo-oscuro);
}

.bead-cross {
    cursor: pointer;
    fill: var(--gold-light);
    stroke: var(--gold-accent);
    stroke-width: 1.5;
    transition: fill 0.2s ease, filter 0.2s ease;
}

.bead-cross:hover {
    fill: var(--gold-accent);
}

.bead-cross.active {
    fill: var(--bordo-claro);
    stroke: var(--bordo-principal);
    filter: drop-shadow(0 0 8px rgba(163, 44, 69, 0.6));
}

.bead-cross.completed {
    fill: var(--bordo-principal);
    opacity: 0.55;
}

/* =============================================
   HISTORY SECTION — ENHANCED
   ============================================= */
.history-content {
    width: 100%;
    max-width: none;
    padding: 2rem 3rem; 
    text-align: left; 
    transition: all 0.3s ease;
}

@media (max-width: 900px) {
    .history-content {
        text-align: left; /* Restaurar alineación en móviles */
        padding: 1.5rem;
    }
}

.history-content h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.history-content h3::before {
    content: '📿';
    font-size: 1.5rem;
}

.history-content p {
    color: var(--texto-oscuro);
    line-height: 1.8;
    font-size: 1.05rem;
    margin-bottom: 1.2rem;
}

.history-content p:last-child {
    margin-bottom: 0;
}

/* =============================================
   ABOUT PAGE — QUOTE
   ============================================= */
.closing-quote {
    font-size: 1.3rem;
    color: var(--bordo-claro);
    max-width: 700px;
    margin-top: 3rem;
    line-height: 1.6;
    font-style: italic;
    position: relative;
    padding: 1.5rem 2rem;
}

.closing-quote::before {
    content: '❝';
    font-size: 3rem;
    position: absolute;
    top: -0.3rem;
    left: -0.5rem;
    color: var(--bordo-claro);
    opacity: 0.3;
}

/* =============================================
   BACKGROUND GRADIENT ANIMATION
   ============================================= */
@keyframes bg-pan {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 768px) {
    /* Navbar */
    nav {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }
    
    .nav-links a {
        font-size: 1rem;
        padding: 0.4rem 0.8rem;
    }

    /* Textos principales */
    h1 {
        font-size: 2.2rem;
    }

    .subtitle {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }

    main {
        padding: 2rem 5%;
    }

    /* Cards */
    .card-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .card {
        padding: 1.5rem 1rem;
    }

    .card h3 {
        font-size: 1.4rem;
    }

    /* Rosario interactivo */
    .rosary-container {
        padding: 1rem;
    }

    .rosary-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .rosary-controls {
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: center;
    }

    .btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.85rem;
        flex: 1;
        min-width: 30%;
        text-align: center;
    }

    /* Carousel */
    .carousel-arrow {
        width: 38px;
        height: 38px;
        font-size: 1.1rem;
    }

    .carousel-prev { left: 6px; }
    .carousel-next { right: 6px; }

    /* History */
    .history-content {
        padding: 2rem 1.5rem;
    }

    .history-content h3 {
        font-size: 1.4rem;
    }
}

/* =============================================
   NEW LAYOUT GRIDS (ROSARY & HISTORY)
   ============================================= */
.rosary-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 2rem;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
}
@media (max-width: 900px) {
    .rosary-grid { grid-template-columns: 1fr; }
}

.rosary-visual-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.rosary-interactive-column {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
}

.history-grid {
    display: grid;
    grid-template-columns: 6fr 4fr;
    gap: 3rem; /* Espacio entre fotos y texto */
    align-items: center;
    max-width: 1600px; /* Ensanchado para empujar al borde */
    width: 100%;
    margin: 0 auto;
}
@media (max-width: 900px) {
    .history-grid { grid-template-columns: 1fr; }
}

.history-images {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    position: relative;
}

.history-img {
    width: 100%;
    border-radius: var(--radius);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    object-fit: cover;
    max-height: 1000vh; /* Altura dinámica para evitar que rompa el 100vh de la pantalla */
}

.history-img-1 {
    transform: rotate(-3deg);
    z-index: 2;
    transition: transform 0.3s ease;
}
.history-img-1:hover {
    transform: rotate(0deg) scale(1.02);
    z-index: 4;
}

.history-img-2 {
    transform: rotate(3deg);
    margin-top: -10%; /* Superposición más suave */
    margin-left: 5%;
    z-index: 1;
    transition: transform 0.3s ease;
    width: auto;
    max-width: 80%; /* Evita que crezca demasiado */
}
.history-img-2:hover {
    transform: rotate(0deg) scale(1.02);
    z-index: 4;
}

/* =============================================
   PRODUCT IMAGE CAROUSEL
   ============================================= */
.product-image-carousel {
    border-radius: 8px;
    margin-bottom: 1.2rem;
    aspect-ratio: 1 / 1;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

.product-image-carousel .carousel-viewport,
.product-image-carousel .carousel-track {
    height: 100%;
}

.product-image-carousel .carousel-slide {
    padding: 0;
    height: 100%;
}

.product-image-carousel .product-image {
    margin-bottom: 0;
    box-shadow: none;
    height: 100%;
    object-fit: contain;
    background-color: #0a0a0a;
}

.product-image-carousel .carousel-arrow {
    width: 32px;
    height: 32px;
    font-size: 1rem;
}

.product-image-carousel .carousel-dots {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    margin-top: 0;
}

/* =============================================
   INSTAGRAM FLOAT BUTTON
   ============================================= */
.instagram-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: #fff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    z-index: 9999;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.instagram-float:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 12px 20px rgba(0,0,0,0.3);
}

.instagram-float svg {
    width: 32px;
    height: 32px;
}

/* =============================================
   PRODUCT DETAIL PAGE — MercadoLibre Style
   ============================================= */

.product-detail-main {
    padding: 100px 5% 4rem;
    max-width: 1300px;
    margin: 0 auto;
    width: 100%;
    text-align: left;
    animation: fadeIn 0.6s ease-out;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--bordo-claro);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: var(--bordo-principal);
    text-decoration: underline;
}

.breadcrumb-sep {
    color: #cbd5e1;
    font-size: 1rem;
}

/* Main 2-column layout */
.product-detail-layout {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 3rem;
    align-items: start;
}

/* ---- Gallery Section ---- */
.gallery-section {
    position: sticky;
    top: 110px;
    z-index: 10; /* Ensure zoom panel renders above product-info-section */
}

.gallery-container {
    display: flex;
    gap: 1rem;
}

/* Thumbnails column */
.gallery-thumbnails {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    flex-shrink: 0;
    width: 72px;
}

.gallery-thumb {
    width: 72px;
    height: 72px;
    border-radius: 6px;
    border: 2px solid transparent;
    overflow: hidden;
    cursor: pointer;
    padding: 0;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
    flex-shrink: 0;
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-thumb:hover {
    border-color: var(--bordo-claro);
    transform: scale(1.05);
}

.gallery-thumb.active {
    border-color: var(--bordo-principal);
    box-shadow: 0 0 0 2px rgba(56, 3, 14, 0.2);
}

/* Main image */
.gallery-main-wrapper {
    position: relative;
    flex: 1;
    display: flex;
    gap: 1rem;
}

.gallery-main {
    flex: 1;
    aspect-ratio: 1 / 1;
    background: #0a0a0a;
    border-radius: 10px;
    overflow: hidden;
    cursor: crosshair;
    position: relative;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.gallery-main-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: opacity 0.3s ease;
}

.gallery-main.zooming .gallery-main-img {
    opacity: 0.9;
}

/* Zoom result panel (appears to the right of main image) */
.zoom-result {
    display: none;
    position: absolute;
    top: 0;
    left: calc(100% + 1rem);
    width: 48vw; /* Cover the entire info column regardless of screen size */
    height: 100%;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background-color: #fff;
    background-repeat: no-repeat;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.zoom-result.active {
    display: block;
    opacity: 1;
}

/* ---- Product Info Section ---- */
.product-info-section {
    padding: 0 1rem;
    text-align: left;
    position: relative;
    z-index: 1; /* Below gallery-section z-index:10 so zoom panel renders on top */
}

.product-detail-name {
    font-size: 2rem;
    font-weight: 600;
    color: var(--bordo-principal);
    margin-bottom: 1.2rem;
    line-height: 1.2;
}

.product-detail-price-block {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    margin-bottom: 0.3rem;
}

.product-detail-price {
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--texto-oscuro);
    letter-spacing: -0.5px;
}

.product-detail-price-note {
    font-size: 1rem;
    color: var(--text-muted);
}

.product-detail-price-alt {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 0.8rem;
}

.product-detail-promo {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #2e7d32, #43a047);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 1.2rem;
    box-shadow: 0 2px 8px rgba(46, 125, 50, 0.3);
}

.product-detail-divider {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 1.5rem 0;
}

.product-detail-description {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--texto-oscuro);
    margin-bottom: 1.5rem;
}

/* Variants */
.product-detail-variants {
    margin-bottom: 1.5rem;
}

.product-detail-variants-title,
.product-detail-specs-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--texto-oscuro);
    margin-bottom: 0.8rem;
}

.product-detail-variant-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
}

.variant-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem;
    border-radius: 8px;
    border: 2px solid var(--border-color);
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
    font-family: 'Nunito', sans-serif;
    font-size: 0.8rem;
    color: var(--texto-oscuro);
    min-width: 70px;
}

.variant-btn:hover {
    border-color: var(--bordo-claro);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.variant-btn.active {
    border-color: var(--bordo-principal);
    box-shadow: 0 0 0 2px rgba(56, 3, 14, 0.15);
    background: #fef7f8;
}

.variant-thumb {
    width: 48px;
    height: 48px;
    border-radius: 4px;
    object-fit: cover;
}

/* Specs / Details */
.product-detail-specs {
    margin-bottom: 1.5rem;
}

.product-detail-specs-list {
    list-style: none;
    padding: 0;
}

.product-detail-specs-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.6rem;
    font-size: 1rem;
    color: var(--texto-oscuro);
    line-height: 1.5;
}

.product-detail-specs-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--bordo-claro);
    font-weight: 700;
    font-size: 1.2rem;
    line-height: 1.3;
}

/* CTA Button */
.cta-instagram {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    border-radius: 12px;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 16px rgba(220, 39, 67, 0.3);
    margin-bottom: 1.5rem;
}

.cta-instagram:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 24px rgba(220, 39, 67, 0.4);
}

.cta-instagram svg {
    flex-shrink: 0;
}

/* Back link */
.product-detail-back {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--bordo-claro);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: color 0.2s, transform 0.2s;
}

.product-detail-back:hover {
    color: var(--bordo-principal);
    transform: translateX(-4px);
}

/* ---- Product Detail Responsive ---- */
@media (max-width: 1100px) {
    .zoom-result {
        display: none !important;
    }

    .gallery-main {
        cursor: default;
    }
}

@media (max-width: 900px) {
    .product-detail-main {
        padding: 170px 1.2rem 3rem;
    }

    .product-detail-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .gallery-section {
        position: static;
    }

    .gallery-container {
        flex-direction: column-reverse;
    }

    .gallery-thumbnails {
        flex-direction: row;
        width: 100%;
        overflow-x: auto;
        gap: 0.5rem;
        padding-bottom: 0.5rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    
    .gallery-thumbnails::-webkit-scrollbar {
        display: none;
    }

    .gallery-thumb {
        width: 60px;
        height: 60px;
    }

    .zoom-result {
        display: none !important;
    }

    .gallery-main {
        cursor: default;
        aspect-ratio: 1 / 1;
        border-radius: 8px;
    }

    .product-detail-name {
        font-size: 1.8rem;
        margin-bottom: 0.8rem;
    }

    .product-detail-price {
        font-size: 2.2rem;
    }

    .product-info-section {
        padding: 0 0.3rem;
    }

    .product-detail-promo {
        width: 100%;
        justify-content: center;
    }

    .product-detail-variant-list {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 0.5rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .product-detail-variant-list::-webkit-scrollbar {
        display: none;
    }

    .variant-btn {
        flex-shrink: 0;
        min-width: 75px;
    }

    .cta-instagram {
        width: 100%;
        justify-content: center;
        padding: 1.2rem;
    }
}

/* ---- Extra small phones (≤480px) ---- */
@media (max-width: 480px) {
    /* Nav needs to be more compact on small phones */
    nav {
        padding: 0.6rem 0.8rem;
        gap: 0.35rem;
    }

    .logo {
        font-size: 1.3rem;
        gap: 0.4rem;
    }

    .logo-img {
        height: 32px;
    }

    .nav-links {
        gap: 0.3rem;
    }

    .nav-links a {
        padding: 0.25rem 0.5rem;
        font-size: 0.8rem;
    }

    .nav-quote {
        font-size: 0.78rem;
        margin-top: 0.2rem;
        line-height: 1.3;
    }

    /* Product detail — give enough top padding to clear the shorter nav */
    .product-detail-main {
        padding: 160px 1rem 2rem;
    }

    /* Breadcrumb */
    .breadcrumb {
        font-size: 0.8rem;
        margin-bottom: 1rem;
    }

    /* Product info */
    .product-detail-name {
        font-size: 1.5rem;
    }

    .product-detail-price {
        font-size: 1.8rem;
    }

    .product-detail-description {
        font-size: 1rem;
    }

    .product-detail-variants-title,
    .product-detail-specs-title {
        font-size: 1rem;
    }

    .product-detail-specs-list li {
        font-size: 0.95rem;
    }

    /* Variant buttons scroll area */
    .product-detail-variant-list {
        gap: 0.5rem;
        padding-left: 0.2rem;
    }

    .variant-btn {
        min-width: 68px;
        font-size: 0.75rem;
        padding: 0.4rem;
    }

    .variant-thumb {
        width: 42px;
        height: 42px;
    }

    /* CTA */
    .cta-instagram {
        font-size: 1rem;
        padding: 1rem;
    }

    /* Products page sections */
    .product-section,
    .about-section {
        padding: 2rem 0.8rem 1.5rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    h1 {
        font-size: 1.8rem;
    }

    .subtitle {
        font-size: 0.95rem;
    }

    /* Cards within carousel — prevent clipping */
    .carousel-slide {
        padding: 0.5rem;
    }

    .carousel-slide .card {
        max-width: 100%;
        padding: 1.2rem 1rem;
    }

    /* Instagram float */
    .instagram-float {
        width: 44px;
        height: 44px;
        bottom: 14px;
        right: 14px;
    }

    .instagram-float svg {
        width: 22px;
        height: 22px;
    }
}

/* ---- Card Link in productos.html ---- */
.card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s;
}

.card-link:hover .card {
    transform: translateY(-8px);
    box-shadow: 0 15px 25px rgba(138, 28, 49, 0.15);
}

.card-link .card:hover {
    transform: none;
}

.card-detail-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: 1rem;
    color: var(--bordo-claro);
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.2s, gap 0.2s;
}

.card-link:hover .card-detail-link {
    color: var(--bordo-principal);
    gap: 0.6rem;
}

/* ═══════════════════════════════════════════════════════════════════════
   ROSARIO INTERACTIVO — SVG Beads & Interactive States
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Contenedor del SVG ── */
.rosary-svg {
    width: 100%;
    max-width: 400px;
    height: auto;
    margin: 0 auto;
    display: block;
    user-select: none;
    -webkit-user-select: none;
}

/* ── Cuenta genérica (círculo) ── */
.rosary-bead {
    cursor: pointer;
    transition: fill 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                stroke 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                stroke-width 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                filter 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Propagar cursor y evitar selección en todos los hijos de las cuentas */
.rosary-bead,
.rosary-bead * {
    cursor: pointer !important;
    user-select: none;
    -webkit-user-select: none;
}

.rosary-bead circle,
.rosary-bead polygon,
.rosary-bead path {
    transition: fill 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                stroke 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                stroke-width 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                filter 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Cuentas chicas — estado base */
circle.rosary-bead {
    fill: #e8d48b;
    stroke: #c9a94e;
    stroke-width: 1;
    filter: drop-shadow(0 1px 1px rgba(0,0,0,0.15));
}

/* Cuentas grandes — estado base */
circle.rosary-bead.rosary-bead--large {
    fill: #c9a94e;
    stroke: #a8852e;
    stroke-width: 1.5;
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.2));
}

/* ── Cruz ── */
.rosary-bead--cross .rosary-cross-path {
    fill: #c9a94e;
    stroke: #a8852e;
    stroke-width: 1;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.25));
}

/* ── Medalla (colgante) ── */
.rosary-medal-outer {
    fill: #c9a94e;
    stroke: #a8852e;
    stroke-width: 1.5;
}

.rosary-medal-inner {
    fill: #e8d48b;
    stroke: none;
}

/* ── Transición (diamante entre decenas) ── */
.rosary-transition-diamond {
    fill: #d4b85c;
    stroke: #a8852e;
    stroke-width: 0.8;
    opacity: 0.7;
}

/* ── Medalla central (cierre) — Invisible hasta el paso final ── */
/* Especificidad alta para sobreescribir circle.rosary-bead */
circle.rosary-bead.rosary-bead--center-medal {
    fill: transparent;
    stroke: transparent;
    stroke-width: 0;
    opacity: 0;
    pointer-events: none;
    filter: none;
}

/* ═══════════════════════════════════════════════════════════════════════
   ESTADOS INTERACTIVOS
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Hover (todas las cuentas) ── */
circle.rosary-bead:hover,
.rosary-bead:hover .rosary-cross-path,
.rosary-bead:hover .rosary-medal-outer,
.rosary-bead:hover .rosary-transition-diamond {
    filter: drop-shadow(0 0 6px rgba(163, 44, 69, 0.5)) brightness(1.1);
}

/* ── ACTIVA — La cuenta del paso actual ── */
circle.rosary-bead.active {
    fill: var(--bordo-claro, #a32c45);
    stroke: var(--bordo-oscuro, #b83851);
    stroke-width: 2.5;
    filter: drop-shadow(0 0 8px rgba(163, 44, 69, 0.6));
    animation: rosary-pulse 1.8s ease-in-out infinite;
}

circle.rosary-bead.rosary-bead--large.active {
    fill: var(--bordo-principal, #38030e);
    stroke: var(--bordo-claro, #a32c45);
    stroke-width: 3;
    filter: drop-shadow(0 0 12px rgba(163, 44, 69, 0.7));
}

.rosary-bead--cross.active .rosary-cross-path {
    fill: var(--bordo-claro, #a32c45);
    stroke: var(--bordo-oscuro, #b83851);
    stroke-width: 1.5;
    filter: drop-shadow(0 0 10px rgba(163, 44, 69, 0.7));
    animation: rosary-pulse 1.8s ease-in-out infinite;
}

.rosary-bead--medal.active .rosary-medal-outer {
    fill: var(--bordo-claro, #a32c45);
    stroke: var(--bordo-oscuro, #b83851);
    stroke-width: 2;
    filter: drop-shadow(0 0 10px rgba(163, 44, 69, 0.6));
    animation: rosary-pulse 1.8s ease-in-out infinite;
}

.rosary-bead--medal.active .rosary-medal-inner {
    fill: #f0d0d8;
}

.rosary-bead--transition.active .rosary-transition-diamond {
    fill: var(--bordo-claro, #a32c45);
    stroke: var(--bordo-oscuro, #b83851);
    stroke-width: 1.5;
    opacity: 1;
    filter: drop-shadow(0 0 8px rgba(163, 44, 69, 0.6));
    animation: rosary-pulse 1.8s ease-in-out infinite;
}

circle.rosary-bead.rosary-bead--center-medal.active {
    fill: var(--bordo-claro, #a32c45);
    stroke: var(--bordo-oscuro, #b83851);
    stroke-width: 2.5;
    opacity: 1;
    pointer-events: auto;
    filter: drop-shadow(0 0 14px rgba(163, 44, 69, 0.8));
    animation: rosary-pulse 1.8s ease-in-out infinite;
}

/* ── COMPLETADA — Cuentas ya rezadas ── */
circle.rosary-bead.completed {
    fill: #8a6d3b;
    stroke: #6b5530;
    stroke-width: 1;
    opacity: 0.55;
}

circle.rosary-bead.rosary-bead--large.completed {
    fill: #7a5f2e;
    stroke: #5c4722;
    opacity: 0.55;
}

.rosary-bead--cross.completed .rosary-cross-path {
    fill: #8a6d3b;
    stroke: #6b5530;
    opacity: 0.55;
}

.rosary-bead--medal.completed .rosary-medal-outer {
    fill: #8a6d3b;
    stroke: #6b5530;
    opacity: 0.55;
}

.rosary-bead--medal.completed .rosary-medal-inner {
    fill: #a88a5a;
    opacity: 0.55;
}

.rosary-bead--transition.completed .rosary-transition-diamond {
    fill: #8a6d3b;
    stroke: #6b5530;
    opacity: 0.4;
}

/* ── Animación de pulso suave para la cuenta activa ── */
@keyframes rosary-pulse {
    0%, 100% {
        filter: drop-shadow(0 0 6px rgba(163, 44, 69, 0.5));
    }
    50% {
        filter: drop-shadow(0 0 14px rgba(163, 44, 69, 0.85));
    }
}

/* ── Focus: eliminar cualquier outline del navegador ── */
.rosary-bead:focus,
.rosary-bead:focus-visible {
    outline: none;
}
