/* ==========================================================================
   JR ACCESORIOS — PLANTILLA BOUTIQUE PARA WORDPRESS (v1.0.0)
   ========================================================================== */

:root {
    --primary-color: #667B5E;       /* Verde oliva */
    --accent-color: #B58D3F;        /* Dorado apagado */
    --bg-color: #FBF8F2;            /* Crema muy claro */
    --text-color: #302720;          /* Marrón oscuro */
    --cta-bg-color: #EEF1E7;        /* Verde muy pálido */
    --line-color: #E8DFD4;          /* Beige claro para divisores */
    --whatsapp-color: #5B8B50;      /* Verde WhatsApp */
    --font-heading: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --container-max: 1180px;
    --header-height: 78px;
    --logo-max-width: 150px;
    --catalog-rows: 2;
    --catalog-cols-pc: 4;
}

/* Reset y base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    font-size: 0.95rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease, opacity 0.2s ease;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

.jra-container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

/* Botones universales */
.jra-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 24px;
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.25s ease;
    cursor: pointer;
    text-align: center;
}

.jra-btn-primary {
    background-color: var(--primary-color);
    color: #ffffff;
}

.jra-btn-primary:hover {
    background-color: #55684e;
    color: #ffffff;
}

.jra-btn-outline {
    background-color: transparent;
    border: 1px solid var(--line-color);
    color: var(--text-color);
}

.jra-btn-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* ==========================================================================
   HEADER Y NAVEGACIÓN
   ========================================================================== */
.jra-site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--header-height);
    background-color: rgba(251, 248, 242, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line-color);
    display: flex;
    align-items: center;
}

.jra-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.jra-brand {
    display: flex;
    align-items: center;
}

.jra-logo {
    max-width: var(--logo-max-width);
    height: auto;
    object-fit: contain;
}

.jra-brand-text {
    font-family: var(--font-heading);
    font-size: 1.85rem;
    font-weight: 600;
    color: var(--text-color);
    letter-spacing: 0.5px;
}

.jra-nav-menu ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 32px;
}

.jra-nav-menu a {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-color);
    position: relative;
    padding: 6px 0;
}

.jra-nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--accent-color);
    transition: width 0.25s ease;
}

.jra-nav-menu a:hover::after {
    width: 100%;
}

.jra-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
}

.jra-hamburger-line {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--text-color);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* ==========================================================================
   1. HERO SLIDER
   ========================================================================== */
.jra-hero-section {
    position: relative;
    width: 100%;
    overflow: hidden;
    background-color: #F8F5EE;
}

.jra-slider-wrapper {
    position: relative;
    width: 100%;
    min-height: 470px;
}

.jra-slider-track {
    position: relative;
    width: 100%;
    min-height: 470px;
}

.jra-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.65s ease-in-out, visibility 0.65s ease-in-out;
    display: flex;
    align-items: center;
}

.jra-slide.is-active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

.jra-slide-container {
    height: 100%;
    display: flex;
    align-items: center;
}

.jra-slide-content {
    max-width: 540px;
    padding: 40px 30px;
    border-radius: 8px;
    background: linear-gradient(90deg, rgba(251, 248, 242, 0.94) 0%, rgba(251, 248, 242, 0.85) 60%, rgba(251, 248, 242, 0.2) 100%);
}

.jra-slide-title {
    font-family: var(--font-heading);
    font-size: 3.2rem;
    font-weight: 600;
    line-height: 1.15;
    color: var(--text-color);
    margin-bottom: 16px;
}

.jra-slide-subtitle {
    font-size: 1.1rem;
    line-height: 1.5;
    color: var(--text-color);
    margin-bottom: 24px;
    opacity: 0.9;
}

.jra-btn-hero {
    background-color: var(--primary-color);
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 1.15rem;
    padding: 12px 28px;
}

.jra-btn-hero:hover {
    background-color: #55684e;
}

/* Flechas y puntos del slider */
.jra-slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: rgba(251, 248, 242, 0.85);
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.jra-slider-arrow:hover {
    background-color: #ffffff;
    transform: translateY(-50%) scale(1.05);
}

.jra-slider-prev { left: 24px; }
.jra-slider-next { right: 24px; }

.jra-slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 8px;
}

.jra-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background-color: rgba(48, 39, 32, 0.25);
    transition: all 0.3s ease;
}

.jra-dot.is-active {
    background-color: var(--accent-color);
    width: 22px;
    border-radius: 10px;
}

/* ==========================================================================
   2. CATÁLOGO BOUTIQUE Y GRID HORIZONTAL
   ========================================================================== */
.jra-catalog-section {
    padding-top: 54px;
    padding-bottom: 48px;
}

.jra-section-header {
    text-align: center;
    margin-bottom: 28px;
}

.jra-section-title {
    font-family: var(--font-heading);
    font-size: 2.4rem;
    font-weight: 600;
    color: var(--text-color);
}

.jra-section-subtitle {
    margin-top: 8px;
    font-size: 1rem;
    color: #6e645a;
}

.jra-filters-wrapper {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 32px;
}

.jra-filter-btn {
    padding: 7px 18px;
    border-radius: 20px;
    border: 1px solid var(--line-color);
    background-color: #ffffff;
    color: var(--text-color);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.jra-filter-btn:hover {
    border-color: var(--primary-color);
}

.jra-filter-btn.is-active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #ffffff;
}

/* Pista horizontal con CSS Grid */
.jra-catalog-track-wrapper {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
}

.jra-catalog-track {
    display: grid;
    grid-auto-flow: column;
    grid-template-rows: repeat(var(--catalog-rows), auto);
    grid-auto-columns: calc((100% - (var(--catalog-cols-pc) - 1) * 20px) / var(--catalog-cols-pc));
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 15px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    user-select: none;
    cursor: grab;
}

.jra-catalog-track:active {
    cursor: grabbing;
}

.jra-catalog-track::-webkit-scrollbar {
    display: none;
}

/* Tarjeta de producto */
.jra-card {
    background: #ffffff;
    border: 1px solid var(--line-color);
    border-radius: 6px;
    overflow: hidden;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    cursor: pointer;
}

.jra-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(48, 39, 32, 0.06);
}

.jra-card-img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background-color: #F8F5EE;
}

.jra-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.jra-card:hover .jra-card-img {
    transform: scale(1.03);
}

.jra-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9b9083;
    font-size: 0.85rem;
    background-color: #F3EFE6;
}

.jra-card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: var(--accent-color);
    color: #ffffff;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

.jra-card-body {
    padding: 14px 14px 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-grow: 1;
}

.jra-card-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 6px;
    line-height: 1.25;
}

.jra-card-price {
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.jra-card-old-price {
    color: #888888;
    margin-right: 6px;
    text-decoration: line-through;
}

.jra-card-current-price {
    font-weight: 600;
    color: var(--primary-color);
}

.jra-card-action-btn {
    margin-top: auto;
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--line-color);
    background-color: #ffffff;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-color);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.jra-card-action-btn:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #ffffff;
}

.jra-catalog-scroll-hint {
    text-align: center;
    margin-top: 14px;
    font-size: 0.85rem;
    color: #887d72;
}

.jra-catalog-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #777;
}

/* ==========================================================================
   3. SECCIÓN SOBRE MÍ / TALLER
   ========================================================================== */
.jra-about-section {
    padding: 70px 0;
    background-color: #ffffff;
}

.jra-about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.jra-about-grid.is-reversed .jra-about-media {
    order: 2;
}

.jra-about-media {
    width: 100%;
    min-height: 360px;
    border-radius: 8px;
    overflow: hidden;
    background-color: #F8F5EE;
}

.jra-about-img {
    width: 100%;
    height: 100%;
    min-height: 360px;
    object-fit: cover;
}

.jra-about-placeholder {
    width: 100%;
    min-height: 360px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #F2EDE4;
    color: #887d72;
    padding: 30px;
    text-align: center;
}

.jra-about-title {
    font-family: var(--font-heading);
    font-size: 2.6rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 20px;
    line-height: 1.2;
}

.jra-about-text {
    font-size: 1.05rem;
    line-height: 1.75;
    color: #4a3e35;
}

/* ==========================================================================
   4. LLAMADO FINAL (CTA WHATSAPP)
   ========================================================================== */
.jra-cta-section {
    padding: 50px 0;
}

.jra-cta-box {
    background-color: var(--cta-bg-color);
    border-radius: 10px;
    padding: 40px 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.jra-cta-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 6px;
}

.jra-cta-subtitle {
    font-size: 1rem;
    color: #554a40;
}

.jra-btn-cta {
    background-color: var(--primary-color);
    color: #ffffff;
    font-size: 1rem;
    font-weight: 500;
    padding: 12px 28px;
    white-space: nowrap;
}

.jra-btn-cta:hover {
    background-color: #55684e;
}

/* ==========================================================================
   FOOTER Y BOTÓN FLOTANTE
   ========================================================================== */
.jra-site-footer {
    padding: 40px 0;
    border-top: 1px solid var(--line-color);
    background-color: var(--bg-color);
}

.jra-footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.jra-footer-brand {
    display: flex;
    align-items: center;
    gap: 20px;
}

.jra-footer-logo {
    max-width: 120px;
    height: auto;
}

.jra-footer-brand-text {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-color);
}

.jra-footer-tagline {
    font-size: 0.9rem;
    color: #776c61;
}

.jra-footer-social {
    display: flex;
    align-items: center;
    gap: 16px;
}

.jra-footer-social a {
    color: var(--text-color);
    display: inline-flex;
    padding: 6px;
    border-radius: 50%;
    transition: color 0.2s, transform 0.2s;
}

.jra-footer-social a:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* Botón flotante */
.jra-floating-whatsapp {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: var(--whatsapp-color);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(91, 139, 80, 0.4);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.jra-floating-whatsapp:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(91, 139, 80, 0.5);
}

/* ==========================================================================
   VISOR AMPLIADO / LIGHTBOX (MODAL ACCESIBLE)
   ========================================================================== */
.jra-lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.jra-lightbox-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.jra-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background-color: rgba(48, 39, 32, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.jra-lightbox-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 1080px;
    max-height: 90vh;
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
}

.jra-lightbox-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 20;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #ffffff;
    border: 1px solid var(--line-color);
    color: var(--text-color);
    font-size: 22px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    transition: background-color 0.2s;
}

.jra-lightbox-close:hover {
    background-color: #f5f5f5;
}

.jra-lightbox-content {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    height: 100%;
    max-height: 88vh;
    overflow: hidden;
}

.jra-lightbox-col-img {
    background-color: #FAF8F4;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    overflow: hidden;
}

.jra-lightbox-img-wrap {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.jra-lightbox-img-wrap img {
    max-width: 100%;
    max-height: 72vh;
    object-fit: contain;
    border-radius: 4px;
}

.jra-lightbox-col-info {
    padding: 40px 34px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.jra-lb-badge {
    align-self: flex-start;
    background-color: var(--accent-color);
    color: #ffffff;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.jra-lb-status {
    align-self: flex-start;
    background-color: #EEF1E7;
    color: var(--primary-color);
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.jra-lb-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-color);
    margin-bottom: 12px;
}

.jra-lb-price-box {
    margin-bottom: 16px;
    font-size: 1.25rem;
}

.jra-lb-regular-price {
    color: #888888;
    text-decoration: line-through;
    margin-right: 8px;
    font-size: 1rem;
}

.jra-lb-sale-price {
    font-weight: 600;
    color: var(--primary-color);
}

.jra-lb-excerpt {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #554b42;
    margin-bottom: 20px;
}

.jra-lb-features-box {
    margin-bottom: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--line-color);
}

.jra-lb-features-title {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    color: #776b60;
}

.jra-lb-features-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.jra-lb-features-list li {
    font-size: 0.9rem;
    color: var(--text-color);
    position: relative;
    padding-left: 18px;
}

.jra-lb-features-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-size: 1.2rem;
    line-height: 1;
}

.jra-lb-actions {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 15px;
}

.jra-lb-actions .jra-btn {
    width: 100%;
}

/* ==========================================================================
   RESPONSIVE DESIGN (BREAKPOINTS 900PX Y 650PX)
   ========================================================================== */
@media (max-width: 900px) {
    .jra-menu-toggle {
        display: flex;
    }

    .jra-nav-menu {
        position: absolute;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background-color: #FBF8F2;
        border-bottom: 1px solid var(--line-color);
        padding: 20px 24px;
        display: none;
    }

    .jra-nav-menu.is-active {
        display: block;
    }

    .jra-nav-menu ul {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .jra-catalog-track {
        grid-auto-columns: calc((100% - 20px) / 2.5);
    }

    .jra-about-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .jra-about-grid.is-reversed .jra-about-media {
        order: 0;
    }

    .jra-lightbox-content {
        grid-template-columns: 1fr;
        overflow-y: auto;
    }

    .jra-lightbox-col-img {
        max-height: 320px;
        padding: 20px;
    }

    .jra-lightbox-img-wrap img {
        max-height: 280px;
    }

    .jra-lightbox-col-info {
        padding: 24px 20px;
    }
}

@media (max-width: 650px) {
    .jra-slide-content {
        max-width: 100%;
        padding: 30px 20px;
        background: linear-gradient(180deg, rgba(251, 248, 242, 0) 0%, rgba(251, 248, 242, 0.95) 40%, rgba(251, 248, 242, 0.98) 100%);
    }

    .jra-slide-container {
        align-items: flex-end;
    }

    .jra-slide-title {
        font-size: 2.2rem;
    }

    .jra-slider-arrow {
        display: none;
    }

    .jra-catalog-track {
        grid-auto-columns: 72vw;
    }

    .jra-cta-box {
        flex-direction: column;
        text-align: center;
        padding: 30px 20px;
    }

    .jra-footer-inner {
        flex-direction: column;
        text-align: center;
    }

    .jra-floating-whatsapp {
        width: 48px;
        height: 48px;
        bottom: 18px;
        right: 18px;
    }

    .jra-floating-whatsapp svg {
        width: 25px;
        height: 25px;
    }
}

/* Accesibilidad: Respetar preferencias de reducción de movimiento */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
