@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Outfit:wght@400;500;600;700;800;900&family=Vazirmatn:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --bg-dark: #05050a;
    --bg-card: rgba(18, 18, 30, 0.62);
    --bg-card-hover: rgba(28, 28, 46, 0.78);
    --bg-card-solid: #11111c;

    --border-glass: rgba(255, 255, 255, 0.11);
    --border-glass-top: rgba(255, 255, 255, 0.22);
    --border-glass-hover: rgba(255, 255, 255, 0.25);
    
    --accent-purple: #7c3aed;
    --accent-indigo: #6366f1;
    --accent-cyan: #06b6d4;
    --accent-emerald: #10b981;
    --accent-amber: #f59e0b;
    --accent-rose: #f43f5e;
    
    --glow-indigo: rgba(99, 102, 241, 0.35);
    --glow-cyan: rgba(6, 182, 212, 0.35);
    
    --text-white: #ffffff;
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --text-dim: #6b7280;
    
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 10px;
    --radius-pill: 100px;
    
    --font-fa: 'Vazirmatn', system-ui, -apple-system, sans-serif;
    --font-en: 'Outfit', 'Inter', system-ui, -apple-system, sans-serif;
    
    --spring-ease: cubic-bezier(0.34, 1.56, 0.64, 1);
    --liquid-ease: cubic-bezier(0.16, 1, 0.3, 1);
    --smooth-ease: cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}

::-webkit-scrollbar {
    display: none;
}

html {
    scroll-behavior: smooth;
    overscroll-behavior: contain;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-fa);
    min-height: 100vh;
    min-height: 100dvh;
    direction: rtl;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.lang-en {
    direction: ltr;
    font-family: var(--font-en);
}

.ambient-mesh {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.mesh-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(110px);
    opacity: 0.38;
    will-change: transform;
    animation: orbBreathing 18s infinite ease-in-out alternate;
}

.orb-1 {
    top: -12%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--accent-purple) 0%, transparent 70%);
}

.orb-2 {
    bottom: 5%;
    left: -12%;
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, var(--accent-cyan) 0%, transparent 70%);
    animation-delay: -6s;
    animation-duration: 22s;
}

.orb-3 {
    top: 40%;
    left: 20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--accent-rose) 0%, transparent 70%);
    animation-delay: -12s;
    animation-duration: 26s;
}

@keyframes orbBreathing {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, -20px) scale(1.1); }
    100% { transform: translate(-20px, 35px) scale(0.95); }
}

.app-wrapper {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    padding-bottom: 96px;
    position: relative;
    z-index: 1;
}

.floating-header {
    position: sticky;
    top: 12px;
    z-index: 50;
    margin: 12px 14px 14px 14px;
    padding: 12px 18px;
    background: rgba(14, 14, 24, 0.72);
    backdrop-filter: blur(35px) saturate(200%);
    -webkit-backdrop-filter: blur(35px) saturate(200%);
    border-radius: 24px;
    border: 1px solid var(--border-glass);
    border-top: 1px solid var(--border-glass-top);
    box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.3s var(--liquid-ease), background 0.3s var(--liquid-ease);
}

.brand-badge {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-logo-icon {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent-indigo), var(--accent-cyan));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.95rem;
    box-shadow: 0 4px 15px var(--glow-indigo);
}

.brand-text-group {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 1.05rem;
    font-weight: 800;
}

.brand-text-group span {
    background: linear-gradient(135deg, #ffffff 20%, var(--accent-cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.3px;
}

.verified-badge {
    color: var(--accent-cyan);
    font-size: 0.9rem;
    -webkit-text-fill-color: initial;
    filter: drop-shadow(0 0 6px rgba(6, 182, 212, 0.6));
}

.user-badges {
    display: flex;
    align-items: center;
    gap: 7px;
}

.pill-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 13px;
    border-radius: var(--radius-pill);
    font-size: 0.78rem;
    font-weight: 700;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    transition: transform 0.25s var(--spring-ease), box-shadow 0.25s var(--liquid-ease);
}

.pill-badge:active {
    transform: scale(0.92);
}

.pill-badge.gold {
    background: rgba(245, 158, 11, 0.12);
    color: var(--accent-amber);
    border: 1px solid rgba(245, 158, 11, 0.28);
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.15);
}

.pill-badge.cyan {
    background: rgba(6, 182, 212, 0.12);
    color: var(--accent-cyan);
    border: 1px solid rgba(6, 182, 212, 0.28);
    box-shadow: 0 4px 16px rgba(6, 182, 212, 0.15);
}

.floating-hero {
    margin: 0 14px 14px 14px;
    padding: 22px 20px;
    border-radius: 26px;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.38) 0%, rgba(6, 182, 212, 0.25) 100%);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid var(--border-glass);
    border-top: 1px solid var(--border-glass-top);
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 45px -12px rgba(0, 0, 0, 0.55), inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

.floating-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    pointer-events: none;
}

.discount-hero {
    background: linear-gradient(135deg, rgba(244, 63, 94, 0.35) 0%, rgba(245, 158, 11, 0.25) 100%);
}

.hero-content h2 {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 6px;
    color: var(--text-white);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-content p {
    font-size: 0.83rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.45;
}

.search-bar-wrapper {
    margin: 0 14px 14px 14px;
}

.search-glass-input {
    position: relative;
    width: 100%;
}

.search-glass-input input {
    width: 100%;
    background: rgba(18, 18, 30, 0.65);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid var(--border-glass);
    border-top: 1px solid var(--border-glass-top);
    padding: 14px 18px 14px 44px;
    border-radius: var(--radius-lg);
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.35s var(--liquid-ease);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35);
}

body.lang-en .search-glass-input input {
    padding: 14px 44px 14px 18px;
}

.search-glass-input input:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 25px rgba(6, 182, 212, 0.25), 0 8px 30px rgba(0, 0, 0, 0.45);
    background: rgba(26, 26, 42, 0.82);
}

.search-glass-input input::placeholder {
    color: var(--text-dim);
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    font-size: 0.95rem;
    transition: color 0.3s var(--liquid-ease);
}

body.lang-en .search-icon {
    left: auto;
    right: 16px;
}

.search-glass-input input:focus ~ .search-icon {
    color: var(--accent-cyan);
}

.content-container {
    padding: 0;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 0 14px;
}

.product-card {
    background: var(--bg-card);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid var(--border-glass);
    border-top: 1px solid var(--border-glass-top);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: transform 0.35s var(--spring-ease), box-shadow 0.35s var(--liquid-ease), border-color 0.35s var(--liquid-ease);
    box-shadow: 0 12px 30px -8px rgba(0, 0, 0, 0.5);
    position: relative;
}

.product-card:hover {
    border-color: var(--border-glass-hover);
    box-shadow: 0 18px 40px -6px rgba(124, 58, 237, 0.28);
}

.product-card:active {
    transform: scale(0.96);
}

.card-img-wrapper {
    width: 100%;
    height: 120px;
    background: linear-gradient(145deg, rgba(28, 28, 46, 0.85), rgba(16, 16, 28, 0.95));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--liquid-ease);
}

.product-card:hover .card-img-wrapper img {
    transform: scale(1.08);
}

.card-img-wrapper .placeholder-icon {
    font-size: 3.2rem;
    filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.4));
    transition: transform 0.35s var(--spring-ease);
}

.product-card:hover .placeholder-icon {
    transform: scale(1.12) rotate(-4deg);
}

.card-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 2;
}

body.lang-en .card-badge {
    right: auto;
    left: 8px;
}

.card-body {
    padding: 12px 14px 14px 14px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
}

.card-title {
    font-size: 0.92rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.35;
    height: 32px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-footer {
    margin-top: 10px;
}

.btn-price {
    width: 100%;
    background: linear-gradient(135deg, var(--accent-indigo), var(--accent-cyan));
    color: #fff;
    border: none;
    padding: 9px 12px;
    border-radius: var(--radius-md);
    font-size: 0.82rem;
    font-weight: 700;
    font-family: inherit;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
    transition: transform 0.2s var(--spring-ease), box-shadow 0.2s var(--liquid-ease);
}

.btn-price:active {
    transform: scale(0.95);
}

.floating-nav-bar {
    position: fixed;
    bottom: 14px;
    left: 14px;
    right: 14px;
    max-width: 450px;
    margin: 0 auto;
    height: 68px;
    background: rgba(14, 14, 24, 0.82);
    backdrop-filter: blur(40px) saturate(210%);
    -webkit-backdrop-filter: blur(40px) saturate(210%);
    border: 1px solid var(--border-glass);
    border-top: 1px solid var(--border-glass-top);
    border-radius: 34px;
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0 8px;
    z-index: 100;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), inset 0 1px 1px rgba(255, 255, 255, 0.18);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--text-dim);
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.3s var(--liquid-ease), transform 0.25s var(--spring-ease);
    width: 22%;
    height: 52px;
    border-radius: 24px;
    position: relative;
}

.nav-item i {
    font-size: 1.25rem;
    transition: transform 0.3s var(--spring-ease), color 0.3s var(--liquid-ease);
}

.nav-item.active {
    color: var(--text-white);
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.35), rgba(6, 182, 212, 0.35));
    border: 1px solid rgba(124, 58, 237, 0.4);
    box-shadow: 0 4px 18px rgba(124, 58, 237, 0.25);
}

.nav-item.active i {
    transform: translateY(-2px) scale(1.08);
}

.nav-item:active {
    transform: scale(0.92);
}

.view-section {
    display: none;
    opacity: 0;
    transform: translateY(12px);
}

.view-section.active {
    display: block;
    animation: viewFadeIn 0.35s var(--liquid-ease) forwards;
}

@keyframes viewFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.detail-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: none;
    align-items: flex-end;
    justify-content: center;
}

.detail-modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    opacity: 0;
    transition: opacity 0.35s var(--liquid-ease);
}

.detail-modal.active .modal-overlay {
    opacity: 1;
}

.modal-sheet {
    position: relative;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    background: rgba(16, 16, 26, 0.95);
    backdrop-filter: blur(40px) saturate(200%);
    -webkit-backdrop-filter: blur(40px) saturate(200%);
    border-top-left-radius: 32px;
    border-top-right-radius: 32px;
    border-top: 1px solid var(--border-glass-top);
    padding: 0 20px 45px 20px;
    overflow-y: auto;
    z-index: 1;
    transform: translateY(100%);
    transition: transform 0.4s var(--liquid-ease);
    box-shadow: 0 -15px 50px rgba(0, 0, 0, 0.8);
}

.detail-modal.active .modal-sheet {
    transform: translateY(0);
}

.modal-drag-handle {
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.22);
    border-radius: 100px;
    margin: 12px auto 16px auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.btn-close-circle, .btn-close {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-main);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s var(--liquid-ease), transform 0.2s var(--spring-ease);
}

.btn-close-circle:active, .btn-close:active {
    transform: scale(0.9);
    background: rgba(255, 255, 255, 0.25);
}

.btn-submit {
    width: 100%;
    background: linear-gradient(135deg, var(--accent-emerald), #059669);
    color: #fff;
    border: none;
    padding: 15px;
    border-radius: var(--radius-md);
    font-size: 0.98rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
    transition: transform 0.2s var(--spring-ease), box-shadow 0.2s var(--liquid-ease);
}

.btn-submit:active {
    transform: scale(0.96);
}

.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid var(--border-glass);
    border-top: 1px solid var(--border-glass-top);
    border-radius: 26px;
    padding: 22px;
    margin: 0 14px 14px 14px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4);
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 6px;
    font-weight: 500;
}

.form-group input, .form-group select {
    width: 100%;
    background: rgba(10, 10, 18, 0.8);
    border: 1px solid var(--border-glass);
    padding: 13px 16px;
    border-radius: var(--radius-md);
    color: var(--text-white);
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.25s var(--liquid-ease), box-shadow 0.25s var(--liquid-ease);
}

.form-group input:focus, .form-group select:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.2);
}

.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, var(--accent-emerald), #059669);
    color: #fff;
    border: none;
    padding: 15px;
    border-radius: var(--radius-md);
    font-size: 0.98rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
    transition: transform 0.2s var(--spring-ease), box-shadow 0.2s var(--liquid-ease);
}

.btn-primary:active {
    transform: scale(0.96);
}

.purchases-list {
    padding: 0 14px;
}

.purchase-item {
    background: var(--bg-card);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid var(--border-glass);
    border-top: 1px solid var(--border-glass-top);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.status-tag {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
}

.status-pending { background: rgba(245, 158, 11, 0.15); color: var(--accent-amber); border: 1px solid rgba(245, 158, 11, 0.3); }
.status-approved { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.status-rejected { background: rgba(244, 63, 94, 0.15); color: #f87171; border: 1px solid rgba(244, 63, 94, 0.3); }

.toast-pill {
    position: fixed;
    bottom: 92px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(24, 24, 38, 0.92);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--border-glass);
    color: var(--text-white);
    padding: 10px 22px;
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s var(--spring-ease);
    z-index: 300;
}

.toast-pill.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.profile-avatar-wrapper {
    text-align: center;
    margin-bottom: 24px;
}

.avatar-ring {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 2.2rem;
    box-shadow: 0 10px 30px var(--glow-cyan);
}

.avatar-ring + h2 {
    margin-top: 12px;
    font-size: 1.3rem;
    color: var(--text-white);
}

.avatar-ring ~ p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 4px;
}

.skeleton {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.04) 25%, rgba(255, 255, 255, 0.08) 50%, rgba(255, 255, 255, 0.04) 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s infinite;
    border-radius: var(--radius-lg);
}

@keyframes skeletonShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-card {
    height: 220px;
}
