/* ========================================
   LAS LUCIÉRNAGAS — PREMIUM EXPERIENCE
   Visual effects that make this feel like 
   a luxury brand, not a WordPress site.
   ======================================== */

/* ----------------------------------------
   CUSTOM SCROLLBAR
   ---------------------------------------- */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--rose) 0%, var(--gold) 100%);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gold);
}

html {
    scrollbar-width: thin;
    scrollbar-color: var(--gold) var(--bg);
}

/* ----------------------------------------
   PAGE LOAD ANIMATION
   ---------------------------------------- */
.site {
    animation: siteReveal 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

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

/* ----------------------------------------
   SCROLL REVEAL SYSTEM
   ---------------------------------------- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-left.revealed {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-right.revealed {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-scale.revealed {
    opacity: 1;
    transform: scale(1);
}

/* Stagger children */
.stagger-children .reveal:nth-child(1) { transition-delay: 0s; }
.stagger-children .reveal:nth-child(2) { transition-delay: 0.1s; }
.stagger-children .reveal:nth-child(3) { transition-delay: 0.2s; }
.stagger-children .reveal:nth-child(4) { transition-delay: 0.3s; }
.stagger-children .reveal:nth-child(5) { transition-delay: 0.4s; }
.stagger-children .reveal:nth-child(6) { transition-delay: 0.5s; }

/* ----------------------------------------
   GLASS MORPHISM HEADER
   ---------------------------------------- */
.site-header {
    background-color: rgba(253, 242, 240, 0.85) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(240, 222, 221, 0.6) !important;
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.site-header.scrolled {
    background-color: rgba(253, 242, 240, 0.95) !important;
    box-shadow: 0 4px 30px rgba(61, 44, 46, 0.08);
}

.site-header.scrolled .header-inner {
    padding: 16px 0;
}

.site-header.scrolled .site-logo-text .logo-name {
    font-size: 1.8rem;
}

/* ----------------------------------------
   MARQUEE TOP BAR
   ---------------------------------------- */
.top-bar {
    overflow: hidden;
    position: relative;
}

.top-bar-marquee {
    display: flex;
    align-items: center;
    animation: marquee 30s linear infinite;
    white-space: nowrap;
    gap: 80px;
}

.top-bar-marquee:hover {
    animation-play-state: paused;
}

.top-bar-marquee span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.top-bar-marquee .marquee-diamond {
    width: 4px;
    height: 4px;
    background: var(--gold-light);
    transform: rotate(45deg);
    display: inline-flex;
    align-self: center;
    opacity: 0.6;
    flex-shrink: 0;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ----------------------------------------
   HERO ENHANCEMENTS
   ---------------------------------------- */
.hero-section {
    position: relative;
    min-height: 600px !important;
    overflow: hidden;
}

/* Animated gradient background */
.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        var(--black) 0%,
        #5C3D40 25%,
        var(--rose-dark) 50%,
        #5C3D40 75%,
        var(--black) 100%
    );
    background-size: 400% 400%;
    animation: heroGradient 12s ease infinite;
    z-index: 0;
}

@keyframes heroGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Firefly particles canvas */
.hero-fireflies {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

/* Fallback CSS fireflies */
.firefly {
    position: absolute;
    width: 3px;
    height: 3px;
    background: var(--gold-light);
    border-radius: 50%;
    box-shadow: 0 0 6px 2px rgba(226, 208, 164, 0.4),
                0 0 12px 4px rgba(226, 208, 164, 0.2);
    animation: fireflyFloat 6s ease-in-out infinite,
               fireflyGlow 3s ease-in-out infinite alternate;
    opacity: 0;
}

.firefly:nth-child(1) { left: 10%; top: 20%; animation-delay: 0s, 0.5s; animation-duration: 7s, 2.5s; }
.firefly:nth-child(2) { left: 25%; top: 60%; animation-delay: 1s, 0s; animation-duration: 8s, 3s; }
.firefly:nth-child(3) { left: 50%; top: 30%; animation-delay: 2s, 1s; animation-duration: 6s, 2.8s; }
.firefly:nth-child(4) { left: 70%; top: 70%; animation-delay: 0.5s, 0.3s; animation-duration: 9s, 3.2s; }
.firefly:nth-child(5) { left: 85%; top: 40%; animation-delay: 3s, 1.5s; animation-duration: 7.5s, 2.6s; }
.firefly:nth-child(6) { left: 15%; top: 80%; animation-delay: 1.5s, 0.8s; animation-duration: 8.5s, 3.1s; }
.firefly:nth-child(7) { left: 40%; top: 15%; animation-delay: 2.5s, 0.2s; animation-duration: 6.5s, 2.7s; }
.firefly:nth-child(8) { left: 60%; top: 50%; animation-delay: 0.8s, 1.2s; animation-duration: 7.2s, 2.9s; }
.firefly:nth-child(9) { left: 90%; top: 25%; animation-delay: 3.5s, 0.6s; animation-duration: 8.2s, 3.3s; }
.firefly:nth-child(10) { left: 35%; top: 85%; animation-delay: 1.8s, 1.8s; animation-duration: 6.8s, 2.4s; }
.firefly:nth-child(11) { left: 5%; top: 45%; animation-delay: 4s, 0.4s; animation-duration: 9.2s, 3.5s; }
.firefly:nth-child(12) { left: 75%; top: 10%; animation-delay: 2.2s, 1.1s; animation-duration: 7.8s, 2.3s; }

@keyframes fireflyFloat {
    0%, 100% {
        transform: translate(0, 0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    50% {
        transform: translate(30px, -40px);
        opacity: 0.8;
    }
    90% {
        opacity: 1;
    }
}

@keyframes fireflyGlow {
    0% {
        box-shadow: 0 0 4px 1px rgba(226, 208, 164, 0.3),
                    0 0 8px 3px rgba(226, 208, 164, 0.1);
    }
    100% {
        box-shadow: 0 0 8px 3px rgba(226, 208, 164, 0.6),
                    0 0 16px 6px rgba(226, 208, 164, 0.3);
    }
}

/* Hero text stagger entrance */
.hero-content .hero-subtitle {
    animation: heroTextIn 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.3s both;
}

.hero-content .hero-title {
    animation: heroTextIn 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.5s both;
}

.hero-content .hero-description {
    animation: heroTextIn 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.7s both;
}

.hero-content .hero-button {
    animation: heroTextIn 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.9s both;
}

@keyframes heroTextIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero button glow */
.hero-button {
    position: relative;
    overflow: hidden;
}

.hero-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: none;
    animation: buttonShine 3s ease-in-out infinite;
}

@keyframes buttonShine {
    0% { left: -100%; }
    50%, 100% { left: 100%; }
}

/* ----------------------------------------
   ELEGANT SECTION ORNAMENTS
   ---------------------------------------- */
.section-header {
    position: relative;
}

.section-header::after {
    content: '';
    display: block;
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    margin: 18px auto 0;
}

.section-header .section-title {
    position: relative;
}

/* Diamond ornament between subtitle and content */
.section-ornament {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 12px;
}

.section-ornament::before,
.section-ornament::after {
    content: '';
    width: 40px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-light));
}

.section-ornament::after {
    background: linear-gradient(90deg, var(--gold-light), transparent);
}

.section-ornament .diamond {
    width: 6px;
    height: 6px;
    background: var(--gold);
    transform: rotate(45deg);
    flex-shrink: 0;
}

/* ----------------------------------------
   PRODUCT CARD — SHINE SWEEP
   ---------------------------------------- */
ul.products li.product {
    position: relative;
    overflow: hidden;
}

ul.products li.product .woocommerce-loop-product__link {
    position: relative;
    overflow: hidden;
}

/* Diagonal shine sweep on hover */
ul.products li.product .woocommerce-loop-product__link::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 50%;
    height: 200%;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.15) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(25deg);
    transition: none;
    pointer-events: none;
    z-index: 5;
    opacity: 0;
}

ul.products li.product:hover .woocommerce-loop-product__link::after {
    animation: shineSweep 0.7s ease forwards;
}

@keyframes shineSweep {
    0% {
        left: -60%;
        opacity: 1;
    }
    100% {
        left: 130%;
        opacity: 0;
    }
}

/* Product card subtle border glow on hover */
ul.products li.product:hover {
    border-color: rgba(201, 169, 110, 0.3);
    box-shadow: 0 8px 30px rgba(61, 44, 46, 0.1),
                0 0 0 1px rgba(201, 169, 110, 0.15);
}

/* Add to cart button slide-up reveal */
ul.products li.product .button {
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                background-color 0.3s ease;
    position: relative;
}

ul.products li.product:hover .button {
    transform: translateY(0);
    opacity: 1;
}

/* ----------------------------------------
   CATEGORY CARDS — PREMIUM HOVER
   ---------------------------------------- */
.category-card {
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 2px solid transparent;
    border-radius: var(--radius);
    z-index: 3;
    transition: border-color 0.5s ease;
    pointer-events: none;
}

.category-card:hover::before {
    border-color: rgba(201, 169, 110, 0.5);
}

.category-info {
    transform: translateY(8px);
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.category-card:hover .category-info {
    transform: translateY(0);
}

.category-name {
    position: relative;
    display: inline-block;
}

.category-name::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--gold-light);
    transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.category-card:hover .category-name::after {
    width: 100%;
}

/* ----------------------------------------
   TRUST SECTION — FLOAT ANIMATION
   ---------------------------------------- */
.trust-item {
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.trust-item:hover {
    transform: translateY(-8px);
}

.trust-icon {
    display: inline-block !important;
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.trust-item:hover .trust-icon {
    transform: scale(1.15);
}

/* ----------------------------------------
   BUTTONS — PREMIUM INTERACTIONS
   ---------------------------------------- */
.hero-button,
.button-outline,
.read-more,
.woocommerce .single_add_to_cart_button {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

.button-outline:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(196, 135, 143, 0.3);
}

/* ----------------------------------------
   SINGLE PRODUCT — PREMIUM LAYOUT
   ---------------------------------------- */
.woocommerce div.product .woocommerce-product-gallery {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
}

.woocommerce div.product .woocommerce-product-gallery img {
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.woocommerce div.product .woocommerce-product-gallery:hover img {
    transform: scale(1.03);
}

/* Price badge styling */
.woocommerce div.product p.price {
    position: relative;
    display: inline-block;
}

.woocommerce div.product p.price::before {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--gold), transparent);
    border-radius: 1px;
}

/* ----------------------------------------
   LINKS — ANIMATED UNDERLINE
   ---------------------------------------- */
.main-navigation a {
    position: relative;
}

.main-navigation a::after {
    transform-origin: right !important;
}

.main-navigation a:hover::after,
.main-navigation .current-menu-item a::after {
    transform-origin: left !important;
}

/* ----------------------------------------
   FOOTER — PREMIUM TOUCHES
   ---------------------------------------- */
.site-footer {
    position: relative;
    overflow: hidden;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* Newsletter section */
.footer-newsletter {
    text-align: center;
    padding: 50px 0 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 40px;
}

.footer-newsletter h3 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    color: var(--white);
    margin-bottom: 8px;
    font-weight: 500;
}

.footer-newsletter p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    margin-bottom: 24px;
}

.newsletter-form {
    display: flex;
    max-width: 440px;
    margin: 0 auto;
    gap: 0;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.newsletter-form input[type="email"] {
    flex: 1;
    padding: 14px 20px;
    border: none;
    background: rgba(255, 255, 255, 0.06);
    color: var(--white);
    font-family: var(--font-body);
    font-size: 0.9rem;
    outline: none;
    transition: background 0.3s ease;
}

.newsletter-form input[type="email"]::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.newsletter-form input[type="email"]:focus {
    background: rgba(255, 255, 255, 0.1);
}

.newsletter-form button {
    padding: 14px 28px;
    background: var(--gold);
    color: var(--white);
    border: none;
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.3s ease;
    white-space: nowrap;
}

.newsletter-form button:hover {
    background: var(--gold-dark);
}

/* Footer brand echo */
.footer-brand {
    text-align: center;
    margin-bottom: 30px;
}

.footer-brand .footer-logo-text {
    font-family: 'Great Vibes', cursive;
    font-size: 2rem;
    color: var(--rose-light);
    display: block;
    margin-bottom: 4px;
    opacity: 0.8;
}

.footer-brand .footer-tagline {
    font-size: 0.7rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.3);
}

/* ----------------------------------------
   IMAGE LAZY REVEAL
   ---------------------------------------- */
.woocommerce ul.products li.product a img,
ul.products li.product img {
    transition: transform 0.5s ease, opacity 0.6s ease !important;
}

/* ----------------------------------------
   SALE BADGE — PREMIUM
   ---------------------------------------- */
.woocommerce span.onsale {
    background: linear-gradient(135deg, var(--rose) 0%, var(--rose-dark) 100%) !important;
    border-radius: 0 !important;
    position: absolute !important;
    top: 12px !important;
    left: 12px !important;
    z-index: 5 !important;
    padding: 6px 16px !important;
    font-size: 0.7rem !important;
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.04); }
}

/* ----------------------------------------
   SMOOTH TEXT SELECTION
   ---------------------------------------- */
::selection {
    background: var(--rose);
    color: var(--white);
}

::-moz-selection {
    background: var(--rose);
    color: var(--white);
}

/* ----------------------------------------
   LOADING SHIMMER for images
   ---------------------------------------- */
@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

.category-image--placeholder {
    background: linear-gradient(
        90deg,
        var(--rose-dark) 0%,
        var(--gold) 25%,
        var(--rose-dark) 50%
    ) !important;
    background-size: 2000px 100% !important;
    animation: shimmer 3s linear infinite;
}

/* ----------------------------------------
   RESPONSIVE PREMIUM ADJUSTMENTS
   ---------------------------------------- */
@media (max-width: 768px) {
    .top-bar-marquee {
        animation-duration: 20s;
    }

    .hero-section {
        min-height: 480px !important;
    }

    .firefly:nth-child(n+7) {
        display: none;
    }

    .newsletter-form {
        flex-direction: column;
        border-radius: 0;
        border: none;
    }

    .newsletter-form input[type="email"] {
        border: 1px solid rgba(255, 255, 255, 0.12);
        border-radius: var(--radius);
        margin-bottom: 8px;
    }

    .newsletter-form button {
        border-radius: var(--radius);
        padding: 14px;
    }

    .footer-newsletter h3 {
        font-size: 1.3rem;
    }

    ul.products li.product .button {
        transform: translateY(0);
        opacity: 1;
    }
}

@media (max-width: 480px) {
    .hero-section {
        min-height: 400px !important;
    }

    .firefly:nth-child(n+5) {
        display: none;
    }
}

/* ----------------------------------------
   PRINT: Remove all effects
   ---------------------------------------- */
@media print {
    .hero-fireflies,
    .firefly,
    .top-bar-marquee {
        display: none !important;
    }

    .reveal,
    .reveal-left,
    .reveal-right,
    .reveal-scale {
        opacity: 1 !important;
        transform: none !important;
    }
}
