/* ==========================================================================
   Dadlsan.ir — application stylesheet (2026)
   Extends assets/css/site.css + assets/css/product.css with the new
   components: dark mode, navigation extras, shop flow, account, admin bits.
   ========================================================================== */

/* ------------------------------------------------------------ material icons */
.material-symbols-rounded {
    font-family: 'Material Symbols Rounded', sans-serif !important;
    font-weight: normal;
    font-style: normal;
    font-size: 1.35em;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    vertical-align: -0.22em;
}

.material-symbols-rounded.fill {
    font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24;
}

.material-symbols-rounded.sm {
    font-size: 1.05em;
}

.material-symbols-rounded.lg {
    font-size: 1.9em;
}

.material-symbols-rounded.xl {
    font-size: 2.6em;
}

/* legacy emoji slots now hold icons */
.benefit-card .emoji .material-symbols-rounded,
.why-card .icon .material-symbols-rounded,
.trust-badge-item .icon .material-symbols-rounded,
.feature-card .icon .material-symbols-rounded,
.accessory-card .icon .material-symbols-rounded,
.footer-contact-item .icon .material-symbols-rounded {
    font-size: 1.15em;
}

.benefit-card .emoji,
.why-card .icon,
.trust-badge-item .icon,
.feature-card .icon,
.accessory-card .icon {
    line-height: 1;
}

/* ------------------------------------------------------------------ helpers */
.hidden,
.is-hidden {
    display: none !important;
}

.text-muted {
    color: var(--color-text-secondary);
}

.text-center {
    text-align: center;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.mt-0 {
    margin-top: 0;
}

.mt-1 {
    margin-top: 8px;
}

.mt-2 {
    margin-top: 16px;
}

.mt-3 {
    margin-top: 24px;
}

.mt-4 {
    margin-top: 32px;
}

.mb-2 {
    margin-bottom: 16px;
}

.mb-3 {
    margin-bottom: 24px;
}

.gap-1 {
    gap: 8px;
}

.flex {
    display: flex;
}

.flex-wrap {
    flex-wrap: wrap;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.ltr {
    direction: ltr;
    unicode-bidi: embed;
}

.ellipsis {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* --------------------------------------------------------------- dark theme */
:root {
    --app-radius-sm: 12px;
    --app-radius: 16px;
    --app-radius-lg: 22px;
    --app-shadow: 0 10px 34px rgba(15, 23, 42, .08);
    --app-shadow-lg: 0 24px 60px rgba(15, 23, 42, .14);
    --app-success: #10b981;
    --app-warn: #f59e0b;
    --app-danger: #ef4444;
    --app-info: #0ea5e9;
    --app-primary: #223f99;
}

[data-theme='dark'] {
    --color-bg: #0b1120;
    --color-bg-alt: #111a2e;
    --color-glass: rgba(17, 26, 46, .78);
    --color-text-primary: #e9eefb;
    --color-text-secondary: #9aa8c7;
    --color-border: #22304d;
    --color-primary-900: #e8edff;
    --shadow-soft: 0 4px 24px rgba(0, 0, 0, .35);
    --shadow-glass: 0 8px 32px rgba(0, 0, 0, .45);
    color-scheme: dark;
}

[data-theme='dark'] body {
    background: var(--color-bg);
    color: var(--color-text-primary);
}

[data-theme='dark'] .navbar,
[data-theme='dark'] .mobile-drawer,
[data-theme='dark'] .modal-content,
[data-theme='dark'] .cart-summary,
[data-theme='dark'] .account-card,
[data-theme='dark'] .checkout-card {
    background: #101a2f;
    border-color: var(--color-border);
}

[data-theme='dark'] .product-card,
[data-theme='dark'] .benefit-card,
[data-theme='dark'] .why-card,
[data-theme='dark'] .feature-card,
[data-theme='dark'] .specs-grid .spec-item,
[data-theme='dark'] .accessory-card,
[data-theme='dark'] .review-card,
[data-theme='dark'] .related-card,
[data-theme='dark'] .snippet-card,
[data-theme='dark'] .gallery-item,
[data-theme='dark'] .faq-item,
[data-theme='dark'] .comparison-table {
    background: #111a2e;
    border-color: var(--color-border);
    color: var(--color-text-primary);
}

[data-theme='dark'] .comparison-table th {
    background: #16233d;
    color: #eaf0ff;
}

[data-theme='dark'] .cta-final-inner,
[data-theme='dark'] .cta-box,
[data-theme='dark'] .bulk-card {
    background: linear-gradient(135deg, #16233d, #0e1729);
}

[data-theme='dark'] .footer {
    background: #070d1a;
}

[data-theme='dark'] .form-group input,
[data-theme='dark'] .form-group textarea,
[data-theme='dark'] .form-group select,
[data-theme='dark'] .input,
[data-theme='dark'] .select,
[data-theme='dark'] .textarea {
    background: #0d1626;
    border-color: var(--color-border);
    color: var(--color-text-primary);
}

[data-theme='dark'] .section-title,
[data-theme='dark'] h1,
[data-theme='dark'] h2,
[data-theme='dark'] h3,
[data-theme='dark'] h4 {
    color: var(--color-text-primary);
}

[data-theme='dark'] .hero-dadlsan::before,
[data-theme='dark'] .product-hero::before {
    opacity: .35;
}

[data-theme='dark'] img {
    color-scheme: dark;
}

[data-theme='dark'] .btn-outline {
    border-color: var(--color-border);
    color: var(--color-text-primary);
}

[data-theme='dark'] .btn-outline:hover {
    background: #16233d;
}

[data-theme='dark'] .toast {
    background: rgba(8, 14, 26, .95);
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--color-border);
    background: var(--color-bg);
    color: var(--color-text-primary);
    cursor: pointer;
    transition: var(--transition);
}

.theme-toggle:hover {
    border-color: var(--app-primary);
    color: var(--app-primary);
}

/* ------------------------------------------------------------- navbar extras */
.navbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-inline-start: auto;
}

.nav-icon-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--color-border);
    background: var(--color-bg);
    color: var(--color-text-primary);
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
}

.nav-icon-btn:hover {
    border-color: var(--app-primary);
    color: var(--app-primary);
    transform: translateY(-1px);
}

.nav-cart-count {
    position: absolute;
    top: -4px;
    inset-inline-end: -4px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 10px;
    background: var(--app-danger);
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-search-form {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: 999px;
    padding: 4px 6px 4px 14px;
    min-width: 230px;
}

.nav-search-form input {
    border: none;
    background: transparent;
    outline: none;
    font-family: inherit;
    font-size: .92rem;
    color: var(--color-text-primary);
    width: 100%;
}

.nav-search-form button {
    border: none;
    background: var(--app-primary);
    color: #fff;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nav-user-name {
    font-size: .85rem;
    font-weight: 600;
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* mobile drawer */
.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(4, 10, 24, .55);
    backdrop-filter: blur(3px);
    z-index: 1400;
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, visibility .25s ease;
}

.drawer-overlay.open {
    opacity: 1;
    visibility: visible;
}

.mobile-drawer {
    position: fixed;
    top: 0;
    inset-inline-end: 0;
    width: min(86vw, 340px);
    height: 100%;
    background: var(--color-bg);
    z-index: 1500;
    transform: translateX(110%);
    transition: transform .3s cubic-bezier(.4, 0, .2, 1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    box-shadow: -12px 0 40px rgba(0, 0, 0, .18);
}

[dir='rtl'] .mobile-drawer {
    transform: translateX(-110%);
}

.mobile-drawer.open {
    transform: translateX(0) !important;
}

.drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid var(--color-border);
    font-weight: 800;
}

.drawer-close {
    border: none;
    background: var(--color-bg-alt);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    color: var(--color-text-primary);
}

.drawer-body {
    padding: 16px 20px 40px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.drawer-body a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: var(--app-radius-sm);
    color: var(--color-text-primary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.drawer-body a:hover,
.drawer-body a.active {
    background: var(--color-bg-alt);
    color: var(--app-primary);
}

.drawer-section-title {
    font-size: .8rem;
    color: var(--color-text-secondary);
    margin: 14px 4px 4px;
}

.drawer-cta {
    margin-top: 14px;
    display: grid;
    gap: 8px;
}

/* ------------------------------------------------------------- breadcrumbs */
.breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: .86rem;
    color: var(--color-text-secondary);
    margin: 18px 0 6px;
}

.breadcrumbs a {
    color: var(--color-text-secondary);
    text-decoration: none;
}

.breadcrumbs a:hover {
    color: var(--app-primary);
}

.breadcrumbs .sep {
    opacity: .55;
}

.breadcrumbs .current {
    color: var(--color-text-primary);
    font-weight: 600;
}

/* ----------------------------------------------------------- page headings */
.page-hero {
    padding: 30px 0 6px;
}

.page-hero h1 {
    font-size: clamp(1.5rem, 3.4vw, 2.15rem);
    font-weight: 800;
    color: var(--color-primary-900);
    margin-bottom: 10px;
    line-height: 1.5;
}

.page-hero p {
    color: var(--color-text-secondary);
    max-width: 780px;
    line-height: 1.9;
}

/* ------------------------------------------------------------- pagination */
.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin: 34px 0 10px;
}

.pagination a,
.pagination span {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid var(--color-border);
    background: var(--color-bg);
    color: var(--color-text-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: .9rem;
}

.pagination a:hover {
    border-color: var(--app-primary);
    color: var(--app-primary);
}

.pagination .active {
    background: var(--app-primary);
    border-color: var(--app-primary);
    color: #fff;
}

.pagination .dots {
    border: none;
    background: transparent;
}

/* ---------------------------------------------------------------- badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 700;
    line-height: 1.6;
    background: var(--color-bg-alt);
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border);
}

.badge-success {
    background: rgba(16, 185, 129, .12);
    color: #047857;
    border-color: rgba(16, 185, 129, .3);
}

.badge-warn {
    background: rgba(245, 158, 11, .14);
    color: #b45309;
    border-color: rgba(245, 158, 11, .3);
}

.badge-danger {
    background: rgba(239, 68, 68, .12);
    color: #b91c1c;
    border-color: rgba(239, 68, 68, .3);
}

.badge-info {
    background: rgba(14, 165, 233, .12);
    color: #0369a1;
    border-color: rgba(14, 165, 233, .3);
}

.badge-primary {
    background: rgba(34, 63, 153, .12);
    color: #1e3a8a;
    border-color: rgba(34, 63, 153, .28);
}

.badge-muted {
    background: var(--color-bg-alt);
    color: var(--color-text-secondary);
}

[data-theme='dark'] .badge-success {
    color: #6ee7b7;
}

[data-theme='dark'] .badge-warn {
    color: #fcd34d;
}

[data-theme='dark'] .badge-danger {
    color: #fca5a5;
}

[data-theme='dark'] .badge-info {
    color: #7dd3fc;
}

[data-theme='dark'] .badge-primary {
    color: #a5b4fc;
}

/* ----------------------------------------------------------------- alerts */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
    border-radius: var(--app-radius);
    border: 1px solid var(--color-border);
    background: var(--color-bg-alt);
    color: var(--color-text-primary);
    font-size: .92rem;
    line-height: 1.9;
    margin-bottom: 14px;
}

.alert-success {
    background: rgba(16, 185, 129, .1);
    border-color: rgba(16, 185, 129, .3);
}

.alert-error,
.alert-danger {
    background: rgba(239, 68, 68, .1);
    border-color: rgba(239, 68, 68, .3);
}

.alert-warning {
    background: rgba(245, 158, 11, .12);
    border-color: rgba(245, 158, 11, .32);
}

.alert-info {
    background: rgba(14, 165, 233, .1);
    border-color: rgba(14, 165, 233, .3);
}

/* ------------------------------------------------------------------ forms */
.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.field-label {
    font-weight: 600;
    font-size: .9rem;
    color: var(--color-text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.field-label .req {
    color: var(--app-danger);
}

.field-hint {
    font-size: .78rem;
    color: var(--color-text-secondary);
}

.input,
.select,
.textarea {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--color-border);
    border-radius: var(--app-radius-sm);
    font-size: .95rem;
    font-family: inherit;
    background: var(--color-bg);
    color: var(--color-text-primary);
    transition: var(--transition);
}

.input:focus,
.select:focus,
.textarea:focus {
    outline: none;
    border-color: var(--app-primary);
    box-shadow: 0 0 0 4px rgba(34, 63, 153, .1);
}

.input.is-invalid,
.select.is-invalid,
.textarea.is-invalid {
    border-color: var(--app-danger);
}

.textarea {
    min-height: 110px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .9rem;
    cursor: pointer;
}

.checkbox input {
    width: 18px;
    height: 18px;
    accent-color: var(--app-primary);
}

/* --------------------------------------------------------------- buttons */
.btn-block {
    width: 100%;
    justify-content: center;
}

.btn-danger {
    background: var(--app-danger);
    color: #fff;
    border: 2px solid var(--app-danger);
}

.btn-danger:hover {
    background: #dc2626;
    border-color: #dc2626;
    color: #fff;
}

.btn-ghost {
    background: transparent;
    border: 2px solid transparent;
    color: var(--color-text-secondary);
}

.btn-ghost:hover {
    background: var(--color-bg-alt);
    color: var(--color-text-primary);
}

.btn-icon {
    width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn[disabled],
.btn.is-loading {
    opacity: .65;
    pointer-events: none;
}

.btn.is-loading::after {
    content: '';
    width: 14px;
    height: 14px;
    margin-inline-start: 8px;
    border-radius: 50%;
    border: 2px solid currentColor;
    border-top-color: transparent;
    animation: btnSpin .7s linear infinite;
    display: inline-block;
}

@keyframes btnSpin {
    to {
        transform: rotate(360deg);
    }
}

/* ----------------------------------------------------------- shop toolbar */
.shop-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--app-radius);
    background: var(--color-bg);
    margin: 18px 0 22px;
}

.shop-toolbar .count {
    font-size: .88rem;
    color: var(--color-text-secondary);
    margin-inline-end: auto;
}

.shop-toolbar select,
.shop-toolbar input {
    padding: 9px 12px;
    border-radius: 10px;
    border: 1px solid var(--color-border);
    background: var(--color-bg);
    color: var(--color-text-primary);
    font-family: inherit;
    font-size: .88rem;
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--color-border);
    background: var(--color-bg);
    color: var(--color-text-primary);
    text-decoration: none;
    font-size: .86rem;
    font-weight: 600;
    transition: var(--transition);
}

.filter-chip:hover,
.filter-chip.active {
    border-color: var(--app-primary);
    color: var(--app-primary);
    background: rgba(34, 63, 153, .06);
}

/* --------------------------------------------------------- product cards */
.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-card-body .price del {
    color: var(--color-text-secondary);
    font-size: .82rem;
    margin-inline-start: 8px;
}

.product-card-body .meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: .8rem;
    color: var(--color-text-secondary);
    margin-bottom: 6px;
}

.product-card-body .stars {
    color: #f59e0b;
    font-size: .85rem;
    letter-spacing: 1px;
}

.product-card .product-card-body h3 a {
    color: inherit;
    text-decoration: none;
}

.product-card .product-card-body h3 a:hover {
    color: var(--app-primary);
}

.products-section .products-grid,
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

/* categories strip */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    margin-top: 28px;
}

.category-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 22px 18px;
    border-radius: var(--app-radius);
    border: 1px solid var(--color-border);
    background: var(--color-bg);
    text-decoration: none;
    color: var(--color-text-primary);
    transition: var(--transition);
    text-align: center;
    align-items: center;
}

.category-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--app-shadow);
    border-color: rgba(34, 63, 153, .25);
}

.category-card .material-symbols-rounded {
    font-size: 2rem;
    color: var(--app-primary);
}

.category-card h3 {
    font-size: 1rem;
    font-weight: 700;
}

.category-card .count {
    font-size: .8rem;
    color: var(--color-text-secondary);
}

/* ------------------------------------------------------------ cart & totals */
.cart-layout,
.checkout-grid,
.account-layout {
    display: grid;
    gap: 22px;
    align-items: start;
}

.cart-layout {
    grid-template-columns: 1.6fr 1fr;
}

.checkout-grid {
    grid-template-columns: 1.5fr 1fr;
}

.cart-line {
    display: grid;
    grid-template-columns: 92px 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--app-radius);
    background: var(--color-bg);
    margin-bottom: 12px;
}

.cart-line img {
    width: 92px;
    height: 92px;
    object-fit: cover;
    border-radius: 14px;
    background: var(--color-bg-alt);
}

.cart-line .title {
    font-weight: 700;
    color: var(--color-text-primary);
    text-decoration: none;
    display: block;
    margin-bottom: 6px;
    line-height: 1.7;
}

.cart-line .title:hover {
    color: var(--app-primary);
}

.cart-line .unit-price {
    font-size: .85rem;
    color: var(--color-text-secondary);
}

.cart-line .line-total {
    font-weight: 800;
    color: var(--app-primary);
    white-space: nowrap;
}

.qty-control {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 3px;
    background: var(--color-bg-alt);
}

.qty-control button {
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 9px;
    background: var(--color-bg);
    color: var(--color-text-primary);
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.qty-control button:hover {
    background: var(--app-primary);
    color: #fff;
}

.qty-control input {
    width: 46px;
    text-align: center;
    border: none;
    background: transparent;
    font-family: inherit;
    font-weight: 700;
    color: var(--color-text-primary);
}

.cart-summary,
.checkout-card,
.account-card {
    border: 1px solid var(--color-border);
    border-radius: var(--app-radius-lg);
    background: var(--color-bg);
    padding: 22px;
    box-shadow: var(--app-shadow);
}

.cart-summary h3,
.checkout-card h2,
.account-card h2 {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--color-primary-900);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 0;
    font-size: .93rem;
    color: var(--color-text-secondary);
    border-bottom: 1px dashed var(--color-border);
}

.summary-row:last-of-type {
    border-bottom: none;
}

.summary-row strong {
    color: var(--color-text-primary);
}

.summary-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    margin-top: 8px;
    border-top: 2px solid var(--color-border);
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--color-primary-900);
}

.coupon-form {
    display: flex;
    gap: 8px;
    margin: 14px 0;
}

.coupon-form input {
    flex: 1;
    padding: 11px 14px;
    border-radius: 12px;
    border: 2px solid var(--color-border);
    background: var(--color-bg);
    color: var(--color-text-primary);
    font-family: inherit;
}

/* ------------------------------------------------------------------ steps */
.steps {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}

.step {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: .86rem;
    font-weight: 600;
    color: var(--color-text-secondary);
}

.step .num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .82rem;
}

.step.active {
    color: var(--app-primary);
}

.step.active .num {
    background: var(--app-primary);
    border-color: var(--app-primary);
    color: #fff;
}

.step-sep {
    flex: 1;
    min-width: 18px;
    height: 2px;
    background: var(--color-border);
}

/* ---------------------------------------------------------- account area */
.account-layout {
    grid-template-columns: 260px 1fr;
    padding-bottom: 40px;
}

.account-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    border: 1px solid var(--color-border);
    border-radius: var(--app-radius);
    background: var(--color-bg);
    padding: 12px;
    position: sticky;
    top: 90px;
}

.account-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    color: var(--color-text-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: .92rem;
    transition: var(--transition);
}

.account-nav a:hover,
.account-nav a.active {
    background: var(--color-bg-alt);
    color: var(--app-primary);
}

.account-nav a.danger {
    color: var(--app-danger);
}

.stat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.stat-card {
    border: 1px solid var(--color-border);
    border-radius: var(--app-radius);
    background: var(--color-bg);
    padding: 18px;
}

.stat-card .label {
    font-size: .82rem;
    color: var(--color-text-secondary);
    margin-bottom: 6px;
}

.stat-card .value {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--color-primary-900);
}

/* ------------------------------------------------------------ order cards */
.order-card {
    border: 1px solid var(--color-border);
    border-radius: var(--app-radius);
    background: var(--color-bg);
    padding: 18px;
    margin-bottom: 14px;
}

.order-card-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    justify-content: space-between;
    margin-bottom: 12px;
}

.order-card-head .number {
    font-weight: 800;
    color: var(--color-primary-900);
}

.order-card-head .date {
    font-size: .82rem;
    color: var(--color-text-secondary);
}

.order-items-mini {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 12px 0;
}

.order-items-mini .mini {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .84rem;
    color: var(--color-text-secondary);
    background: var(--color-bg-alt);
    border-radius: 12px;
    padding: 6px 10px;
}

.order-items-mini img {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    object-fit: cover;
}

.timeline {
    list-style: none;
    padding: 0;
    margin: 16px 0 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.timeline li {
    display: flex;
    gap: 10px;
    font-size: .88rem;
    color: var(--color-text-secondary);
}

.timeline .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--app-primary);
    margin-top: 7px;
    flex-shrink: 0;
}

.timeline .when {
    font-size: .78rem;
    opacity: .8;
}

/* ----------------------------------------------------------------- tables */
.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--color-border);
    border-radius: var(--app-radius);
    background: var(--color-bg);
}

.table {
    width: 100%;
    border-collapse: collapse;
    min-width: 620px;
}

.table th,
.table td {
    padding: 13px 14px;
    text-align: right;
    border-bottom: 1px solid var(--color-border);
    font-size: .9rem;
}

.table th {
    background: var(--color-bg-alt);
    font-weight: 700;
    color: var(--color-text-primary);
    white-space: nowrap;
}

.table tbody tr:hover {
    background: var(--color-bg-alt);
}

.table td .actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

/* ----------------------------------------------------------- empty state */
.empty-state {
    text-align: center;
    padding: 54px 24px;
    border: 1px dashed var(--color-border);
    border-radius: var(--app-radius-lg);
    background: var(--color-bg-alt);
    color: var(--color-text-secondary);
}

.empty-state .material-symbols-rounded {
    font-size: 3rem;
    color: var(--color-border);
    display: block;
    margin-bottom: 12px;
}

.empty-state h3 {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--color-text-primary);
    margin-bottom: 8px;
}

/* ------------------------------------------------------------- lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(4, 8, 18, .92);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.lightbox.open {
    display: flex;
}

.lightbox img {
    max-width: 92vw;
    max-height: 84vh;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    inset-inline-end: 20px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ---------------------------------------------------------------- video */
.video-embed {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: var(--app-radius-lg);
    overflow: hidden;
    background: #000;
}

.video-embed iframe,
.video-embed video {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.video-embed video {
    object-fit: cover;
}

/* --------------------------------------------------------- assistant chat */
.assistant-bubble {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 18px;
    border: 1px dashed var(--color-border);
    border-radius: var(--app-radius);
    background: var(--color-bg-alt);
    color: var(--color-text-primary);
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.assistant-bubble:hover {
    border-color: var(--app-primary);
    color: var(--app-primary);
}

/* ---------------------------------------------------------------- review */
.review-form {
    border: 1px solid var(--color-border);
    border-radius: var(--app-radius);
    padding: 20px;
    background: var(--color-bg);
    margin-top: 22px;
}

.star-picker {
    display: inline-flex;
    gap: 4px;
    direction: ltr;
}

.star-picker button {
    border: none;
    background: transparent;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: var(--color-border);
    padding: 0;
}

.star-picker button.on {
    color: #f59e0b;
}

/* ------------------------------------------------------------ responsive */
@media (max-width: 1024px) {
    .cart-layout,
    .checkout-grid,
    .account-layout {
        grid-template-columns: 1fr;
    }

    .account-nav {
        position: static;
        flex-direction: row;
        overflow-x: auto;
        gap: 4px;
    }

    .account-nav a {
        white-space: nowrap;
    }

    .nav-search-form {
        display: none;
    }
}

@media (max-width: 768px) {
    .navbar-links {
        display: none;
    }

    .cart-line {
        grid-template-columns: 74px 1fr;
    }

    .cart-line img {
        width: 74px;
        height: 74px;
    }

    .cart-line .line-side {
        grid-column: 1 / -1;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }

    .table {
        min-width: 520px;
    }

    .shop-toolbar {
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .nav-icon-btn,
    .theme-toggle {
        width: 38px;
        height: 38px;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 12px;
    }
}

/* ==========================================================================
   Review pass fixes (typography inheritance, navbar layout, dark-mode blocks)
   ========================================================================== */

/* every form control inherits the YekanBakh webfont declared in fonts.css */
button,
input,
select,
textarea {
    font-family: inherit;
}

/* ------------------------------------------------------- navbar hardening */
/* the navbar must stay on ONE row: labels never wrap and the menu is handed
   over to the drawer before the links would collide with the tools */
.navbar-inner {
    gap: 10px;
}

.navbar-brand {
    flex: 0 0 auto;
    white-space: nowrap;
}

.navbar-links {
    flex: 0 1 auto;
    min-width: 0;
    flex-wrap: nowrap;
    gap: 2px;
    overflow: hidden;
}

.navbar-links li {
    display: flex;
}

.navbar-links a {
    white-space: nowrap;
    padding: 8px 10px;
    font-size: .92rem;
}

.navbar-actions {
    flex: 0 0 auto;
    gap: 6px;
}

.nav-search-form {
    flex: 0 1 220px;
    min-width: 0;
}

.nav-search-form input {
    min-width: 0;
}

@media (max-width: 1280px) {
    .navbar-links a {
        padding: 8px 8px;
        font-size: .88rem;
    }

    .nav-search-form {
        flex-basis: 180px;
    }
}

@media (max-width: 1120px) {

    .navbar-toggle {
        display: block;
    }

    .navbar-links {
        display: none;
    }
}

/* ---------------------------------------------------------- breadcrumbs */
.breadcrumbs {
    margin: 14px 0 2px;
    font-size: .85rem;
    line-height: 1.6;
}

.breadcrumbs .material-symbols-rounded {
    font-size: .95em;
    vertical-align: -0.28em;
}

/* ------------------------------------------- AI assistant (dark mode fix) */
/* --color-primary-900 flips to a *light* tint in dark mode, which turned the
   chat header / AI bubble into light-on-light surfaces. Pin real dark values. */
[data-theme='dark'] .ai-assistant-section {
    background: linear-gradient(135deg, #101a2f 0%, #0b1120 100%);
    border: 1px solid var(--color-border);
}

[data-theme='dark'] .ai-assistant-section::before,
[data-theme='dark'] .ai-assistant-section::after {
    opacity: .06;
}

[data-theme='dark'] .ai-header h2 {
    color: var(--color-text-primary);
}

[data-theme='dark'] .ai-chat {
    background: #111a2e;
    border-color: var(--color-border);
    box-shadow: var(--shadow-soft);
}

[data-theme='dark'] .ai-chat-header {
    background: #16233d;
    color: #eaf0ff;
}

[data-theme='dark'] .ai-chat-body::-webkit-scrollbar-track {
    background: #0d1626;
}

[data-theme='dark'] .ai-chat-body::-webkit-scrollbar-thumb {
    background: #2b3a5c;
}

[data-theme='dark'] .ai-message.ai .bubble {
    background: #1c2b4b;
    color: var(--color-text-primary);
}

[data-theme='dark'] .ai-message.user .bubble {
    background: var(--app-primary);
    color: #fff;
}

[data-theme='dark'] .ai-quick-questions,
[data-theme='dark'] .ai-chat-input-area {
    border-top-color: var(--color-border);
}

[data-theme='dark'] .ai-quick-btn {
    background: #16233d;
    border-color: var(--color-border);
    color: var(--color-text-secondary);
}

[data-theme='dark'] .ai-quick-btn:hover {
    background: var(--app-primary);
    border-color: var(--app-primary);
    color: #fff;
}

[data-theme='dark'] .ai-chat-input-area input {
    background: #0d1626;
    border-color: var(--color-border);
    color: var(--color-text-primary);
}

[data-theme='dark'] .ai-chat-input-area input::placeholder {
    color: #8494b8;
}

[data-theme='dark'] .ai-chat-input-area input:focus {
    border-color: var(--app-primary);
    box-shadow: 0 0 0 3px rgba(99, 132, 255, .14);
}

[data-theme='dark'] .ai-chat-input-area button {
    background: var(--app-primary);
}

[data-theme='dark'] .ai-chat-input-area button:hover {
    background: #2f52b8;
}







