/**
 * GetPress Design System
 * Version: 2.0
 * Based on: UI/UX Overhaul Implementation Plan
 */

/* ========================================
   DESIGN TOKENS
   Based on 8px spacing scale
   ======================================== */

/* Pagination Visibility Fix */
.pagination-container nav div[class*="hidden"] {
    display: flex !important;
}

.pagination-container nav div.justify-between.flex-1.sm\:hidden {
    display: none !important;
}

@media (max-width: 640px) {
    .pagination-container nav div.justify-between.flex-1.sm\:hidden {
        display: flex !important;
    }

    .pagination-container nav div.hidden.sm\:flex-1 {
        display: none !important;
    }
}

:root {
    /* ========================================
       RESPONSIVE DESIGN TOKENS
       Using clamp(min, preferred, max) for fluid scaling
       ======================================== */

    /* Fluid Typography Scale */
    --text-display: clamp(1.75rem, 1.5rem + 1vw, 2.25rem);
    /* 28px - 36px */
    --text-h1: clamp(1.5rem, 1.25rem + 0.75vw, 1.75rem);
    /* 24px - 28px */
    --text-h2: clamp(1.25rem, 1.125rem + 0.5vw, 1.375rem);
    /* 20px - 22px */
    --text-h3: clamp(1rem, 0.9375rem + 0.25vw, 1.125rem);
    /* 16px - 18px */
    --text-body-lg: clamp(0.9375rem, 0.875rem + 0.125vw, 1rem);
    /* 15px - 16px */
    --text-body: clamp(0.8125rem, 0.75rem + 0.125vw, 0.875rem);
    /* 13px - 14px */
    --text-caption: clamp(0.6875rem, 0.625rem + 0.125vw, 0.75rem);
    /* 11px - 12px */
    --text-micro: clamp(0.5625rem, 0.5rem + 0.125vw, 0.625rem);
    /* 9px - 10px */

    /* Fluid Spacing Scale */
    --space-1: clamp(2px, 0.125rem + 0.1vw, 4px);
    --space-2: clamp(6px, 0.375rem + 0.1vw, 8px);
    --space-3: clamp(8px, 0.5rem + 0.2vw, 12px);
    --space-4: clamp(12px, 0.75rem + 0.25vw, 16px);
    --space-6: clamp(16px, 1rem + 0.5vw, 24px);
    --space-8: clamp(24px, 1.5rem + 0.5vw, 32px);
    --space-12: clamp(32px, 2rem + 1vw, 48px);
    --space-16: clamp(48px, 3rem + 1vw, 64px);

    /* Section & Container Spacing */
    --space-section: clamp(2rem, 1.5rem + 2vw, 4rem);
    --space-container: clamp(1rem, 0.5rem + 2vw, 2rem);
    --header-height: clamp(56px, 3.5rem + 1vw, 72px);

    /* Color System */
    --color-primary-600: #DC2626;
    --color-primary-700: #B91C1C;
    --color-primary-50: #FEF2F2;
    --color-slate-900: #0F172A;
    --color-slate-800: #1E293B;
    --color-slate-600: #475569;
    --color-slate-400: #94A3B8;
    --color-slate-100: #F1F5F9;
    --color-slate-50: #F8FAFC;
    --color-white: #FFFFFF;
    --color-success: #10B981;
    --color-warning: #F59E0B;
    --color-error: #EF4444;

    /* Fluid Border Radius */
    --radius-sm: clamp(6px, 0.375rem + 0.15vw, 8px);
    --radius-md: clamp(8px, 0.5rem + 0.25vw, 12px);
    --radius-lg: clamp(12px, 0.75rem + 0.25vw, 16px);
    --radius-xl: clamp(16px, 1rem + 0.25vw, 20px);
    --radius-2xl: clamp(20px, 1.25rem + 0.25vw, 24px);

    /* Shadows (subtle, not heavy) */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-card: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.2s ease;
    --transition-slow: 0.3s ease;
}

/* ========================================
   ACCESSIBILITY - Focus States (WCAG 2.4.7)
   ======================================== */

/* Global focus ring for interactive elements */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--color-primary-600);
    outline-offset: 2px;
}

/* Remove default outline since we handle it above */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

/* ========================================
   TYPOGRAPHY UTILITIES
   ======================================== */

.text-display {
    font-size: var(--text-display);
    font-weight: 800;
    line-height: 1.2;
}

.text-h1 {
    font-size: var(--text-h1);
    font-weight: 700;
    line-height: 1.3;
}

.text-h2 {
    font-size: var(--text-h2);
    font-weight: 700;
    line-height: 1.35;
}

.text-h3 {
    font-size: var(--text-h3);
    font-weight: 600;
    line-height: 1.4;
}

.text-body-lg {
    font-size: var(--text-body-lg);
    font-weight: 400;
    line-height: 1.6;
}

.text-body {
    font-size: var(--text-body);
    font-weight: 400;
    line-height: 1.6;
}

.text-caption {
    font-size: var(--text-caption);
    font-weight: 500;
    line-height: 1.5;
}

.text-micro {
    font-size: var(--text-micro);
    font-weight: 600;
    line-height: 1.4;
}

/* ========================================
   BUTTON SYSTEM
   ======================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: all var(--transition-base);
    cursor: pointer;
    text-decoration: none;
    border: none;
}

.btn-primary {
    background: var(--color-primary-600);
    color: var(--color-white);
    box-shadow: 0 1px 2px rgba(220, 38, 38, 0.2);
}

.btn-primary:hover {
    background: var(--color-primary-700);
}

.btn-secondary {
    background: var(--color-white);
    color: var(--color-primary-600);
    border: 1px solid var(--color-primary-600);
}

.btn-secondary:hover {
    background: var(--color-primary-50);
}

.btn-ghost {
    background: transparent;
    color: var(--color-slate-600);
}

.btn-ghost:hover {
    background: var(--color-slate-100);
    color: var(--color-slate-900);
}

/* Button Sizes */
.btn-lg {
    height: 48px;
    padding: 0 var(--space-6);
    font-size: var(--text-body-lg);
}

.btn-md {
    height: 40px;
    padding: 0 var(--space-4);
    font-size: var(--text-body);
}

.btn-sm {
    height: 32px;
    padding: 0 var(--space-3);
    font-size: var(--text-caption);
}

/* ========================================
   CARD SYSTEM (No heavy shadows, no colored glows)
   ======================================== */

.card {
    background: var(--color-white);
    border: 1px solid var(--color-slate-100);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    transition: border-color var(--transition-base);
}

.card:hover {
    border-color: var(--color-slate-400);
}

.card-product {
    padding: var(--space-4);
}

.card-content {
    padding: var(--space-6);
}

.card-stat {
    padding: var(--space-6);
    box-shadow: none;
}

.card-form {
    padding: var(--space-8);
    box-shadow: var(--shadow-md);
    border: none;
}

/* ========================================
   PRODUCT CARD FIXES (Remove blue glow, simplify hover)
   ======================================== */

/* Override any existing heavy shadow/glow effects on product cards */
article.bg-white.rounded-2xl {
    box-shadow: var(--shadow-card) !important;
    transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

article.bg-white.rounded-2xl:hover {
    box-shadow: var(--shadow-md) !important;
    border-color: var(--color-slate-400) !important;
    /* NO scale, NO translateY, NO colored shadows */
    transform: none !important;
}

/* Product card image hover - subtle, not scale+shadow+translate */
article.bg-white.rounded-2xl img {
    transition: transform var(--transition-slow);
}

article.bg-white.rounded-2xl:hover img {
    transform: scale(1.02);
}

/* ========================================
   TYPOGRAPHY NORMALIZATION
   Fixes ALL-CAPS content from database
   ======================================== */

/* Book titles - force proper title case */
article h4,
article h3,
.gp-book-title,
.line-clamp-2,
.gp-cart-item-title {
    text-transform: capitalize;
}

/* Category labels - consistent capitalization */
.gp-category-label,
article .text-xs.font-bold.text-primary-600,
article span[class*="text-primary"] {
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 0.05em;
}

/* ========================================
   HEADER COMPONENT STYLES
   Extracted from: header.blade.php
   ======================================== */


/* Top Bar */
.gp-topbar {
    background: linear-gradient(to right, #0f172a, #1e293b, #0f172a);
    color: #94a3b8;
    font-size: 12px;
}

.gp-topbar a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s;
}

.gp-topbar a:hover {
    color: #f87171;
}

/* Main Header */
.gp-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #ffffff;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid #e2e8f0;
}

/* Eliminate gap between header and content */
main#main-content {
    margin-top: 0;
}

main#main-content>section:first-child {
    margin-top: 0;
}

.gp-header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-4);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
    gap: var(--space-4);
}

/* Logo */
.gp-logo img {
    height: 44px;
    width: auto;
    transition: transform 0.2s;
}

.gp-logo:hover img {
    transform: scale(1.05);
}

/* Navigation */
.gp-nav {
    display: none;
    gap: 4px;
}

.gp-nav a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    text-decoration: none;
    transition: all 0.2s;
}

.gp-nav a:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.gp-nav a.active {
    background: #fef2f2;
    color: #dc2626;
}

/* Search */
.gp-search {
    display: none;
    flex: 1;
    max-width: 400px;
}

.gp-search-box {
    display: flex;
    align-items: center;
    background: #f1f5f9;
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 10px 16px;
    transition: all 0.3s;
}

.gp-search-box:focus-within {
    background: #fff;
    border-color: #fca5a5;
    box-shadow: 0 0 0 4px rgba(252, 165, 165, 0.2);
}

.gp-search-input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 14px;
    color: #0f172a;
}

.gp-search-input::placeholder {
    color: #94a3b8;
}

.gp-search-btn {
    background: transparent;
    border: none;
    color: #dc2626;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 8px;
    transition: all 0.2s;
}

.gp-search-btn:hover {
    color: #b91c1c;
    text-decoration: underline;
}

/* Action Buttons */
.gp-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.gp-action-btn {
    position: relative;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border: none;
    border-radius: 12px;
    color: #dc2626;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.gp-action-btn:hover {
    background: #fef2f2;
    color: #b91c1c;
    transform: translateY(-1px);
}

.gp-cart-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 18px;
    height: 18px;
    background: #dc2626;
    color: white;
    font-size: 10px;
    font-weight: 700;
    border-radius: 99px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* Login Button */
.gp-login-btn {
    display: none;
    align-items: center;
    gap: 8px;
    background: #dc2626;
    color: white;
    padding: 10px 20px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: 0 4px 6px rgba(220, 38, 38, 0.3);
}

.gp-login-btn:hover {
    background: #b91c1c;
    transform: translateY(-2px);
}

/* User Button */
.gp-user-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: #f8fafc;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s;
}

.gp-user-btn:hover {
    background: #f1f5f9;
}

.gp-user-avatar {
    width: 36px;
    height: 36px;
    background: #e2e8f0;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #475569;
}

.gp-user-info {
    display: none;
    text-align: left;
}

.gp-user-label {
    font-size: 10px;
    color: #94a3b8;
    font-weight: 500;
}

.gp-user-name {
    font-size: 12px;
    color: #334155;
    font-weight: 700;
}

/* Mobile Toggle */
.gp-mobile-toggle {
    display: flex;
}

/* Mobile Nav */
.gp-mobile-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e2e8f0;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    padding: 12px;
    z-index: 100;
    max-height: 80vh;
    overflow-y: auto;
}

.gp-mobile-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 10px;
    color: #475569;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
}

.gp-mobile-nav a:hover {
    background: #f1f5f9;
}

.gp-mobile-nav a.active {
    background: #fef2f2;
    color: #dc2626;
}

.gp-mobile-nav a i {
    width: 18px;
    text-align: center;
    font-size: 14px;
}

/* Cart Overlay & Panel - Works with Alpine x-show */
.gp-cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 200;
    /* Note: visibility controlled by Alpine x-show, not CSS class toggle */
}

/* Legacy class toggle support (deprecated - use Alpine) */
.gp-cart-overlay.open {
    display: block;
}

.gp-cart-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 400px;
    background: white;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    z-index: 201;
}

.gp-cart-overlay.open .gp-cart-panel {
    transform: translateX(0);
}

.gp-cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.gp-cart-title {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
}

.gp-cart-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: #64748b;
    cursor: pointer;
    font-size: 20px;
}

.gp-cart-close:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.gp-cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.gp-cart-empty {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
}

.gp-cart-empty i {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
}

.gp-cart-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 12px;
    margin-bottom: 12px;
}

.gp-cart-item-img {
    width: 50px;
    height: 65px;
    background: #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.gp-cart-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gp-cart-item-info {
    flex: 1;
    min-width: 0;
}

.gp-cart-item-title {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gp-cart-item-price {
    font-size: 14px;
    font-weight: 700;
    color: #dc2626;
    margin-top: 4px;
}

.gp-cart-footer {
    padding: 20px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}

.gp-cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.gp-cart-total-label {
    color: #64748b;
    font-weight: 500;
}

.gp-cart-total-value {
    font-size: 24px;
    font-weight: 800;
    color: #0f172a;
}

.gp-checkout-btn {
    display: block;
    width: 100%;
    padding: 16px;
    background: #dc2626;
    color: white;
    text-align: center;
    text-decoration: none;
    font-weight: 700;
    border-radius: 12px;
    transition: background 0.2s;
}

/* ========================================
   MEMBER BOTTOM NAVIGATION
   Mobile & Premium Design
   ======================================== */

@media (min-width: 1024px) {
    .gp-checkout-btn:hover {
        background: #b91c1c;
    }
}

.gp-checkout-btn:hover {
    background: #b91c1c;
}

/* ========================================
   RESPONSIVE BREAKPOINTS
   ======================================== */

@media (min-width: 768px) {
    .gp-search {
        display: flex;
    }

    .gp-login-btn {
        display: flex;
    }

    .gp-user-info {
        display: block;
    }
}

@media (min-width: 1024px) {
    .gp-nav {
        display: flex;
    }

    .gp-mobile-toggle {
        display: none;
    }
}

/* ========================================
   STYLE.BLADE.PHP EXTRACTED STYLES
   ======================================== */

/* Alpine.js cloak */
[x-cloak] {
    display: none !important;
}

/* Custom Select2 styling */
.select2-container--default .select2-selection--single {
    background-color: #F8FAFC;
    border: 2px solid #E2E8F0;
    border-radius: 0.75rem;
    height: 48px;
    padding: 8px 12px;
}

.select2-container--default .select2-selection--single:focus,
.select2-container--default.select2-container--focus .select2-selection--single {
    border-color: #60A5FA;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 28px;
    color: #334155;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 46px;
    right: 12px;
}

.select2-dropdown {
    border: 2px solid #E2E8F0;
    border-radius: 0.75rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    margin-top: 4px;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background: linear-gradient(135deg, #3B82F6 0%, #14B8A6 100%);
}

/* Navigation Link Styles */
.header-glass {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
}

.top-bar-gradient {
    background: linear-gradient(to right, #7f1d1d, #dc2626, #7f1d1d);
}

.nav-link {
    color: #475569;
    font-weight: 600;
    font-size: 0.9375rem;
    transition: all 0.3s ease;
    padding: 0.5rem 0;
    position: relative;
    white-space: nowrap;
    display: inline-block;
}

.nav-link:hover {
    color: #ef4444;
    transform: translateY(-1px);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 3px;
    background: linear-gradient(to right, #ef4444, #f97316);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform: translateX(-50%);
    border-radius: 999px;
}

.nav-link:hover::after,
.nav-link-active::after {
    width: 105%;
}

.nav-link-active {
    color: #ef4444;
}

/* Search Pill */
.search-pill {
    background: #f1f5f9;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.search-pill:focus-within {
    background: #ffffff;
    border-color: #fca5a5;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.05);
}

/* Animation Utilities */
.hover-lift {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.1);
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-5px);
    }
}

/* ========================================
   CUSTOM SCROLLBAR
   ======================================== */

.custom-scrollbar::-webkit-scrollbar {
    width: 4px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 2px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ----------------------------------------
   PREMIUM PHOTO UPLOAD SYSTEM
   ---------------------------------------- */

.profile-photo-container {
    position: relative;
    width: 128px;
    height: 128px;
    margin: 0 auto;
}

.profile-photo-wrapper {
    width: 128px;
    height: 128px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #fff;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    position: relative;
    background: #f1f5f9;
}

.profile-photo-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.photo-loading-spinner {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    z-index: 20;
    display: none;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.photo-loading-spinner.active {
    display: flex;
}

.upload-progress-ring {
    width: 40px;
    height: 40px;
    border: 3px solid #f1f5f9;
    border-top: 3px solid #dc2626;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.photo-success-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #10b981;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    border: 2px solid white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transform: scale(0);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 30;
}

.photo-success-badge.active {
    transform: scale(1);
}

.photo-edit-btn {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: #dc2626;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
    border: 2px solid white;
    transition: all 0.3s ease;
    z-index: 25;
}

.photo-edit-btn:hover {
    transform: scale(1.1) rotate(15deg);
    background: #b91c1c;
}

/* ========================================
   MICRO-ANIMATIONS & TRANSITIONS
   Premium UX Enhancement Suite
   ======================================== */

/* === ENTRANCE ANIMATIONS === */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

@keyframes pulse-subtle {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-4px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(4px);
    }
}

@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 0.5;
    }

    100% {
        transform: scale(4);
        opacity: 0;
    }
}

@keyframes glow-pulse {

    0%,
    100% {
        box-shadow: 0 0 5px rgba(220, 38, 38, 0.3);
    }

    50% {
        box-shadow: 0 0 20px rgba(220, 38, 38, 0.5);
    }
}

/* === ANIMATION UTILITY CLASSES === */

.animate-fade-in-up {
    animation: fadeInUp 0.5s ease-out forwards;
}

.animate-fade-in-down {
    animation: fadeInDown 0.5s ease-out forwards;
}

.animate-fade-in-left {
    animation: fadeInLeft 0.5s ease-out forwards;
}

.animate-fade-in-right {
    animation: fadeInRight 0.5s ease-out forwards;
}

.animate-scale-in {
    animation: scaleIn 0.4s ease-out forwards;
}

.animate-slide-in-up {
    animation: slideInUp 0.4s ease-out forwards;
}

.animate-shimmer {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.animate-shake {
    animation: shake 0.5s ease-in-out;
}

.animate-glow {
    animation: glow-pulse 2s ease-in-out infinite;
}

/* Stagger delays for list items */
.stagger-1 {
    animation-delay: 0.05s;
}

.stagger-2 {
    animation-delay: 0.1s;
}

.stagger-3 {
    animation-delay: 0.15s;
}

.stagger-4 {
    animation-delay: 0.2s;
}

.stagger-5 {
    animation-delay: 0.25s;
}

.stagger-6 {
    animation-delay: 0.3s;
}

.stagger-7 {
    animation-delay: 0.35s;
}

.stagger-8 {
    animation-delay: 0.4s;
}

/* Initial hidden state for animations */
.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);
}

/* === SCROLL REVEAL VARIANTS === */

.scroll-fade-up {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-fade-up.revealed {
    opacity: 1;
    transform: translateY(0);
}

.scroll-fade-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-fade-left.revealed {
    opacity: 1;
    transform: translateX(0);
}

.scroll-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-scale.revealed {
    opacity: 1;
    transform: scale(1);
}

/* === ENHANCED PRODUCT CARD ANIMATIONS === */

.product-card-enhanced {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.3s ease,
        border-color 0.3s ease;
}

.product-card-enhanced:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.15);
}

.product-card-enhanced:active {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px -4px rgba(0, 0, 0, 0.12);
}

.product-card-enhanced .product-image {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card-enhanced:hover .product-image {
    transform: scale(1.05);
}

/* === BUTTON PRESS ANIMATION === */

.btn-press {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-press:hover {
    transform: translateY(-2px);
}

.btn-press:active {
    transform: translateY(0) scale(0.98);
}

/* === TOUCH RIPPLE EFFECT === */

.ripple-container {
    position: relative;
    overflow: hidden;
}

.ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    pointer-events: none;
    animation: ripple 0.6s linear;
}

/* === CART PANEL ANIMATIONS === */

.cart-panel-enter {
    animation: slideInFromRight 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.cart-panel-leave {
    animation: slideOutToRight 0.25s ease-in forwards;
}

@keyframes slideInFromRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutToRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.cart-backdrop {
    transition: opacity 0.3s ease;
}

.cart-item-enter {
    animation: fadeInLeft 0.3s ease-out forwards;
}

.cart-item-remove {
    animation: fadeOutRight 0.3s ease-in forwards;
}

@keyframes fadeOutRight {
    to {
        opacity: 0;
        transform: translateX(30px);
    }
}

/* === FORM INPUT ANIMATIONS === */

.input-focus-ring {
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.input-focus-ring:focus {
    border-color: var(--color-primary-600);
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.1);
    background-color: #fff;
}

.floating-label {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    transition: all 0.2s ease;
    pointer-events: none;
    color: var(--color-slate-400);
    font-size: 14px;
}

.floating-label.active,
input:focus+.floating-label,
input:not(:placeholder-shown)+.floating-label {
    top: 8px;
    transform: translateY(0);
    font-size: 11px;
    color: var(--color-primary-600);
    font-weight: 600;
}

.input-success {
    border-color: var(--color-success) !important;
}

.input-error {
    border-color: var(--color-error) !important;
    animation: shake 0.4s ease-in-out;
}

/* === TOAST NOTIFICATION STYLES === */

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.2);
    border-left: 4px solid #10b981;
    pointer-events: auto;
    animation: toastSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    max-width: 380px;
}

.toast-success {
    border-left-color: #10b981;
}

.toast-error {
    border-left-color: #ef4444;
}

.toast-warning {
    border-left-color: #f59e0b;
}

.toast-info {
    border-left-color: #3b82f6;
}

.toast-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.toast-success .toast-icon {
    background: #d1fae5;
    color: #10b981;
}

.toast-error .toast-icon {
    background: #fee2e2;
    color: #ef4444;
}

.toast-warning .toast-icon {
    background: #fef3c7;
    color: #f59e0b;
}

.toast-info .toast-icon {
    background: #dbeafe;
    color: #3b82f6;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 700;
    font-size: 14px;
    color: #0f172a;
}

.toast-message {
    font-size: 13px;
    color: #64748b;
    margin-top: 2px;
}

.toast-close {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s;
}

.toast-close:hover {
    color: #0f172a;
}

.toast-exit {
    animation: toastSlideOut 0.3s ease-in forwards;
}

@keyframes toastSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toastSlideOut {
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* === BACK TO TOP BUTTON === */

.back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    background: var(--color-primary-600);
    color: #fff;
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 100;
}

@media (max-width: 1024px) {
    .back-to-top {
        bottom: 24px;
        /* Align with WhatsApp by default */
        width: 44px;
        height: 44px;
    }

    .back-to-top.has-filter {
        bottom: 100px;
        /* Shift up only when filter is present */
    }
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--color-primary-700);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(220, 38, 38, 0.5);
}

/* === MOBILE TOUCH ENHANCEMENTS === */

@media (hover: none) and (pointer: coarse) {

    /* Larger touch targets */
    .touch-target {
        min-height: 44px;
        min-width: 44px;
    }

    /* Active state feedback */
    .touch-feedback:active {
        opacity: 0.8;
        transform: scale(0.98);
    }

    /* Remove hover animations on touch */
    .product-card-enhanced:hover {
        transform: none;
        box-shadow: var(--shadow-card);
    }
}

/* === LOADING SKELETON ENHANCEMENTS === */

.skeleton {
    background: linear-gradient(90deg,
            #f1f5f9 0%,
            #e2e8f0 50%,
            #f1f5f9 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite linear;
    border-radius: 8px;
}

.skeleton-text {
    height: 14px;
    margin-bottom: 8px;
}

.skeleton-text-sm {
    height: 12px;
    width: 60%;
}

.skeleton-image {
    aspect-ratio: 2/3;
    border-radius: 12px;
}

.skeleton-card {
    padding: 16px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #f1f5f9;
}

/* === PAGE TRANSITION === */

.page-enter {
    animation: fadeInUp 0.4s ease-out forwards;
}

main {
    animation: fadeInUp 0.35s ease-out;
}

/* === HERO SECTION ENHANCEMENTS === */

.hero-text-animate {
    animation: fadeInUp 0.7s ease-out forwards;
}

.hero-text-animate:nth-child(1) {
    animation-delay: 0.1s;
}

.hero-text-animate:nth-child(2) {
    animation-delay: 0.2s;
}

.hero-text-animate:nth-child(3) {
    animation-delay: 0.3s;
}

.hero-cta-animate {
    animation: fadeInUp 0.6s ease-out forwards;
    animation-delay: 0.4s;
    opacity: 0;
}

/* Floating background shapes */
.floating-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    animation: floatShape 6s ease-in-out infinite;
}

@keyframes floatShape {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

/* ========================================
   MEMBER AREA DESIGN SYSTEM
   Premium UI/UX with Glassmorphism & Animations
   ======================================== */

/* Member Area Tokens */
:root {
    --member-sidebar-width: 280px;
    --member-sidebar-collapsed: 72px;
    --member-content-max: 1200px;
    --member-bottom-nav-height: 64px;
}

/* ----------------------------------------
   GLASSMORPHISM UTILITIES
   ---------------------------------------- */

.member-glass {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.member-glass-dark {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ----------------------------------------
   MEMBER SIDEBAR STYLES
   ---------------------------------------- */

.member-sidebar {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border-right: 1px solid rgba(226, 232, 240, 0.8);
    position: relative;
    overflow: hidden;
}

/* Fix sidebar visibility on desktop (lg: 1024px+) */
@media (min-width: 1024px) {

    .hidden.lg\:block,
    div.hidden.lg\:block {
        display: block !important;
    }
}

.member-sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.03) 0%, rgba(220, 38, 38, 0) 100%);
    pointer-events: none;
}

/* Sidebar Profile Header */
.member-profile-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    position: relative;
    overflow: hidden;
}

.member-profile-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

/* Sidebar Navigation Item */
.member-nav-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    font-weight: 500;
    font-size: 14px;
    color: #475569;
    transition: all 0.2s ease;
    overflow: hidden;
}

.member-nav-item:hover {
    background: #f1f5f9;
    color: #0f172a;
    transform: translateX(4px);
}

.member-nav-item.active {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.1) 0%, rgba(220, 38, 38, 0.05) 100%);
    color: #dc2626;
    font-weight: 600;
}

.member-nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 24px;
    background: linear-gradient(180deg, #dc2626 0%, #b91c1c 100%);
    border-radius: 0 4px 4px 0;
    animation: slideInLeft 0.3s ease;
}

.member-nav-item i {
    width: 20px;
    text-align: center;
    font-size: 16px;
    transition: transform 0.2s ease;
}

.member-nav-item:hover i {
    transform: scale(1.1);
}

/* Sidebar Section Title */
.member-nav-section {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #94a3b8;
    padding: 16px 16px 8px;
}

/* ----------------------------------------
   STAT CARDS WITH ANIMATIONS
   ---------------------------------------- */

.member-stat-card {
    position: relative;
    border-radius: 20px;
    padding: 24px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: default;
}

.member-stat-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.member-stat-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.member-stat-card:hover::before {
    opacity: 1;
}

/* Gradient Variants */
.member-stat-primary {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 50%, #991b1b 100%);
    color: white;
}

.member-stat-blue {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 50%, #1d4ed8 100%);
    color: white;
}

.member-stat-amber {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #b45309 100%);
    color: white;
}

.member-stat-emerald {
    background: linear-gradient(135deg, #10b981 0%, #059669 50%, #047857 100%);
    color: white;
}

.member-stat-purple {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 50%, #6d28d9 100%);
    color: white;
}

/* Stat Icon */
.member-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    backdrop-filter: blur(10px);
}

/* Stat Number with Counter Animation */
.member-stat-number {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    margin: 12px 0 4px;
    animation: countUp 0.8s ease-out forwards;
}

.member-stat-label {
    font-size: 13px;
    font-weight: 500;
    opacity: 0.85;
}

/* ----------------------------------------
   CONTENT CARDS
   ---------------------------------------- */

.member-card {
    background: white;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    transition: all 0.2s ease;
}

.member-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.1);
}

.member-card-header {
    padding: 20px 24px;
    border-bottom: 1px solid #f1f5f9;
    background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
}

.member-card-body {
    padding: 24px;
}

/* ----------------------------------------
   TABLES ENHANCEMENT
   ---------------------------------------- */

.member-table {
    width: 100%;
}

.member-table thead {
    background: #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.member-table th {
    padding: 14px 16px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    border-bottom: 2px solid #e2e8f0;
}

.member-table td {
    padding: 16px;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s ease;
}

.member-table tbody tr {
    transition: all 0.15s ease;
}

.member-table tbody tr:hover {
    background: #f8fafc;
}

.member-table tbody tr:hover td {
    color: #0f172a;
}

/* ----------------------------------------
   BADGES & STATUS
   ---------------------------------------- */

.member-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.member-badge-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #047857;
}

.member-badge-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #b45309;
}

.member-badge-danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #b91c1c;
}

.member-badge-info {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1d4ed8;
}

.member-badge-neutral {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    color: #475569;
}

/* ----------------------------------------
   MOBILE BOTTOM NAVIGATION
   ---------------------------------------- */

.member-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--member-bottom-nav-height, 64px);
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(226, 232, 240, 0.8);
    display: flex !important;
    justify-content: space-around;
    align-items: center;
    padding: 0 8px;
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
}

/* Hide on desktop (lg: 1024px+) */
@media (min-width: 1024px) {
    .member-bottom-nav {
        display: none !important;
    }
}

.member-bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 12px;
    transition: all 0.2s ease;
    color: #64748b;
    min-width: 64px;
}

.member-bottom-nav-item:hover,
.member-bottom-nav-item:active {
    background: #f1f5f9;
}

.member-bottom-nav-item.active {
    color: #dc2626;
}

.member-bottom-nav-item.active i {
    transform: scale(1.1);
}

.member-bottom-nav-item i {
    font-size: 20px;
    margin-bottom: 4px;
    transition: transform 0.2s ease;
}

.member-bottom-nav-item span {
    font-size: 10px;
    font-weight: 600;
}

/* ----------------------------------------
   EMPTY STATES
   ---------------------------------------- */

.member-empty-state {
    text-align: center;
    padding: 48px 24px;
}

.member-empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: #94a3b8;
}

.member-empty-title {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
}

.member-empty-desc {
    font-size: 14px;
    color: #64748b;
    max-width: 300px;
    margin: 0 auto;
}

/* ----------------------------------------
   ANIMATIONS
   ---------------------------------------- */

@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        transform: translateY(-50%) translateX(-100%);
        opacity: 0;
    }

    to {
        transform: translateY(-50%) translateX(0);
        opacity: 1;
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.member-shimmer {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* Page transition */
.member-page-enter {
    animation: fadeInUp 0.4s ease-out forwards;
}

/* Card stagger animation */
.member-stagger>* {
    opacity: 0;
    animation: fadeInUp 0.5s ease-out forwards;
}

.member-stagger>*:nth-child(1) {
    animation-delay: 0.05s;
}

.member-stagger>*:nth-child(2) {
    animation-delay: 0.1s;
}

.member-stagger>*:nth-child(3) {
    animation-delay: 0.15s;
}

.member-stagger>*:nth-child(4) {
    animation-delay: 0.2s;
}

.member-stagger>*:nth-child(5) {
    animation-delay: 0.25s;
}

.member-stagger>*:nth-child(6) {
    animation-delay: 0.3s;
}

/* ----------------------------------------
   RESPONSIVE ADJUSTMENTS
   ---------------------------------------- */

@media (max-width: 1024px) {
    .member-content-with-bottom-nav {
        padding-bottom: calc(var(--member-bottom-nav-height) + 100px) !important;
    }

    /* Aggressive Hide Back to Top button on mobile member area */
    body #topcontrol,
    body .member-content-with-bottom-nav~#topcontrol,
    #topcontrol[style*="display: block"] {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }
}

@media (max-width: 768px) {
    .member-stat-card {
        padding: 20px;
    }

    .member-stat-number {
        font-size: 1.75rem;
    }

    .member-card-header {
        padding: 16px 20px;
    }

    .member-card-body {
        padding: 20px;
    }
}

/* ----------------------------------------
   PREMIUM BUTTON STYLES
   ---------------------------------------- */

.member-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    outline: none;
}

.member-btn-sm {
    padding: 8px 14px;
    font-size: 12px;
    gap: 5px;
    border-radius: 8px;
}

.member-btn-primary {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    box-shadow: 0 4px 14px -3px rgba(220, 38, 38, 0.4);
}

.member-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px -4px rgba(220, 38, 38, 0.5);
}

.member-btn-secondary {
    background: #f1f5f9;
    color: #475569;
}

.member-btn-secondary:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.member-btn-outline {
    background: transparent;
    border: 2px solid #e2e8f0;
    color: #475569;
}

.member-btn-outline:hover {
    border-color: #dc2626;
    color: #dc2626;
}

/* ----------------------------------------
   OWL CAROUSEL NAVIGATION
   Premium styled navigation arrows
   ---------------------------------------- */

/* Ensure carousel has position context for nav */
.owl-carousel {
    position: relative;
}

.owl-carousel .owl-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex !important;
    justify-content: space-between;
    pointer-events: none;
    padding: 0 8px;
    left: 0;
    z-index: 20;
}

/* Override disabled state - force show nav */
.owl-carousel .owl-nav.disabled {
    display: flex !important;
}

.owl-carousel .owl-nav .owl-prev,
.owl-carousel .owl-nav .owl-next {
    pointer-events: auto;
    width: 44px;
    height: 44px;
    background: white !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    color: #1e293b !important;
    font-size: 18px !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15) !important;
    transition: all 0.2s ease;
    cursor: pointer;
    opacity: 1 !important;
    visibility: visible !important;
}

.owl-carousel .owl-nav .owl-prev:hover,
.owl-carousel .owl-nav .owl-next:hover {
    background: #dc2626 !important;
    border-color: #dc2626 !important;
    color: white !important;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.3);
}

.owl-carousel .owl-nav .owl-prev {
    margin-left: -20px;
}

.owl-carousel .owl-nav .owl-next {
    margin-right: -20px;
}

.owl-carousel .owl-nav .owl-prev span,
.owl-carousel .owl-nav .owl-next span {
    display: none;
}

.owl-carousel .owl-nav button.owl-prev i,
.owl-carousel .owl-nav button.owl-next i {
    font-size: 14px;
}

/* Dots styling */
.owl-carousel .owl-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

.owl-carousel .owl-dots .owl-dot {
    width: 8px;
    height: 8px;
    background: #e2e8f0;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.owl-carousel .owl-dots .owl-dot.active {
    background: #dc2626;
    transform: scale(1.2);
}

.owl-carousel .owl-dots .owl-dot:hover {
    background: #dc2626;
}

/* Layout Density & Whitespace Refinements */
section {
    padding-top: clamp(0.75rem, 1.5vw, 1.5rem) !important;
    padding-bottom: clamp(0.75rem, 1.5vw, 1.5rem) !important;
}

@media (max-width: 640px) {
    .container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
}

/* Mobile Filter Drawer Utilities */
[x-cloak] {
    display: none !important;
}

.custom-scrollbar::-webkit-scrollbar {
    width: 4px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}