/* Sell — panel va do'kon uslublari */

:root {
    --brand: #4f46e5;
    --brand-600: #4338ca;
    --brand-50: #eef2ff;
    --bg: #f5f6fa;
    --surface: #ffffff;
    --border: #e5e7ef;
    --text: #111827;
    --muted: #6b7280;
    --success: #12b76a;
    --success-bg: #ecfdf3;
    --warning: #f79009;
    --danger: #f04438;
    --danger-bg: #fef3f2;
    --radius: 14px;
    --radius-sm: 10px;
    --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 10px 28px -14px rgba(16, 24, 40, .18);
    --sidebar-w: 252px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
p { margin: 0; }
.icon { flex: none; }

/* ---------- Tugmalar ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 18px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-600); }
.btn-ghost { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn-ghost:hover { background: var(--bg); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-block { width: 100%; }

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text);
    cursor: pointer;
}
.icon-btn:hover { background: var(--bg); }

/* ---------- Formalar ---------- */
.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.label { font-size: 14px; font-weight: 500; color: var(--text); }
.label-hint { color: var(--muted); font-weight: 400; }

.input, select {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    font: inherit;
    color: var(--text);
    transition: border-color .15s, box-shadow .15s;
}
.input:focus, select:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, .12);
}
.input::placeholder { color: #9aa1ae; }
.input.is-invalid { border-color: var(--danger); }

.input-group { display: flex; align-items: stretch; }
.input-prefix {
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-right: none;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    background: var(--bg);
    color: var(--muted);
    font-size: 14px;
}
.input-group .input { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

.field-error { color: var(--danger); font-size: 13px; }

.choice-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; }
.choice-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    transition: border-color .15s, background .15s;
}
.choice-body small { color: var(--muted); }
.choice input:checked + .choice-body {
    border-color: var(--brand);
    background: var(--brand-50);
}

/* ---------- Xabarlar ---------- */
.flash-stack { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.alert {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    font-size: 14px;
}
.alert-success { background: var(--success-bg); color: #05603a; }
.alert-error { background: var(--danger-bg); color: #912018; }
.alert-close { border: none; background: none; font-size: 20px; line-height: 1; cursor: pointer; color: inherit; opacity: .6; }
.alert-close:hover { opacity: 1; }

/* ---------- Kirish sahifasi ---------- */
.auth-page { min-height: 100vh; }
.auth-grid { display: grid; grid-template-columns: 1.05fr 1fr; min-height: 100vh; }

.auth-promo {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 32px;
    padding: 40px;
    background: linear-gradient(160deg, #4f46e5 0%, #3730a3 60%, #1e1b4b 100%);
    color: #fff;
}
.auth-promo-body { max-width: 420px; }
.auth-promo h2 { font-size: 30px; line-height: 1.2; margin-bottom: 14px; }
.auth-promo p { color: rgba(255, 255, 255, .78); }
.auth-points { margin: 24px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.auth-points li { position: relative; padding-left: 26px; color: rgba(255, 255, 255, .9); }
.auth-points li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 7px;
    width: 14px;
    height: 8px;
    border-left: 2px solid #a5b4fc;
    border-bottom: 2px solid #a5b4fc;
    transform: rotate(-45deg);
}
.auth-promo-foot { color: rgba(255, 255, 255, .6); font-size: 14px; }

.auth-form-side { display: flex; align-items: center; justify-content: center; padding: 32px 20px; }
.auth-card { width: 100%; max-width: 420px; }
.auth-title { font-size: 26px; margin-bottom: 6px; }
.auth-subtitle { color: var(--muted); margin-bottom: 24px; }
.auth-foot { margin-top: 20px; text-align: center; color: var(--muted); font-size: 14px; }

/* ---------- Brend ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; }
.brand:hover { text-decoration: none; }
.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--brand);
    color: #fff;
    font-weight: 700;
}
.brand-name { font-size: 18px; letter-spacing: -.02em; }
.brand-light { color: #fff; }
.brand-light .brand-mark { background: rgba(255, 255, 255, .18); }

/* ---------- Panel karkasi ---------- */
.app { min-height: 100vh; }

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-w);
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 18px 14px;
    background: var(--surface);
    border-right: 1px solid var(--border);
    overflow-y: auto;
    z-index: 40;
}
.sidebar .brand { padding: 4px 8px 14px; }

.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: var(--radius-sm);
    color: #414a5c;
    font-size: 14.5px;
    font-weight: 500;
}
.nav-link:hover { background: var(--bg); text-decoration: none; }
.nav-link.is-current { background: var(--brand-50); color: var(--brand-600); }
.nav-badge {
    margin-left: auto;
    padding: 2px 6px;
    border-radius: 6px;
    background: var(--bg);
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
}
.nav-children { display: none; flex-direction: column; margin: 2px 0 6px 34px; gap: 2px; }
.nav-group.is-active .nav-children { display: flex; }
.nav-child { padding: 7px 10px; border-radius: 8px; color: var(--muted); font-size: 14px; }
.nav-child:hover { background: var(--bg); text-decoration: none; }
.nav-child.is-current { color: var(--brand-600); font-weight: 500; }

.sidebar-footer { padding-top: 10px; }
.plan-card {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    background: linear-gradient(140deg, #4f46e5, #3730a3);
    color: #fff;
}
.plan-card span { font-size: 12.5px; color: rgba(255, 255, 255, .8); }

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, .45);
    z-index: 35;
}
.sidebar-overlay.is-visible { display: block; }

.main { margin-left: var(--sidebar-w); display: flex; flex-direction: column; min-height: 100vh; }

.topbar {
    position: sticky;
    top: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    height: 64px;
    padding: 0 24px;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
    z-index: 30;
}
.topbar-title { font-size: 18px; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.shop-switch select { padding: 8px 12px; font-size: 14px; }
.shop-name { color: var(--muted); font-size: 14px; }

.user-menu { position: relative; }
.user-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px 6px 6px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    font: inherit;
    cursor: pointer;
}
.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--brand-50);
    color: var(--brand-600);
    font-weight: 600;
}
.menu-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 210px;
    padding: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.menu-head { padding: 8px 10px 10px; display: flex; flex-direction: column; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.menu-head span { color: var(--muted); font-size: 13px; }
.menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 9px 10px;
    border: none;
    border-radius: 8px;
    background: none;
    font: inherit;
    color: var(--text);
    text-align: left;
    cursor: pointer;
}
.menu-item:hover { background: var(--bg); text-decoration: none; }
.menu-item.is-danger { color: var(--danger); }

.content { padding: 24px; display: flex; flex-direction: column; gap: 20px; }

/* ---------- Kartalar ---------- */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-title { font-size: 16px; }
.card-link { font-size: 14px; }
.card-foot { margin-top: 16px; }
.card-center { display: flex; justify-content: center; }
.pill { padding: 3px 10px; border-radius: 999px; background: var(--bg); color: var(--muted); font-size: 13px; font-weight: 500; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.stat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--brand-50);
    color: var(--brand-600);
}
.stat-label { display: block; color: var(--muted); font-size: 13px; }
.stat-value { font-size: 20px; }

.mini-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.mini-stat { display: flex; flex-direction: column; gap: 2px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.mini-stat span { color: var(--muted); font-size: 13px; }
.mini-stat strong { font-size: 17px; }

/* ---------- Checklist ---------- */
.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.checklist-item { display: flex; align-items: center; gap: 10px; }
.checklist-item a { color: var(--text); }
.check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border: 1.5px solid var(--border);
    border-radius: 50%;
    color: #fff;
}
.checklist-item.is-done .check { background: var(--success); border-color: var(--success); }
.checklist-item.is-done a { color: var(--muted); text-decoration: line-through; }

/* ---------- Jadval ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { padding: 11px 8px; text-align: left; border-bottom: 1px solid var(--border); }
.table th { color: var(--muted); font-weight: 500; font-size: 13px; }
.table tr:last-child td { border-bottom: none; }

.badge { display: inline-flex; padding: 3px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 500; background: var(--bg); color: var(--muted); }
.badge-new { background: var(--brand-50); color: var(--brand-600); }
.badge-accepted, .badge-ready, .badge-delivering { background: #fff7e6; color: #b54708; }
.badge-completed { background: var(--success-bg); color: #05603a; }
.badge-canceled { background: var(--danger-bg); color: #912018; }

/* ---------- Bo'sh holat ---------- */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 32px 16px;
    text-align: center;
    color: var(--muted);
}
.empty-state .icon { color: #c3c8d4; }
.empty-state p { color: var(--text); font-weight: 500; }
.empty-state span { font-size: 14px; }
.empty-lg { padding: 48px 20px; gap: 12px; }
.empty-lg h2 { font-size: 20px; color: var(--text); }
.empty-lg code { padding: 2px 6px; border-radius: 6px; background: var(--bg); font-size: 13px; }
.empty-lg .btn { margin-top: 12px; }

/* ---------- Xatolik sahifalari ---------- */
.error-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 24px; }
.error-box { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.error-code { font-size: 60px; font-weight: 700; color: var(--brand); letter-spacing: -.04em; }
.error-box p { color: var(--muted); max-width: 420px; }
.error-box .btn { margin-top: 12px; }

/* ---------- Do'kon (mijoz ko'rinishi) ---------- */
.shop-page { background: #fff; }
.shop-header { border-bottom: 1px solid var(--border); background: #fff; position: sticky; top: 0; z-index: 10; }
.shop-header-inner { display: flex; align-items: center; gap: 12px; max-width: 720px; margin: 0 auto; padding: 14px 16px; }
.shop-logo { width: 46px; height: 46px; border-radius: 12px; object-fit: cover; }
.shop-logo-text { display: inline-flex; align-items: center; justify-content: center; background: var(--brand-50); color: var(--brand-600); font-weight: 700; font-size: 20px; }
.shop-title { font-size: 18px; }
.shop-phone { font-size: 14px; color: var(--muted); }
.shop-main { max-width: 720px; margin: 0 auto; padding: 16px 16px 40px; }

.shop-categories { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 16px; }
.shop-category { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 76px; color: var(--text); font-size: 13px; }
.shop-category img { width: 62px; height: 62px; border-radius: 16px; object-fit: cover; }

.shop-products { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.product-card { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: #fff; }
.product-image { aspect-ratio: 3 / 4; background: var(--bg); }
.product-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-body { padding: 10px 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.product-old-price { color: var(--muted); text-decoration: line-through; font-size: 13px; }
.product-price { font-size: 16px; }
.product-name { font-size: 14px; color: #374151; }
.shop-empty { text-align: center; padding: 60px 16px; color: var(--muted); }
.shop-empty h2 { color: var(--text); margin-bottom: 6px; }
.shop-powered { margin-top: 28px; text-align: center; color: var(--muted); font-size: 13px; }

/* ---------- Moslashuvchanlik ---------- */
.only-mobile { display: none; }

@media (max-width: 960px) {
    .auth-grid { grid-template-columns: 1fr; }
    .auth-promo { display: none; }
    .grid-2 { grid-template-columns: 1fr; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .mini-grid { grid-template-columns: repeat(2, 1fr); }

    .sidebar { transform: translateX(-100%); transition: transform .2s ease; }
    .sidebar.is-open { transform: translateX(0); }
    .main { margin-left: 0; }
    .only-mobile { display: inline-flex; }
    .only-desktop { display: none; }
    .content { padding: 16px; }
    .topbar { padding: 0 16px; }
}

@media (max-width: 560px) {
    .field-row, .choice-row { grid-template-columns: 1fr; }
    .stat-grid { grid-template-columns: 1fr; }
    .topbar-title { font-size: 16px; }
}

/* ==========================================================================
   M2: katalog, formalar va do'kon
   ========================================================================== */

/* ---------- Sahifa sarlavhasi va filtrlar ---------- */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-hint { color: var(--muted); font-size: 14px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filters .input, .filters select { width: auto; min-width: 180px; }

/* ---------- Jadval qo'shimchalari ---------- */
.table-hover tbody tr:hover { background: var(--bg); }
.table td a { color: var(--text); font-weight: 500; }
.muted-sm { display: block; color: var(--muted); font-size: 13px; }
.strike { text-decoration: line-through; }
.table-foot { margin-top: 14px; color: var(--muted); font-size: 13px; }

.thumb {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--bg);
    color: #b9bfcc;
    overflow: hidden;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }

.row-actions { display: flex; gap: 4px; justify-content: flex-end; }
.row-actions form { display: inline-flex; }
.icon-btn.is-danger { color: var(--danger); font-size: 22px; line-height: 1; }
.icon-btn.is-danger:hover { background: var(--danger-bg); }

.badge-toggle { border: none; cursor: pointer; font: inherit; font-size: 12.5px; font-weight: 500; }

.pagination { display: flex; gap: 6px; margin-top: 16px; flex-wrap: wrap; }
.page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 14px;
}
.page:hover { background: var(--bg); text-decoration: none; }
.page.is-current { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ---------- Formalar ---------- */
.form-card { display: flex; flex-direction: column; gap: 16px; }
.form-card .card-title { margin-bottom: 0; }
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.form-main, .form-side { display: flex; flex-direction: column; gap: 20px; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; }
textarea.input { resize: vertical; font: inherit; }
input[type="file"].input { padding: 9px 12px; background: var(--bg); }

.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14.5px; }
.switch input { width: 18px; height: 18px; accent-color: var(--brand); }

.image-preview {
    width: 110px;
    height: 110px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg);
}
.image-preview img { width: 100%; height: 100%; object-fit: cover; }

.gallery { display: flex; gap: 10px; flex-wrap: wrap; }
.gallery-item { position: relative; width: 88px; height: 88px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }
.gallery-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 50%;
    background: rgba(17, 24, 39, .7);
    color: #fff;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
}

.link-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.shop-url { display: block; font-size: 15px; margin: 4px 0 2px; word-break: break-all; }

/* ---------- Do'kon: umumiy ---------- */
.shop-page { padding-bottom: 80px; }
.shop-brand { display: flex; align-items: center; gap: 12px; color: var(--text); }
.shop-brand:hover { text-decoration: none; }
.shop-brand > span { display: flex; flex-direction: column; }
.shop-about { color: var(--muted); font-size: 14px; margin-bottom: 14px; }
.shop-heading { font-size: 20px; margin: 4px 0 14px; }
.back-link { display: inline-block; margin-bottom: 10px; color: var(--muted); font-size: 14px; }

.shop-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border);
    padding-bottom: env(safe-area-inset-bottom);
    z-index: 20;
}
.shop-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 10px 0;
    color: var(--muted);
    font-size: 12px;
}
.shop-nav-item:hover { text-decoration: none; color: var(--brand); }
.shop-nav-icon { position: relative; display: inline-flex; }
.cart-badge[hidden] { display: none; }
.cart-badge {
    position: absolute;
    top: -4px;
    right: -8px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--brand);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.shop-category-img {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 62px;
    height: 62px;
    border-radius: 16px;
    background: var(--brand-50);
    overflow: hidden;
}
.shop-category-img img { width: 100%; height: 100%; object-fit: cover; }

.product-card .product-image { position: relative; display: block; }
.product-flag {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(17, 24, 39, .75);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
}
.product-flag-sale { background: var(--danger); }
.product-body .btn { margin-top: 8px; padding: 9px 12px; font-size: 14px; }
.product-name { display: block; color: #374151; }

/* ---------- Mahsulot sahifasi ---------- */
.product-page { padding-bottom: 90px; }
.product-gallery { display: flex; gap: 10px; overflow-x: auto; margin-bottom: 16px; scroll-snap-type: x mandatory; }
.product-gallery img {
    width: 100%;
    max-width: 320px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: var(--radius);
    flex: none;
    scroll-snap-align: center;
}
.product-title { font-size: 20px; margin-bottom: 8px; }
.product-price-row { display: flex; align-items: baseline; gap: 10px; }
.product-price-lg { font-size: 24px; }
.product-stock { margin-top: 6px; color: var(--success); font-size: 14px; }
.product-description { margin-top: 18px; }
.product-description h2 { font-size: 16px; margin-bottom: 6px; }
.product-description p { color: #374151; }

.product-buy-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 56px;
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 10px 16px;
    background: rgba(255, 255, 255, .97);
    border-top: 1px solid var(--border);
    z-index: 15;
}
.product-buy-bar .btn { margin: 0; }

.qty { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.qty button {
    width: 36px;
    height: 38px;
    border: none;
    background: none;
    font-size: 18px;
    color: var(--text);
    cursor: pointer;
}
.qty span { min-width: 26px; text-align: center; font-weight: 500; }

/* ---------- Savat va buyurtma ---------- */
.cart-list { display: flex; flex-direction: column; gap: 10px; }
.cart-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
}
.cart-item-image { width: 56px; height: 56px; border-radius: 10px; background: var(--bg); overflow: hidden; flex: none; }
.cart-item-image img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-body { flex: 1; min-width: 0; }
.cart-item-name { font-size: 14px; color: #374151; margin-bottom: 2px; }

.cart-summary {
    margin-top: 18px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.cart-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14.5px; }
.cart-row-total { padding-top: 10px; border-top: 1px solid var(--border); font-size: 16px; }
.checkout-form { max-width: 520px; }

.thanks { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; padding-top: 20px; }
.thanks-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--success-bg);
    color: var(--success);
    font-size: 26px;
}
.thanks h1 { font-size: 20px; }
.thanks-card { width: 100%; text-align: left; display: flex; flex-direction: column; gap: 8px; }

@media (max-width: 960px) {
    .form-grid { grid-template-columns: 1fr; }
    .page-head { align-items: stretch; flex-direction: column; }
    .filters .input, .filters select { flex: 1; min-width: 0; }
}

/* ---------- M3: Telegram bot sahifasi ---------- */
.steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; color: #374151; font-size: 14.5px; }
.steps code, .muted-sm code { padding: 2px 6px; border-radius: 6px; background: var(--bg); font-size: 13px; }

.feature-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.feature-list li { display: flex; align-items: flex-start; gap: 10px; font-size: 14.5px; color: #374151; }
.feature-list .icon { color: var(--success); margin-top: 3px; }

.card-title .badge { margin-left: 8px; vertical-align: middle; }

/* ---------- M4: buyurtmalar ---------- */
.tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--muted);
    font-size: 14px;
    white-space: nowrap;
}
.tab:hover { text-decoration: none; background: var(--bg); }
.tab.is-current { background: var(--brand); border-color: var(--brand); color: #fff; }
.tab-count { padding: 0 6px; border-radius: 999px; background: rgba(0, 0, 0, .08); font-size: 12px; font-weight: 600; }
.tab.is-current .tab-count { background: rgba(255, 255, 255, .25); }

.nav-count {
    margin-left: auto;
    min-width: 20px;
    padding: 1px 6px;
    border-radius: 999px;
    background: var(--danger);
    color: #fff;
    font-size: 11.5px;
    font-weight: 600;
    text-align: center;
}

.btn-sm { padding: 7px 12px; font-size: 13.5px; }
.input-sm { padding: 7px 10px; font-size: 13.5px; width: auto; }
.text-right { text-align: right; }
.stack { display: flex; flex-direction: column; gap: 20px; }
.order-title { font-size: 20px; display: flex; align-items: center; gap: 10px; margin: 6px 0 2px; }
.cancel-form { display: flex; gap: 6px; align-items: center; }
.pay-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.totals { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }

.info-list { display: flex; flex-direction: column; gap: 10px; }
.info-list > div { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.info-list span { color: var(--muted); font-size: 13.5px; }
.info-list strong { font-weight: 500; text-align: right; }

.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.timeline li { display: flex; gap: 12px; position: relative; }
.timeline li:not(:last-child)::before {
    content: "";
    position: absolute;
    left: 5px;
    top: 16px;
    bottom: -16px;
    width: 2px;
    background: var(--border);
}
.timeline-dot { width: 12px; height: 12px; margin-top: 4px; border-radius: 50%; background: var(--brand); flex: none; }
.timeline div { display: flex; flex-direction: column; }

.status-rows { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
}
.status-row:hover { background: var(--bg); text-decoration: none; }

.badge-accepted { background: #eff4ff; color: #3538cd; }
.badge-ready { background: #fff7e6; color: #b54708; }
.badge-delivering { background: #f0f9ff; color: #026aa2; }
