/*
 Theme Name:   GeneratePress Child
 Theme URI:    https://generatepress.com
 Description:  Default GeneratePress child theme
 Author:       Tom Usborne
 Author URI:   https://tomusborne.com
 Template:     generatepress
 Version:      0.1
*/

/*--------------------------------------------------------------
# MEGA WOW EFFECTS
--------------------------------------------------------------*/

/* Startup loader */
.wow-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 1s ease-out, transform 1s ease-out;
}

.wow-loader.hide {
    opacity: 0;
    transform: scale(1.5);
    pointer-events: none;
    visibility: hidden;
}

/* Extra security - force disappearance after 3 seconds */
.wow-loader {
    animation: force-hide 3s ease-out forwards;
}

@keyframes force-hide {
    0%, 66% { 
        opacity: 1; 
        visibility: visible; 
    }
    100% { 
        opacity: 0; 
        visibility: hidden; 
        display: none;
    }
}

.loader-text {
    font-size: 5rem;
    font-weight: 900;
    color: white;
    text-transform: uppercase;
    letter-spacing: 1rem;
    animation: pulse-glow 2s ease-in-out infinite;
    text-shadow: 0 0 30px rgba(255,255,255,0.5);
}

.loader-subtitle {
    font-size: 1.5rem;
    color: rgba(255,255,255,0.8);
    margin-top: 1rem;
    animation: fade-slide 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { 
        transform: scale(1);
        filter: brightness(1);
    }
    50% { 
        transform: scale(1.05);
        filter: brightness(1.2);
    }
}

@keyframes fade-slide {
    0%, 100% { opacity: 0.5; transform: translateY(10px); }
    50% { opacity: 1; transform: translateY(0); }
}

/* Canvas for particles */
#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition: opacity 2s ease-in;
}

#particles-canvas.show {
    opacity: 0.8;
}

/* 3D entrance animation for title */
@keyframes hero-3d-entrance {
    0% {
        opacity: 0;
        transform: perspective(1000px) rotateX(-90deg) translateY(100px) scale(0.5);
        filter: blur(20px);
    }
    50% {
        transform: perspective(1000px) rotateX(-45deg) translateY(50px) scale(0.8);
        filter: blur(10px);
    }
    100% {
        opacity: 1;
        transform: perspective(1000px) rotateX(0) translateY(0) scale(1);
        filter: blur(0);
    }
}

/* Neon effect on main title */
.gb-headline-hero-title {
    animation: hero-3d-entrance 2s ease-out forwards, neon-flicker 3s ease-in-out infinite;
    transform-style: preserve-3d;
    transition: all 0.3s ease;
}

@keyframes neon-flicker {
    0%, 100% {
        text-shadow: 
            0 0 5px #fff,
            0 0 10px #fff,
            0 0 15px #FFD700,
            0 0 20px #FFD700,
            0 0 35px #FFD700,
            0 0 40px #FFD700;
    }
    50% {
        text-shadow: 
            0 0 10px #fff,
            0 0 20px #fff,
            0 0 25px #FFD700,
            0 0 30px #FFD700,
            0 0 45px #FFD700,
            0 0 50px #FFD700;
    }
}

/* Counters with glowing effect */
.counting {
    background: linear-gradient(45deg, #FFD700, #FFA500, #FF6347, #FFD700);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-wave 3s ease infinite;
    filter: drop-shadow(0 0 20px rgba(255,215,0,0.5));
    transition: transform 0.3s ease;
}

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

/* Scroll reveal */
.wow-reveal {
    opacity: 0;
    transform: translateY(50px) scale(0.9) rotateX(-10deg);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.wow-revealed {
    opacity: 1;
    transform: translateY(0) scale(1) rotateX(0);
}

/* Stats boxes with levitation effect */
[class*="stat1"], [class*="stat2"], [class*="stat3"] {
    animation: levitate 3s ease-in-out infinite;
}

[class*="stat1"] { animation-delay: 0s; }
[class*="stat2"] { animation-delay: 0.5s; }
[class*="stat3"] { animation-delay: 1s; }

@keyframes levitate {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(2deg); }
}

/* Magnetic effect on buttons */
.gb-button, #calculate-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.gb-button::before, #calculate-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.gb-button:hover::before, #calculate-btn:hover::before {
    width: 300%;
    height: 300%;
}

/* Holographic effect on main CTA */
.gb-button-hero-cta {
    background: linear-gradient(45deg, #667eea, #764ba2, #f093fb, #f5576c, #ffc107, #667eea);
    background-size: 300% 300%;
    animation: holographic-shift 5s ease infinite;
    position: relative;
    z-index: 1;
}

.gb-button-hero-cta::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #667eea, #764ba2, #f093fb, #f5576c, #ffc107, #667eea);
    background-size: 300% 300%;
    animation: holographic-shift 5s ease infinite;
    border-radius: inherit;
    filter: blur(8px);
    opacity: 0.7;
    z-index: -1;
}

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

/* Cards with 3D depth effect */
.gb-container[class*="quick-"]:hover {
    transform: translateY(-15px) rotateX(-5deg) scale(1.05);
    box-shadow: 
        0 20px 40px rgba(0,0,0,0.3),
        0 40px 80px rgba(0,0,0,0.15);
}

/* Shine animation on cards */
.gb-container[class*="quick-"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.8s ease;
    z-index: 10;
}

.gb-container[class*="quick-"]:hover::before {
    left: 100%;
}

/* Responsive optimizations */
@media (max-width: 768px) {
    .loader-text {
        font-size: 3rem;
        letter-spacing: 0.5rem;
    }
    
    .loader-subtitle {
        font-size: 1rem;
    }
    
    #particles-canvas {
        opacity: 0.5;
    }
    
    .gb-headline-hero-title {
        font-size: 2rem !important;
    }
    
    @keyframes hero-3d-entrance {
        0% {
            opacity: 0;
            transform: translateY(50px) scale(0.8);
            filter: blur(10px);
        }
        100% {
            opacity: 1;
            transform: translateY(0) scale(1);
            filter: blur(0);
        }
    }
}

/*--------------------------------------------------------------
# STICKY SHOPIFY BUTTON - STYLE FOR GENERATEBLOCKS PRO
--------------------------------------------------------------*/

/* Style for existing GenerateBlocks Pro sticky button */
.gb-container[data-generate-sticky],
.gb-button-wrapper[data-generate-sticky],
[class*="gb-container"][style*="position: fixed"],
[class*="gb-button-wrapper"][style*="position: fixed"] {
    z-index: 9999 !important;
}

/* The Shopify sticky button specifically */
.gb-container[data-generate-sticky] .gb-button,
.gb-button-wrapper[data-generate-sticky] .gb-button,
[class*="gb-container"][style*="position: fixed"] .gb-button,
[class*="gb-button-wrapper"][style*="position: fixed"] .gb-button,
.gb-sticky-container .gb-button {
    animation: sticky-entrance 0.8s ease-out forwards;
    animation-delay: 2s;
    opacity: 0;
}

/* The styled GenerateBlocks sticky button */
.gb-container[data-generate-sticky] .gb-button,
.gb-button-wrapper[data-generate-sticky] .gb-button,
[class*="gb-container"][style*="position: fixed"] .gb-button,
[class*="gb-button-wrapper"][style*="position: fixed"] .gb-button,
.gb-sticky-container .gb-button {
    display: inline-flex !important;
    align-items: center !important;
    padding: 20px 30px !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    color: #FFFFFF !important;
    background: linear-gradient(45deg, #ff6b6b, #ee5a6f, #e74c3c, #ff6b6b) !important;
    background-size: 300% 300% !important;
    border-radius: 50px !important;
    box-shadow: 0 10px 30px rgba(231, 76, 60, 0.4) !important;
    position: relative !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    transition: all 0.3s ease !important;
    animation: gradient-flow 3s ease infinite, pulse-shadow 2s ease-in-out infinite !important;
}

/* Pulsation effect */
@keyframes pulse-shadow {
    0% {
        box-shadow: 0 10px 30px rgba(231, 76, 60, 0.4);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 15px 40px rgba(231, 76, 60, 0.6);
        transform: scale(1.02);
    }
    100% {
        box-shadow: 0 10px 30px rgba(231, 76, 60, 0.4);
        transform: scale(1);
    }
}

/* Gradient animation */
@keyframes gradient-flow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Entrance animation */
@keyframes sticky-entrance {
    0% {
        opacity: 0;
        transform: translateY(100px) scale(0.5);
    }
    50% {
        transform: translateY(-20px) scale(1.1);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Shine effect that crosses */
.gb-container[data-generate-sticky] .gb-button::before,
.gb-button-wrapper[data-generate-sticky] .gb-button::before,
[class*="gb-container"][style*="position: fixed"] .gb-button::before,
[class*="gb-button-wrapper"][style*="position: fixed"] .gb-button::before,
.gb-sticky-container .gb-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.8s ease;
    z-index: 1;
}

.gb-container[data-generate-sticky] .gb-button:hover::before,
.gb-button-wrapper[data-generate-sticky] .gb-button:hover::before,
[class*="gb-container"][style*="position: fixed"] .gb-button:hover::before,
[class*="gb-button-wrapper"][style*="position: fixed"] .gb-button:hover::before,
.gb-sticky-container .gb-button:hover::before {
    left: 100%;
}

/* "Limited Offer" badge on sticky container */
.gb-container[data-generate-sticky]::after,
.gb-button-wrapper[data-generate-sticky]::after,
[class*="gb-container"][style*="position: fixed"]::after,
[class*="gb-button-wrapper"][style*="position: fixed"]::after {
    content: '🔥 LIMITED OFFER!';
    position: absolute;
    top: -15px;
    right: -10px;
    background: #FFD700;
    color: #2c3e50;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    animation: badge-bounce 1s ease-in-out infinite;
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
    z-index: 10;
}

@keyframes badge-bounce {
    0%, 100% { transform: translateY(0) rotate(-5deg); }
    50% { transform: translateY(-5px) rotate(5deg); }
}

/* Hover effects */
.gb-container[data-generate-sticky] .gb-button:hover,
.gb-button-wrapper[data-generate-sticky] .gb-button:hover,
[class*="gb-container"][style*="position: fixed"] .gb-button:hover,
[class*="gb-button-wrapper"][style*="position: fixed"] .gb-button:hover,
.gb-sticky-container .gb-button:hover {
    transform: translateY(-3px) scale(1.05) !important;
    box-shadow: 0 20px 40px rgba(231, 76, 60, 0.6) !important;
    background-size: 400% 400% !important;
}

/* Click effect */
.gb-container[data-generate-sticky] .gb-button:active,
.gb-button-wrapper[data-generate-sticky] .gb-button:active,
[class*="gb-container"][style*="position: fixed"] .gb-button:active,
[class*="gb-button-wrapper"][style*="position: fixed"] .gb-button:active,
.gb-sticky-container .gb-button:active {
    transform: translateY(-1px) scale(0.98) !important;
}

/* Animated icon - add an arrow */
.gb-container[data-generate-sticky] .gb-button::after,
.gb-button-wrapper[data-generate-sticky] .gb-button::after,
[class*="gb-container"][style*="position: fixed"] .gb-button::after,
[class*="gb-button-wrapper"][style*="position: fixed"] .gb-button::after,
.gb-sticky-container .gb-button::after {
    content: ' →';
    display: inline-block;
    margin-left: 10px;
    transition: transform 0.3s ease;
}

.gb-container[data-generate-sticky] .gb-button:hover::after,
.gb-button-wrapper[data-generate-sticky] .gb-button:hover::after,
[class*="gb-container"][style*="position: fixed"] .gb-button:hover::after,
[class*="gb-button-wrapper"][style*="position: fixed"] .gb-button:hover::after,
.gb-sticky-container .gb-button:hover::after {
    transform: translateX(5px);
}

/* Mobile version */
@media (max-width: 768px) {
    .gb-container[data-generate-sticky] .gb-button,
    .gb-button-wrapper[data-generate-sticky] .gb-button,
    [class*="gb-container"][style*="position: fixed"] .gb-button,
    [class*="gb-button-wrapper"][style*="position: fixed"] .gb-button,
    .gb-sticky-container .gb-button {
        font-size: 16px !important;
        padding: 15px 20px !important;
    }
    
    /* Hide badge on mobile */
    .gb-container[data-generate-sticky]::after,
    .gb-button-wrapper[data-generate-sticky]::after,
    [class*="gb-container"][style*="position: fixed"]::after,
    [class*="gb-button-wrapper"][style*="position: fixed"]::after {
        display: none;
    }
}

/* Ensure button text stays visible */
.gb-container[data-generate-sticky] .gb-button span,
.gb-button-wrapper[data-generate-sticky] .gb-button span,
[class*="gb-container"][style*="position: fixed"] .gb-button span,
[class*="gb-button-wrapper"][style*="position: fixed"] .gb-button span,
.gb-sticky-container .gb-button span {
    position: relative;
    z-index: 2;
}

/*--------------------------------------------------------------
# STICKY SHOPIFY BUTTON CENTERED - NEW DESIGN
--------------------------------------------------------------*/

/* Centered sticky button with close option */
#stickyButton {
    position: fixed !important;
    bottom: 30px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 99999 !important;
    border: none;
    cursor: pointer;
    /* Animation only if not already closed */
    animation: sticky-entrance-center 0.8s ease-out forwards;
    animation-delay: 1s;
    display: inline-flex !important;
}

#stickyButton,
.sticky-shopify-cta-centered {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 20px 50px;
    padding-right: 40px; /* Space for the X */
    font-size: 20px;
    font-weight: 800;
    text-decoration: none;
    color: #FFFFFF;
    background: linear-gradient(45deg, #ff6b6b, #ee5a6f, #e74c3c, #ff6b6b);
    background-size: 300% 300%;
    border-radius: 50px;
    box-shadow: 0 15px 35px rgba(231, 76, 60, 0.4);
    position: relative;
    overflow: visible; /* To allow badge overflow */
    white-space: nowrap;
    transition: all 0.3s ease;
    animation: gradient-flow 3s ease infinite, pulse-shadow-strong 2s ease-in-out infinite;
}

/* Close button X */
#closeButton {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    font-weight: bold;
    font-size: 20px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 10;
}

#closeButton:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-50%) rotate(90deg) scale(1.2);
}

/* Special entrance animation for center */
@keyframes sticky-entrance-center {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(100px) scale(0.8);
    }
    50% {
        opacity: 1;
        transform: translateX(-50%) translateY(-20px) scale(1.1);
    }
    100% {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
}

/* Stronger pulsation */
@keyframes pulse-shadow-strong {
    0% {
        box-shadow: 0 15px 35px rgba(231, 76, 60, 0.4);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 20px 45px rgba(231, 76, 60, 0.7), 0 0 0 10px rgba(231, 76, 60, 0.1);
        transform: scale(1.03);
    }
    100% {
        box-shadow: 0 15px 35px rgba(231, 76, 60, 0.4);
        transform: scale(1);
    }
}

/* Badge centered above - THE FLOATING "3 MONTHS" BADGE! */
#stickyButton::before,
.sticky-shopify-cta-centered::before {
    content: '🔥 LIMITED OFFER - 3 MONTHS!';
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: #FFD700;
    color: #2c3e50;
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    animation: badge-float 2s ease-in-out infinite;
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.5);
}

@keyframes badge-float {
    0%, 100% { transform: translateX(-50%) translateY(0) rotate(-2deg); }
    50% { transform: translateX(-50%) translateY(-5px) rotate(2deg); }
}

/* Shine that crosses */
#stickyButton .button-text::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
    transition: left 0.8s ease;
    pointer-events: none;
}

#stickyButton:hover .button-text::after {
    left: 100%;
}

/* Central shine effect on hover */
#stickyButton::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 70%);
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.6s ease;
    pointer-events: none;
    border-radius: 50px;
}

#stickyButton:hover::after {
    transform: translate(-50%, -50%) scale(1.5);
}

/* Powerful hover */
#stickyButton:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 25px 50px rgba(231, 76, 60, 0.6), 0 0 0 3px rgba(255,255,255,0.3);
    background-size: 400% 400%;
}

/* Button text style */
#stickyButton .button-text {
    position: relative;
    z-index: 2;
    display: inline-block;
}

/* Mobile - stays centered but smaller */
@media (max-width: 768px) {
    #stickyButton {
        bottom: 20px;
        font-size: 16px;
        padding: 15px 30px;
        padding-right: 45px;
        width: calc(100% - 40px);
        max-width: 400px;
    }
    
    #stickyButton::before {
        font-size: 12px;
        padding: 5px 15px;
        top: -28px;
    }
    
    #closeButton {
        width: 25px;
        height: 25px;
        font-size: 16px;
        right: 10px;
    }
}