/* ========================================
   ELEGANCE THEME - Compiled Stylesheet
   Performance-optimized: removed unused effects
   ======================================== */

/* ========================================
   CSS VARIABLES
   ======================================== */
:root {
    --transition-fast: 150ms;
    --transition-normal: 250ms;
    --transition-slow: 400ms;
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 9999px;
}

/* ========================================
   BASE STYLES
   ======================================== */
[x-cloak] { display: none !important; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Poppins', 'Tajawal', sans-serif;
    overflow-x: hidden;
}
[dir="rtl"] body { font-family: 'Tajawal', 'Poppins', sans-serif; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f5e6e8; }
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgb(var(--color-primary)), rgb(var(--color-gold)));
    border-radius: 10px;
}

/* ========================================
   GLASS MORPHISM
   ======================================== */
.glass {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}
@media (max-width: 767px) {
    .glass {
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }
}

/* ========================================
   BUTTONS
   ======================================== */
.btn-elegant {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-elegant::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}
.btn-elegant:hover::before { left: 100%; }

/* ========================================
   PRODUCT CARD
   ======================================== */
.product-card {
    transition: border-color 0.2s ease;
}

/* ========================================
   UNDERLINE ANIMATION
   ======================================== */
.elegant-underline {
    position: relative;
    display: inline-block;
}
.elegant-underline::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, rgb(var(--color-primary)), rgb(var(--color-gold)));
    transition: width 0.3s ease;
}
.elegant-underline:hover::after { width: 100%; }

/* ========================================
   GRADIENT TEXT
   ======================================== */
.gradient-text {
    background: linear-gradient(135deg, rgb(var(--color-primary)) 0%, rgb(var(--color-gold)) 50%, rgb(var(--color-primary)) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========================================
   SPLIDE SLIDER STYLES
   ======================================== */
.hero-splide .splide__track,
.hero-splide .splide__list {
    height: 100%;
}

.elegance-splide .splide__arrow {
    background: rgba(255,255,255,0.95);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    box-shadow: 0 4px 20px rgb(var(--color-primary) / 0.3);
    transition: all 0.3s ease;
    opacity: 1;
}
.elegance-splide .splide__arrow:hover {
    background: linear-gradient(135deg, rgb(var(--color-primary)), rgb(var(--color-gold)));
    transform: scale(1.1);
}
.elegance-splide .splide__arrow:hover svg { fill: white; }
.elegance-splide .splide__arrow svg {
    fill: rgb(var(--color-primary));
    width: 18px;
    height: 18px;
}
.elegance-splide .splide__pagination__page {
    background: rgb(var(--color-primary));
    opacity: 0.4;
    width: 12px;
    height: 12px;
    transition: all 0.3s ease;
}
.elegance-splide .splide__pagination__page.is-active {
    opacity: 1;
    width: 30px;
    border-radius: 6px;
    background: linear-gradient(90deg, rgb(var(--color-primary)), rgb(var(--color-gold)));
    transform: scale(1);
}

/* Bug fix 4.5 (C_LCP_DELAY): paint the first slide BEFORE Splide mounts
   so the LCP element does not wait for ~1,860ms of JS initialisation.
   Once Splide adds the `is-initialized` class on the .splide root these
   rules stop matching and the library takes over the layout (flex track,
   transform-based slide positioning).

   The rule is universal (.splide:not(.is-initialized)) per task 4.5: it
   covers the hero slider for LCP. The products/category/bestseller
   sliders still get a usable skeleton because the first slide stays
   visible at full width via the products-splide width rules below; the
   remaining cards appear the instant Splide mounts (task 6.2 mounts on
   IntersectionObserver, so this gap is sub-frame in practice).

   _Preservation 3.2/3.3: Splide invariants (autoplay, RTL, loop,
   pagination, slide count) are unchanged because Splide replaces these
   styles the moment it mounts. */
.splide:not(.is-initialized) .splide__list { display: block; }
.splide:not(.is-initialized) .splide__slide:not(:first-child) { display: none; }
.splide:not(.is-initialized) .splide__slide { flex-shrink: 0; }
.products-splide:not(.is-initialized) .splide__slide { width: 100%; }
@media (min-width: 576px) {
    .products-splide:not(.is-initialized) .splide__slide { width: 50%; }
}
@media (min-width: 1024px) {
    .products-splide:not(.is-initialized) .splide__slide { width: 33.333%; }
}
@media (min-width: 1280px) {
    .products-splide:not(.is-initialized) .splide__slide { width: 25%; }
}

/* Hero mobile arrows */
@media (max-width: 767px) {
    .hero-splide .splide__arrow {
        width: 36px;
        height: 36px;
        top: 50%;
    }
    .hero-splide .splide__arrows { pointer-events: none; }
    .hero-splide .splide__arrow { pointer-events: auto; }
}

/* Hero Overlay */
.hero-overlay {
    background: linear-gradient(135deg,
        rgba(45, 45, 45, 0.7) 0%,
        rgba(45, 45, 45, 0.3) 50%,
        transparent 100%);
}

/* ========================================
   FORM INPUTS
   ======================================== */
.input-elegant {
    border: 2px solid #e8c4c4;
    transition: all 0.3s ease;
}
.input-elegant:focus {
    border-color: rgb(var(--color-primary));
    box-shadow: 0 0 0 4px rgb(var(--color-primary) / 0.1);
}

/* ========================================
   BADGES
   ======================================== */
.badge-elegant {
    background: linear-gradient(135deg, rgb(var(--color-primary)), rgb(var(--color-gold)));
    color: white;
    font-size: 0.7rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* ========================================
   WISHLIST HEART
   ======================================== */
.heart-beat {
    animation: heartBeat 0.3s ease-in-out;
}
@keyframes heartBeat {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* ========================================
   CARD HOVER (categories, features)
   ======================================== */
.card-elegant {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.card-elegant:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

/* ========================================
   ANNOUNCEMENT BAR — Accessibility Contrast Fix
   Bug fix 8.2 (C_A11Y_CONTRAST): The original bg-primary + text-white
   combination does not meet WCAG 2.1 AA contrast ratio (≥ 4.5:1).
   This scoped class overrides the background/foreground ONLY on the
   announcement bar without touching bg-primary globally (preservation 3.1).
   #1a1a2e on #ffffff → contrast ratio ≈ 15.4:1 (well above 4.5:1).
   ======================================== */
.announcement-bar {
    background: var(--announcement-bg, #1a1a2e) !important;
    color: var(--announcement-fg, #ffffff) !important;
}

/* ========================================
   SITE HEADER HEIGHT (Bug fix 5.1, C_CLS_MAIN)
   Default 81px = h-20 (80px) + 1px border-b (no announcement bar).
   Updated dynamically by header.blade.php Alpine `$watch` when an
   announcement bar is present, BEFORE the LCP element is drawn.
   ======================================== */
:root { --site-header-height: 96px; }

/* ========================================
   MARQUEE (Announcement Bar)
   ======================================== */
@keyframes marquee-scroll {
    from { transform: translateX(0%); }
    to { transform: translateX(50%); }
}
.marquee-container {
    display: flex;
    overflow: hidden;
    white-space: nowrap;
}
.animate-marquee {
    display: flex;
    flex-shrink: 0;
    animation: marquee-scroll var(--marquee-duration, 20s) linear infinite;
    will-change: transform;
}
.animate-marquee:hover { animation-play-state: paused; }
.animate-marquee.speed-slow { --marquee-duration: 30s; }
.animate-marquee.speed-medium { --marquee-duration: 20s; }
.animate-marquee.speed-fast { --marquee-duration: 10s; }

/* ========================================
   SCROLL ANIMATIONS (single class approach)
   ======================================== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger Children */
.stagger-children > * {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}
.stagger-children.is-visible > * {
    opacity: 1;
    transform: translateY(0);
}
.stagger-children.is-visible > *:nth-child(1) { transition-delay: 0.05s; }
.stagger-children.is-visible > *:nth-child(2) { transition-delay: 0.1s; }
.stagger-children.is-visible > *:nth-child(3) { transition-delay: 0.15s; }
.stagger-children.is-visible > *:nth-child(4) { transition-delay: 0.2s; }
.stagger-children.is-visible > *:nth-child(5) { transition-delay: 0.25s; }
.stagger-children.is-visible > *:nth-child(6) { transition-delay: 0.3s; }
.stagger-children.is-visible > *:nth-child(7) { transition-delay: 0.35s; }
.stagger-children.is-visible > *:nth-child(8) { transition-delay: 0.4s; }
.stagger-children.is-visible > *:nth-child(9) { transition-delay: 0.45s; }
.stagger-children.is-visible > *:nth-child(10) { transition-delay: 0.5s; }
.stagger-children.is-visible > *:nth-child(11) { transition-delay: 0.55s; }
.stagger-children.is-visible > *:nth-child(12) { transition-delay: 0.6s; }

/* ========================================
   SHINE EFFECT (used on Instagram images)
   ======================================== */
.shine-effect {
    position: relative;
    overflow: hidden;
}
.shine-effect::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(to right, transparent 0%, rgba(255,255,255,0.3) 50%, transparent 100%);
    transform: rotate(30deg) translateX(-100%);
    transition: transform 0.6s ease;
}
.shine-effect:hover::after {
    transform: rotate(30deg) translateX(100%);
}

/* ========================================
   HOVER LIFT (used on Instagram grid)
   ======================================== */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.12);
}

/* ========================================
   RTL SUPPORT
   ======================================== */
[dir="rtl"] .rtl\:space-x-reverse > :not([hidden]) ~ :not([hidden]) {
    --tw-space-x-reverse: 1;
}

/* ========================================
   MOBILE BOTTOM NAVIGATION
   ======================================== */
@media (max-width: 767px) {
    main { padding-bottom: 75px !important; }
    .fixed.bottom-6 { bottom: 85px !important; }
    #pwa-install-btn { bottom: 85px !important; }
}

.safe-area-pb {
    padding-bottom: env(safe-area-inset-bottom, 6px);
}

.mobile-bottom-nav {
    animation: slideUpNav 0.3s ease-out;
}
@keyframes slideUpNav {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.nav-item, .nav-item-home {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.nav-item-home > div {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.nav-item-home:active > div {
    transform: scale(0.95);
}

/* ========================================
   PWA INSTALL ANIMATION
   ======================================== */
@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========================================
   NEWSLETTER SECTION - Minimal decorative
   ======================================== */
.magnetic-btn {
    position: relative;
    transition: transform 0.3s ease;
}
.magnetic-btn:hover { transform: scale(1.03); }

.btn-sparkle { position: relative; }

.animate-gentle-pulse {
    animation: gentle-pulse 2s ease-in-out infinite;
}
@keyframes gentle-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}
