/**
 * Warung Dwi — 3D Visual Layer
 * Depth, perspective, glass, floating layers (respects reduced-motion)
 */

/* ---------- Scene & depth tokens ---------- */
:root {
    --wr-3d-perspective: 1000px;
    --wr-3d-shadow: 0 18px 40px -12px rgba(91, 33, 182, 0.22),
        0 8px 16px -8px rgba(15, 23, 42, 0.12);
    --wr-3d-shadow-hover: 0 28px 50px -14px rgba(91, 33, 182, 0.32),
        0 14px 28px -10px rgba(15, 23, 42, 0.16);
    --wr-3d-edge: rgba(255, 255, 255, 0.55);
    --wr-3d-edge-dark: rgba(255, 255, 255, 0.08);
}

html {
    scroll-behavior: smooth;
}

body {
    perspective-origin: 50% 20%;
}

/* Ambient 3D depth orbs behind page content */
body.wr-3d-ready::before,
body.wr-3d-ready::after {
    content: '';
    position: fixed;
    pointer-events: none;
    z-index: 0;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.45;
    will-change: transform;
}

body.wr-3d-ready::before {
    width: min(42vw, 420px);
    height: min(42vw, 420px);
    top: -8%;
    right: -6%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.35) 0%, transparent 70%);
    animation: wr-3d-orb-a 14s ease-in-out infinite alternate;
}

body.wr-3d-ready::after {
    width: min(36vw, 360px);
    height: min(36vw, 360px);
    bottom: 8%;
    left: -8%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.22) 0%, transparent 70%);
    animation: wr-3d-orb-b 18s ease-in-out infinite alternate;
}

@keyframes wr-3d-orb-a {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to { transform: translate3d(-4%, 6%, 0) scale(1.08); }
}

@keyframes wr-3d-orb-b {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to { transform: translate3d(6%, -5%, 0) scale(1.12); }
}

/* Keep content above ambient orbs */
header, main, footer, #product-modal {
    position: relative;
    z-index: 1;
}

/* SweetAlert2 — jangan position:relative (popup akan turun ke bawah halaman) */
.swal2-container {
    position: fixed !important;
    inset: 0 !important;
    z-index: 10050 !important;
    display: grid !important;
    place-items: center !important;
    padding: 0.625em !important;
    overflow-x: hidden !important;
}

.swal2-container.swal2-backdrop-show,
.swal2-container.swal2-noanimation {
    background: rgba(15, 23, 42, 0.45) !important;
}

.swal2-popup {
    margin: 0 !important;
    max-height: calc(100vh - 2rem) !important;
    overflow-y: auto !important;
}

header#main-header {
    z-index: 50;
}

/* ---------- Header glass depth ---------- */
#main-header {
    transform-style: preserve-3d;
    box-shadow: 0 8px 32px -12px rgba(91, 33, 182, 0.12);
    backdrop-filter: blur(16px) saturate(1.2);
    -webkit-backdrop-filter: blur(16px) saturate(1.2);
}

#main-header img[data-store-logo] {
    transform: translateZ(20px);
    box-shadow:
        0 10px 24px -8px rgba(91, 33, 182, 0.35),
        inset 0 1px 0 var(--wr-3d-edge) !important;
}

/* ---------- Hero 3D scene ---------- */
.wr-hero-3d,
section.bg-gradient-to-br.from-rose-50\/50,
.page-hero {
    transform-style: preserve-3d;
    perspective: var(--wr-3d-perspective);
}

@media (max-width: 767px) {
    .page-hero,
    .page-hero--catalog {
        perspective: none !important;
        transform-style: flat !important;
        touch-action: pan-y !important;
        overscroll-behavior-x: none !important;
    }
}

.wr-hero-3d .animate-float,
#store-hero-character,
[data-hero-image] {
    transform-style: preserve-3d;
    will-change: transform;
    filter: drop-shadow(0 28px 40px rgba(91, 33, 182, 0.28));
    transition: filter 0.35s ease;
}

.wr-hero-3d .animate-float:hover [data-hero-image],
.wr-hero-3d .animate-float:hover #store-hero-character {
    filter: drop-shadow(0 36px 48px rgba(91, 33, 182, 0.38));
}

/* Floating brand badges → 3D chips */
.hero-bounce,
.hero-swing,
.hero-wiggle,
.hero-pop,
.hero-pulse,
.hero-slide {
    transform-style: preserve-3d;
    box-shadow:
        0 14px 28px -10px rgba(15, 23, 42, 0.2),
        0 4px 10px -4px rgba(91, 33, 182, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.75) !important;
    border: 1px solid rgba(255, 255, 255, 0.65) !important;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(245, 243, 255, 0.92)) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* ---------- Product / catalog 3D grid ---------- */
#product-container,
#productsGrid,
.products-grid-3d {
    perspective: var(--wr-3d-perspective);
    transform-style: preserve-3d;
}

.product-card {
    position: relative;
    transform-style: preserve-3d;
    transform: translateZ(0) rotateX(0deg) rotateY(0deg);
    transition:
        transform 0.35s cubic-bezier(0.23, 1, 0.32, 1),
        box-shadow 0.35s cubic-bezier(0.23, 1, 0.32, 1),
        border-color 0.25s ease !important;
    box-shadow: var(--wr-3d-shadow) !important;
    border: 1px solid rgba(233, 213, 255, 0.65) !important;
    background:
        linear-gradient(160deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.96) 100%) !important;
    overflow: hidden;
    backface-visibility: hidden;
}

/* Glare / shine layer (driven by JS --glare-x/y) */
.product-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    z-index: 5;
    background: radial-gradient(
        circle at var(--glare-x, 50%) var(--glare-y, 0%),
        rgba(255, 255, 255, 0.55) 0%,
        rgba(255, 255, 255, 0.08) 35%,
        transparent 60%
    );
    opacity: 0;
    transition: opacity 0.35s ease;
    mix-blend-mode: soft-light;
}

.product-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    z-index: 0;
    box-shadow: inset 0 1px 0 var(--wr-3d-edge);
}

.product-card:hover,
.product-card.is-tilting {
    box-shadow: var(--wr-3d-shadow-hover) !important;
    border-color: #c4b5fd !important;
    z-index: 2;
}

.product-card:hover::before,
.product-card.is-tilting::before {
    opacity: 1;
}

.product-card > * {
    position: relative;
    z-index: 1;
    transform: translateZ(18px);
}

.product-card .aspect-square {
    transform: translateZ(28px);
    border-radius: 0.85rem !important;
    overflow: hidden;
    box-shadow:
        0 10px 22px -10px rgba(91, 33, 182, 0.25),
        inset 0 0 0 1px rgba(255, 255, 255, 0.4);
    background:
        linear-gradient(145deg, #f8fafc 0%, #f5f3ff 55%, #ede9fe 100%) !important;
}

.product-card .aspect-square img {
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    transform: translateZ(0) scale(1);
}

.product-card:hover .aspect-square img,
.product-card.is-tilting .aspect-square img {
    transform: scale(1.06);
}

/* 3D CTA button on cards */
.product-card a.bg-rose-600,
.product-card a[class*="bg-rose"] {
    transform: translateZ(32px);
    box-shadow:
        0 8px 0 #3b0f7a,
        0 12px 20px -6px rgba(91, 33, 182, 0.45) !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease !important;
}

.product-card a.bg-rose-600:hover,
.product-card a[class*="bg-rose"]:hover {
    transform: translateZ(32px) translateY(-2px);
    filter: brightness(1.05);
}

.product-card a.bg-rose-600:active,
.product-card a[class*="bg-rose"]:active {
    transform: translateZ(32px) translateY(4px);
    box-shadow:
        0 2px 0 #3b0f7a,
        0 6px 12px -6px rgba(91, 33, 182, 0.35) !important;
}

/* ---------- Generic 3D surface cards ---------- */
.wr-card-3d,
.home-testimonial-card,
.lb-card,
.v2-live-order-card,
#cara-order .bg-white.rounded-2xl,
#cara-order .rounded-2xl.bg-white,
.page-hero-pill,
.home-section-pill {
    transform-style: preserve-3d;
    transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.3s ease;
}

.home-testimonial-card {
    box-shadow:
        0 12px 28px -12px rgba(91, 33, 182, 0.2),
        0 4px 10px -4px rgba(15, 23, 42, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
}

.home-testimonial-card:hover {
    transform: translateY(-6px) rotateX(4deg);
    box-shadow:
        0 20px 36px -12px rgba(91, 33, 182, 0.28),
        0 8px 16px -6px rgba(15, 23, 42, 0.12) !important;
}

.lb-card {
    transform: translateZ(0);
    box-shadow: var(--wr-3d-shadow) !important;
}

.lb-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--wr-3d-shadow-hover) !important;
}

/* Step cards on how-to / homepage */
#cara-order .rounded-2xl,
#cara-order [class*="rounded-2xl"] {
    box-shadow:
        0 14px 30px -12px rgba(91, 33, 182, 0.14),
        0 4px 10px -4px rgba(15, 23, 42, 0.06);
}

/* ---------- Unified site buttons ---------- */
.wr-btn-row {
    pointer-events: auto;
}

.wr-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: inherit;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none !important;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    border-radius: 0.85rem;
    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease,
        filter 0.15s ease,
        background 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease;
}

.wr-btn--md {
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
}

.wr-btn--lg {
    padding: 1rem 2rem;
    font-size: 1rem;
}

.wr-btn.w-full {
    width: 100%;
}

.wr-btn--primary {
    background: linear-gradient(135deg, #5b21b6 0%, #7c3aed 100%);
    color: #fff !important;
    box-shadow:
        0 6px 0 #3b0f7a,
        0 12px 24px -8px rgba(91, 33, 182, 0.45);
}

.wr-btn--primary:hover {
    filter: brightness(1.05);
    transform: translateY(-2px);
    color: #fff !important;
}

.wr-btn--primary:active {
    transform: translateY(3px);
    box-shadow:
        0 2px 0 #3b0f7a,
        0 6px 14px -8px rgba(91, 33, 182, 0.35);
}

.wr-btn--outline {
    background: #fff;
    color: #5b21b6 !important;
    border: 2px solid #ede9fe;
    box-shadow: 0 2px 10px -6px rgba(91, 33, 182, 0.15);
}

.wr-btn--outline:hover {
    background: #f5f3ff;
    border-color: #5b21b6;
    color: #4c1d95 !important;
}

.wr-btn--outline:active {
    transform: translateY(1px);
}

.wr-btn--outline-wa {
    background: #fff;
    color: #047857 !important;
    border: 2px solid #d1fae5;
    box-shadow: 0 2px 10px -6px rgba(5, 150, 105, 0.12);
}

.wr-btn--outline-wa:hover {
    background: #ecfdf5;
    border-color: #10b981;
    color: #065f46 !important;
}

.wr-btn--wa {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: #fff !important;
    box-shadow:
        0 6px 0 #047857,
        0 12px 24px -8px rgba(5, 150, 105, 0.4);
}

.wr-btn--wa:hover {
    filter: brightness(1.05);
    transform: translateY(-2px);
    color: #fff !important;
}

.wr-btn--wa:active {
    transform: translateY(3px);
    box-shadow:
        0 2px 0 #047857,
        0 6px 14px -8px rgba(5, 150, 105, 0.3);
}

.wr-btn--ghost {
    background: #fff;
    color: #475569 !important;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.wr-btn--ghost:hover {
    background: #f8fafc;
    border-color: #c4b5fd;
    color: #5b21b6 !important;
}

.wr-btn--ghost i {
    color: #5b21b6;
}

@media (max-width: 639px) {
    .wr-btn-row.flex-col > .wr-btn,
    .wr-btn-row.flex-col > a.wr-btn {
        width: 100%;
    }
}

html[data-theme="dark"] .wr-btn--outline {
    background: #1e293b;
    color: #c4b5fd !important;
    border-color: #4c1d95;
}

html[data-theme="dark"] .wr-btn--outline:hover {
    background: #312e81;
    border-color: #7c3aed;
    color: #ede9fe !important;
}

html[data-theme="dark"] .wr-btn--outline-wa {
    background: #1e293b;
    color: #6ee7b7 !important;
    border-color: #065f46;
}

html[data-theme="dark"] .wr-btn--outline-wa:hover {
    background: #064e3b;
    border-color: #10b981;
}

html[data-theme="dark"] .wr-btn--ghost {
    background: #1e293b;
    color: #cbd5e1 !important;
    border-color: #475569;
}

html[data-theme="dark"] .wr-btn--ghost:hover {
    background: #334155;
    border-color: #7c3aed;
    color: #e9d5ff !important;
}

html[data-theme="dark"] .wr-btn--ghost i {
    color: #c4b5fd;
}

/* ---------- Primary 3D buttons (legacy + unified) ---------- */
.btn-3d,
.wr-btn--primary,
.wr-btn--wa {
    position: relative;
    transform: translateY(0);
}

/* ---------- Section badges / pills 3D ---------- */
.home-section-badge,
.page-hero-badge {
    box-shadow:
        0 6px 14px -6px rgba(91, 33, 182, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.85);
    transform: translateZ(10px);
}

.home-section-pill,
.page-hero-pill {
    box-shadow:
        0 6px 14px -8px rgba(91, 33, 182, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
}

.home-section-pill:hover,
.page-hero-pill:hover {
    transform: translateY(-2px);
}

/* ---------- FAQ / details accordion depth ---------- */
details.bg-white,
details[class*="rounded"] {
    transform-style: preserve-3d;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 8px 22px -12px rgba(91, 33, 182, 0.14);
}

details[open] {
    box-shadow: 0 16px 32px -14px rgba(91, 33, 182, 0.2);
}

/* ---------- Modal 3D ---------- */
#product-modal .bg-white,
.modal-content {
    transform: perspective(900px) rotateX(0deg) translateZ(0);
    box-shadow:
        0 40px 80px -20px rgba(15, 23, 42, 0.35),
        0 16px 32px -12px rgba(91, 33, 182, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.6) !important;
}

/* ---------- Footer depth strip ---------- */
footer {
    box-shadow: 0 -20px 50px -30px rgba(91, 33, 182, 0.35);
}

/* ---------- Parallax helper classes (JS) ---------- */
[data-parallax] {
    will-change: transform;
    transition: transform 0.12s linear;
}

.wr-3d-tilt-active {
    transition: transform 0.08s linear !important;
}

/* ---------- Dark theme 3D ---------- */
html[data-theme="dark"] body.wr-3d-ready::before {
    background: radial-gradient(circle, rgba(139, 92, 246, 0.22) 0%, transparent 70%);
    opacity: 0.55;
}

html[data-theme="dark"] body.wr-3d-ready::after {
    background: radial-gradient(circle, rgba(37, 99, 235, 0.16) 0%, transparent 70%);
    opacity: 0.5;
}

html[data-theme="dark"] .product-card {
    background: linear-gradient(160deg, #1e293b 0%, #172033 100%) !important;
    border-color: #334155 !important;
    box-shadow:
        0 18px 40px -12px rgba(0, 0, 0, 0.45),
        0 8px 16px -8px rgba(91, 33, 182, 0.2) !important;
}

html[data-theme="dark"] .product-card:hover,
html[data-theme="dark"] .product-card.is-tilting {
    border-color: #7c3aed !important;
    box-shadow:
        0 28px 50px -14px rgba(0, 0, 0, 0.55),
        0 14px 28px -10px rgba(91, 33, 182, 0.35) !important;
}

html[data-theme="dark"] .product-card::before {
    mix-blend-mode: screen;
    background: radial-gradient(
        circle at var(--glare-x, 50%) var(--glare-y, 0%),
        rgba(167, 139, 250, 0.35) 0%,
        transparent 55%
    );
}

html[data-theme="dark"] .hero-bounce,
html[data-theme="dark"] .hero-swing,
html[data-theme="dark"] .hero-wiggle,
html[data-theme="dark"] .hero-pop,
html[data-theme="dark"] .hero-pulse,
html[data-theme="dark"] .hero-slide {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.9)) !important;
    border-color: rgba(71, 85, 105, 0.6) !important;
    box-shadow:
        0 14px 28px -10px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .home-testimonial-card {
    box-shadow:
        0 12px 28px -12px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
}

/* =========================================================
   ANIMATION LAYER — entrance, scroll, float, shine, pulse
   ========================================================= */

/* ----- Keyframes ----- */
@keyframes wr-fade-up-3d {
    0% {
        opacity: 0;
        transform: perspective(900px) translateY(36px) rotateX(12deg) scale(0.92);
        filter: blur(4px);
    }
    100% {
        opacity: 1;
        transform: perspective(900px) translateY(0) rotateX(0) scale(1);
        filter: blur(0);
    }
}

@keyframes wr-fade-in-left {
    0% { opacity: 0; transform: translateX(-40px) scale(0.96); }
    100% { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes wr-fade-in-right {
    0% { opacity: 0; transform: translateX(40px) scale(0.96); }
    100% { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes wr-pop-in {
    0% { opacity: 0; transform: scale(0.6) rotate(-6deg); }
    60% { opacity: 1; transform: scale(1.08) rotate(2deg); }
    100% { opacity: 1; transform: scale(1) rotate(0); }
}

@keyframes wr-soft-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes wr-shimmer-sweep {
    0% { transform: translateX(-120%) skewX(-18deg); }
    100% { transform: translateX(220%) skewX(-18deg); }
}

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

@keyframes wr-pulse-ring {
    0% { box-shadow: 0 0 0 0 rgba(91, 33, 182, 0.45); }
    70% { box-shadow: 0 0 0 14px rgba(91, 33, 182, 0); }
    100% { box-shadow: 0 0 0 0 rgba(91, 33, 182, 0); }
}

@keyframes wr-badge-float {
    0%, 100% { transform: translateY(0) rotate(var(--wr-badge-rot, -4deg)); }
    50% { transform: translateY(-10px) rotate(var(--wr-badge-rot, -4deg)); }
}

@keyframes wr-sparkle {
    0%, 100% { opacity: 0.2; transform: scale(0.6); }
    50% { opacity: 1; transform: scale(1.25); }
}

@keyframes wr-particle-rise {
    0% {
        opacity: 0;
        transform: translate3d(0, 20px, 0) scale(0.4);
    }
    15% { opacity: 0.85; }
    100% {
        opacity: 0;
        transform: translate3d(var(--px, 0), -120px, 0) scale(1);
    }
}

@keyframes wr-text-glow {
    0%, 100% { text-shadow: 0 0 0 transparent; }
    50% { text-shadow: 0 0 24px rgba(139, 92, 246, 0.35); }
}

@keyframes wr-icon-wiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-8deg) scale(1.08); }
    75% { transform: rotate(8deg) scale(1.08); }
}

@keyframes wr-border-glow {
    0%, 100% { border-color: rgba(196, 181, 253, 0.5); }
    50% { border-color: rgba(139, 92, 246, 0.9); }
}

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

@keyframes wr-slide-up-fade {
    from { opacity: 0; transform: translateY(28px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Katalog produk — jangan pakai scroll-reveal / fade */
#productsGrid,
#product-container,
#productsGrid.catalog-ready,
#product-container.catalog-ready {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    visibility: visible !important;
}

#productsGrid .product-card,
#product-container .product-card,
#productsGrid.catalog-ready .product-card,
#product-container.catalog-ready .product-card {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    visibility: visible !important;
}

#productsGrid.wr-reveal,
#product-container.wr-reveal {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
}

/* ----- Scroll-reveal base (JS toggles .is-inview) ----- */
.wr-reveal {
    opacity: 0;
    transform: translateY(32px) scale(0.98);
    transition:
        opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.7s cubic-bezier(0.22, 1, 0.36, 1),
        filter 0.7s ease;
    filter: blur(2px);
    will-change: opacity, transform;
}

.wr-reveal.is-inview {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
}

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

.wr-reveal-left.is-inview {
    opacity: 1;
    transform: translateX(0);
}

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

.wr-reveal-right.is-inview {
    opacity: 1;
    transform: translateX(0);
}

.wr-reveal-scale {
    opacity: 0;
    transform: scale(0.88);
    transition: opacity 0.65s ease, transform 0.65s cubic-bezier(0.34, 1.4, 0.64, 1);
}

.wr-reveal-scale.is-inview {
    opacity: 1;
    transform: scale(1);
}

/* Stagger delays for children */
.wr-stagger > .wr-reveal:nth-child(1),
.wr-stagger > .product-card:nth-child(1),
.wr-stagger > .lb-card:nth-child(1) { transition-delay: 0.05s; animation-delay: 0.05s; }
.wr-stagger > .wr-reveal:nth-child(2),
.wr-stagger > .product-card:nth-child(2),
.wr-stagger > .lb-card:nth-child(2) { transition-delay: 0.12s; animation-delay: 0.12s; }
.wr-stagger > .wr-reveal:nth-child(3),
.wr-stagger > .product-card:nth-child(3),
.wr-stagger > .lb-card:nth-child(3) { transition-delay: 0.19s; animation-delay: 0.19s; }
.wr-stagger > .wr-reveal:nth-child(4),
.wr-stagger > .product-card:nth-child(4),
.wr-stagger > .lb-card:nth-child(4) { transition-delay: 0.26s; animation-delay: 0.26s; }
.wr-stagger > .wr-reveal:nth-child(5),
.wr-stagger > .product-card:nth-child(5),
.wr-stagger > .lb-card:nth-child(5) { transition-delay: 0.33s; animation-delay: 0.33s; }
.wr-stagger > .wr-reveal:nth-child(6),
.wr-stagger > .product-card:nth-child(6),
.wr-stagger > .lb-card:nth-child(6) { transition-delay: 0.4s; animation-delay: 0.4s; }
.wr-stagger > .wr-reveal:nth-child(7),
.wr-stagger > .product-card:nth-child(7),
.wr-stagger > .lb-card:nth-child(7) { transition-delay: 0.47s; animation-delay: 0.47s; }
.wr-stagger > .wr-reveal:nth-child(8),
.wr-stagger > .product-card:nth-child(8),
.wr-stagger > .lb-card:nth-child(8) { transition-delay: 0.54s; animation-delay: 0.54s; }

/* ----- Product card entrance (when .wr-anim-in added) ----- */
.product-card.wr-anim-pending,
.lb-card.wr-anim-pending {
    opacity: 0;
}

.product-card.wr-anim-in,
.lb-card.wr-anim-in {
    animation: wr-fade-up-3d 0.65s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.product-card.wr-anim-done,
.product-card.catalog-card-in {
    animation: none;
    opacity: 1;
    transform: none;
    filter: none;
}

/* Idle float — leaderboard / cards, not product catalog (avoids hover flicker) */
@media (min-width: 769px) {
    .lb-card.wr-idle-float:not(.is-tilting):not(:hover),
    .wr-card-3d:not(.product-card).wr-idle-float:not(.is-tilting):not(:hover) {
        animation: wr-soft-float 4.5s ease-in-out infinite;
    }

    .lb-card.wr-idle-float:nth-child(odd):not(.is-tilting):not(:hover),
    .wr-card-3d:not(.product-card).wr-idle-float:nth-child(odd):not(.is-tilting):not(:hover) {
        animation-duration: 5.2s;
    }

    .product-card:hover,
    .product-card:focus-within {
        transform: translateY(-5px) !important;
    }
}

/* Legacy rule kept scoped — product cards no longer use idle float */
@media (min-width: 769px) {
    .product-card.wr-idle-float:not(.is-tilting):not(:hover) {
        animation: none;
    }

    .product-card.wr-idle-float:nth-child(odd):not(.is-tilting):not(:hover),
    .product-card.wr-idle-float:nth-child(3n):not(.is-tilting):not(:hover) {
        animation: none;
    }
}

/* Shimmer sweep on card hover */
.product-card {
    overflow: hidden;
}

.product-card .wr-shine {
    position: absolute;
    top: 0;
    left: 0;
    width: 45%;
    height: 100%;
    pointer-events: none;
    z-index: 6;
    background: linear-gradient(
        105deg,
        transparent 0%,
        rgba(255, 255, 255, 0.08) 40%,
        rgba(255, 255, 255, 0.45) 50%,
        rgba(255, 255, 255, 0.08) 60%,
        transparent 100%
    );
    transform: translateX(-120%) skewX(-18deg);
    opacity: 0;
    animation: none;
}

.product-card:hover .wr-shine {
    opacity: 0.4;
}

/* ----- Hero entrance ----- */
.wr-hero-3d .wr-hero-copy {
    animation: wr-fade-in-left 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.wr-hero-3d .wr-hero-visual {
    animation: wr-fade-in-right 0.95s 0.12s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.wr-hero-3d h1 {
    animation: wr-slide-up-fade 0.85s 0.1s both;
}

.wr-hero-3d h1 .text-rose-600,
.wr-hero-3d h1 span.text-rose-600 {
    background: linear-gradient(90deg, #5b21b6, #8b5cf6, #2563eb, #8b5cf6, #5b21b6);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent !important;
    animation: wr-gradient-shift 5s ease infinite, wr-text-glow 3s ease-in-out infinite;
}

.wr-hero-3d .inline-flex.items-center.gap-2.bg-rose-50 {
    animation: wr-pop-in 0.7s 0.05s both;
}

/* Animated feature pills under hero */
.wr-hero-3d .flex.flex-wrap.gap-4 > div {
    animation: wr-pop-in 0.55s both;
}
.wr-hero-3d .flex.flex-wrap.gap-4 > div:nth-child(1) { animation-delay: 0.35s; }
.wr-hero-3d .flex.flex-wrap.gap-4 > div:nth-child(2) { animation-delay: 0.45s; }
.wr-hero-3d .flex.flex-wrap.gap-4 > div:nth-child(3) { animation-delay: 0.55s; }

.wr-hero-3d .flex.flex-wrap.gap-4 > div:hover i,
.wr-hero-3d .flex.flex-wrap.gap-4 > div:hover .fab {
    animation: wr-icon-wiggle 0.5s ease;
}

/* CTA buttons pulse ring */
.wr-hero-3d .wr-btn--primary {
    animation: wr-pulse-ring 2.4s ease-out infinite;
}

/* Shine on primary CTA */
.wr-btn-shine {
    position: relative;
    overflow: hidden;
}

.wr-btn-shine::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 40%;
    height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    transform: translateX(-150%) skewX(-16deg);
    pointer-events: none;
}

.wr-btn-shine:hover::after {
    animation: wr-shimmer-sweep 0.7s ease;
}

/* ----- Section headers ----- */
.home-section-badge {
    animation: wr-pop-in 0.6s both;
}

.home-section-head.is-inview .home-section-badge {
    animation: wr-pop-in 0.6s both;
}

.home-section-head.is-inview h2 {
    animation: wr-slide-up-fade 0.7s 0.08s both;
}

.home-section-head.is-inview p {
    animation: wr-slide-up-fade 0.7s 0.16s both;
}

.home-section-pill {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.home-section-pill:hover {
    transform: translateY(-3px) scale(1.04);
    box-shadow: 0 10px 20px -10px rgba(91, 33, 182, 0.3) !important;
}

.home-section-pill:hover i {
    animation: wr-icon-wiggle 0.45s ease;
}

/* ----- Floating particles (JS injects .wr-particles) ----- */
.wr-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 2;
}

.wr-particle {
    position: absolute;
    bottom: 8%;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: radial-gradient(circle, #c4b5fd 0%, #8b5cf6 60%, transparent 100%);
    opacity: 0;
    animation: wr-particle-rise linear infinite;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.55);
}

.wr-particle--sm {
    width: 4px;
    height: 4px;
    background: radial-gradient(circle, #93c5fd 0%, #3b82f6 70%, transparent 100%);
}

.wr-particle--lg {
    width: 8px;
    height: 8px;
}

/* ----- Decorative sparkles ----- */
.wr-sparkle-dot {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #a78bfa;
    pointer-events: none;
    animation: wr-sparkle 2.2s ease-in-out infinite;
    box-shadow: 0 0 12px rgba(167, 139, 250, 0.8);
    z-index: 2;
}

/* ----- Nav link hover underline animation ----- */
#main-header nav a.relative span.absolute {
    transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

#main-header a[href]:hover i {
    animation: wr-icon-wiggle 0.45s ease;
}

/* ----- Logo spin-ish on hover ----- */
#main-header img[data-store-logo] {
    transition: transform 0.45s cubic-bezier(0.34, 1.4, 0.64, 1) !important;
}

#main-header a:hover img[data-store-logo] {
    transform: translateZ(20px) rotate(12deg) scale(1.08) !important;
}

/* ----- Step / how-to cards ----- */
#cara-order .rounded-2xl,
#cara-order [class*="rounded-2xl"] {
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease !important;
}

#cara-order .rounded-2xl:hover,
#cara-order [class*="rounded-2xl"]:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow:
        0 22px 40px -14px rgba(91, 33, 182, 0.22),
        0 8px 16px -8px rgba(15, 23, 42, 0.1) !important;
}

/* ----- Testimonial marquee slightly faster feel ----- */
.home-testimonial-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

/* ----- FAQ open animation ----- */
details summary {
    cursor: pointer;
    transition: color 0.2s ease;
}

details[open] {
    animation: wr-border-glow 2.5s ease-in-out infinite;
}

/* ----- Live order toast — slide-in only, no float anim (hindari konflik transform) ----- */
.v2-live-order-card.is-visible {
    animation: none;
}

/* ----- Footer social hover ----- */
footer a {
    transition: color 0.2s ease, transform 0.25s ease;
}

footer a:hover {
    transform: translateX(3px);
}

/* ----- Page hero (inner pages) ----- */
.page-hero {
    animation: wr-slide-up-fade 0.7s ease both;
}

.page-hero-title {
    animation: wr-slide-up-fade 0.75s 0.08s both;
}

.page-hero-desc {
    animation: wr-slide-up-fade 0.75s 0.16s both;
}

/* ---------- Mobile: lighter 3D, keep entrance anims ---------- */
@media (max-width: 768px) {
    body.wr-3d-ready::before,
    body.wr-3d-ready::after {
        opacity: 0.28;
        filter: blur(60px);
        animation: none;
    }

    .product-card:hover {
        transform: translateY(-4px) !important;
    }

    .product-card::before {
        display: none;
    }

    .product-card a.bg-rose-600,
    .product-card a[class*="bg-rose"] {
        box-shadow: 0 4px 0 #3b0f7a, 0 8px 16px -6px rgba(91, 33, 182, 0.35) !important;
    }

    .wr-particles {
        display: none;
    }

    .product-card.wr-anim-in:not(.is-tilting):not(:hover) {
        animation: wr-fade-up-3d 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
    }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    body.wr-3d-ready::before,
    body.wr-3d-ready::after,
    .hero-bounce,
    .hero-swing,
    .hero-wiggle,
    .hero-pop,
    .hero-pulse,
    .hero-slide,
    .animate-float,
    .product-card.wr-anim-in,
    .lb-card.wr-anim-in,
    .wr-particle,
    .wr-sparkle-dot,
    .v2-live-order-card,
    .wr-hero-3d h1 .text-rose-600,
    .wr-hero-3d .wr-btn--primary {
        animation: none !important;
    }

    .wr-reveal,
    .wr-reveal-left,
    .wr-reveal-right,
    .wr-reveal-scale,
    .product-card,
    .home-testimonial-card,
    .lb-card,
    [data-parallax],
    .wr-btn--primary,
    .wr-btn--wa {
        transition: none !important;
        transform: none !important;
        opacity: 1 !important;
        filter: none !important;
    }

    .product-card::before,
    .product-card .wr-shine {
        display: none;
    }
}

/* =========================================================
   UI POLISH — product cards, trust strip, floats, skeleton
   ========================================================= */

/* Hero wave (dark-mode aware) */
.wr-hero-wave-fill,
.wr-hero-3d svg path.wr-hero-wave-fill {
    color: #ffffff;
    fill: currentColor;
}
html[data-theme="dark"] .wr-hero-wave-fill,
html[data-theme="dark"] .wr-hero-3d svg path.wr-hero-wave-fill {
    color: #0f172a;
}

/* ----- Trust strip ----- */
.wr-trust-strip {
    margin-bottom: 0.5rem;
}
.wr-trust-panel {
    background: linear-gradient(135deg, #ffffff 0%, #f5f3ff 100%);
    border: 1px solid #e9d5ff;
    border-radius: 1.25rem;
    box-shadow:
        0 20px 40px -18px rgba(91, 33, 182, 0.22),
        0 4px 12px -6px rgba(15, 23, 42, 0.08);
    padding: 0.85rem 0.5rem;
    overflow: hidden;
}
@media (min-width: 768px) {
    .wr-trust-panel {
        padding: 1.15rem 0.5rem;
    }
}
.wr-trust-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    justify-content: center;
    padding: 0.65rem 0.85rem;
    position: relative;
}
@media (min-width: 768px) {
    .wr-trust-item:not(:last-child)::after {
        content: '';
        position: absolute;
        right: 0;
        top: 20%;
        bottom: 20%;
        width: 1px;
        background: linear-gradient(to bottom, transparent, #ddd6fe, transparent);
    }
}
.wr-trust-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #ede9fe, #ddd6fe);
    color: #5b21b6;
    font-size: 0.95rem;
    flex-shrink: 0;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}
.wr-trust-icon--wa {
    background: linear-gradient(145deg, #d1fae5, #a7f3d0);
    color: #059669;
}
.wr-trust-value {
    font-size: 1rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.15;
    letter-spacing: -0.02em;
}
.wr-trust-label {
    font-size: 0.68rem;
    font-weight: 600;
    color: #64748b;
    margin-top: 0.1rem;
}
html[data-theme="dark"] .wr-trust-panel {
    background: linear-gradient(135deg, #1e293b 0%, #172033 100%);
    border-color: #4c1d95;
}
html[data-theme="dark"] .wr-trust-value { color: #f1f5f9; }
html[data-theme="dark"] .wr-trust-label { color: #94a3b8; }
html[data-theme="dark"] .wr-trust-icon {
    background: rgba(91, 33, 182, 0.35);
    color: #c4b5fd;
}

/* ----- Product card redesign ----- */
.product-grid {
    align-items: stretch;
}

.product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0.65rem;
    border-radius: 1rem !important;
    background: #fff !important;
    border: 1px solid #ede9fe !important;
    box-shadow: 0 10px 28px -14px rgba(91, 33, 182, 0.16) !important;
}

/* Jangan override Tailwind .hidden — search-as-you-type butuh ini */
.product-card.hidden,
#productsGrid .product-card.hidden,
#product-container .product-card.hidden,
#product-container .product-item.hidden {
    display: none !important;
}

@media (min-width: 768px) {
    .product-card {
        padding: 0.85rem;
        border-radius: 1.15rem !important;
    }
}

.product-card__media {
    position: relative;
    margin-bottom: 0.7rem;
}

.product-card__img-wrap {
    aspect-ratio: 1 / 1;
    width: 100%;
    border-radius: 0.85rem;
    overflow: hidden;
    background: linear-gradient(145deg, #f8fafc, #f5f3ff 55%, #ede9fe);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.5);
}

.product-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.product-card:hover .product-card__img,
.product-card.is-tilting .product-card__img {
    transform: scale(1.06);
}

.product-card__cat {
    position: absolute;
    top: 0.45rem;
    left: 0.45rem;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.28rem 0.5rem;
    border-radius: 0.5rem;
    background: linear-gradient(135deg, #5b21b6, #7c3aed);
    color: #fff;
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    box-shadow: 0 6px 14px -6px rgba(91, 33, 182, 0.55);
    max-width: calc(100% - 5rem);
}

.product-card__cat-text {
    display: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
@media (min-width: 640px) {
    .product-card__cat-text { display: inline; }
}

.product-card__stock {
    position: absolute;
    top: 0.45rem;
    right: 0.45rem;
    z-index: 3;
    padding: 0.28rem 0.45rem;
    border-radius: 0.5rem;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(6px);
    color: #fff;
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}
.product-card__stock--low {
    background: rgba(217, 119, 6, 0.9);
}
.product-card__stock--out {
    background: rgba(185, 28, 28, 0.9);
}

.product-card__promo {
    position: absolute;
    bottom: 0.45rem;
    left: 0.45rem;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.22rem 0.45rem;
    border-radius: 0.45rem;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: #fff;
    font-size: 0.58rem;
    font-weight: 800;
    text-transform: uppercase;
    box-shadow: 0 6px 12px -4px rgba(239, 68, 68, 0.45);
}

.product-card__body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.product-card__title {
    font-size: 0.78rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0 0 0.25rem;
    letter-spacing: -0.01em;
}
@media (min-width: 768px) {
    .product-card__title { font-size: 0.9rem; }
}

.product-card__desc {
    font-size: 0.65rem;
    color: #94a3b8;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0 0 0.4rem;
}

.product-card__meta {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.45rem;
    flex-wrap: wrap;
}
.product-card__stars {
    color: #f59e0b;
    font-size: 0.55rem;
    letter-spacing: 0.05em;
}
.product-card__sold {
    font-size: 0.62rem;
    color: #94a3b8;
    font-weight: 600;
}

.product-card__price-row {
    margin-top: auto;
    margin-bottom: 0.65rem;
}
.product-card__price-label {
    display: block;
    font-size: 0.58rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.05rem;
}
.product-card__price {
    font-size: 0.95rem;
    font-weight: 900;
    color: #5b21b6;
    line-height: 1.15;
    margin: 0;
    letter-spacing: -0.02em;
}
.product-card__price-alt {
    display: block;
    margin-top: 0.12rem;
    font-size: 0.62rem;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: 0;
    line-height: 1.2;
}
@media (min-width: 768px) {
    .product-card__price { font-size: 1.1rem; }
    .product-card__price-alt { font-size: 0.68rem; }
}

.product-card__actions {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 0.4rem;
    margin-top: auto;
}

.product-card__buy,
.product-card__detail {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 2.35rem;
    padding: 0.45rem 0.5rem;
    border-radius: 0.65rem;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    text-decoration: none;
    border: none;
    cursor: pointer;
    line-height: 1;
}

.product-card__buy {
    background: linear-gradient(135deg, #5b21b6, #7c3aed);
    color: #fff !important;
    box-shadow: 0 6px 0 #3b0f7a, 0 10px 18px -8px rgba(91, 33, 182, 0.5);
    border-radius: 0.65rem;
}
.product-card__buy:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
    color: #fff !important;
}
.product-card__buy:active {
    transform: translateY(3px);
    box-shadow: 0 2px 0 #3b0f7a, 0 4px 10px -6px rgba(91, 33, 182, 0.4);
}
.product-card__buy--disabled,
.product-card__buy--disabled:hover {
    background: #94a3b8 !important;
    box-shadow: none !important;
    transform: none !important;
    cursor: not-allowed;
    filter: none !important;
    pointer-events: none;
}

.product-card__detail {
    background: #fff;
    color: #64748b;
    border: 1px solid #e2e8f0;
    border-radius: 0.65rem;
}
.product-card__detail:hover {
    background: #f8fafc;
    color: #5b21b6;
    border-color: #c4b5fd;
}

.product-card--oos {
    opacity: 0.88;
}
.product-card--oos .product-card__img {
    filter: grayscale(0.35);
}

/* Override old nested transform rules that conflict with new structure */
.product-card > * {
    transform: none;
}
.product-card .product-card__media,
.product-card .product-card__body,
.product-card .product-card__actions {
    position: relative;
    z-index: 1;
}
.product-card a.bg-rose-600,
.product-card a[class*="bg-rose"] {
    box-shadow: none !important;
}

/* ----- Skeleton ----- */
@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.skeleton-shimmer {
    background: linear-gradient(90deg, #f1f5f9 25%, #e9d5ff 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.4s ease-in-out infinite;
    border-radius: 0.4rem;
}
.product-skel {
    background: #fff;
    min-height: 100%;
}
.product-skel__img {
    aspect-ratio: 1;
    width: 100%;
}
.product-skel__line {
    height: 0.7rem;
    margin-bottom: 0.45rem;
}
.product-skel__line.w-3\/4 { width: 75%; }
.product-skel__line.w-1\/2 { width: 50%; }
.product-skel__line.w-2\/5 { width: 40%; }
.product-skel__btn {
    height: 2.25rem;
    width: 100%;
    margin-top: auto;
}
html[data-theme="dark"] .skeleton-shimmer {
    background: linear-gradient(90deg, #1e293b 25%, #334155 50%, #1e293b 75%);
    background-size: 200% 100%;
}
html[data-theme="dark"] .product-skel {
    background: #1e293b;
    border-color: #334155;
}

/* Dark product card */
html[data-theme="dark"] .product-card {
    background: linear-gradient(160deg, #1e293b, #172033) !important;
    border-color: #334155 !important;
}
html[data-theme="dark"] .product-card__title { color: #f1f5f9; }
html[data-theme="dark"] .product-card__desc,
html[data-theme="dark"] .product-card__sold,
html[data-theme="dark"] .product-card__price-label { color: #94a3b8; }
html[data-theme="dark"] .product-card__price { color: #c4b5fd; }
html[data-theme="dark"] .product-card__price-alt { color: #64748b; }
html[data-theme="dark"] .product-card__detail {
    background: #0f172a;
    border-color: #475569;
    color: #cbd5e1;
}
html[data-theme="dark"] .product-card__detail:hover {
    border-color: #7c3aed;
    color: #e9d5ff;
    background: #1e293b;
}

/* ----- Floating action buttons ----- */
.wr-float-stack {
    position: fixed;
    right: 1rem;
    bottom: 1.15rem;
    z-index: 9990;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.65rem;
    pointer-events: none;
}
.wr-float-stack > * {
    pointer-events: auto;
}
.wr-float-wa {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.75rem 1rem 0.75rem 0.85rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff !important;
    font-weight: 800;
    font-size: 0.82rem;
    text-decoration: none !important;
    box-shadow:
        0 10px 28px -8px rgba(22, 163, 74, 0.55),
        0 4px 10px -4px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    animation: wr-pulse-ring 2.6s ease-out infinite;
}
.wr-float-wa:hover {
    transform: translateY(-2px) scale(1.03);
    color: #fff !important;
    box-shadow: 0 14px 32px -8px rgba(22, 163, 74, 0.65);
}
.wr-float-wa i {
    font-size: 1.35rem;
}
.wr-float-wa__label {
    display: none;
}
@media (min-width: 640px) {
    .wr-float-wa__label { display: inline; }
    .wr-float-wa {
        padding-right: 1.15rem;
    }
}
.wr-float-top {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 999px;
    border: 1px solid #e9d5ff;
    background: #fff;
    color: #5b21b6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 24px -10px rgba(91, 33, 182, 0.35);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease, background 0.2s ease;
}
.wr-float-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.wr-float-top:hover {
    background: #5b21b6;
    color: #fff;
    border-color: #5b21b6;
}
html[data-theme="dark"] .wr-float-top {
    background: #1e293b;
    border-color: #4c1d95;
    color: #c4b5fd;
}
html[data-theme="dark"] .wr-float-top:hover {
    background: #7c3aed;
    color: #fff;
}

/* Section spacing polish on mobile */
@media (max-width: 640px) {
    #cara-order { padding-top: 3.5rem; padding-bottom: 3.5rem; }
    #faq { padding-top: 3.5rem; padding-bottom: 3.5rem; }
    .wr-hero-3d h1 {
        font-size: 2rem !important;
        line-height: 1.15 !important;
    }
    .product-card__actions {
        grid-template-columns: 1fr;
    }
    .product-card__buy,
    .product-card__detail {
        min-height: 2.2rem;
        font-size: 0.62rem;
    }
}

/* Highlight ring when deep-linked product */
.product-card.ring-2 {
    box-shadow: 0 0 0 3px rgba(91, 33, 182, 0.35), var(--wr-3d-shadow-hover) !important;
}

/* ----- Trust strip loading skeleton ----- */
.wr-trust-value--loading {
    color: transparent !important;
    position: relative;
    min-width: 2.5rem;
    border-radius: 0.35rem;
    background: linear-gradient(90deg, #ede9fe 25%, #f5f3ff 50%, #ede9fe 75%);
    background-size: 200% 100%;
    animation: wr-trust-shimmer 1.2s ease-in-out infinite;
}
html[data-theme="dark"] .wr-trust-value--loading {
    background: linear-gradient(90deg, #334155 25%, #475569 50%, #334155 75%);
    background-size: 200% 100%;
}
@keyframes wr-trust-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.wr-trust-value.is-ready {
    color: #0f172a;
    background: none;
    animation: none;
}
html[data-theme="dark"] .wr-trust-value.is-ready {
    color: #f1f5f9;
}

/* ----- Testimonial placeholders (replaced when API loads) ----- */
.wr-testimonial-placeholder {
    opacity: 0.72;
    pointer-events: none;
}
#testimonialsGrid[data-testimonials-loading="1"] .wr-testimonial-placeholder {
    animation: wr-trust-shimmer 1.4s ease-in-out infinite;
}

/* ----- Mobile performance: lighter effects ----- */
@media (max-width: 767px), (pointer: coarse) {
    body.wr-3d-ready::before,
    body.wr-3d-ready::after {
        opacity: 0.18;
        filter: blur(48px);
        animation: none;
    }

    .wr-hero-3d [class*="blur-["],
    .wr-hero-3d .blur-\[100px\],
    .wr-hero-3d .blur-\[80px\],
    .wr-hero-3d .blur-\[120px\],
    .wr-hero-3d .blur-\[60px\] {
        filter: blur(40px) !important;
        opacity: 0.65 !important;
    }

    .wr-hero-3d .animate-ping {
        animation: none !important;
        opacity: 0.35 !important;
    }

    .wr-hero-3d .animate-float {
        animation-duration: 4.5s;
    }

    .hero-bounce,
    .hero-swing,
    .hero-wiggle,
    .hero-pop,
    .hero-pulse,
    .hero-slide {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    footer .blur-\[100px\] {
        display: none;
    }

    .product-card:hover,
    .product-card.is-tilting {
        transform: none !important;
    }

    .product-card.wr-anim-pending,
    .product-card.wr-anim-in {
        opacity: 1 !important;
        animation: none !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.wr-3d-ready::before,
    body.wr-3d-ready::after,
    .wr-hero-3d .animate-float,
    .wr-hero-3d .animate-ping,
    .wr-hero-3d .animate-pulse,
    .testimonials-marquee-track {
        animation: none !important;
    }

    .wr-trust-value--loading {
        animation: none;
        background: #ede9fe;
        color: #94a3b8 !important;
    }
}
