/* ═══════════════════════════════════════════════════════════════
   Modern UI Refresh — Phase A+B
   Scope: storefront (body.store-body) + dealer (body.dealer-body)
   Admin pages are unaffected (admin uses _AdminLayout, no body class).
   ═══════════════════════════════════════════════════════════════ */

body.store-body,
body.dealer-body {
    --brand: #2563eb;
    --brand-dark: #1d4ed8;
    --brand-soft: #eff6ff;
    --accent: #0ea5e9;
    --accent-dark: #0284c7;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --text: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --surface: #ffffff;
    --surface-2: #f8fafc;

    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;

    --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08), 0 2px 4px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.10), 0 4px 8px rgba(15, 23, 42, 0.05);

    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-feature-settings: 'cv11', 'ss01';
    color: var(--text);
}

body.store-body[dir="rtl"],
body.dealer-body[dir="rtl"] {
    font-family: 'Inter', 'Segoe UI', 'Tahoma', 'Arial', sans-serif;
}

/* ═══════ Typography refinement ═══════ */
body.store-body h1, body.store-body h2, body.store-body h3,
body.dealer-body h1, body.dealer-body h2, body.dealer-body h3 {
    letter-spacing: -0.02em;
    font-weight: 700;
}

body.store-body h4, body.store-body h5, body.store-body h6,
body.dealer-body h4, body.dealer-body h5, body.dealer-body h6 {
    letter-spacing: -0.01em;
    font-weight: 600;
}

/* ═══════ Modern product card (scoped) ═══════ */
.mod-product-card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.mod-product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--brand-soft);
}

.mod-product-card__media {
    position: relative;
    aspect-ratio: 1 / 1;
    background: var(--surface-2);
    overflow: hidden;
}

.mod-product-card__media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1rem;
    transition: transform 0.35s ease;
}

.mod-product-card:hover .mod-product-card__media img {
    transform: scale(1.05);
}

.mod-product-card__ribbons {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    z-index: 2;
    pointer-events: none;
}

[dir="rtl"] .mod-product-card__ribbons {
    left: auto;
    right: 0.5rem;
}

.mod-ribbon {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.02em;
    background: rgba(15, 23, 42, 0.85);
    color: #fff;
    backdrop-filter: blur(6px);
}

.mod-ribbon--sale { background: var(--danger); }
.mod-ribbon--new { background: var(--success); }
.mod-ribbon--featured { background: var(--brand); }
.mod-ribbon--low { background: var(--warning); color: #1e293b; }
.mod-ribbon--out { background: #6b7280; }

.mod-product-card__quickcta {
    position: absolute;
    bottom: 0.5rem;
    left: 0.5rem;
    right: 0.5rem;
    display: flex;
    gap: 0.35rem;
    transform: translateY(120%);
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
    z-index: 2;
}

.mod-product-card:hover .mod-product-card__quickcta,
.mod-product-card:focus-within .mod-product-card__quickcta {
    transform: translateY(0);
    opacity: 1;
}

.mod-product-card__quickcta .btn {
    flex: 1;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.85rem;
    box-shadow: var(--shadow-md);
}

.mod-product-card__body {
    padding: 0.85rem 1rem 1rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: 0.25rem;
}

.mod-product-card__sku {
    font-family: 'JetBrains Mono', 'Consolas', monospace;
    font-size: 0.72rem;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

.mod-product-card__title {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.35;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.5em;
}

.mod-product-card__price-row {
    margin-top: auto;
    padding-top: 0.5rem;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.mod-product-card__price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--brand);
    line-height: 1;
}

.mod-product-card__price-was {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: line-through;
    line-height: 1;
}

.mod-product-card__price-lock {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.mod-product-card__stock {
    font-size: 0.72rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.15rem;
}

.mod-product-card__stock--in { color: var(--success); }
.mod-product-card__stock--low { color: var(--warning); }
.mod-product-card__stock--out { color: var(--danger); }

/* Wishlist icon */
.mod-product-card__fav {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 3;
    width: 34px; height: 34px;
    border-radius: 50%;
    background: rgba(255,255,255,0.85);
    border: none;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: background 0.15s, transform 0.15s;
    color: var(--text-muted);
    backdrop-filter: blur(4px);
}

[dir="rtl"] .mod-product-card__fav { right: auto; left: 0.5rem; }

.mod-product-card__fav:hover {
    background: #fff;
    color: var(--danger);
    transform: scale(1.08);
}

/* ═══════ Hero banner ═══════ */
.mod-hero {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 2.5rem;
    aspect-ratio: 16 / 6;
    min-height: 280px;
    background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
}

.mod-hero__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 8s ease;
}

.mod-hero:hover .mod-hero__bg { transform: scale(1.05); }

.mod-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(15,23,42,0.7) 0%, rgba(37,99,235,0.3) 55%, transparent 100%);
}

[dir="rtl"] .mod-hero__overlay {
    background: linear-gradient(-120deg, rgba(15,23,42,0.7) 0%, rgba(37,99,235,0.3) 55%, transparent 100%);
}

.mod-hero__content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    padding: 2rem 3rem;
    color: #fff;
    z-index: 2;
}

.mod-hero__content-inner {
    max-width: 560px;
}

.mod-hero h1, .mod-hero h2 {
    color: #fff;
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.1;
    text-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.mod-hero p.lead {
    color: rgba(255,255,255,0.92);
    font-size: 1.1rem;
    margin-bottom: 1.25rem;
    text-shadow: 0 1px 6px rgba(0,0,0,0.25);
}

@media (max-width: 768px) {
    .mod-hero {
        aspect-ratio: 4 / 3;
        min-height: 220px;
    }
    .mod-hero__content { padding: 1.25rem 1.5rem; }
    .mod-hero h1, .mod-hero h2 { font-size: 1.4rem; }
    .mod-hero p.lead { font-size: 0.95rem; }
}

/* ═══════ Empty state ═══════ */
.mod-empty {
    text-align: center;
    padding: 3rem 1.5rem;
    max-width: 420px;
    margin: 0 auto;
}

.mod-empty__icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 1.25rem;
    opacity: 0.9;
}

.mod-empty__title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.mod-empty__desc {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

/* ═══════ Filter sidebar ═══════ */
.mod-filter-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: var(--shadow-xs);
    overflow: hidden;
}

.mod-filter-card__head {
    padding: 0.85rem 1rem;
    font-weight: 600;
    border-bottom: 1px solid var(--border);
    background: var(--surface-2);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mod-filter-section {
    border-bottom: 1px solid var(--border);
}

.mod-filter-section:last-child { border-bottom: 0; }

.mod-filter-section__head {
    width: 100%;
    padding: 0.85rem 1rem;
    background: transparent;
    border: none;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.mod-filter-section__head:hover { background: var(--surface-2); }

.mod-filter-section__head .bi-chevron-down {
    transition: transform 0.2s ease;
}

.mod-filter-section[aria-expanded="true"] .bi-chevron-down,
.mod-filter-section.open .bi-chevron-down {
    transform: rotate(180deg);
}

.mod-filter-section__body {
    padding: 0.25rem 0.5rem 0.85rem;
    max-height: 280px;
    overflow-y: auto;
}

.mod-filter-option {
    display: block;
    padding: 0.35rem 0.5rem;
    color: var(--text);
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    transition: background 0.15s;
}

.mod-filter-option:hover {
    background: var(--surface-2);
    color: var(--brand);
}

.mod-filter-option.active {
    background: var(--brand-soft);
    color: var(--brand-dark);
    font-weight: 600;
}

.mod-filter-option--sub { padding-left: 1.5rem; font-size: 0.83rem; }
[dir="rtl"] .mod-filter-option--sub { padding-left: 0.5rem; padding-right: 1.5rem; }

.mod-filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding: 0.5rem 0 0.75rem;
    align-items: center;
}

.mod-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: var(--brand-soft);
    color: var(--brand-dark);
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-size: 0.8rem;
    text-decoration: none;
    border: 1px solid transparent;
    transition: background 0.15s;
}

.mod-filter-chip:hover {
    background: #dbeafe;
    color: var(--brand-dark);
}

.mod-filter-chip .bi-x { font-size: 1rem; }

/* ═══════ Category grid (landing) ═══════ */
.mod-cat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (min-width: 576px) { .mod-cat-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 768px) { .mod-cat-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 992px) { .mod-cat-grid { grid-template-columns: repeat(6, 1fr); } }

.mod-cat-tile {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: linear-gradient(135deg, var(--brand-soft), #fff);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    text-align: center;
    text-decoration: none;
    color: var(--text);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    font-weight: 600;
    font-size: 0.9rem;
}

.mod-cat-tile:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--brand);
    color: var(--brand-dark);
}

.mod-cat-tile__icon {
    font-size: 2rem;
    color: var(--brand);
    display: block;
    margin-bottom: 0.5rem;
}

/* ═══════ Brand strip ═══════ */
.mod-brand-strip {
    display: flex;
    gap: 2rem;
    padding: 1.25rem 0;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    align-items: center;
    justify-content: space-around;
    flex-wrap: wrap;
}

.mod-brand-strip::-webkit-scrollbar { display: none; }

.mod-brand-tile {
    flex: 0 0 auto;
    min-width: 120px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-weight: 700;
    color: var(--text-muted);
    opacity: 0.7;
    transition: opacity 0.2s, color 0.2s;
    text-decoration: none;
    font-size: 1rem;
    letter-spacing: 0.02em;
}

.mod-brand-tile:hover {
    opacity: 1;
    color: var(--brand);
}

/* ═══════ Trust row ═══════ */
.mod-trust-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 2rem 0;
}

@media (min-width: 768px) { .mod-trust-row { grid-template-columns: repeat(4, 1fr); } }

.mod-trust-item {
    text-align: center;
    padding: 1.25rem 1rem;
    border-radius: var(--radius-md);
    background: var(--surface);
    border: 1px solid var(--border);
    transition: transform 0.2s, box-shadow 0.2s;
}

.mod-trust-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }

.mod-trust-item__icon {
    width: 48px; height: 48px;
    margin: 0 auto 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background: var(--brand-soft);
    color: var(--brand);
    font-size: 1.5rem;
}

.mod-trust-item__title {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.mod-trust-item__desc {
    color: var(--text-muted);
    font-size: 0.82rem;
    margin: 0;
}

/* ═══════ Newsletter CTA ═══════ */
.mod-newsletter {
    background: linear-gradient(135deg, #1e3a5f, #2563eb);
    color: #fff;
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    text-align: center;
    margin: 2rem 0;
}

.mod-newsletter h4 {
    color: #fff;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.mod-newsletter p {
    color: rgba(255,255,255,0.85);
    margin-bottom: 1.25rem;
}

.mod-newsletter__form {
    max-width: 420px;
    margin: 0 auto;
    display: flex;
    gap: 0.5rem;
}

.mod-newsletter__form .form-control {
    border: none;
    border-radius: var(--radius-sm);
}

.mod-newsletter__form .btn {
    border-radius: var(--radius-sm);
    font-weight: 600;
    padding: 0 1.25rem;
    white-space: nowrap;
}

/* ═══════ Dealer cart v2 rows ═══════ */
.mod-cart-row {
    display: grid;
    grid-template-columns: 72px 1fr auto auto;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
}

.mod-cart-row:last-child { border-bottom: 0; }

.mod-cart-row__img {
    width: 72px; height: 72px;
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    padding: 0.35rem;
    object-fit: contain;
}

.mod-cart-row__info .title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text);
    display: block;
    margin-bottom: 0.15rem;
}

.mod-cart-row__info .sku {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', 'Consolas', monospace;
}

.mod-qty-stepper {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--surface);
}

.mod-qty-stepper button {
    background: var(--surface-2);
    border: none;
    width: 32px;
    height: 36px;
    color: var(--text);
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
}

.mod-qty-stepper button:hover { background: var(--brand-soft); color: var(--brand); }
.mod-qty-stepper button:disabled { opacity: 0.4; cursor: not-allowed; }

.mod-qty-stepper input {
    border: none;
    width: 48px;
    height: 36px;
    text-align: center;
    font-weight: 600;
    -moz-appearance: textfield;
}

.mod-qty-stepper input::-webkit-inner-spin-button,
.mod-qty-stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.mod-cart-row__total {
    font-weight: 700;
    color: var(--brand);
    font-size: 1.05rem;
    text-align: right;
    min-width: 100px;
}

[dir="rtl"] .mod-cart-row__total { text-align: left; }

.mod-cart-row__remove {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: background 0.15s, color 0.15s;
}

.mod-cart-row__remove:hover { background: #fee2e2; color: var(--danger); }

@media (max-width: 576px) {
    .mod-cart-row {
        grid-template-columns: 60px 1fr auto;
        grid-template-areas:
            "img info remove"
            "img qty total";
        gap: 0.5rem 0.75rem;
        padding: 0.75rem;
    }
    .mod-cart-row__img { width: 60px; height: 60px; grid-area: img; }
    .mod-cart-row__info { grid-area: info; }
    .mod-qty-stepper { grid-area: qty; }
    .mod-cart-row__total { grid-area: total; min-width: 0; }
    .mod-cart-row__remove { grid-area: remove; align-self: start; }
}

.mod-cart-summary-sticky {
    position: sticky;
    top: 80px;
}

/* ═══════ Mobile bottom nav (dealer PWA) ═══════ */
.mod-bottom-nav {
    display: none;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    background: #fff;
    border-top: 1px solid var(--border);
    z-index: 1030;
    padding: 0.25rem 0 env(safe-area-inset-bottom, 0.25rem);
    box-shadow: 0 -4px 12px rgba(15,23,42,0.06);
}

.mod-bottom-nav__list {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    list-style: none;
    margin: 0; padding: 0;
}

.mod-bottom-nav__link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.25rem 0.4rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.68rem;
    position: relative;
    transition: color 0.15s;
}

.mod-bottom-nav__link i {
    font-size: 1.25rem;
    margin-bottom: 0.1rem;
}

.mod-bottom-nav__link.active,
.mod-bottom-nav__link:hover {
    color: var(--brand);
}

.mod-bottom-nav__link.active::before {
    content: '';
    position: absolute;
    top: 0;
    width: 28px;
    height: 3px;
    background: var(--brand);
    border-radius: 0 0 3px 3px;
}

.mod-bottom-nav__badge {
    position: absolute;
    top: 0.15rem;
    right: 50%;
    transform: translateX(16px);
    background: var(--danger);
    color: #fff;
    border-radius: 999px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    font-size: 0.62rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

[dir="rtl"] .mod-bottom-nav__badge {
    right: auto;
    left: 50%;
    transform: translateX(-16px);
}

@media (max-width: 767.98px) {
    body.dealer-body .mod-bottom-nav { display: block; }
    body.dealer-body main.container-fluid { padding-bottom: 5rem !important; }
    body.dealer-body .dealer-footer { margin-bottom: 4rem; }
}

/* ═══════ Toast polish ═══════ */
body.store-body .toast,
body.dealer-body .toast {
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    border: none;
}

/* ═══════ Buttons refinement (scoped) ═══════ */
body.store-body .btn,
body.dealer-body .btn {
    border-radius: var(--radius-sm);
    font-weight: 500;
    transition: transform 0.1s ease, box-shadow 0.15s ease;
}

body.store-body .btn:active,
body.dealer-body .btn:active {
    transform: translateY(1px);
}

body.store-body .btn-primary,
body.dealer-body .btn-primary {
    background-color: var(--brand);
    border-color: var(--brand);
    box-shadow: 0 1px 2px rgba(37,99,235,0.2);
}

body.store-body .btn-primary:hover,
body.dealer-body .btn-primary:hover {
    background-color: var(--brand-dark);
    border-color: var(--brand-dark);
    box-shadow: 0 4px 12px rgba(37,99,235,0.28);
}

body.store-body .btn-lg,
body.dealer-body .btn-lg {
    border-radius: var(--radius-md);
    font-weight: 600;
    padding: 0.65rem 1.5rem;
}

/* ═══════ Card scope — soften default Bootstrap in store/dealer ═══════ */
body.store-body .card,
body.dealer-body .card {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xs);
}

body.store-body .card-header,
body.dealer-body .card-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    padding: 0.85rem 1rem;
}

/* ═══════ Sticky navbar polish ═══════ */
body.store-body .navbar.sticky-top,
body.dealer-body .navbar.sticky-top {
    backdrop-filter: saturate(180%) blur(8px);
    background-color: rgba(255,255,255,0.92) !important;
    border-bottom: 1px solid var(--border);
}

/* ═══════════════════════════════════════════════════════════════
   PRODUCT DETAIL PREMIUM
   ═══════════════════════════════════════════════════════════════ */

/* Centered page wrapper — large-screen polish */
.pd-page {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
}

/* .pd-hero: row-spacing extras; gutter is handled by Bootstrap's g-* utilities on the element */
.pd-hero { --pd-hero-mt: 0; }

/* Display heading font — H1 only, scoped */
body.store-body .pd-title,
body.dealer-body .pd-title {
    font-family: 'Space Grotesk', 'Inter', system-ui, sans-serif;
    font-weight: 700;
    font-size: clamp(1.5rem, 2.5vw, 2.1rem);
    letter-spacing: -0.025em;
    line-height: 1.15;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.pd-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 1.25rem;
}

.pd-meta__pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: var(--surface-2);
    color: var(--text-muted);
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid var(--border);
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.pd-meta__pill a, .pd-meta__pill--link:hover { color: var(--brand); border-color: var(--brand-soft); background: var(--brand-soft); }

.pd-breadcrumb {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

.pd-breadcrumb a { color: var(--text-muted); text-decoration: none; transition: color 0.15s; }
.pd-breadcrumb a:hover { color: var(--brand); }
.pd-breadcrumb .sep { margin: 0 0.4rem; opacity: 0.5; }

/* ═══════ Gallery ═══════ */
.pd-gallery {
    display: grid;
    grid-template-columns: 76px 1fr;
    gap: 0.75rem;
    align-items: start;
}

@media (max-width: 767.98px) {
    .pd-gallery {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr auto;
    }
    .pd-gallery__thumbs {
        flex-direction: row !important;
        overflow-x: auto !important;
        max-height: none !important;
    }
}

.pd-gallery__thumbs {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 480px;
    overflow-y: auto;
    scrollbar-width: thin;
}

.pd-gallery__thumbs::-webkit-scrollbar { width: 4px; height: 4px; }
.pd-gallery__thumbs::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.pd-gallery__thumb {
    width: 76px;
    aspect-ratio: 1 / 1;
    flex-shrink: 0;
    background: var(--surface-2);
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    padding: 0.35rem;
    cursor: pointer;
    display: block;
    transition: border-color 0.15s, transform 0.15s;
}

.pd-gallery__thumb img { width: 100%; height: 100%; object-fit: contain; }

.pd-gallery__thumb:hover { transform: translateY(-2px); }
.pd-gallery__thumb.active { border-color: var(--brand); }

.pd-gallery__main {
    position: relative;
    aspect-ratio: 1 / 1;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: zoom-in;
    box-shadow: var(--shadow-xs);
}

.pd-gallery__main-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1.5rem;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

/* Hover magnifier using background-position trick */
.pd-gallery__main.zoomed .pd-gallery__main-img { opacity: 0; }

.pd-gallery__main-zoom {
    position: absolute;
    inset: 0;
    background-repeat: no-repeat;
    background-size: 200%;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.pd-gallery__main.zoomed .pd-gallery__main-zoom { opacity: 1; }

.pd-gallery__fullscreen-btn {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(6px);
    border: 1px solid var(--border);
    width: 36px; height: 36px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.15s, transform 0.15s;
    z-index: 2;
}

[dir="rtl"] .pd-gallery__fullscreen-btn { right: auto; left: 0.75rem; }

.pd-gallery__fullscreen-btn:hover { color: var(--brand); transform: scale(1.08); }

.pd-gallery__ribbons {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    display: flex; flex-direction: column; gap: 0.35rem;
    z-index: 2;
    pointer-events: none;
}

[dir="rtl"] .pd-gallery__ribbons { left: auto; right: 0.75rem; }

/* Lightbox */
.pd-lightbox {
    position: fixed; inset: 0;
    background: rgba(15, 23, 42, 0.92);
    z-index: 2200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.pd-lightbox.open { display: flex; }

.pd-lightbox__img {
    max-width: 92vw;
    max-height: 92vh;
    object-fit: contain;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    border-radius: var(--radius-md);
    background: #fff;
    padding: 2rem;
}

.pd-lightbox__close {
    position: absolute;
    top: 1.25rem; right: 1.25rem;
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: none;
    width: 44px; height: 44px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.25rem;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s, transform 0.15s;
}

[dir="rtl"] .pd-lightbox__close { right: auto; left: 1.25rem; }

.pd-lightbox__close:hover { background: rgba(255,255,255,0.25); transform: scale(1.08); }

.pd-lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.12);
    color: #fff;
    border: none;
    width: 48px; height: 48px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.25rem;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s;
}

.pd-lightbox__nav:hover { background: rgba(255,255,255,0.25); }
.pd-lightbox__nav--prev { left: 1.5rem; }
.pd-lightbox__nav--next { right: 1.5rem; }
[dir="rtl"] .pd-lightbox__nav--prev { left: auto; right: 1.5rem; }
[dir="rtl"] .pd-lightbox__nav--next { right: auto; left: 1.5rem; }

/* ═══════ Price Ladder ═══════ */
.pd-ladder {
    background: linear-gradient(145deg, var(--surface) 0%, var(--surface-2) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem 1.25rem;
    margin-bottom: 1.25rem;
}

.pd-ladder__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.35rem;
}

.pd-ladder__title {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.pd-ladder__title i { color: var(--brand); }

.pd-ladder__hint {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 0.85rem;
}

.pd-ladder__steps {
    display: grid;
    gap: 0.5rem;
    grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
}

/* 4'ten fazla tier varsa bile 4 kolon tut — geniş ekranda tek satırda kayıp gitmesin */
@media (min-width: 992px) {
    .pd-ladder__steps {
        grid-template-columns: repeat(auto-fit, minmax(128px, 200px));
        justify-content: start;
    }
}

.pd-ladder__step {
    position: relative;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.75rem 0.85rem;
    transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
    overflow: hidden;
}

.pd-ladder__step:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }

.pd-ladder__step.active {
    border-color: var(--brand);
    background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
    box-shadow: 0 4px 12px rgba(37,99,235,0.12);
}

.pd-ladder__step.best {
    border-color: #f59e0b;
    background: linear-gradient(135deg, #fffbeb 0%, #fff 100%);
}

.pd-ladder__step.active.best {
    border-color: var(--brand);
    background: linear-gradient(135deg, #eff6ff 0%, #fffbeb 100%);
    box-shadow: 0 4px 14px rgba(245,158,11,0.18);
}

.pd-ladder__step-qty {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.02em;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
}

.pd-ladder__step-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.1;
    margin-bottom: 0.1rem;
}

.pd-ladder__step.active .pd-ladder__step-price { color: var(--brand); }

.pd-ladder__step-save {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--success);
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

.pd-ladder__step-badge {
    position: absolute;
    top: 0; right: 0;
    background: #f59e0b;
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 0.15rem 0.4rem;
    border-radius: 0 var(--radius-sm) 0 var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

[dir="rtl"] .pd-ladder__step-badge {
    right: auto; left: 0;
    border-radius: var(--radius-sm) 0 var(--radius-sm) 0;
}

.pd-ladder__step-active-mark {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--brand) 0%, #60a5fa 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease-out;
}

.pd-ladder__step.active .pd-ladder__step-active-mark { transform: scaleX(1); }

/* ═══════ CTA Block ═══════ */
.pd-cta {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow-xs);
}

.pd-cta__row {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1.25rem 1.5rem;
    align-items: end;
}

@media (max-width: 575.98px) {
    .pd-cta__row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

.pd-cta__actions-row {
    display: flex;
    gap: 0.6rem;
    align-items: stretch;
    margin-top: 1rem;
}

.pd-cta__actions-row .pd-cta__primary {
    flex: 1;
    justify-content: center;
    height: 52px;
    font-size: 1rem;
}

.pd-cta__qty-label,
.pd-cta__price-label {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
    font-weight: 600;
}

.pd-cta__qty-stepper {
    display: inline-flex;
    align-items: center;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--surface);
}

.pd-cta__qty-stepper button {
    background: var(--surface-2);
    border: none;
    width: 44px;
    height: 48px;
    color: var(--text);
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.pd-cta__qty-stepper button:hover { background: var(--brand-soft); color: var(--brand); }

.pd-cta__qty-stepper input {
    border: none;
    width: 64px;
    height: 48px;
    text-align: center;
    font-weight: 700;
    font-size: 1.05rem;
    -moz-appearance: textfield;
    background: transparent;
}

.pd-cta__qty-stepper input::-webkit-inner-spin-button,
.pd-cta__qty-stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.pd-cta__price {
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    font-weight: 800;
    color: var(--brand);
    line-height: 1;
    letter-spacing: -0.02em;
    font-family: 'Space Grotesk', 'Inter', sans-serif;
}

.pd-cta__total {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.pd-cta__total strong { color: var(--text); font-weight: 600; }

.pd-cta__actions {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
}

.pd-cta__primary {
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
    color: #fff;
    border: none;
    padding: 0 1.75rem;
    height: 48px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(37,99,235,0.28);
    transition: transform 0.15s, box-shadow 0.15s;
    white-space: nowrap;
}

.pd-cta__primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37,99,235,0.35);
    color: #fff;
}

.pd-cta__primary:disabled {
    background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.pd-cta__primary i { transition: transform 0.2s ease; }
.pd-cta__primary:hover i.bi-arrow-right { transform: translateX(3px); }
[dir="rtl"] .pd-cta__primary:hover i.bi-arrow-right { transform: translateX(-3px); }

.pd-cta__icon-btn {
    width: 48px; height: 48px;
    border-radius: 50%;
    border: 1.5px solid var(--border);
    background: var(--surface);
    color: var(--text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: color 0.15s, border-color 0.15s, transform 0.15s;
}

.pd-cta__icon-btn:hover {
    color: var(--danger);
    border-color: #fecaca;
    transform: scale(1.08);
}

.pd-cta__icon-btn.active { color: var(--danger); border-color: #fecaca; background: #fef2f2; }

.pd-cta__stock {
    margin-top: 1rem;
    padding: 0.55rem 0.85rem;
    background: var(--surface-2);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.pd-cta__stock--in { color: var(--success); background: #ecfdf5; }
.pd-cta__stock--low { color: #b45309; background: #fffbeb; }
.pd-cta__stock--out { color: var(--danger); background: #fef2f2; }

/* ═══════ Trust row (product detail) ═══════ */
.pd-trust {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.6rem;
    margin-bottom: 1.25rem;
}

@media (max-width: 575.98px) {
    .pd-trust { grid-template-columns: repeat(2, 1fr); }
}

.pd-trust__item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.75rem 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    transition: border-color 0.15s, transform 0.15s;
}

.pd-trust__item:hover { border-color: var(--brand-soft); transform: translateY(-1px); }

.pd-trust__icon {
    width: 36px; height: 36px;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    background: var(--brand-soft);
    color: var(--brand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.pd-trust__body { line-height: 1.2; }
.pd-trust__title { font-weight: 600; font-size: 0.82rem; color: var(--text); }
.pd-trust__desc { font-size: 0.72rem; color: var(--text-muted); }

/* ═══════ Tabs ═══════ */
.pd-tabs {
    margin-top: 3rem;
    margin-bottom: 2.5rem;
    max-width: 940px;
}

.pd-tabs__nav {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border);
    margin-bottom: 1.5rem;
    overflow-x: auto;
    scrollbar-width: none;
}

.pd-tabs__nav::-webkit-scrollbar { display: none; }

.pd-tabs__btn {
    background: transparent;
    border: none;
    padding: 0.85rem 1.25rem;
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--text-muted);
    cursor: pointer;
    position: relative;
    transition: color 0.15s;
    white-space: nowrap;
}

.pd-tabs__btn:hover { color: var(--text); }

.pd-tabs__btn.active { color: var(--brand); }

.pd-tabs__btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0; right: 0;
    height: 2px;
    background: var(--brand);
    border-radius: 2px;
}

.pd-tabs__panel {
    display: none;
    padding: 0.5rem 0;
    color: var(--text);
    line-height: 1.65;
}

.pd-tabs__panel.active { display: block; animation: pd-fade 0.2s ease; }

@keyframes pd-fade {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Specs list */
.pd-specs {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    max-width: 620px;
}

.pd-specs__row {
    display: grid;
    grid-template-columns: 180px 1fr;
    border-bottom: 1px solid var(--border);
}

.pd-specs__row:last-child { border-bottom: 0; }
.pd-specs__row:nth-child(even) { background: var(--surface-2); }

.pd-specs__key {
    padding: 0.7rem 1rem;
    font-weight: 500;
    font-size: 0.88rem;
    color: var(--text-muted);
    border-right: 1px solid var(--border);
}

[dir="rtl"] .pd-specs__key { border-right: none; border-left: 1px solid var(--border); }

.pd-specs__val {
    padding: 0.7rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
}

@media (max-width: 575.98px) {
    .pd-specs__row { grid-template-columns: 1fr; }
    .pd-specs__key { border-right: none; border-bottom: 1px solid var(--border); padding-bottom: 0.25rem; }
    [dir="rtl"] .pd-specs__key { border-left: none; }
    .pd-specs__val { padding-top: 0.3rem; }
}

/* Mobile sticky add-to-cart bar */
.pd-mobile-cta {
    display: none;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    background: #fff;
    border-top: 1px solid var(--border);
    padding: 0.6rem 0.85rem env(safe-area-inset-bottom, 0.6rem);
    z-index: 1040;
    box-shadow: 0 -6px 20px rgba(15,23,42,0.08);
    gap: 0.6rem;
    align-items: center;
}

.pd-mobile-cta .price {
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--brand);
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    flex: 1;
    min-width: 0;
}

.pd-mobile-cta .btn {
    flex: 0 0 auto;
    border-radius: 999px;
    padding: 0.55rem 1.25rem;
    font-weight: 700;
    white-space: nowrap;
}

@media (max-width: 767.98px) {
    body.store-body .pd-mobile-cta,
    body.dealer-body .pd-mobile-cta { display: flex; }
    body.store-body main,
    body.dealer-body main { padding-bottom: 6rem !important; }
}

/* RTL: flip arrows */
[dir="rtl"] .pd-cta__primary i.bi-arrow-right::before { content: "\F12F"; /* bi-arrow-left */ }

/* ═══════════════════════════════════════════════════════════════
   CART PREMIUM (v3)
   ═══════════════════════════════════════════════════════════════ */

.cart-page {
    /* inherits max-width from .dealer-page-wrap */
    width: 100%;
}

/* Checkout stepper */
.cart-stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 0.5rem 0 2rem;
    flex-wrap: wrap;
}

.cart-stepper__step {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 500;
}

.cart-stepper__step.active { color: var(--brand); font-weight: 600; }
.cart-stepper__step.done { color: var(--success); }

.cart-stepper__num {
    width: 30px; height: 30px;
    border-radius: 50%;
    background: var(--surface-2);
    border: 2px solid var(--border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.cart-stepper__step.active .cart-stepper__num {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
    box-shadow: 0 0 0 4px var(--brand-soft);
}

.cart-stepper__step.done .cart-stepper__num {
    background: var(--success);
    border-color: var(--success);
    color: #fff;
}

.cart-stepper__sep {
    width: 40px;
    height: 2px;
    background: var(--border);
    border-radius: 2px;
}

@media (max-width: 575.98px) {
    .cart-stepper__sep { width: 20px; }
    .cart-stepper__step { font-size: 0.78rem; }
    .cart-stepper__num { width: 26px; height: 26px; font-size: 0.75rem; }
}

/* Free shipping progress */
.cart-shipping-bar {
    background: linear-gradient(135deg, #ecfdf5 0%, #fff 100%);
    border: 1px solid #a7f3d0;
    border-radius: var(--radius-md);
    padding: 0.85rem 1rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cart-shipping-bar.achieved { background: linear-gradient(135deg, #d1fae5 0%, #ecfdf5 100%); border-color: var(--success); }

.cart-shipping-bar__icon {
    font-size: 1.5rem;
    color: var(--success);
    flex-shrink: 0;
}

.cart-shipping-bar__body { flex: 1; min-width: 0; }

.cart-shipping-bar__msg {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.3rem;
}

.cart-shipping-bar__track {
    height: 6px;
    background: rgba(16, 185, 129, 0.12);
    border-radius: 999px;
    overflow: hidden;
}

.cart-shipping-bar__fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success) 0%, #34d399 100%);
    border-radius: 999px;
    transition: width 0.4s ease;
}

/* Payment method cards (replace select) */
.cart-paymethod {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.6rem;
}

.cart-paymethod__option {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.85rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, transform 0.1s;
}

.cart-paymethod__option input[type=radio] {
    margin-top: 0.15rem;
    accent-color: var(--brand);
    cursor: pointer;
}

.cart-paymethod__option:hover { border-color: var(--brand-soft); }

.cart-paymethod__option:has(input:checked),
.cart-paymethod__option.is-checked {
    border-color: var(--brand);
    background: linear-gradient(135deg, var(--brand-soft) 0%, #fff 100%);
}

.cart-paymethod__body { line-height: 1.3; }

.cart-paymethod__title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.cart-paymethod__desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

/* Coupon receipt */
.cart-coupon {
    background: repeating-linear-gradient(45deg, #fafbfd, #fafbfd 8px, #fff 8px, #fff 16px);
    border: 1.5px dashed var(--border);
    border-radius: var(--radius-sm);
    padding: 0.85rem;
    margin-bottom: 0.75rem;
}

.cart-coupon--applied {
    background: linear-gradient(135deg, #ecfdf5 0%, #fff 100%);
    border-color: var(--success);
    border-style: solid;
}

.cart-coupon__row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.cart-coupon__input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.35rem 0.5rem;
    font-size: 0.9rem;
    font-family: 'JetBrains Mono', 'Consolas', monospace;
    letter-spacing: 0.04em;
}

.cart-coupon__input:focus { outline: none; box-shadow: none; }

.cart-coupon__btn {
    background: var(--brand);
    color: #fff;
    border: none;
    padding: 0.4rem 0.85rem;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.cart-coupon__btn:hover { background: var(--brand-dark); }

.cart-coupon__applied {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.cart-coupon__code {
    font-family: 'JetBrains Mono', 'Consolas', monospace;
    font-weight: 700;
    color: var(--success);
    font-size: 0.95rem;
    letter-spacing: 0.04em;
}

/* Trust strip below checkout */
.cart-trust-strip {
    display: flex;
    justify-content: space-around;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}

.cart-trust-strip__item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 500;
}

.cart-trust-strip__item i { font-size: 0.95rem; color: var(--success); }

/* Mobile sticky checkout bar */
.cart-mobile-bar {
    display: none;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    background: #fff;
    border-top: 1px solid var(--border);
    padding: 0.6rem 0.85rem env(safe-area-inset-bottom, 0.6rem);
    z-index: 1040;
    box-shadow: 0 -6px 20px rgba(15,23,42,0.08);
    gap: 0.6rem;
    align-items: center;
}

.cart-mobile-bar__total {
    flex: 1; min-width: 0;
    line-height: 1.1;
}

.cart-mobile-bar__label {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.cart-mobile-bar__amount {
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--brand);
    font-family: 'Space Grotesk', 'Inter', sans-serif;
}

.cart-mobile-bar .btn {
    flex: 0 0 auto;
    border-radius: 999px;
    padding: 0.55rem 1.25rem;
    font-weight: 700;
    white-space: nowrap;
}

@media (max-width: 767.98px) {
    body.dealer-body .cart-page .cart-mobile-bar { display: flex; }
    body.dealer-body .cart-page { padding-bottom: 6rem; }
    .cart-summary-desktop { display: none; }
}

@media (min-width: 768px) {
    .cart-summary-mobile { display: none; }
}

/* ═══════════════════════════════════════════════════════════════
   CATALOG PREMIUM (v3)
   ═══════════════════════════════════════════════════════════════ */

.catalog-page {
    /* inherits max-width from .dealer-page-wrap */
    width: 100%;
}

/* Quick filter pills */
.catalog-pills {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.catalog-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.95rem;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
    text-decoration: none;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.catalog-pill:hover {
    border-color: var(--brand);
    color: var(--brand);
    transform: translateY(-1px);
}

.catalog-pill.active {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
    box-shadow: 0 4px 10px rgba(37,99,235,0.2);
}

.catalog-pill.active:hover { color: #fff; }

.catalog-pill i { font-size: 0.95rem; }

/* View toggle */
.catalog-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.catalog-toolbar__left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.catalog-toolbar__right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.catalog-view-toggle {
    display: inline-flex;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.catalog-view-toggle button {
    background: transparent;
    border: none;
    padding: 0.4rem 0.7rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s;
    font-size: 0.95rem;
}

.catalog-view-toggle button:hover { color: var(--brand); background: var(--surface-2); }
.catalog-view-toggle button.active { background: var(--brand); color: #fff; }

/* List view grid */
.catalog-list .catalog-list__item {
    display: grid;
    grid-template-columns: 120px 1fr auto;
    gap: 1rem;
    padding: 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 0.75rem;
    transition: border-color 0.15s, box-shadow 0.15s;
    align-items: center;
}

.catalog-list__item:hover {
    border-color: var(--brand-soft);
    box-shadow: var(--shadow-sm);
}

.catalog-list__img {
    width: 120px; height: 120px;
    background: var(--surface-2);
    border-radius: var(--radius-sm);
    padding: 0.6rem;
}

.catalog-list__img img { width: 100%; height: 100%; object-fit: contain; }

.catalog-list__body { min-width: 0; }

.catalog-list__sku {
    font-family: 'JetBrains Mono', 'Consolas', monospace;
    font-size: 0.72rem;
    color: var(--text-muted);
}

.catalog-list__title {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text);
    margin: 0.15rem 0 0.35rem;
    line-height: 1.3;
}

.catalog-list__title a { color: var(--text); text-decoration: none; }
.catalog-list__title a:hover { color: var(--brand); }

.catalog-list__desc {
    color: var(--text-muted);
    font-size: 0.85rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.catalog-list__actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    min-width: 180px;
}

.catalog-list__price {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--brand);
    font-family: 'Space Grotesk', 'Inter', sans-serif;
}

.catalog-list__price-was {
    font-size: 0.82rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

@media (max-width: 575.98px) {
    .catalog-list .catalog-list__item {
        grid-template-columns: 80px 1fr;
        grid-template-areas:
            "img body"
            "actions actions";
    }
    .catalog-list__img { width: 80px; height: 80px; grid-area: img; }
    .catalog-list__body { grid-area: body; }
    .catalog-list__actions { grid-area: actions; flex-direction: row; justify-content: space-between; align-items: center; min-width: 0; }
}

/* Grid density (3 vs 4 columns) */
.catalog-grid--comfortable .col-lg-3,
.catalog-grid--comfortable .col-lg-4 { flex: 0 0 33.333%; max-width: 33.333%; }

@media (max-width: 991.98px) {
    .catalog-grid--comfortable .col-lg-3,
    .catalog-grid--comfortable .col-lg-4 { flex: 0 0 50%; max-width: 50%; }
}

/* Sticky sidebar */
@media (min-width: 992px) {
    .catalog-sidebar-sticky {
        position: sticky;
        top: 80px;
        max-height: calc(100vh - 100px);
        overflow-y: auto;
        scrollbar-width: thin;
    }
}

/* ═══════════════════════════════════════════════════════════════
   DEALER GLOBAL LAYOUT WRAPPER
   Her dealer sayfası otomatik bu max-width içine alınır.
   Sayfa-özel class'lar (.dash-page/.order-page/.cart-page/.catalog-page)
   sadece semantic grup olarak kalır; ekstra max-width koymazlar.
   ═══════════════════════════════════════════════════════════════ */

body.dealer-body .dealer-page-wrap {
    max-width: 1320px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

/* Default başlık: dealer sayfalarında tüm .page-title h4/h1 Space Grotesk */
body.dealer-body h1.page-title,
body.dealer-body h2.page-title,
body.dealer-body h4.page-title {
    font-family: 'Space Grotesk', 'Inter', system-ui, sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
    margin-bottom: 1.25rem;
}

/* Default h4 (eski sayfalar için fallback — tüm page-top h4) */
body.dealer-body main > .dealer-page-wrap > h4:first-child,
body.dealer-body main > .dealer-page-wrap > h3:first-child,
body.dealer-body main > .dealer-page-wrap > h2:first-child {
    font-family: 'Space Grotesk', 'Inter', system-ui, sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
}

/* Default tablo: dealer sayfalarında tüm .table modern head */
body.dealer-body .table > thead > tr > th {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    background: var(--surface-2);
    padding: 0.75rem 1rem;
}

body.dealer-body .table > tbody > tr > td {
    padding: 0.85rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

/* Default badge: dealer sayfalarında daha yumuşak */
body.dealer-body .badge {
    font-weight: 600;
    padding: 0.35em 0.7em;
    border-radius: 999px;
    font-size: 0.72em;
    letter-spacing: 0.01em;
}

/* Default form inputs */
body.dealer-body .form-control,
body.dealer-body .form-select {
    border-radius: var(--radius-sm);
}

body.dealer-body .form-control:focus,
body.dealer-body .form-select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-soft);
}

/* ═══════════════════════════════════════════════════════════════
   STOREFRONT LAYOUT DEFAULTS (anonim + public)
   _StoreLayout zaten .container kullanıyor; sadece tipografi ve
   form/tablo/badge varsayılan stilleri.
   ═══════════════════════════════════════════════════════════════ */

body.store-body h1.page-title,
body.store-body h2.page-title,
body.store-body h3.page-title,
body.store-body h4.page-title {
    font-family: 'Space Grotesk', 'Inter', system-ui, sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
    margin-bottom: 1.25rem;
}

/* Storefront display başlıklar (hero/landing) */
body.store-body h1.display-4,
body.store-body h1.display-5,
body.store-body h1.display-6,
body.store-body h2.display-5,
body.store-body h2.display-6 {
    font-family: 'Space Grotesk', 'Inter', system-ui, sans-serif;
    font-weight: 800;
    letter-spacing: -0.03em;
}

body.store-body .table > thead > tr > th {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    background: var(--surface-2);
    padding: 0.75rem 1rem;
}

body.store-body .table > tbody > tr > td {
    padding: 0.85rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

body.store-body .badge {
    font-weight: 600;
    padding: 0.35em 0.7em;
    border-radius: 999px;
    font-size: 0.72em;
    letter-spacing: 0.01em;
}

body.store-body .form-control,
body.store-body .form-select {
    border-radius: var(--radius-sm);
}

body.store-body .form-control:focus,
body.store-body .form-select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-soft);
}

/* ═══════════════════════════════════════════════════════════════
   AUTH / LOGIN LAYOUT PREMIUM
   Login/Register/ForgotPassword/ResetPassword ortak stil
   ═══════════════════════════════════════════════════════════════ */

body.auth-body {
    --brand: #2563eb;
    --brand-dark: #1d4ed8;
    --brand-soft: #eff6ff;
    --text: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.10), 0 4px 8px rgba(15, 23, 42, 0.05);

    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    background:
        radial-gradient(circle at 15% 15%, rgba(37,99,235,0.10), transparent 45%),
        radial-gradient(circle at 85% 85%, rgba(124,58,237,0.10), transparent 45%),
        linear-gradient(180deg, #f8fafc 0%, #eff6ff 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    color: var(--text);
}

body.auth-body[dir="rtl"] {
    font-family: 'Inter', 'Tahoma', 'Arial', sans-serif;
}

.auth-card {
    background: #fff;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 440px;
    padding: 2.25rem 2rem;
    border: 1px solid var(--border);
}

.auth-card--wide { max-width: 640px; }

.auth-card__brand {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-card__brand-icon {
    width: 56px; height: 56px;
    margin: 0 auto 1rem;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.25);
}

.auth-card__title {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.02em;
    margin: 0;
    color: var(--text);
}

.auth-card__subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0.35rem 0 0;
}

.auth-card .form-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.4rem;
}

.auth-card .form-control,
.auth-card .form-select {
    border-radius: var(--radius-sm);
    padding: 0.65rem 0.85rem;
    border: 1.5px solid var(--border);
    font-size: 0.95rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.auth-card .form-control:focus,
.auth-card .form-select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-soft);
    outline: none;
}

.auth-card .btn-primary,
.auth-card .btn-auth-primary {
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
    border: none;
    color: #fff;
    border-radius: 999px;
    padding: 0.7rem 1.25rem;
    font-weight: 600;
    font-size: 0.95rem;
    width: 100%;
    box-shadow: 0 4px 12px rgba(37,99,235,0.25);
    transition: transform 0.15s, box-shadow 0.15s;
}

.auth-card .btn-primary:hover,
.auth-card .btn-auth-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37,99,235,0.35);
}

.auth-card .btn-outline-primary {
    border-radius: 999px;
    border: 1.5px solid var(--brand);
    color: var(--brand);
    font-weight: 600;
    padding: 0.55rem 1.1rem;
}

.auth-card a {
    color: var(--brand);
    text-decoration: none;
    font-weight: 500;
}

.auth-card a:hover { color: var(--brand-dark); text-decoration: underline; }

.auth-card__divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.5rem 0 1rem;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.auth-card__divider::before,
.auth-card__divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.auth-card__footer {
    margin-top: 1.5rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.88rem;
}

.auth-card .alert {
    border-radius: var(--radius-sm);
    border: none;
    font-size: 0.88rem;
    padding: 0.75rem 1rem;
}

/* ═══════════════════════════════════════════════════════════════
   ERROR PAGE PREMIUM (Forbidden / NotFound / TooMany / Error)
   ═══════════════════════════════════════════════════════════════ */

.err-page {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
}

.err-card {
    max-width: 520px;
    text-align: center;
}

.err-card__illus {
    width: 160px;
    height: 160px;
    margin: 0 auto 1.5rem;
    opacity: 0.95;
}

.err-card__code {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: 4rem;
    font-weight: 800;
    letter-spacing: -0.05em;
    line-height: 1;
    background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 50%, #7c3aed 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 0.5rem;
}

.err-card__title {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text, #0f172a);
    margin-bottom: 0.75rem;
}

.err-card__desc {
    color: var(--text-muted, #64748b);
    font-size: 1rem;
    margin-bottom: 1.75rem;
    line-height: 1.55;
}

.err-card__actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.err-card__actions .btn {
    border-radius: 999px;
    padding: 0.55rem 1.4rem;
    font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════════
   DEALER DASHBOARD PREMIUM
   ═══════════════════════════════════════════════════════════════ */

.dash-page {
    /* max-width now comes from .dealer-page-wrap; keep as semantic group */
    width: 100%;
}

.dash-stat-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.dash-stat {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.35rem;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.dash-stat:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--brand-soft);
}

.dash-stat__icon {
    width: 48px; height: 48px;
    border-radius: var(--radius-sm);
    background: var(--brand-soft);
    color: var(--brand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.dash-stat--success .dash-stat__icon { background: #ecfdf5; color: var(--success); }
.dash-stat--warning .dash-stat__icon { background: #fffbeb; color: var(--warning); }
.dash-stat--danger .dash-stat__icon { background: #fef2f2; color: var(--danger); }
.dash-stat--info .dash-stat__icon { background: #f0f9ff; color: var(--accent); }

.dash-stat__body { flex: 1; min-width: 0; line-height: 1.2; }

.dash-stat__label {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.dash-stat__value {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
    line-height: 1.05;
}

.dash-stat__value.dash-stat__value--neg { color: var(--danger); }
.dash-stat__value.dash-stat__value--pos { color: var(--success); }

.dash-stat__sub {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
}

.dash-stat__action {
    font-size: 0.8rem;
    color: var(--brand);
    text-decoration: none;
    font-weight: 600;
    margin-top: 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.dash-stat__action:hover { color: var(--brand-dark); }
.dash-stat__action i { transition: transform 0.15s; }
.dash-stat__action:hover i { transform: translateX(3px); }

[dir="rtl"] .dash-stat__action:hover i { transform: translateX(-3px); }

/* Dashboard recent orders mini-list */
.dash-orders {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.dash-orders__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1.1rem;
    border-bottom: 1px solid var(--border);
    background: var(--surface-2);
}

.dash-orders__head h6 { margin: 0; font-weight: 600; font-size: 0.95rem; }

.dash-order-row {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1.1rem;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
    text-decoration: none;
    color: var(--text);
}

.dash-order-row:last-child { border-bottom: 0; }
.dash-order-row:hover { background: var(--surface-2); color: var(--text); }

.dash-order-row__num {
    font-weight: 600;
    color: var(--text);
    font-family: 'JetBrains Mono', 'Consolas', monospace;
    font-size: 0.88rem;
}

.dash-order-row__date { font-size: 0.78rem; color: var(--text-muted); }

.dash-order-row__total {
    font-weight: 700;
    color: var(--brand);
    font-size: 0.95rem;
    font-family: 'Space Grotesk', 'Inter', sans-serif;
}

@media (max-width: 575.98px) {
    .dash-order-row {
        grid-template-columns: 1fr auto;
        grid-template-areas: "num total" "date status";
        row-gap: 0.25rem;
    }
    .dash-order-row__num { grid-area: num; }
    .dash-order-row__total { grid-area: total; text-align: right; }
    .dash-order-row__date { grid-area: date; }
    .dash-order-row .status-chip { grid-area: status; justify-self: end; }
}

/* Status chip (shared: home, orders) */
.status-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.status-chip i { font-size: 0.85rem; }

.status-chip--pending { background: #fef3c7; color: #92400e; }
.status-chip--approved { background: #d1fae5; color: #065f46; }
.status-chip--processing { background: #dbeafe; color: #1e40af; }
.status-chip--shipped { background: #e0e7ff; color: #3730a3; }
.status-chip--delivered { background: #d1fae5; color: #065f46; }
.status-chip--cancelled { background: #fee2e2; color: #991b1b; }
.status-chip--rejected { background: #fecaca; color: #991b1b; }

/* Quick action tiles */
.dash-quick {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    margin-bottom: 1.5rem;
}

.dash-quick-tile {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1rem 1.1rem;
    text-decoration: none;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s;
}

.dash-quick-tile:hover {
    border-color: var(--brand);
    color: var(--brand);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.dash-quick-tile i {
    font-size: 1.35rem;
    color: var(--brand);
}

.dash-quick-tile span { font-weight: 600; font-size: 0.92rem; }

/* Section header shared */
.dash-section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 2.5rem 0 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.dash-section-head h4, .dash-section-head h5 {
    margin: 0;
    font-weight: 700;
    letter-spacing: -0.01em;
}

/* ═══════════════════════════════════════════════════════════════
   ORDER DETAIL PREMIUM
   ═══════════════════════════════════════════════════════════════ */

.order-page {
    /* inherits max-width from .dealer-page-wrap */
    width: 100%;
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.order-header__title {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-weight: 700;
    font-size: clamp(1.25rem, 2vw, 1.75rem);
    letter-spacing: -0.02em;
    margin: 0;
    color: var(--text);
}

.order-header__meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.order-header__actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

/* Horizontal status timeline */
.order-timeline {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem 1.25rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.order-timeline__track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: 0;
    position: relative;
}

.order-timeline__step {
    text-align: center;
    position: relative;
    padding: 0 0.5rem;
}

.order-timeline__step::before {
    content: '';
    position: absolute;
    top: 14px;
    left: 50%;
    right: -50%;
    height: 2px;
    background: var(--border);
    z-index: 0;
}

.order-timeline__step:last-child::before { display: none; }

.order-timeline__step.done::before { background: var(--success); }

.order-timeline__dot {
    position: relative;
    z-index: 1;
    width: 30px; height: 30px;
    margin: 0 auto 0.5rem;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: all 0.2s;
}

.order-timeline__step.done .order-timeline__dot {
    background: var(--success);
    border-color: var(--success);
    color: #fff;
}

.order-timeline__step.active .order-timeline__dot {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
    box-shadow: 0 0 0 4px var(--brand-soft);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(37,99,235,0.15); }
    50% { box-shadow: 0 0 0 8px rgba(37,99,235,0.08); }
}

.order-timeline__step.cancelled .order-timeline__dot {
    background: var(--danger);
    border-color: var(--danger);
    color: #fff;
}

.order-timeline__label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    line-height: 1.2;
}

.order-timeline__step.done .order-timeline__label,
.order-timeline__step.active .order-timeline__label { color: var(--text); }

.order-timeline__date {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

@media (max-width: 575.98px) {
    .order-timeline { padding: 1.25rem 0.75rem; }
    .order-timeline__track { grid-auto-flow: row; grid-auto-columns: unset; gap: 0.5rem; }
    .order-timeline__step {
        display: flex;
        align-items: flex-start;
        gap: 0.75rem;
        text-align: left;
        padding: 0;
    }
    .order-timeline__step::before {
        top: 30px; left: 14px; right: auto;
        bottom: -8px; width: 2px; height: auto;
    }
    .order-timeline__step:last-child::before { display: none; }
    .order-timeline__dot { margin: 0; flex-shrink: 0; }
    .order-timeline__label { margin-top: 0.3rem; }
}

/* Order items block */
.order-items {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.order-items__head {
    padding: 0.85rem 1.1rem;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.order-item-row {
    display: grid;
    grid-template-columns: 64px 1fr auto auto;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1.1rem;
    border-bottom: 1px solid var(--border);
}

.order-item-row:last-child { border-bottom: 0; }

.order-item-row__img {
    width: 64px; height: 64px;
    background: var(--surface-2);
    border-radius: var(--radius-sm);
    padding: 0.35rem;
}

.order-item-row__img img { width: 100%; height: 100%; object-fit: contain; }

.order-item-row__body .name {
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--text);
    display: block;
    margin-bottom: 0.1rem;
}

.order-item-row__body .sku {
    font-family: 'JetBrains Mono', 'Consolas', monospace;
    font-size: 0.72rem;
    color: var(--text-muted);
}

.order-item-row__qty {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    white-space: nowrap;
}

.order-item-row__total {
    font-weight: 700;
    color: var(--brand);
    font-size: 0.98rem;
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    min-width: 100px;
    text-align: right;
}

[dir="rtl"] .order-item-row__total { text-align: left; }

@media (max-width: 575.98px) {
    .order-item-row {
        grid-template-columns: 56px 1fr auto;
        grid-template-areas: "img body total" "img qty total";
        gap: 0.5rem 0.75rem;
        padding: 0.75rem;
    }
    .order-item-row__img { width: 56px; height: 56px; grid-area: img; }
    .order-item-row__body { grid-area: body; }
    .order-item-row__qty { grid-area: qty; }
    .order-item-row__total { grid-area: total; min-width: 0; }
}

/* Summary breakdown */
.order-summary {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.1rem 1.25rem;
}

.order-summary__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.45rem 0;
    font-size: 0.9rem;
    color: var(--text);
}

.order-summary__row.discount { color: var(--success); }
.order-summary__row.total {
    border-top: 1px solid var(--border);
    padding-top: 0.85rem;
    margin-top: 0.5rem;
    font-weight: 700;
    font-size: 1.05rem;
}

.order-summary__row.total strong {
    color: var(--brand);
    font-size: 1.25rem;
    font-family: 'Space Grotesk', 'Inter', sans-serif;
}

/* Info card (right column) */
.order-info-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 1rem;
}

.order-info-card__head {
    padding: 0.85rem 1.1rem;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    font-size: 0.88rem;
}

.order-info-card__body {
    padding: 0.85rem 1.1rem;
}

.order-info-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.4rem 0;
    font-size: 0.85rem;
    border-bottom: 1px dashed var(--border);
}

.order-info-row:last-child { border-bottom: 0; }

.order-info-row__key { color: var(--text-muted); }
.order-info-row__val { font-weight: 600; color: var(--text); text-align: right; }
[dir="rtl"] .order-info-row__val { text-align: left; }

