/* =====================================================================
   BOBALICIOUS — index.php modern enhancement layer
   Load AFTER the page's inline <style>. Nothing here needs PHP changes.
   ===================================================================== */

:root {
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --glow: 0 18px 50px rgba(0, 168, 204, 0.18);
}

html { scroll-behavior: smooth; }

/* ---------- Scroll progress bar (created by JS) ---------- */
.scroll-progress {
    position: fixed;
    top: 0; left: 0;
    height: 3px;
    width: 100%;
    transform-origin: 0 50%;
    transform: scaleX(0);
    background: linear-gradient(90deg, #00a8cc, #70ddf2, #00a8cc);
    z-index: 10050;
    pointer-events: none;
}

/* ---------- Reveal animations (only active when JS is running) ---------- */
.js-anim .reveal {
    opacity: 0;
    transform: translateY(34px) scale(0.98);
    transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
    transition-delay: var(--d, 0ms);
    will-change: opacity, transform;
}
.js-anim .reveal.from-left  { transform: translateX(-46px); }
.js-anim .reveal.from-right { transform: translateX(46px); }
.js-anim .reveal.zoom       { transform: scale(0.9); }
.js-anim .reveal.is-in {
    opacity: 1;
    transform: none;
}

/* ---------- Section headers ---------- */
.modern-section-header h2 {
    font-size: clamp(28px, 4vw, 42px);
}
.modern-section-header h2 span {
    background: linear-gradient(90deg, #00a8cc, #3fd0ea, #00a8cc);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 5s linear infinite;
}
@keyframes shine { to { background-position: 200% center; } }

.modern-badge {
    position: relative;
    overflow: hidden;
}
.modern-badge::after {
    content: "";
    position: absolute;
    top: 0; left: -80%;
    width: 50%; height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.7), transparent);
    animation: badge-sweep 4.5s ease-in-out infinite;
}
@keyframes badge-sweep {
    0%, 55% { left: -80%; }
    100%    { left: 140%; }
}

/* ---------- Buttons ---------- */
.btn-boba-primary,
.btn-whatsapp,
.btn-boba-outline {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}
.btn-boba-primary::before,
.btn-whatsapp::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, 0.35) 50%, transparent 80%);
    transform: translateX(-120%);
    transition: transform 0.7s var(--ease-out);
    z-index: -1;
}
.btn-boba-primary:hover::before,
.btn-whatsapp:hover::before { transform: translateX(120%); }
.btn-boba-primary:active,
.btn-whatsapp:active,
.btn-boba-outline:active { transform: translateY(0) scale(0.98); }

/* ---------- 1. Snapshot bar ---------- */
.modern-snapshot-bar {
    backdrop-filter: blur(10px);
    transition: box-shadow 0.4s ease, transform 0.4s var(--ease-out);
}
.modern-snapshot-bar:hover {
    transform: translateY(-4px);
    box-shadow: 0 26px 60px rgba(12, 35, 64, 0.12);
}
.snap-icon-wrap { position: relative; }
.snap-icon-wrap::after {
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: 22px;
    border: 2px solid rgba(0, 168, 204, 0.25);
    opacity: 0;
    transform: scale(0.85);
}
.snap-box:hover .snap-icon-wrap::after {
    animation: ring-pulse 1.2s ease-out infinite;
}
@keyframes ring-pulse {
    0%   { opacity: 0.8; transform: scale(0.9); }
    100% { opacity: 0;   transform: scale(1.25); }
}

/* ---------- 2. Hero card ---------- */
.wholesale-hero-card {
    overflow: hidden;
    isolation: isolate;
}
.wholesale-hero-card::before,
.wholesale-hero-card::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    z-index: -1;
    pointer-events: none;
}
.wholesale-hero-card::before {
    width: 340px; height: 340px;
    top: -120px; right: -80px;
    background: rgba(0, 168, 204, 0.22);
    animation: drift 12s ease-in-out infinite alternate;
}
.wholesale-hero-card::after {
    width: 280px; height: 280px;
    bottom: -120px; left: -60px;
    background: rgba(112, 221, 242, 0.3);
    animation: drift 15s ease-in-out infinite alternate-reverse;
}
@keyframes drift {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(40px, 30px) scale(1.15); }
}

.wholesale-hero-card h1 { font-size: clamp(30px, 4.4vw, 48px); }
.wholesale-hero-card h1 span {
    background: linear-gradient(90deg, #00a8cc, #3fd0ea, #0087a4);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 6s linear infinite;
}

.hero-banner-showcase img {
    animation: float-y 6s ease-in-out infinite;
}
.hero-banner-showcase:hover img { animation-play-state: paused; }
@keyframes float-y {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50%      { transform: translateY(-14px) rotate(0.6deg); }
}

.hero-trust-tag {
    transition: transform 0.3s var(--ease-out), box-shadow 0.3s ease, background 0.3s ease;
}
.hero-trust-tag:hover {
    transform: translateY(-3px);
    background: #ffffff;
    box-shadow: 0 8px 18px rgba(0, 168, 204, 0.15);
}

/* ---------- 3. WHY CARDS — alignment fix (centered, never orphaned) ---------- */
.why-cards-grid {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: center;     /* last row of 2 cards sits in the centre */
    gap: 26px;
}
.why-cards-grid .modern-why-card {
    flex: 0 1 calc((100% - 52px) / 3);
    min-width: 280px;
    overflow: hidden;
    position: relative;
}
.modern-why-card::before {
    content: "";
    position: absolute;
    left: 0; top: 0;
    height: 4px; width: 100%;
    background: linear-gradient(90deg, #00a8cc, #70ddf2);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s var(--ease-out);
}
.modern-why-card:hover::before { transform: scaleX(1); }
.modern-why-card:hover .why-icon-box {
    transform: rotate(-6deg) scale(1.08);
    box-shadow: 0 10px 22px rgba(0, 168, 204, 0.3);
}
.why-icon-box { transition: all 0.4s var(--ease-out); }

@media (max-width: 992px) {
    .why-cards-grid .modern-why-card { flex: 0 1 calc((100% - 26px) / 2); }
}
@media (max-width: 640px) {
    .why-cards-grid .modern-why-card { flex: 1 1 100%; min-width: 0; }
}

/* ---------- 4. Product format cards ---------- */
.format-display-card {
    transform-style: preserve-3d;
    transition: transform 0.45s var(--ease-out), box-shadow 0.45s ease, border-color 0.3s ease;
}
.format-display-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 24px;
    background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(0, 168, 204, 0.12), transparent 45%);
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}
.format-display-card:hover::after { opacity: 1; }
.format-hero-image-wrap { overflow: hidden; }
.format-hero-image-wrap::before {
    content: "";
    position: absolute;
    width: 62%; aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 168, 204, 0.18), transparent 70%);
    animation: breathe 4s ease-in-out infinite;
}
.format-hero-image-wrap img { position: relative; z-index: 1; }
@keyframes breathe {
    0%, 100% { transform: scale(0.9); opacity: 0.7; }
    50%      { transform: scale(1.1); opacity: 1; }
}
.format-micro-badge { transition: all 0.25s ease; }
.format-display-card:hover .format-micro-badge {
    background: var(--primary-light);
    border-color: rgba(0, 168, 204, 0.35);
    color: var(--primary-dark);
}

/* ---------- 5. Global network ---------- */
.modern-global-section::before {
    content: "";
    position: absolute;
    width: 480px; height: 480px;
    top: -200px; right: -120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 168, 204, 0.35), transparent 65%);
    animation: drift 14s ease-in-out infinite alternate;
    pointer-events: none;
}
.modern-global-section > .row { position: relative; z-index: 1; }
.global-metric-item {
    padding: 14px 20px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.35s var(--ease-out), background 0.3s ease;
}
.global-metric-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.1);
}
.map-interactive-box img {
    animation: float-y 8s ease-in-out infinite;
}

/* ---------- 6. Video ---------- */
.modern-video-wrapper { transition: transform 0.5s var(--ease-out), box-shadow 0.5s ease; }
.modern-video-wrapper:hover {
    transform: scale(1.01);
    box-shadow: 0 30px 70px rgba(0, 168, 204, 0.25);
}
.play-pulse-btn { animation: play-pulse 2.2s ease-out infinite; }
@keyframes play-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.55); }
    100% { box-shadow: 0 0 0 26px rgba(255, 255, 255, 0); }
}
.modern-video-wrapper:hover .play-pulse-btn { animation: none; }

/* ---------- 7. Blog cards ---------- */
.blog-swiper-container { padding: 10px 6px 30px; }
.modern-blog-card { transition: transform 0.45s var(--ease-out), box-shadow 0.45s ease, border-color 0.3s ease; }
.blog-read-more { transition: gap 0.3s var(--ease-out); }
.modern-blog-card:hover .blog-read-more { gap: 12px; }

/* ---------- 8. Inquiry hub ---------- */
.inquiry-form-card { transition: box-shadow 0.4s ease, transform 0.4s var(--ease-out); }
.inquiry-form-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--glow);
}
.modern-field:focus { transform: translateY(-1px); }
.m-faq-item { transition: all 0.3s var(--ease-out); }
.m-faq-item:hover { transform: translateX(4px); border-color: rgba(0, 168, 204, 0.5); }
.m-faq-item.active .m-faq-body { animation: faq-open 0.4s var(--ease-out); }
@keyframes faq-open {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: none; }
}

/* ---------- 9. Reviews ---------- */
.testi-swiper-container { padding: 10px 6px 20px; }
.review-card-modern { position: relative; overflow: hidden; }
.review-card-modern::before {
    content: "\201C";
    position: absolute;
    top: -8px; right: 18px;
    font-family: 'Outfit', serif;
    font-size: 110px;
    line-height: 1;
    color: rgba(0, 168, 204, 0.09);
    pointer-events: none;
}
.review-stars { transition: letter-spacing 0.4s var(--ease-out); }
.review-card-modern:hover .review-stars { letter-spacing: 4px; }

/* ---------- Accessibility ---------- */
a:focus-visible, button:focus-visible, .modern-field:focus-visible, .m-faq-header:focus-visible {
    outline: 3px solid rgba(0, 168, 204, 0.55);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition-duration: 0.01ms !important;
    }
    .js-anim .reveal { opacity: 1; transform: none; }
}
