/* ═══════════════════════════════════════════════
   QORVEX Store - Premium Glassmorphism Design
   ═══════════════════════════════════════════════ */

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

/* ─── CSS Variables ─── */
:root {
    --primary: #f72585;
    --primary-dark: #b5179e;
    --secondary: #3f37c9;
    --accent: #4cc9f0;
    --bg: #0b090a;
    --surface: #161a1d;
    --surface-2: #1e2226;
    --text: #ffffff;
    --text-2: #adb5bd;
    --text-3: #6c757d;
    --glass: rgba(22, 26, 29, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.37);
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    --radius: 16px;
    --radius-sm: 8px;
    --radius-lg: 24px;
    --radius-full: 50px;
    --font: 'Cairo', sans-serif;
    --font-en: 'Outfit', sans-serif;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.45);
}

/* ─── Reset ─── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    direction: rtl;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul,
ol {
    list-style: none;
}

input,
button,
textarea,
select {
    font-family: inherit;
    font-size: inherit;
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* ─── Layout ─── */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-lg {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ─── Glass Components ─── */
.glass {
    background: var(--glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

.glass-card {
    background: var(--glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: var(--radius);
    padding: 24px;
    transition: var(--transition);
}

.glass-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(255, 255, 255, 0.15);
}

.glass-card-static {
    background: var(--glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: var(--radius);
    padding: 24px;
}

/* ─── Typography ─── */
h1,
h2,
h3,
h4,
h5 {
    font-weight: 700;
    line-height: 1.3;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-center {
    text-align: center;
}

.text-secondary {
    color: var(--text-2);
}

/* ─── Buttons ─── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: var(--radius-full);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 1rem;
    text-decoration: none;
    white-space: nowrap;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    box-shadow: 0 4px 15px rgba(247, 37, 133, 0.35);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(247, 37, 133, 0.5);
}

.btn-secondary {
    background: var(--surface-2);
    color: var(--text);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    background: var(--surface);
    border-color: var(--primary);
}

.btn-outline {
    background: transparent;
    color: var(--text);
    border: 2px solid var(--glass-border);
}

.btn-outline:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
}

.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
}

.btn-sm {
    padding: 8px 18px;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 16px 36px;
    font-size: 1.1rem;
}

.btn-icon {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 12px;
    font-size: 1.2rem;
}

.btn-block {
    width: 100%;
}

/* ─── Form Elements ─── */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-2);
    font-weight: 600;
    font-size: 0.95rem;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 14px 18px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background: var(--surface);
    color: var(--text);
    font-size: 1rem;
    transition: var(--transition);
    outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(247, 37, 133, 0.15);
}

.form-input::placeholder {
    color: var(--text-3);
}

input[type="datetime-local"].form-input,
input[type="date"].form-input,
input[type="time"].form-input {
    direction: ltr;
    text-align: left;
    font-family: var(--font-en);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.form-select {
    appearance: none;
    cursor: pointer;
}

.form-error {
    color: var(--danger);
    font-size: 0.85rem;
    margin-top: 6px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* ─── Header ─── */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    transition: var(--transition);
}

.header.scrolled {
    background: rgba(11, 9, 10, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    padding: 10px 0;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    font-family: var(--font-en);
    letter-spacing: 2px;
}

.nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-link {
    color: var(--text-2);
    font-weight: 600;
    padding: 8px 0;
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: color 0.3s;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--text);
}

.nav-link:hover::after {
    width: 100%;
}

.hdr-cart-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--surface-2);
    color: var(--text);
    transition: all 0.3s;
    border: 1px solid var(--glass-border);
}

.hdr-cart-btn:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    transform: translateY(-2px);
}

.cart-count {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 20px;
    height: 20px;
    background: var(--primary);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px rgba(247, 37, 133, 0.4);
    border: 2px solid var(--bg);
}

.mobile-menu-btn {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--surface-2);
    border: 1px solid var(--glass-border);
    color: var(--text);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.mobile-menu-btn:hover {
    background: var(--surface);
    border-color: var(--primary);
}

/* ─── Hero Section ─── */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 80px;
}

.hero-blob {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--primary), transparent 70%);
    opacity: 0.15;
    filter: blur(80px);
    top: 50%;
    left: 20%;
    transform: translate(-50%, -50%);
    z-index: 0;
    animation: blob-float 12s infinite alternate ease-in-out;
}

.hero-blob-2 {
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--accent), transparent 70%);
    opacity: 0.1;
    filter: blur(80px);
    bottom: 10%;
    right: 10%;
    z-index: 0;
    animation: blob-float 8s infinite alternate-reverse ease-in-out;
}

.hero-content {
    max-width: 600px;
    z-index: 1;
    position: relative;
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-2);
    margin-bottom: 30px;
}

.hero-actions {
    display: flex;
    gap: 16px;
}

/* ─── Products Grid ─── */
.products-section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.section-desc {
    color: var(--text-2);
    font-size: 1.1rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.product-card {
    overflow: hidden;
    cursor: pointer;
}

.product-card .card-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 16px;
    transition: transform 0.5s ease;
}

.product-card:hover .card-image {
    transform: scale(1.05);
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.product-price {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
}

.product-old-price {
    font-size: 0.95rem;
    color: var(--text-3);
    text-decoration: line-through;
    margin-right: 8px;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

.stars {
    color: #fbbf24;
    font-size: 0.95rem;
    letter-spacing: 2px;
}

/* ─── Badges ─── */
.badge {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.badge-pending {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
}

.badge-processing {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

.badge-shipped {
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
}

.badge-delivered {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

.badge-cancelled {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

.badge-active {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

.badge-inactive {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

.badge-sale {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--danger);
    color: #fff;
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
}

/* ─── Footer ─── */
.footer {
    background: var(--glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--glass-border);
    padding: 60px 0 30px;
    margin-top: 80px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-title {
    font-weight: 700;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.footer-link {
    display: block;
    color: var(--text-2);
    margin-bottom: 12px;
    transition: var(--transition);
}

.footer-link:hover {
    color: var(--primary);
    transform: translateX(-5px);
}

.footer-bottom {
    border-top: 1px solid var(--glass-border);
    padding-top: 20px;
    text-align: center;
    color: var(--text-3);
    font-size: 0.9rem;
}

/* ─── Tables ─── */
.data-table {
    width: 100%;
    text-align: right;
    border-collapse: collapse;
}

.data-table th {
    padding: 14px 16px;
    color: var(--text-2);
    font-weight: 600;
    font-size: 0.9rem;
    border-bottom: 2px solid var(--glass-border);
}

.data-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--glass-border);
    transition: var(--transition);
}

.data-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* ─── Admin Layout ─── */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 280px;
    height: 100vh;
    padding: 30px 20px 80px 20px;
    border-left: 1px solid var(--glass-border);
    background: var(--surface);
    display: flex;
    flex-direction: column;
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 100;
    overflow-y: auto;
}

.admin-content {
    flex: 1;
    margin-right: 280px;
    padding: 30px;
}

.admin-logo {
    font-size: 1.6rem;
    font-weight: 800;
    font-family: var(--font-en);
    letter-spacing: 2px;
    margin-bottom: 8px;
    text-align: center;
}

.admin-nav {
    margin-top: 30px;
    flex: 1;
}

.admin-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 12px;
    color: var(--text-2);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: 1px solid transparent;
    margin-bottom: 4px;
}

.admin-nav-link:hover,
.admin-nav-link.active {
    background: rgba(247, 37, 133, 0.1);
    color: var(--primary);
    border-color: rgba(247, 37, 133, 0.2);
}

.admin-nav-link.active {
    background: rgba(247, 37, 133, 0.15);
}

/* ─── Stat Cards ─── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    text-align: center;
    padding: 30px;
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.2;
    margin: 10px 0;
}

.stat-label {
    color: var(--text-2);
    font-size: 1rem;
}

/* ─── Toast ─── */
.toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    padding: 14px 30px;
    border-radius: 12px;
    font-weight: 600;
    animation: slideDown 0.4s ease, fadeOut 0.4s ease 2.6s forwards;
    min-width: 300px;
    text-align: center;
}

.toast-success {
    background: rgba(16, 185, 129, 0.95);
    color: #fff;
}

.toast-error {
    background: rgba(239, 68, 68, 0.95);
    color: #fff;
}

.toast-info {
    background: rgba(59, 130, 246, 0.95);
    color: #fff;
}

/* ─── Loading ─── */
.skeleton {
    background: linear-gradient(90deg, var(--surface) 25%, rgba(255, 255, 255, 0.05) 50%, var(--surface) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--radius-sm);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--glass-border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 40px auto;
}

/* ─── Pagination ─── */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
}

.page-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    color: var(--text-2);
    font-weight: 600;
    transition: var(--transition);
}

.page-link:hover,
.page-link.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* ─── Breadcrumb ─── */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 20px 0;
    color: var(--text-3);
    font-size: 0.9rem;
}

.breadcrumb a {
    color: var(--text-2);
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb-sep {
    color: var(--text-3);
}

/* ─── Cart ─── */
.cart-page-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    gap: 24px;
    align-items: start;
}

.cart-items-card {
    padding: 0;
    overflow: hidden;
}

.cart-item {
    display: flex;
    gap: 20px;
    align-items: center;
    padding: 22px 24px;
    border-bottom: 1px solid var(--glass-border);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-media {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
}

.cart-item-image-link,
.cart-item-image {
    display: block;
    width: 100%;
    height: 100%;
}

.cart-item-image {
    object-fit: cover;
}

.cart-item-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: var(--surface);
}

.cart-item-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cart-item-meta {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.cart-item-title-link {
    text-decoration: none;
    color: inherit;
}

.cart-item-title {
    font-weight: 700;
    margin: 0;
    line-height: 1.5;
}

.cart-item-price {
    color: var(--primary);
    font-weight: 700;
    font-size: 1.05rem;
    white-space: nowrap;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.qty-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.qty-input {
    width: 48px;
    text-align: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--text);
    font-weight: 700;
    padding: 6px 0;
}

.qty-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.qty-btn:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.cart-remove-btn {
    color: var(--danger);
    border-color: var(--danger) !important;
    background: rgba(255, 77, 77, 0.08);
}

.cart-remove-btn:hover {
    background: var(--danger);
    color: #fff;
}

.cart-summary-card {
    align-self: start;
    position: sticky;
    top: 100px;
    padding: 24px;
    border: 1px solid var(--glass-border);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
}

.cart-summary-card h3 {
    margin: 0 0 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--glass-border);
    font-size: 1.15rem;
}

.cart-summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    color: var(--text-2);
}

.cart-summary-row-muted {
    color: var(--text-3);
}

.cart-summary-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 18px 0 24px;
    padding-top: 14px;
    border-top: 1px solid var(--glass-border);
    font-size: 1.25rem;
    font-weight: 800;
}

.cart-summary-total span:last-child {
    color: var(--primary);
}

.cart-summary-btn {
    margin-bottom: 12px;
}

.cart-summary-note {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 20px;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-3);
}

/* ─── Empty State ─── */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-text {
    color: var(--text-2);
    font-size: 1.1rem;
}

/* ─── Animations ─── */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

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

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
        visibility: hidden;
    }
}

@keyframes blob-float {
    from {
        transform: translate(-50%, -50%) scale(1);
    }

    to {
        transform: translate(-45%, -55%) scale(1.15);
    }
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

.animate-fade-in {
    animation: fadeInUp 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.animate-slide-in {
    animation: slideDown 0.5s ease forwards;
}

.delay-1 {
    animation-delay: 0.15s;
    opacity: 0;
}

.delay-2 {
    animation-delay: 0.3s;
    opacity: 0;
}

.delay-3 {
    animation-delay: 0.45s;
    opacity: 0;
}

.delay-4 {
    animation-delay: 0.6s;
    opacity: 0;
}

/* ─── Grid Helpers ─── */
.grid {
    display: grid;
    gap: 24px;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.flex {
    display: flex;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.gap-1 {
    gap: 8px;
}

.gap-2 {
    gap: 16px;
}

.gap-3 {
    gap: 24px;
}

.mt-1 {
    margin-top: 8px;
}

.mt-2 {
    margin-top: 16px;
}

.mt-3 {
    margin-top: 24px;
}

.mt-4 {
    margin-top: 32px;
}

.mb-1 {
    margin-bottom: 8px;
}

.mb-2 {
    margin-bottom: 16px;
}

.mb-3 {
    margin-bottom: 24px;
}

.mb-4 {
    margin-bottom: 32px;
}

.p-1 {
    padding: 8px;
}

.p-2 {
    padding: 16px;
}

.p-3 {
    padding: 24px;
}

/* ─── Responsive ─── */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .admin-sidebar {
        width: 240px;
    }

    .admin-content {
        margin-right: 240px;
    }
}

@media (max-width: 768px) {
    .nav {
        position: fixed;
        top: 0;
        right: -320px;
        width: 300px;
        height: 100vh;
        background: rgba(11, 9, 10, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 80px 24px 30px;
        z-index: 999;
        border-left: 1px solid var(--glass-border);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        gap: 16px;
        align-items: flex-start;
    }

    .nav.open {
        right: 0;
    }

    .nav::before {
        content: 'القائمة';
        position: absolute;
        top: 24px;
        right: 24px;
        font-size: 1.25rem;
        font-weight: 800;
        color: var(--text);
    }

    .mobile-menu-btn {
        display: flex;
        font-size: 1.2rem;
    }

    .nav-btn-close {
        display: flex !important;
        position: absolute;
        top: 20px;
        left: 20px;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid var(--glass-border);
        color: var(--text);
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.2s;
    }

    .nav-btn-close:hover {
        background: var(--primary);
        border-color: var(--primary);
    }

    .nav-link {
        width: 100%;
        padding: 12px 16px;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.02);
        border: 1px solid transparent;
        font-size: 1.1rem;
    }

    .nav-link:hover {
        background: rgba(255, 255, 255, 0.05);
        border-color: var(--glass-border);
    }

    .nav-link::after {
        display: none;
    }

    .nav-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(4px);
        z-index: 998;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s;
    }

    .nav-overlay.open {
        opacity: 1;
        pointer-events: auto;
    }

    .hero-actions {
        flex-direction: column;
    }

    .section-title {
        font-size: 1.8rem !important;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .data-table {
        font-size: 0.85rem;
    }

    .data-table th,
    .data-table td {
        padding: 10px 8px;
    }

    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    /* Admin mobile */
    .admin-sidebar {
        transform: translateX(100%);
        transition: transform 0.3s ease;
    }

    .admin-sidebar.open {
        transform: translateX(0);
    }

    .admin-content {
        margin-right: 0;
        padding: 20px;
    }

    .admin-mobile-toggle {
        display: block !important;
        position: fixed;
        top: 20px;
        right: 20px;
        z-index: 101;
        font-size: 1.5rem;
        background: var(--surface);
        border: 1px solid var(--glass-border);
        color: var(--text);
        width: 44px;
        height: 44px;
        border-radius: 12px;
        cursor: pointer;
    }

    .cart-page-layout {
        grid-template-columns: 1fr;
    }

    .cart-summary-card {
        position: static;
        padding: 20px;
    }

    .cart-item {
        flex-direction: column;
        align-items: flex-start;
        text-align: right;
        padding: 18px;
    }

    .cart-item-media {
        width: 100%;
        max-width: 220px;
        height: 160px;
    }

    .cart-item-body {
        width: 100%;
    }

    .cart-item-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .cart-item-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .breadcrumb {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }

    .glass-card,
    .glass-card-static {
        padding: 16px;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* ─── Print ─── */
@media print {

    .header,
    .footer,
    .admin-sidebar,
    .no-print {
        display: none !important;
    }

    body {
        background: #fff;
        color: #000;
    }

    .glass-card,
    .glass-card-static {
        border: 1px solid #ddd;
        background: #fff;
        box-shadow: none;
    }
}