/* ╔═══════════════════════════════════════════╗
   ║   تصميم حصري - متجاوب كلياً (Mobile First) ║
   ╚═══════════════════════════════════════════╝ */

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

:root {
    /* لون أساسي: بنفسجي ملكي */
    --c-primary:        #7c3aed;
    --c-primary-dark:   #5b21b6;
    --c-primary-light:  #a78bfa;
    /* CTA حار */
    --c-accent:         #f97316;
    --c-accent-dark:    #ea580c;
    /* محايد */
    --c-text:           #0f172a;
    --c-text-soft:      #475569;
    --c-muted:          #94a3b8;
    --c-border:         #e2e8f0;
    --c-bg:             #fafafa;
    --c-surface:        #ffffff;
    --c-surface-soft:   #f8fafc;
    /* مؤشرات */
    --c-success:        #10b981;
    --c-warning:        #f59e0b;
    --c-danger:         #ef4444;
    --c-info:           #3b82f6;
    /* ظلال */
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow:    0 4px 12px rgba(15, 23, 42, 0.06);
    --shadow-lg: 0 20px 40px -8px rgba(15, 23, 42, 0.15);
    --shadow-xl: 0 30px 60px -15px rgba(15, 23, 42, 0.25);
    /* gradient ملكي */
    --gradient-hero: linear-gradient(135deg, #7c3aed 0%, #ec4899 50%, #f97316 100%);
    --gradient-card: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    /* قياسات */
    --radius-sm: 8px;
    --radius:    14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    /* الحركات */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, 'Segoe UI', 'Tahoma', system-ui, sans-serif;
    background: var(--c-bg);
    color: var(--c-text);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--c-primary); text-decoration: none; transition: color 0.2s var(--ease); }
a:hover { color: var(--c-primary-dark); }
img { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; }

.container { max-width: 1280px; margin: 0 auto; padding: 24px 16px; }
@media (min-width: 768px) { .container { padding: 32px 24px; } }

.muted { color: var(--c-muted); }
.small { font-size: 0.85em; }
.center { text-align: center; }

/* ═══ Header ═══ */
.site-header {
    background: rgba(255,255,255,0.85);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--c-border);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}
@media (min-width: 768px) {
    .header-inner { padding: 16px 24px; gap: 24px; }
}
.logo {
    font-size: 1.25em;
    font-weight: 800;
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    flex-shrink: 0;
    letter-spacing: -0.5px;
}
@media (min-width: 768px) { .logo { font-size: 1.5em; } }

.search-form {
    flex: 1;
    display: flex;
    max-width: 540px;
    position: relative;
}
.search-form input {
    flex: 1;
    border: 1.5px solid var(--c-border);
    padding: 11px 16px 11px 44px;
    border-radius: 999px;
    font-size: 0.95em;
    font-family: inherit;
    background: var(--c-surface-soft);
    transition: all 0.2s var(--ease);
    min-width: 0;
}
.search-form input:focus {
    outline: none;
    border-color: var(--c-primary);
    background: var(--c-surface);
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.1);
}
.search-form button {
    position: absolute;
    inset-inline-start: 4px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--c-primary);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1em;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-nav { display: none; gap: 14px; align-items: center; }
@media (min-width: 768px) { .header-nav { display: flex; } }
.header-nav a { color: var(--c-text-soft); font-weight: 500; font-size: 0.95em; }
.header-nav a:hover { color: var(--c-primary); }
.wa-link {
    background: #25d366;
    color: white !important;
    padding: 8px 14px;
    border-radius: 999px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
    display: inline-flex;
    align-items: center;
    font-size: 0.9em;
    flex-shrink: 0;
    transition: transform 0.2s var(--ease);
}
.wa-link:hover { color: white !important; transform: translateY(-1px); }
.wa-text { display: none; }
.wa-icon { font-size: 1.2em; }
@media (min-width: 768px) {
    .wa-text { display: inline; }
    .wa-icon { display: none; }
}

/* Mobile menu toggle */
.menu-toggle {
    display: flex;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--c-text);
    font-size: 1.4em;
}
@media (min-width: 768px) { .menu-toggle { display: none; } }

.cats-bar {
    background: var(--c-surface-soft);
    border-bottom: 1px solid var(--c-border);
    overflow: hidden;
}
.cats-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 8px 16px;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.cats-inner::-webkit-scrollbar { display: none; }
.cats-inner a {
    color: var(--c-text-soft);
    white-space: nowrap;
    padding: 8px 16px;
    border-radius: 999px;
    transition: all 0.2s var(--ease);
    font-weight: 500;
    font-size: 0.9em;
    background: var(--c-surface);
    border: 1px solid transparent;
}
.cats-inner a:hover {
    background: var(--c-primary);
    color: white;
    border-color: var(--c-primary);
}

/* ═══ Promo Strip ═══ */
.promo-strip {
    background: linear-gradient(90deg, #0f172a, #1e293b, #0f172a);
    color: white;
    padding: 12px 0;
    overflow: hidden;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.marquee { overflow: hidden; }
.marquee-track {
    display: inline-flex;
    gap: 28px;
    white-space: nowrap;
    animation: marquee 35s linear infinite;
    font-size: 0.9em;
    font-weight: 500;
}
.marquee-track span:nth-child(even) { color: var(--c-accent); }
@keyframes marquee {
    0%   { transform: translateX(0); }
    100% { transform: translateX(50%); }
}

/* ═══ Hero PRO — Bento Layout ═══ */
.hero-pro {
    position: relative;
    background: linear-gradient(135deg, #1e1b4b 0%, #4c1d95 50%, #831843 100%);
    color: white;
    overflow: hidden;
    padding: 60px 0 80px;
}
.hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}
.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: 0.55;
    animation: float 18s ease-in-out infinite;
}
.orb-1 {
    width: 340px; height: 340px;
    background: #f97316;
    top: -80px; left: -60px;
    animation-delay: 0s;
}
.orb-2 {
    width: 420px; height: 420px;
    background: #ec4899;
    bottom: -100px; right: -100px;
    animation-delay: -6s;
}
.orb-3 {
    width: 280px; height: 280px;
    background: #8b5cf6;
    top: 40%; right: 30%;
    animation-delay: -12s;
}
@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%      { transform: translate(40px, -30px) scale(1.1); }
    66%      { transform: translate(-30px, 40px) scale(0.95); }
}

.hero-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    padding-top: 30px;
    padding-bottom: 30px;
}
@media (min-width: 900px) {
    .hero-grid { grid-template-columns: 1.4fr 1fr; gap: 28px; align-items: stretch; }
}

.hero-main-card {
    background: rgba(255,255,255,0.06);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-xl);
    padding: 36px 28px;
}
@media (min-width: 768px) { .hero-main-card { padding: 48px 40px; } }
.hero-tag {
    display: inline-block;
    background: rgba(249, 115, 22, 0.2);
    color: #fed7aa;
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 0.85em;
    font-weight: 600;
    border: 1px solid rgba(249, 115, 22, 0.3);
    margin-bottom: 20px;
}
.hero-title {
    font-size: 2.4em;
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -1px;
    margin-bottom: 18px;
}
@media (min-width: 768px) { .hero-title { font-size: 3.4em; } }
@media (min-width: 1200px) { .hero-title { font-size: 4em; } }
.grad-text {
    background: linear-gradient(90deg, #fbbf24, #f97316, #ec4899);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-desc {
    font-size: 1.05em;
    opacity: 0.85;
    margin-bottom: 28px;
    max-width: 540px;
    line-height: 1.7;
}
@media (min-width: 768px) { .hero-desc { font-size: 1.15em; } }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-ghost-light {
    background: rgba(255,255,255,0.1);
    color: white;
    border: 1.5px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
}
.btn-ghost-light:hover { background: rgba(255,255,255,0.18); color: white; }

.hero-side {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
@media (min-width: 1200px) { .hero-side { gap: 18px; } }
.bento {
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--radius-lg);
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    min-height: 130px;
    transition: transform 0.3s var(--ease);
}
.bento:hover { transform: scale(1.03); }
.bento-stat {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.25), rgba(236, 72, 153, 0.25));
    border-color: rgba(249, 115, 22, 0.3);
}
.bento-num {
    font-size: 2.4em;
    font-weight: 900;
    background: linear-gradient(90deg, #fbbf24, #f97316);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
}
.bento-label { color: rgba(255,255,255,0.75); font-size: 0.85em; font-weight: 500; }
.bento-feature .bento-icon {
    font-size: 2em;
    margin-bottom: 6px;
}
.bento-feature .bento-text {
    font-weight: 700;
    line-height: 1.3;
}
.bento-feature.alt {
    background: rgba(167, 139, 250, 0.15);
    border-color: rgba(167, 139, 250, 0.3);
}
.bento-rating {
    grid-column: span 2;
    align-items: center;
    text-align: center;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(249, 115, 22, 0.2));
    border-color: rgba(251, 191, 36, 0.3);
    min-height: auto;
    padding: 14px;
}
.stars {
    color: #fbbf24;
    font-size: 1.4em;
    letter-spacing: 2px;
}

/* keep old .hero as fallback in case any page uses it */
.hero {
    background: var(--gradient-hero);
    color: white;
    padding: 60px 16px 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero h1 { font-size: 2em; font-weight: 900; margin-bottom: 12px; }
@media (min-width: 768px) { .hero h1 { font-size: 3em; } }
.hero-sub { opacity: 0.95; margin-bottom: 28px; }

/* ═══ Buttons ═══ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    padding: 12px 24px;
    border-radius: 999px;
    font-size: 0.95em;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    color: white;
    transition: all 0.2s var(--ease);
    text-align: center;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}
.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: white;
}
.btn:active { transform: translateY(0); }
.btn.big { padding: 16px 32px; font-size: 1.05em; }
.btn.block { display: flex; width: 100%; }
.btn-primary { background: linear-gradient(135deg, var(--c-primary), var(--c-primary-dark)); }
.btn-accent  { background: linear-gradient(135deg, var(--c-accent), var(--c-accent-dark)); }
.btn-success { background: linear-gradient(135deg, #10b981, #059669); }
.btn-warning { background: var(--c-warning); }
.btn-info    { background: var(--c-info); }
.btn-ghost {
    background: var(--c-surface);
    color: var(--c-text);
    border: 1.5px solid var(--c-border);
    box-shadow: none;
}
.btn-ghost:hover { background: var(--c-surface-soft); color: var(--c-text); }

.btn-mini {
    background: var(--c-info);
    color: white !important;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.85em;
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: opacity 0.15s;
}
.btn-mini:hover { opacity: 0.85; }
.btn-delete { background: var(--c-danger); }

/* ═══ Section Heads ═══ */
.section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 36px 0 20px;
}
.section-head h2 {
    font-size: 1.5em;
    font-weight: 800;
    letter-spacing: -0.3px;
}
@media (min-width: 768px) { .section-head h2 { font-size: 1.75em; } }
.see-all {
    color: var(--c-primary);
    font-weight: 600;
    font-size: 0.95em;
}

/* ═══ Product Grid ═══ */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}
@media (min-width: 640px) { .product-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
@media (min-width: 1024px) { .product-grid { grid-template-columns: repeat(4, 1fr); gap: 20px; } }

.product-card {
    background: var(--c-surface);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
    box-shadow: var(--shadow-sm);
    color: var(--c-text);
    position: relative;
    border: 1px solid var(--c-border);
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    color: var(--c-text);
    border-color: var(--c-primary-light);
}
.badge-discount {
    position: absolute;
    top: 10px;
    inset-inline-start: 10px;
    background: linear-gradient(135deg, var(--c-accent), var(--c-accent-dark));
    color: white;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.75em;
    font-weight: 800;
    z-index: 2;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.4);
}
.badge-discount.inline {
    position: static;
    display: inline-block;
    margin-inline-start: 10px;
    font-size: 0.85em;
}
.product-img {
    aspect-ratio: 1;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    overflow: hidden;
    position: relative;
}
.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s var(--ease);
}
.product-card:hover .product-img img { transform: scale(1.06); }
.img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3em;
    color: var(--c-muted);
}
.img-placeholder.big { font-size: 6em; }
.product-info { padding: 14px; }
.product-info h3 {
    font-size: 0.95em;
    margin-bottom: 8px;
    line-height: 1.4;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.8em;
}
@media (min-width: 768px) { .product-info h3 { font-size: 1em; } }
.prices { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.price {
    color: var(--c-primary);
    font-size: 1.1em;
    font-weight: 800;
}
@media (min-width: 768px) { .price { font-size: 1.2em; } }
.price small { color: var(--c-muted); font-size: 0.65em; font-weight: 600; }
.price-old {
    color: var(--c-muted);
    text-decoration: line-through;
    font-size: 0.85em;
}

/* ═══ Catalog ═══ */
.catalog-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 14px;
}
.catalog-head h1 {
    font-size: 1.5em;
    font-weight: 800;
    letter-spacing: -0.3px;
}
@media (min-width: 768px) { .catalog-head h1 { font-size: 1.8em; } }
.sort-form { display: flex; align-items: center; gap: 10px; }
.sort-form select {
    padding: 10px 14px;
    border: 1.5px solid var(--c-border);
    border-radius: 999px;
    font-family: inherit;
    background: var(--c-surface);
    font-size: 0.9em;
    cursor: pointer;
}
.result-count { margin-bottom: 16px; }

/* ═══ Product detail ═══ */
.product-page { padding: 20px 16px; }
@media (min-width: 768px) { .product-page { padding: 32px 24px; } }
.breadcrumb { margin-bottom: 18px; font-size: 0.9em; }
.breadcrumb a { color: var(--c-text-soft); }
.product-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-bottom: 40px;
}
@media (min-width: 1024px) { .product-layout { grid-template-columns: 1.1fr 1fr; gap: 50px; } }

.product-media .main-img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    background: var(--c-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--c-border);
}
.thumbnails {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    flex-wrap: wrap;
}
.thumb {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s var(--ease);
}
.thumb:hover { border-color: var(--c-primary); transform: scale(1.05); }
.product-detail h1 {
    font-size: 1.7em;
    margin-bottom: 14px;
    font-weight: 800;
    letter-spacing: -0.3px;
    line-height: 1.3;
}
@media (min-width: 768px) { .product-detail h1 { font-size: 2.2em; } }
.short-desc {
    color: var(--c-text-soft);
    margin-bottom: 20px;
    font-size: 1.05em;
}
.price-block {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
    margin: 24px 0;
    padding: 20px;
    background: var(--c-surface-soft);
    border-radius: var(--radius);
    border: 1px solid var(--c-border);
}
.price-big {
    color: var(--c-primary);
    font-size: 2.2em;
    font-weight: 900;
    line-height: 1;
}
@media (min-width: 768px) { .price-big { font-size: 2.6em; } }
.price-big small { color: var(--c-muted); font-size: 0.45em; font-weight: 600; }
.price-old.big { font-size: 1.3em; }
.stock-line {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 18px;
    font-weight: 600;
    font-size: 0.95em;
}
.in-stock { background: rgba(16, 185, 129, 0.1); color: #065f46; border: 1px solid rgba(16, 185, 129, 0.2); }
.out-of-stock { background: rgba(239, 68, 68, 0.1); color: #991b1b; border: 1px solid rgba(239, 68, 68, 0.2); }
.note {
    padding: 12px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: var(--radius-sm);
    color: #78350f;
    margin-top: 14px;
    font-size: 0.9em;
}
.desc-section { margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--c-border); }
.desc-section h3 { margin-bottom: 14px; font-weight: 800; font-size: 1.2em; }
.desc-content { color: var(--c-text-soft); line-height: 1.85; font-size: 1em; }
.related-section { margin-top: 50px; }

/* ═══ Empty states ═══ */
.empty-shop, .empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--c-muted);
}
.empty-shop h2, .empty-state h3 { color: var(--c-text-soft); margin-bottom: 12px; font-weight: 800; }

/* ═══ Flash ═══ */
.flash {
    padding: 14px 18px;
    margin-bottom: 18px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    border-inline-start: 4px solid;
    animation: slideDown 0.3s var(--ease);
}
.flash-error { background: rgba(239, 68, 68, 0.08); color: #991b1b; border-color: var(--c-danger); }
.flash-success { background: rgba(16, 185, 129, 0.08); color: #065f46; border-color: var(--c-success); }
@keyframes slideDown {
    from { transform: translateY(-10px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}

/* ═══ Forms ═══ */
.form { display: flex; flex-direction: column; gap: 8px; }
.form label {
    font-weight: 600;
    color: var(--c-text-soft);
    margin-top: 10px;
    font-size: 0.9em;
}
.form input, .form select, .form textarea {
    background: var(--c-surface);
    border: 1.5px solid var(--c-border);
    padding: 11px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.95em;
    font-family: inherit;
    color: var(--c-text);
    transition: all 0.2s var(--ease);
}
.form input:focus, .form select:focus, .form textarea:focus {
    outline: none;
    border-color: var(--c-primary);
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.1);
}
.search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
}
.search-bar input {
    flex: 1;
    padding: 11px 16px;
    border: 1.5px solid var(--c-border);
    border-radius: var(--radius-sm);
}
.inline-form { flex-direction: row; flex-wrap: wrap; gap: 10px; align-items: stretch; }
.inline-form input { flex: 1; min-width: 150px; }

/* ═══ Auth page ═══ */
.auth-page {
    background: linear-gradient(135deg, #ede9fe 0%, #fce7f3 100%);
    min-height: 100vh;
}
.auth-wrapper { min-height: 80vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.auth-card {
    background: var(--c-surface);
    padding: 40px 32px;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-xl);
}
.auth-title {
    text-align: center;
    color: var(--c-primary);
    margin-bottom: 6px;
    font-weight: 800;
    font-size: 1.7em;
    letter-spacing: -0.3px;
}
.auth-subtitle { text-align: center; color: var(--c-muted); margin-bottom: 28px; }

/* ═══ Admin layout ═══ */
.admin-body { background: #f1f5f9; }
.admin-side {
    position: fixed;
    inset-inline-end: 0;
    top: 0;
    width: 240px;
    height: 100vh;
    background: linear-gradient(180deg, #0f172a, #1e293b);
    color: white;
    padding: 24px 16px;
    overflow-y: auto;
    z-index: 50;
    box-shadow: var(--shadow-xl);
}
.admin-side .brand {
    font-size: 1.15em;
    font-weight: 800;
    color: white;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.admin-menu { display: flex; flex-direction: column; gap: 4px; }
.admin-menu a {
    color: #cbd5e1;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    transition: all 0.2s var(--ease);
    font-size: 0.95em;
}
.admin-menu a:hover {
    background: rgba(255,255,255,0.08);
    color: white;
    transform: translateX(-3px);
}
.admin-menu hr { border: none; border-top: 1px solid rgba(255,255,255,0.1); margin: 12px 0; }
.admin-menu .logout { color: #fca5a5; }

.admin-main {
    margin-inline-end: 240px;
    padding: 30px 32px;
    min-height: 100vh;
}
@media (max-width: 768px) {
    .admin-side {
        position: static;
        width: 100%;
        height: auto;
        padding: 16px;
    }
    .admin-menu {
        flex-direction: row;
        flex-wrap: wrap;
    }
    .admin-menu a { padding: 8px 12px; font-size: 0.85em; }
    .admin-main { margin-inline-end: 0; padding: 20px 16px; }
}

.page-title { font-size: 1.6em; margin-bottom: 20px; font-weight: 800; letter-spacing: -0.3px; }
.page-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

/* ═══ Stats ═══ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 28px;
}
.stat-card {
    background: var(--c-surface);
    padding: 22px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border-top: 4px solid var(--c-primary);
    transition: transform 0.2s var(--ease);
}
.stat-card:hover { transform: translateY(-2px); }
.stat-label { color: var(--c-muted); font-size: 0.85em; display: block; margin-bottom: 6px; font-weight: 600; }
.stat-value { font-size: 1.9em; font-weight: 900; color: var(--c-text); letter-spacing: -0.5px; }

/* ═══ Panel ═══ */
.panel {
    background: var(--c-surface);
    padding: 26px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}
.panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    flex-wrap: wrap;
    gap: 10px;
}
.panel h3 { color: var(--c-text); margin-bottom: 14px; font-weight: 800; }

/* ═══ Tables ═══ */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--c-surface);
}
.data-table th {
    background: var(--c-surface-soft);
    color: var(--c-text-soft);
    padding: 14px;
    text-align: start;
    font-weight: 700;
    font-size: 0.85em;
    border-bottom: 1px solid var(--c-border);
}
.data-table td { padding: 14px; border-top: 1px solid var(--c-border); }
.data-table tr:hover { background: var(--c-surface-soft); }
.mini-thumb { width: 48px; height: 48px; object-fit: cover; border-radius: var(--radius-sm); }
.mini-thumb-empty {
    width: 48px;
    height: 48px;
    background: var(--c-surface-soft);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4em;
}
.badge-ok { background: rgba(16, 185, 129, 0.1); color: #065f46; padding: 3px 12px; border-radius: 999px; font-size: 0.8em; font-weight: 600; }
.badge-off { background: #f3f4f6; color: #6b7280; padding: 3px 12px; border-radius: 999px; font-size: 0.8em; font-weight: 600; }
.badge-star { color: var(--c-warning); }

/* ═══ Product form ═══ */
.form-product { max-width: 1100px; }
.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 20px;
}
@media (min-width: 768px) { .form-grid { grid-template-columns: 1fr 1fr; gap: 32px; } }
.form-col { display: flex; flex-direction: column; gap: 6px; }
.form-col label { font-weight: 600; color: var(--c-text-soft); margin-top: 10px; font-size: 0.9em; }
.checkbox-group { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    margin-top: 0 !important;
    padding: 10px;
    background: var(--c-surface-soft);
    border-radius: var(--radius-sm);
}
.checkbox-label input { width: 18px; height: 18px; }
.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--c-border);
    flex-wrap: wrap;
}

/* ═══ Features Tiles ═══ */
.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin: 30px 0;
}
@media (min-width: 768px) { .features-grid { grid-template-columns: repeat(4, 1fr); gap: 20px; } }
.feature-tile {
    background: var(--c-surface);
    padding: 24px 18px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--c-border);
    text-align: center;
    transition: all 0.3s var(--ease);
    position: relative;
    overflow: hidden;
}
.feature-tile::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-hero);
    opacity: 0;
    transition: opacity 0.3s var(--ease);
    z-index: 0;
}
.feature-tile:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--c-primary-light);
}
.feature-tile > * { position: relative; z-index: 1; }
.feature-icon-wrap {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.1), rgba(249, 115, 22, 0.1));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8em;
    margin: 0 auto 14px;
    transition: transform 0.3s var(--ease);
}
.feature-tile:hover .feature-icon-wrap {
    transform: scale(1.1) rotate(5deg);
}
.feature-tile h3 {
    font-size: 1.05em;
    font-weight: 800;
    margin-bottom: 6px;
}
.feature-tile p {
    color: var(--c-text-soft);
    font-size: 0.88em;
    line-height: 1.5;
}

/* ═══ Categories Showcase ═══ */
.categories-showcase {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
@media (min-width: 640px) { .categories-showcase { grid-template-columns: repeat(4, 1fr); gap: 14px; } }
@media (min-width: 1024px) { .categories-showcase { grid-template-columns: repeat(6, 1fr); gap: 18px; } }

.cat-card {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    padding: 22px 14px;
    border-radius: var(--radius-lg);
    text-align: center;
    color: var(--c-text);
    transition: all 0.3s var(--ease);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.cat-card:hover {
    transform: translateY(-3px);
    color: white;
    background: var(--gradient-hero);
    border-color: transparent;
    box-shadow: var(--shadow-lg);
}
.cat-emoji {
    font-size: 2.2em;
    line-height: 1;
}
.cat-name {
    font-weight: 700;
    font-size: 0.9em;
}

/* ═══ Coming Soon Premium ═══ */
.coming-soon {
    background: linear-gradient(135deg, #0f172a, #4c1d95);
    border-radius: var(--radius-xl);
    padding: 60px 30px;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
    margin: 30px 0;
}
.coming-glow {
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(249, 115, 22, 0.4), transparent 60%);
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
    animation: pulse 4s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50%      { opacity: 1; transform: translateX(-50%) scale(1.1); }
}
.coming-content { position: relative; z-index: 1; }
.coming-icon {
    font-size: 4em;
    margin-bottom: 14px;
}
.coming-soon h2 {
    font-size: 2em;
    font-weight: 900;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}
@media (min-width: 768px) { .coming-soon h2 { font-size: 2.6em; } }
.coming-sub {
    color: rgba(255,255,255,0.8);
    margin-bottom: 24px;
    font-size: 1.05em;
}

/* ═══ Big CTA ═══ */
.big-cta { padding: 40px 0 30px; }
.cta-card {
    background: linear-gradient(135deg, var(--c-accent), var(--c-accent-dark));
    border-radius: var(--radius-xl);
    padding: 36px 28px;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
    box-shadow: 0 20px 50px -10px rgba(249, 115, 22, 0.4);
}
@media (min-width: 768px) {
    .cta-card {
        flex-direction: row;
        justify-content: space-between;
        text-align: start;
        padding: 40px 48px;
    }
}
.cta-text h2 {
    font-size: 1.5em;
    font-weight: 900;
    margin-bottom: 6px;
    letter-spacing: -0.3px;
}
@media (min-width: 768px) { .cta-text h2 { font-size: 1.8em; } }
.cta-text p { opacity: 0.95; font-size: 1em; }
.cta-card .btn-accent {
    background: white;
    color: var(--c-accent-dark);
    flex-shrink: 0;
}
.cta-card .btn-accent:hover { background: white; color: var(--c-accent-dark); }

/* ═══ Cart Icon Badge ═══ */
.cart-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--c-surface-soft);
    border-radius: 999px;
    color: var(--c-text);
    font-size: 1.2em;
    flex-shrink: 0;
    transition: all 0.2s var(--ease);
}
.cart-link:hover {
    background: var(--c-primary);
    color: white;
    transform: scale(1.05);
}
.cart-badge {
    position: absolute;
    top: -4px;
    inset-inline-start: -4px;
    background: var(--c-accent);
    color: white;
    font-size: 0.7em;
    font-weight: 800;
    min-width: 20px;
    height: 20px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    box-shadow: 0 2px 8px rgba(249, 115, 22, 0.4);
}

/* ═══ Add to Cart Form ═══ */
.add-to-cart-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
}
.qty-control {
    display: flex;
    align-items: center;
    width: fit-content;
    border: 1.5px solid var(--c-border);
    border-radius: 999px;
    overflow: hidden;
}
.qty-control input {
    width: 60px;
    text-align: center;
    border: none;
    padding: 10px 4px;
    font-size: 1em;
    font-weight: 700;
    font-family: inherit;
    background: transparent;
}
.qty-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--c-surface-soft);
    cursor: pointer;
    font-size: 1.2em;
    color: var(--c-text);
    transition: background 0.15s;
}
.qty-btn:hover { background: var(--c-border); }

/* ═══ Cart Page ═══ */
.cart-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 20px;
}
@media (min-width: 900px) {
    .cart-layout { grid-template-columns: 1fr 340px; gap: 30px; align-items: start; }
}
.cart-items {
    background: var(--c-surface);
    border-radius: var(--radius);
    padding: 8px;
    box-shadow: var(--shadow);
}
.cart-row {
    display: grid;
    grid-template-columns: 80px 1fr auto auto;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border-bottom: 1px solid var(--c-border);
}
.cart-row:last-of-type { border-bottom: none; }
.cart-img {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--c-surface-soft);
    display: flex;
    align-items: center;
    justify-content: center;
}
.cart-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-img .img-placeholder { font-size: 1.8em; }
.cart-name { font-weight: 700; color: var(--c-text); display: block; margin-bottom: 4px; }
.cart-price { color: var(--c-muted); font-size: 0.9em; }
.cart-qty input {
    width: 60px;
    text-align: center;
    padding: 8px;
    border: 1.5px solid var(--c-border);
    border-radius: 8px;
    font-family: inherit;
    font-weight: 600;
}
.cart-line-total {
    text-align: center;
    min-width: 90px;
}
.cart-line-total strong { display: block; font-size: 1.05em; }
.cart-line-total small { color: var(--c-muted); font-size: 0.8em; }
.cart-remove-form {
    padding: 0 14px 12px;
    text-align: end;
    border-bottom: 1px solid var(--c-border);
}
.btn-link-danger {
    background: none;
    border: none;
    color: var(--c-danger);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.85em;
}
.cart-row-actions {
    display: flex;
    justify-content: space-between;
    padding: 16px 14px;
    gap: 10px;
    flex-wrap: wrap;
}

.cart-summary {
    background: var(--c-surface);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow);
    position: sticky;
    top: 80px;
}
.cart-summary h3 { font-weight: 800; margin-bottom: 14px; }
.sum-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
}
.sum-row.total { font-size: 1.1em; padding-top: 14px; }
.sum-row.total .big { font-size: 1.2em; color: var(--c-primary); }
.cart-summary hr { border: none; border-top: 1px solid var(--c-border); margin: 8px 0; }
.free-tag {
    color: var(--c-success);
    font-weight: 700;
}
.ship-hint {
    color: var(--c-muted);
    font-size: 0.85em;
    background: var(--c-surface-soft);
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    margin: 8px 0;
}

/* ═══ Checkout Page ═══ */
.checkout-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 20px;
}
@media (min-width: 900px) {
    .checkout-layout { grid-template-columns: 1.4fr 1fr; gap: 30px; align-items: start; }
}
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.payment-methods { display: flex; flex-direction: column; gap: 10px; }
.payment-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: var(--c-surface-soft);
    border: 2px solid transparent;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s var(--ease);
}
.payment-option:hover { background: var(--c-surface); border-color: var(--c-border); }
.payment-option input { width: 20px; height: 20px; accent-color: var(--c-primary); }
.payment-option:has(input:checked) {
    background: rgba(124, 58, 237, 0.05);
    border-color: var(--c-primary);
}
.payment-label { font-weight: 600; }
.check-line {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 0.95em;
}
.check-line small { color: var(--c-muted); }
.checkout-summary .panel.sticky { position: sticky; top: 80px; }

/* ═══ Order Success ═══ */
.success-wrap { padding: 30px 0; }
.success-card {
    background: var(--c-surface);
    border-radius: var(--radius-xl);
    padding: 36px 28px;
    box-shadow: var(--shadow-xl);
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}
.success-icon {
    font-size: 4em;
    background: linear-gradient(135deg, #10b981, #059669);
    width: 100px;
    height: 100px;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    box-shadow: 0 20px 50px -10px rgba(16, 185, 129, 0.4);
}
.success-card h1 { font-size: 2em; font-weight: 900; margin-bottom: 10px; }
.order-number {
    font-family: 'Consolas', monospace;
    background: var(--c-surface-soft);
    padding: 10px 20px;
    border-radius: 999px;
    display: inline-block;
    margin: 6px 0 24px;
    font-size: 1.2em;
    color: var(--c-primary);
}
.next-steps {
    text-align: start;
    background: var(--c-surface-soft);
    padding: 22px;
    border-radius: var(--radius);
    margin: 20px 0;
}
.next-steps h3 { margin-bottom: 12px; font-weight: 800; }
.next-steps ol { padding-inline-start: 20px; }
.next-steps li { padding: 4px 0; }
.bank-box {
    background: var(--c-surface);
    border: 1.5px dashed var(--c-primary);
    padding: 16px;
    border-radius: var(--radius-sm);
    white-space: pre-line;
    font-family: 'Consolas', monospace;
    text-align: start;
    margin: 12px 0;
}
.order-summary-box {
    text-align: start;
    margin: 24px 0;
}
.order-summary-box h3 { margin-bottom: 12px; font-weight: 800; }
.text-end { text-align: end; }
.contact-row {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

/* ═══ Admin Orders ═══ */
.status-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
}
.status-tabs .tab {
    background: var(--c-surface);
    color: var(--c-text-soft);
    padding: 8px 16px;
    border-radius: 999px;
    border: 1.5px solid var(--c-border);
    white-space: nowrap;
    font-size: 0.9em;
    font-weight: 600;
}
.status-tabs .tab:hover { color: var(--c-primary); border-color: var(--c-primary); }
.status-tabs .tab.active {
    background: var(--c-primary);
    color: white;
    border-color: var(--c-primary);
}
.tab-count {
    background: rgba(255,255,255,0.25);
    padding: 1px 8px;
    border-radius: 999px;
    margin-inline-start: 4px;
    font-size: 0.85em;
}
.badge {
    padding: 3px 12px;
    border-radius: 999px;
    font-size: 0.8em;
    font-weight: 700;
}
.badge-new   { background: rgba(124, 58, 237, 0.12); color: #5b21b6; }
.badge-warn  { background: rgba(245, 158, 11, 0.12); color: #92400e; }
.badge-info  { background: rgba(59, 130, 246, 0.12); color: #1e40af; }

.order-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}
@media (min-width: 1024px) {
    .order-grid { grid-template-columns: 2fr 1fr; gap: 24px; align-items: start; }
}
.totals-stack {
    text-align: end;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--c-border);
}
.totals-stack p { display: flex; justify-content: space-between; padding: 4px 0; }
.totals-stack p.grand {
    font-size: 1.15em;
    padding-top: 10px;
    margin-top: 6px;
    border-top: 1px solid var(--c-border);
    color: var(--c-primary);
    font-weight: 800;
}

/* ═══ Settings ═══ */
.settings-form { max-width: 900px; }

/* ═══ Footer ═══ */
.site-footer {
    background: var(--c-surface);
    border-top: 1px solid var(--c-border);
    padding: 36px 0 24px;
    margin-top: 60px;
    text-align: center;
    color: var(--c-muted);
}

code {
    background: var(--c-surface-soft);
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.9em;
    color: var(--c-primary);
    font-family: 'SFMono-Regular', Consolas, monospace;
}
