:root {
    --color-primary: #2563eb;
    --color-secondary: #7c3aed;
    --color-dark: #0b1a33;
    --color-danger: #ef4444;
    --color-warning: #f59e0b;
    --color-success: #22c55e;
    --font-family: 'Inter', sans-serif;
    --radius-lg: 20px;
}

* { margin:0; padding:0; box-sizing:border-box; }
body { font-family:var(--font-family); background:#f8fafc; color:var(--color-dark); direction:rtl; overflow-x:hidden; }
.hidden { display:none !important; }

.bg-dynamic {
    position:fixed; inset:0;
    background: radial-gradient(circle at 0% 0%, rgba(37,99,235,0.03) 0%, transparent 50%),
                radial-gradient(circle at 100% 100%, rgba(124,58,237,0.03) 0%, transparent 50%);
    pointer-events:none; z-index:0;
}

.top-bar { background:var(--color-dark); color:rgba(255,255,255,0.6); font-size:13px; padding:8px 0; position:relative; z-index:100; }
.top-bar .container { max-width:1440px; margin:0 auto; padding:0 32px; display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:8px; }
.top-bar .right a { color:rgba(255,255,255,0.6); text-decoration:none; font-size:13px; }

.main-header-store { background:rgba(255,255,255,0.95); backdrop-filter:blur(20px); border-bottom:1px solid rgba(0,0,0,0.04); position:sticky; top:0; z-index:99; }
.main-header-store .container { max-width:1440px; margin:0 auto; padding:12px 32px; display:flex; align-items:center; justify-content:space-between; gap:20px; flex-wrap:wrap; }

.logo-store { display:flex; align-items:center; gap:12px; text-decoration:none; }
.logo-store .icon { width:42px; height:42px; background:linear-gradient(135deg,var(--color-primary),var(--color-secondary)); border-radius:12px; display:flex; align-items:center; justify-content:center; color:white; font-size:20px; }
.logo-store .text { font-size:20px; font-weight:800; color:var(--color-dark); }

.search-wrap { flex:1; max-width:480px; min-width:160px; position:relative; }
.search-wrap input { width:100%; padding:12px 20px 12px 40px; border-radius:60px; border:2px solid #e8edf5; background:#f8fafc; font-size:14px; font-family:var(--font-family); }
.search-wrap input:focus { outline:none; border-color:var(--color-primary); background:white; }
.search-wrap .search-icon { position:absolute; right:18px; top:50%; transform:translateY(-50%); color:#6b7a93; }

.header-actions-store { display:flex; align-items:center; gap:6px; }
.header-btn { padding:10px 18px; border-radius:60px; border:none; font-weight:500; font-size:14px; cursor:pointer; display:flex; align-items:center; gap:8px; font-family:var(--font-family); position:relative; }
.header-btn .badge { background:var(--color-danger); color:white; font-size:10px; font-weight:700; min-width:18px; height:18px; border-radius:50%; display:inline-flex; align-items:center; justify-content:center; padding:0 4px; }
.header-btn.primary { background:linear-gradient(135deg,var(--color-primary),var(--color-secondary)); color:white; padding:10px 24px; }

.nav-categories { background:white; border-bottom:1px solid #e8edf5; position:sticky; top:70px; z-index:98; }
.nav-categories .container { max-width:1440px; margin:0 auto; padding:0 32px; display:flex; align-items:center; gap:4px; overflow-x:auto; }
.nav-cat-item { padding:14px 20px; font-size:14px; font-weight:500; color:#4b5b73; cursor:pointer; white-space:nowrap; border-bottom:3px solid transparent; }
.nav-cat-item:hover { color:var(--color-dark); }
.nav-cat-item.active { color:var(--color-primary); border-bottom-color:var(--color-primary); font-weight:600; }

.closed-banner { background:var(--color-danger); color:white; text-align:center; padding:10px; font-weight:600; }

.hero-section { max-width:1440px; margin:24px auto 32px; padding:0 32px; }
.hero-main { background:linear-gradient(135deg,var(--color-dark),#1a365d); border-radius:28px; padding:48px 52px; position:relative; overflow:hidden; min-height:220px; display:flex; flex-direction:column; justify-content:center; }
.hero-main .tag { display:inline-block; background:rgba(255,255,255,0.06); padding:4px 16px; border-radius:60px; font-size:12px; color:rgba(255,255,255,0.7); width:fit-content; margin-bottom:12px; }
.hero-main h1 { font-size:32px; font-weight:800; color:white; line-height:1.1; margin-bottom:8px; }
.hero-main p { color:rgba(255,255,255,0.6); font-size:15px; max-width:480px; }

.store-content { max-width:1440px; margin:0 auto; padding:0 32px; }
.section-header-store { margin-bottom:20px; }
.section-header-store h2 { font-size:22px; font-weight:700; display:flex; align-items:center; gap:10px; }

.products-grid-store { display:grid; grid-template-columns:repeat(5,1fr); gap:20px; margin-bottom:40px; }
.loading-text { color:#6b7a93; text-align:center; padding:40px; grid-column:1/-1; }

.product-card-store { background:white; border:1px solid #e8edf5; border-radius:var(--radius-lg); padding:16px; cursor:pointer; transition:0.25s; }
.product-card-store:hover { transform:translateY(-4px); box-shadow:0 16px 40px rgba(0,0,0,0.05); }
.product-card-store .image-box { width:100%; height:140px; background:#f8fafc; border-radius:14px; display:flex; align-items:center; justify-content:center; font-size:38px; color:var(--color-primary); margin-bottom:12px; overflow:hidden; }
.product-card-store .image-box img { width:100%; height:100%; object-fit:cover; }
.product-card-store .name { font-size:14px; font-weight:600; margin-bottom:4px; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.product-card-store .price { font-size:16px; font-weight:700; color:var(--color-primary); margin-bottom:8px; }
.product-card-store .btn-add { width:100%; padding:10px; border:1px solid #e8edf5; background:#f8fafc; border-radius:60px; font-weight:600; font-size:13px; cursor:pointer; font-family:var(--font-family); }
.product-card-store .btn-add:hover { background:linear-gradient(135deg,var(--color-primary),var(--color-secondary)); border-color:transparent; color:white; }

.footer-store { background:var(--color-dark); color:rgba(255,255,255,0.6); padding:32px; margin-top:40px; text-align:center; }

/* ============ Modals ============ */
.modal { position:fixed; inset:0; background:rgba(0,0,0,0.55); display:flex; align-items:center; justify-content:center; z-index:200; padding:16px; }
.modal-content { background:white; border-radius:24px; padding:28px; width:100%; max-width:440px; max-height:88vh; overflow-y:auto; position:relative; }
.modal-close { position:absolute; top:16px; left:16px; background:#f1f4f9; border:none; width:32px; height:32px; border-radius:50%; cursor:pointer; font-size:14px; }

.product-modal-content h2 { font-size:20px; margin-bottom:6px; }
.product-modal-content .p-desc { color:#6b7a93; font-size:14px; margin-bottom:12px; }
.product-modal-content .p-price { font-size:22px; font-weight:800; color:var(--color-primary); margin-bottom:16px; }
.option-group { margin-bottom:16px; }
.option-group h4 { font-size:14px; margin-bottom:8px; }
.option-values { display:flex; flex-wrap:wrap; gap:8px; }
.option-value-btn { padding:8px 16px; border-radius:60px; border:2px solid #e8edf5; background:white; cursor:pointer; font-size:13px; font-family:var(--font-family); }
.option-value-btn.selected { border-color:var(--color-primary); background:#eef2ff; color:var(--color-primary); font-weight:600; }
.addon-row { display:flex; justify-content:space-between; align-items:center; padding:8px 0; border-bottom:1px solid #f1f4f9; }
.addon-row label { display:flex; align-items:center; gap:8px; font-size:14px; }
.qty-selector { display:flex; align-items:center; gap:14px; justify-content:center; margin:16px 0; }
.qty-selector button { width:36px; height:36px; border-radius:50%; border:2px solid #e8edf5; background:white; font-size:18px; cursor:pointer; }
.qty-selector span { font-size:18px; font-weight:700; min-width:24px; text-align:center; }
.btn-checkout { width:100%; padding:15px; border:none; border-radius:60px; background:linear-gradient(135deg,var(--color-primary),var(--color-secondary)); color:white; font-weight:700; font-size:15px; cursor:pointer; margin-top:10px; font-family:var(--font-family); }
.btn-checkout:disabled { opacity:0.5; cursor:not-allowed; }

.cart-modal-content h3, .checkout-modal-content h3 { margin-bottom:16px; }
.cart-item-row { display:flex; justify-content:space-between; align-items:center; padding:12px 0; border-bottom:1px solid #f1f4f9; }
.cart-item-row .ci-name { font-weight:600; font-size:14px; }
.cart-item-row .ci-sub { font-size:12px; color:#6b7a93; }
.cart-total-row { display:flex; justify-content:space-between; padding:14px 0; border-top:2px solid var(--color-dark); font-weight:700; font-size:16px; margin-top:6px; }
.empty-cart-msg { text-align:center; color:#9ca3af; padding:30px 0; }

.checkout-type-tabs { display:flex; gap:8px; margin-bottom:16px; }
.checkout-type-tabs .tab-btn { flex:1; padding:10px; border-radius:12px; border:2px solid #e8edf5; background:white; cursor:pointer; font-size:13px; font-family:var(--font-family); }
.checkout-type-tabs .tab-btn.active { border-color:var(--color-primary); background:#eef2ff; color:var(--color-primary); font-weight:700; }

.checkout-modal-content input, .checkout-modal-content textarea, .checkout-modal-content select {
    width:100%; padding:12px 16px; border-radius:12px; border:2px solid #e8edf5; margin-bottom:10px; font-size:14px; font-family:var(--font-family);
}
.checkout-modal-content textarea { resize:vertical; min-height:60px; }
.checkout-summary { background:#f8fafc; border-radius:14px; padding:14px; font-size:14px; margin:12px 0; }
.checkout-summary .row { display:flex; justify-content:space-between; padding:4px 0; }
.checkout-summary .row.total { font-weight:700; border-top:1px solid #e8edf5; margin-top:6px; padding-top:8px; }
.checkout-error { color:var(--color-danger); font-size:13px; text-align:center; margin-top:8px; min-height:18px; }

.success-modal-content { text-align:center; }
.success-icon { font-size:48px; margin-bottom:10px; }
.btn-secondary-modal { width:100%; padding:12px; border:none; border-radius:60px; background:#f1f4f9; color:var(--color-dark); font-weight:600; cursor:pointer; margin-top:8px; }

@media (max-width:1200px) { .products-grid-store { grid-template-columns:repeat(3,1fr); } }
@media (max-width:768px) {
    .search-wrap { order:3; flex-basis:100%; }
    .products-grid-store { grid-template-columns:repeat(2,1fr); gap:12px; }
    .hero-section, .store-content { padding:0 16px; }
    .hero-main { padding:28px 24px; }
}
