/* ============================================
   PREMIUM UI SYSTEM - v3.0
   Modern, Responsive, Premium E-commerce Design
   ============================================ */

/* ============================================
   ENHANCED CSS VARIABLES
   ============================================ */
:root {
    /* Premium Shadows */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-card-hover: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 4px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-float: 0 20px 40px -12px rgba(0, 0, 0, 0.15);
    --shadow-glow: 0 0 20px rgba(var(--primary-rgb), 0.15);

    /* Premium Transitions */
    --ease-premium: cubic-bezier(0.2, 0.8, 0.2, 1);
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --duration-fast: 200ms;
    --duration-normal: 350ms;
    --duration-slow: 500ms;

    /* Z-index Scale */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-overlay: 300;
    --z-drawer: 400;
    --z-modal: 500;
    --z-toast: 600;
}

/* ============================================
   GLOBAL TYPOGRAPHY ENHANCEMENTS
   ============================================ */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

/* Better text selection */
::selection {
    background: rgba(var(--primary-rgb), 0.15);
    color: inherit;
}

/* ============================================
   PREMIUM HEADER
   ============================================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
}

.site-header.scrolled {
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

/* Top bar premium styling */
.header-topbar {
    font-size: 0.75rem;
    letter-spacing: 0.01em;
}

/* Main header area */
.header-main {
    padding: 0.875rem 0;
}

/* Logo */
.site-logo img {
    transition: none;
}

/* Premium search bar */
.search-input-premium {
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    padding: 0.625rem 3rem 0.625rem 1rem;
    font-size: 0.9rem;
    transition: all var(--duration-fast) var(--ease-premium);
    background: #f9fafb;
    width: 100%;
}

.search-input-premium:focus {
    background: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.08);
    outline: none;
}

.search-input-premium::placeholder {
    color: #9ca3af;
}

/* Cart badge pulse animation */
.cart-badge {
    animation: none;
    transition: transform var(--duration-fast) var(--ease-bounce);
}

.cart-badge.updated {
    animation: cartPulse 0.4s var(--ease-bounce);
}

@keyframes cartPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.4); }
    100% { transform: scale(1); }
}

/* ============================================
   MOBILE DRAWER (replaces dropdown)
   ============================================ */
.mobile-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: var(--z-overlay);
    opacity: 0;
    visibility: hidden;
    transition: all var(--duration-normal) var(--ease-premium);
}

.mobile-drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-drawer {
    position: fixed;
    top: 0;
    right: -320px;
    width: 300px;
    max-width: 85vw;
    height: 100vh;
    height: 100dvh;
    background: white;
    z-index: var(--z-drawer);
    transition: right var(--duration-normal) var(--ease-premium);
    overflow-y: auto;
    overscroll-behavior: contain;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.1);
}

[dir="rtl"] .mobile-drawer {
    right: auto;
    left: -320px;
    transition: left var(--duration-normal) var(--ease-premium);
}

.mobile-drawer.active {
    right: 0;
}

[dir="rtl"] .mobile-drawer.active {
    left: 0;
}

.mobile-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f3f4f6;
}

.mobile-drawer-close {
    width: 36px;
    height: 36px;
    border: none;
    background: #f3f4f6;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--duration-fast);
    color: #374151;
}

.mobile-drawer-close:hover {
    background: #e5e7eb;
}

/* Mobile search in drawer */
.mobile-search-form {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f3f4f6;
}

.mobile-search-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    font-size: 0.9rem;
    background: #f9fafb;
}

.mobile-search-input:focus {
    border-color: var(--primary);
    outline: none;
    background: white;
}

/* Mobile nav links */
.mobile-nav-links {
    padding: 0.75rem 0;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem 1.5rem;
    color: #374151;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--duration-fast);
    border-left: 3px solid transparent;
}

[dir="rtl"] .mobile-nav-link {
    border-left: none;
    border-right: 3px solid transparent;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    background: rgba(var(--primary-rgb), 0.04);
    color: var(--primary);
    border-left-color: var(--primary);
}

[dir="rtl"] .mobile-nav-link:hover,
[dir="rtl"] .mobile-nav-link.active {
    border-right-color: var(--primary);
}

.mobile-nav-link i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
    opacity: 0.7;
}

.mobile-nav-link:hover i,
.mobile-nav-link.active i {
    opacity: 1;
}

.mobile-nav-divider {
    height: 1px;
    background: #f3f4f6;
    margin: 0.5rem 1.5rem;
}

/* Mobile drawer footer */
.mobile-drawer-footer {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid #f3f4f6;
    margin-top: auto;
}

/* ============================================
   DESKTOP NAVIGATION - Premium
   ============================================ */
.desktop-nav {
    border-top: 1px solid #f3f4f6;
}

.desktop-nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #4b5563;
    text-decoration: none;
    transition: color var(--duration-fast);
}

.desktop-nav-link:hover {
    color: var(--primary);
}

.desktop-nav-link.active {
    color: var(--primary);
}

.desktop-nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0.5rem;
    right: 0.5rem;
    height: 2px;
    background: var(--primary);
    border-radius: 2px 2px 0 0;
}

/* Categories mega-dropdown */
.nav-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 0.5rem;
    min-width: 220px;
    box-shadow: var(--shadow-float);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all var(--duration-fast) var(--ease-premium);
    z-index: var(--z-dropdown);
}

.nav-dropdown-trigger:hover .nav-dropdown,
.nav-dropdown-trigger:focus-within .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-item {
    display: block;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    color: #4b5563;
    border-radius: 8px;
    text-decoration: none;
    transition: all var(--duration-fast);
}

.nav-dropdown-item:hover {
    background: rgba(var(--primary-rgb), 0.05);
    color: var(--primary);
}

/* ============================================
   PREMIUM PRODUCT CARDS
   ============================================ */
.product-card {
    position: relative;
    background: white;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #f0f0f0;
    transition: all var(--duration-normal) var(--ease-premium);
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
    border-color: #e0e0e0;
}

/* Wishlist button on card */
.product-card__wishlist {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 15;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: white;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-bounce);
    color: #9ca3af;
    opacity: 0;
}

[dir="rtl"] .product-card__wishlist {
    right: auto;
    left: 10px;
}

.product-card:hover .product-card__wishlist {
    opacity: 1;
}

.product-card__wishlist:hover {
    transform: scale(1.15);
    color: #ef4444;
}

.product-card__wishlist.active {
    color: #ef4444;
    opacity: 1;
}

/* Product Card Rating */
.product-card__rating {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-bottom: 0.25rem;
    font-size: 0.7rem;
    color: #f59e0b;
}
.product-card__rating-count {
    color: #9ca3af;
    font-size: 0.7rem;
    margin-left: 4px;
}
[dir="rtl"] .product-card__rating-count {
    margin-left: 0;
    margin-right: 4px;
}

/* Product Card Disabled (out of stock) */
.product-card__btn--disabled {
    background: #e5e7eb !important;
    color: #9ca3af !important;
    cursor: not-allowed;
    border: none;
    width: 100%;
    padding: 0.5rem;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}

/* Product image improvements */
.product-card__image {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: #fafafa;
}

.product-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--duration-slow) var(--ease-premium);
}

.product-card:hover .product-card__image img {
    transform: scale(1.05);
}

/* Premium badges */
.badge-sale,
.badge-new,
.badge-featured,
.badge-hot {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
    padding: 4px 10px;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 8px;
    color: white;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

[dir="rtl"] .badge-sale,
[dir="rtl"] .badge-new,
[dir="rtl"] .badge-featured,
[dir="rtl"] .badge-hot {
    left: auto;
    right: 10px;
}

.badge-sale { background: linear-gradient(135deg, #ef4444, #dc2626); }
.badge-new { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.badge-featured { background: linear-gradient(135deg, #f59e0b, #d97706); }
.badge-hot { background: linear-gradient(135deg, #f97316, #ea580c); }

/* Product card body */
.product-card__body {
    padding: 14px;
}

@media (min-width: 640px) {
    .product-card__body {
        padding: 16px;
    }
}

.product-card__title {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 36px;
    text-decoration: none;
    transition: color var(--duration-fast);
}

.product-card__title:hover {
    color: var(--primary);
}

/* Price styling */
.product-card__price-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.product-card__price {
    font-size: 1.0625rem;
    font-weight: 800;
    color: #111827;
    letter-spacing: -0.01em;
}

.product-card__price-old {
    font-size: 0.75rem;
    color: #9ca3af;
    text-decoration: line-through;
}

/* Add to cart button - premium */
.product-card__btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--primary, oklch(var(--p)));
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-premium);
    position: relative;
    overflow: hidden;
}

.product-card__btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0) 100%);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.product-card__btn:hover::before {
    transform: translateX(100%);
}

.product-card__btn:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.25);
}

.product-card__btn:active {
    transform: translateY(0) scale(0.98);
}

/* ============================================
   PREMIUM PRODUCT GRID
   ============================================ */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

@media (min-width: 640px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 18px;
    }
}

@media (min-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 24px;
    }
}

@media (min-width: 1280px) {
    .product-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 24px;
    }
}

/* Mobile: show 4 items, with "show more" logic */
@media (max-width: 639px) {
    .product-grid > *:nth-child(n+5) {
        display: none;
    }
    
    .product-grid.expanded > * {
        display: block !important;
    }
}

/* ============================================
   PREMIUM CATEGORY CARDS
   ============================================ */
.category-card-premium {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 1;
    background: #f8f9fa;
    transition: all var(--duration-normal) var(--ease-premium);
}

.category-card-premium:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-card-hover);
}

.category-card-premium img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--duration-slow) var(--ease-premium);
}

.category-card-premium:hover img {
    transform: scale(1.08);
}

.category-card-premium__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.5) 0%, transparent 60%);
    display: flex;
    align-items: flex-end;
    padding: 12px;
}

.category-card-premium__name {
    color: white;
    font-size: 0.8125rem;
    font-weight: 600;
    text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

/* ============================================
   PREMIUM HERO CAROUSEL
   ============================================ */
.hero-carousel {
    position: relative;
    overflow: hidden;
    border-radius: 0;
}

@media (min-width: 768px) {
    .hero-carousel {
        border-radius: 0;
    }
}

.hero-slide {
    position: relative;
    min-height: 200px;
}

@media (min-width: 640px) {
    .hero-slide {
        min-height: 380px;
    }
}

@media (min-width: 1024px) {
    .hero-slide {
        min-height: 480px;
    }
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Hero CTA buttons */
.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.hero-cta .btn {
    border-radius: 12px;
    font-weight: 600;
    letter-spacing: 0.01em;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

/* Carousel dots */
.carousel-dots {
    display: flex;
    gap: 8px;
    justify-content: center;
    padding: 12px 0;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    border: none;
    cursor: pointer;
    transition: all var(--duration-fast);
    padding: 0;
}

.carousel-dot.active {
    background: white;
    width: 24px;
    border-radius: 4px;
}

/* ============================================
   PREMIUM SECTION HEADERS
   ============================================ */
.section-header h2 {
    position: relative;
    font-size: 1.25rem;
    font-weight: 800;
    color: #111827;
    letter-spacing: -0.01em;
}

@media (min-width: 640px) {
    .section-header h2 {
        font-size: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .section-header h2 {
        font-size: 1.75rem;
    }
}

/* ============================================
   PREMIUM FOOTER
   ============================================ */
.site-footer {
    position: relative;
    overflow: hidden;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(var(--primary-rgb), 0.3), transparent);
}

.footer-heading {
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.25rem;
    color: rgba(255, 255, 255, 0.95);
}

.footer-link {
    display: inline-block;
    padding: 0.25rem 0;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: all var(--duration-fast);
}

.footer-link:hover {
    color: white;
    transform: translateX(3px);
}

[dir="rtl"] .footer-link:hover {
    transform: translateX(-3px);
}

.footer-social-link {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all var(--duration-fast) var(--ease-bounce);
}

.footer-social-link:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(var(--primary-rgb), 0.3);
}

/* ============================================
   PREMIUM TOAST NOTIFICATIONS      
   ============================================ */
.toast-premium {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: var(--z-toast);
    max-width: 380px;
    padding: 14px 20px;
    border-radius: 14px;
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-float);
    animation: toastSlideIn var(--duration-normal) var(--ease-spring);
    backdrop-filter: blur(12px);
}

[dir="rtl"] .toast-premium {
    right: auto;
    left: 24px;
}

.toast-premium.success {
    background: linear-gradient(135deg, #059669, #10b981);
}

.toast-premium.error {
    background: linear-gradient(135deg, #dc2626, #ef4444);
}

.toast-premium.info {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes toastSlideOut {
    to {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
}

/* ============================================
   PREMIUM FORM INPUTS
   ============================================ */
.input-premium {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    font-size: 0.9rem;
    transition: all var(--duration-fast);
    background: white;
}

.input-premium:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.08);
}

.input-premium.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.08);
}

/* Floating label */
.form-floating {
    position: relative;
}

.form-floating label {
    position: absolute;
    top: 50%;
    left: 1rem;
    transform: translateY(-50%);
    font-size: 0.9rem;
    color: #9ca3af;
    pointer-events: none;
    transition: all var(--duration-fast);
    background: transparent;
    padding: 0 4px;
}

[dir="rtl"] .form-floating label {
    left: auto;
    right: 1rem;
}

.form-floating input:focus ~ label,
.form-floating input:not(:placeholder-shown) ~ label {
    top: 0;
    font-size: 0.75rem;
    color: var(--primary);
    background: white;
}

/* ============================================
   PREMIUM AUTH PAGES (Login/Register)
   ============================================ */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, #f0f4ff 0%, #faf5ff 50%, #fef2f2 100%);
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: white;
    border-radius: 20px;
    padding: 2.5rem 2rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

@media (min-width: 640px) {
    .auth-card {
        padding: 3rem 2.5rem;
    }
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #111827;
    text-align: center;
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    font-size: 0.875rem;
    color: #6b7280;
    text-align: center;
    margin-bottom: 2rem;
}

/* ============================================
   PREMIUM FLASH MESSAGES
   ============================================ */
.flash-message {
    max-width: 72rem;
    margin: 1rem auto;
    padding: 0.875rem 1.25rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    animation: flashSlideDown 0.3s var(--ease-premium);
    position: relative;
}

.flash-message.success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.flash-message.error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.flash-message.info {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.flash-close {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: inherit;
    opacity: 0.5;
    cursor: pointer;
    padding: 4px;
    font-size: 1.1rem;
}

.flash-close:hover {
    opacity: 1;
}

@keyframes flashSlideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   SCROLL TO TOP - Premium
   ============================================ */
#scroll-to-top {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 50;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: white;
    color: var(--primary);
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-premium);
}

[dir="rtl"] #scroll-to-top {
    left: auto;
    right: 24px;
}

#scroll-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    background: var(--primary);
    color: white;
}

#scroll-to-top.visible {
    display: flex;
}

/* ============================================
   TRUST BADGES - Premium
   ============================================ */
.trust-badge {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 1rem 1.25rem;
    background: white;
    border-radius: 14px;
    border: 1px solid #f0f0f0;
    transition: all var(--duration-normal) var(--ease-premium);
}

.trust-badge:hover {
    border-color: rgba(var(--primary-rgb), 0.2);
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.06);
}

.trust-badge__icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

/* ============================================
   REVIEWS SECTION - Premium
   ============================================ */
.review-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid #f0f0f0;
    transition: all var(--duration-normal) var(--ease-premium);
}

.review-card:hover {
    border-color: #e0e0e0;
    box-shadow: var(--shadow-card-hover);
}

.review-stars .fa-star {
    font-size: 0.875rem;
    transition: transform var(--duration-fast);
}

.review-card:hover .review-stars .fa-star.text-yellow-400 {
    transform: scale(1.1);
}

/* ============================================
   LOADING STATES
   ============================================ */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Button loading state */
.btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: btnSpin 0.6s linear infinite;
}

@keyframes btnSpin {
    to { transform: rotate(360deg); }
}

/* ============================================
   UTILITY ENHANCEMENTS
   ============================================ */

/* Better focus styles for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Hide on specific breakpoints */
@media (max-width: 639px) {
    .hide-mobile { display: none !important; }
}

@media (min-width: 640px) and (max-width: 1023px) {
    .hide-tablet { display: none !important; }
}

@media (min-width: 1024px) {
    .hide-desktop { display: none !important; }
}

/* Smooth page transitions - use only transition-based approach */
/* Animation version removed to prevent conflict with transition-based .entered class */

/* Container max-width override for larger screens */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
}

/* ============================================
   MOBILE BOTTOM NAV BAR
   Base styles only - responsive overrides in responsive.css
   ============================================ */
.mobile-bottom-nav {
    display: none;
}

@media (max-width: 768px) {
    .mobile-bottom-nav {
        display: flex !important;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: rgba(255,255,255,0.97);
        border-top: 1px solid #e5e7eb;
        z-index: 9990;
        padding: 0.35rem 0;
        padding-bottom: max(0.35rem, env(safe-area-inset-bottom));
        box-shadow: 0 -4px 20px rgba(0,0,0,0.06);
    }
}

/* ============================================
   EMPTY STATE PREMIUM
   ============================================ */
.empty-state-premium {
    text-align: center;
    padding: 3rem 1.5rem;
}

.empty-state-premium__icon {
    width: 80px;
    height: 80px;
    border-radius: 24px;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: #9ca3af;
}

.empty-state-premium__title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 0.5rem;
}

.empty-state-premium__text {
    font-size: 0.875rem;
    color: #6b7280;
    max-width: 320px;
    margin: 0 auto 1.5rem;
    line-height: 1.6;
}

/* ============================================
   WHATSAPP FAB
   ============================================ */
.whatsapp-fab {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    border-radius: 50%;
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.4);
    color: #fff;
    font-size: 30px;
    text-decoration: none;
    transition: transform var(--duration-normal) var(--ease-bounce),
                box-shadow var(--duration-normal) ease;
    animation: wa-pulse 2s infinite;
}
[dir="rtl"] .whatsapp-fab {
    right: auto;
    left: 25px;
}
.whatsapp-fab:hover {
    transform: scale(1.12);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
    color: #fff;
}
@keyframes wa-pulse {
    0%, 100% { box-shadow: 0 4px 14px rgba(37,211,102,0.4), 0 0 0 0 rgba(37,211,102,0.5); }
    50%      { box-shadow: 0 4px 14px rgba(37,211,102,0.4), 0 0 0 12px rgba(37,211,102,0); }
}
@media (max-width: 768px) {
    .whatsapp-fab {
        bottom: 80px; /* above mobile bottom nav */
        width: 52px;
        height: 52px;
        font-size: 26px;
    }
}

/* ============================================
   SCROLL TO TOP
   ============================================ */
.scroll-to-top {
    position: fixed;
    bottom: 90px;
    right: 25px;
    z-index: 900;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: var(--primary, #6366f1);
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all var(--duration-normal) var(--ease-premium);
}
[dir="rtl"] .scroll-to-top {
    right: auto;
    left: 25px;
}
.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.scroll-to-top:hover {
    background: var(--primary-dark, #4f46e5);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}
@media (max-width: 768px) {
    .scroll-to-top {
        bottom: 140px; /* above whatsapp fab and mobile nav */
        width: 38px;
        height: 38px;
        font-size: 14px;
    }
}

/* ============================================
   PAGE ENTER - No animation to prevent jitter
   ============================================ */
