:root {
    --bs-font-sans-serif: 'Vazirmatn', 'Inter', Tahoma, Arial, sans-serif;
    --bs-body-font-family: var(--bs-font-sans-serif);
    --bs-btn-font-family: var(--bs-font-sans-serif);
}

html {
    font-family: var(--bs-font-sans-serif);
}

body,
button,
input,
optgroup,
select,
textarea,
.form-control,
.form-select,
.btn,
.dropdown-menu,
.navbar,
.modal-content,
.alert,
.badge,
.table,
.card,
.list-group,
.nav,
.pagination,
.breadcrumb,
.offcanvas,
.popover,
.tooltip,
.toast {
    font-family: var(--bs-font-sans-serif);
}

html, body {
    direction: rtl;
    text-align: right;
}

/* Hero gradient */
.hero-section {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 40%, #0f3460 100%);
    padding: 6rem 0 5rem;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(99, 102, 241, .25) 0%, transparent 70%);
    top: -100px;
    left: -100px;
    border-radius: 50%;
}

.hero-section::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(16, 185, 129, .15) 0%, transparent 70%);
    bottom: -50px;
    right: 10%;
    border-radius: 50%;
}

.hero-badge {
    display: inline-block;
    background: rgba(99, 102, 241, .2);
    border: 1px solid rgba(99, 102, 241, .4);
    color: #a5b4fc;
    padding: .35rem 1rem;
    border-radius: 50px;
    font-size: .85rem;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.25;
    color: #ffffff;
}

.hero-title span {
    background: linear-gradient(90deg, #6366f1, #10b981);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-sub {
    color: #94a3b8;
    font-size: 1.15rem;
    max-width: 540px;
}

.hero-stats {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 2.5rem;
}

.hero-stat strong {
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff;
    display: block;
}

.hero-stat span {
    color: #94a3b8;
    font-size: .85rem;
}

/* Feature cards */
.feature-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 2rem 1.5rem;
    text-align: center;
    transition: transform .2s, box-shadow .2s;
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, .1);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

/* Category cards */
.category-card {
    background: linear-gradient(135deg, var(--cat-from), var(--cat-to));
    border-radius: 16px;
    padding: 1.5rem;
    color: #fff;
    cursor: pointer;
    transition: transform .2s, box-shadow .2s;
    text-decoration: none;
    display: block;
}

.category-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .2);
    color: #fff;
}

.category-card .cat-icon {
    font-size: 2.2rem;
    display: block;
    margin-bottom: .5rem;
}

.category-card .cat-title {
    font-weight: 700;
    font-size: 1rem;
}

/* Steps */
.step-circle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #10b981);
    color: #fff;
    font-size: 1.4rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

/* Product cards */
.product-card {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
    transition: transform .2s, box-shadow .2s;
    background: #fff;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, .12);
}

.product-card .card-img-placeholder {
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    height: 190px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
}

/* Navbar brand gradient text */
.brand-gradient {
    background: linear-gradient(90deg, #6366f1, #10b981);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}

/* CTA section */
.cta-section {
    background: linear-gradient(135deg, #6366f1, #0f3460);
    color: #fff;
    border-radius: 24px;
    padding: 4rem 2rem;
    text-align: center;
    margin: 3rem 0;
}

/* Section headers */
.section-label {
    color: #6366f1;
    font-weight: 700;
    font-size: .85rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    display: block;
    margin-bottom: .5rem;
}

.section-title {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 800;
    color: #0f172a;
    margin-bottom: .75rem;
}

a, .btn-link {
    color: #6366f1;
}

.btn-primary {
    color: #fff;
    background-color: #6366f1;
    border-color: #6366f1;
}

.btn-primary:hover {
    background-color: #4f46e5;
    border-color: #4f46e5;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #6366f1;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4N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Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "خطایی رخ داده است."
}

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

/* ═══════════════════════════════════════════════════════════════
   PRODUCT DETAIL PAGE  –  3dsky.org inspired
═══════════════════════════════════════════════════════════════ */

/* Loading state */
.pd-loading {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.pd-spinner {
    color: #6366f1;
    width: 3rem;
    height: 3rem;
}

/* Breadcrumb header band */
.pd-header {
    background: #0f172a;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
    padding: .75rem 0;
}

.pd-breadcrumb {
    --bs-breadcrumb-divider-color: #64748b;
}

.pd-breadcrumb .breadcrumb-item a {
    color: #94a3b8;
    text-decoration: none;
    font-size: .85rem;
    transition: color .15s;
}

.pd-breadcrumb .breadcrumb-item a:hover {
    color: #c7d2fe;
}

.pd-breadcrumb .breadcrumb-item.active {
    color: #94a3b8;
    font-size: .85rem;
}

.pd-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    color: #475569;
}

/* Main container spacing */
.pd-main-container {
    padding-top: 2rem;
    padding-bottom: 4rem;
}

/* ── Gallery ─────────────────────────────────── */
.pd-gallery {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
}

.pd-main-img {
    position: relative;
    cursor: zoom-in;
    overflow: hidden;
    background: #f1f5f9;
}

.pd-main-img img {
    display: block;
    max-height: 520px;
    width: 100%;
    object-fit: contain;
    background: #f8fafc;
    transition: transform .3s ease;
}

.pd-main-img:hover img {
    transform: scale(1.02);
}

.pd-zoom-hint {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(15, 23, 42, .7);
    color: #e2e8f0;
    font-size: .78rem;
    padding: .3rem .75rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: .4rem;
    opacity: 0;
    transition: opacity .2s;
    pointer-events: none;
}

.pd-main-img:hover .pd-zoom-hint {
    opacity: 1;
}

/* Thumbnail strip */
.pd-thumbs {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    padding: 12px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    overflow-x: auto;
    scrollbar-width: thin;
}

.pd-thumb {
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    padding: 0;
    background: none;
    transition: border-color .15s, opacity .15s;
    opacity: .65;
}

.pd-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pd-thumb:hover {
    opacity: .9;
    border-color: #a5b4fc;
}

.pd-thumb.active {
    opacity: 1;
    border-color: #6366f1;
}

/* No-image placeholder */
.pd-no-image {
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    border-radius: 16px;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    color: #94a3b8;
}

/* Description card */
.pd-desc-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.75rem;
}

.pd-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: .5rem;
    padding-bottom: .75rem;
    border-bottom: 1px solid #f1f5f9;
}

.pd-section-icon {
    font-size: 1.1rem;
}

.pd-desc-body {
    color: #374151;
    line-height: 2;
    font-size: .95rem;
    white-space: pre-wrap;
}

/* ── Sidebar ─────────────────────────────────── */
.pd-sidebar {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    position: sticky;
    top: 80px;
}

.pd-sidebar-header {
    padding: 1.5rem 1.5rem .75rem;
    border-bottom: 1px solid #f1f5f9;
}

.pd-cat-badge {
    display: inline-block;
    background: #ede9fe;
    color: #6366f1;
    font-size: .75rem;
    font-weight: 700;
    padding: .25rem .85rem;
    border-radius: 50px;
    margin-bottom: .75rem;
}

.pd-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.4;
    margin: 0;
}

/* Seller card */
.pd-seller-card {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    transition: background .15s;
    color: inherit;
}

.pd-seller-card:hover {
    background: #f8fafc;
}

.pd-seller-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #10b981);
    color: #fff;
    font-weight: 800;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pd-seller-label {
    font-size: .72rem;
    color: #94a3b8;
}

.pd-seller-name {
    font-weight: 700;
    font-size: .9rem;
    color: #0f172a;
}

.pd-seller-arrow {
    font-size: 1.4rem;
    color: #94a3b8;
}

/* Price */
.pd-price-block {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    background: #fafbff;
}

.pd-price {
    display: flex;
    align-items: baseline;
    gap: .4rem;
}

.pd-price-amount {
    font-size: 2rem;
    font-weight: 900;
    color: #059669;
    line-height: 1;
}

.pd-price-unit {
    font-size: .95rem;
    color: #6b7280;
    font-weight: 600;
}

.pd-price-free {
    font-size: 1.75rem;
    font-weight: 900;
    color: #059669;
}

/* CTA block */
.pd-cta-block {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
}

.pd-btn-buy {
    background: linear-gradient(135deg, #059669, #0f9d74);
    color: #fff !important;
    font-weight: 700;
    font-size: 1rem;
    padding: .85rem 1.5rem;
    border-radius: 12px;
    border: none;
    box-shadow: 0 4px 16px rgba(5, 150, 105, .35);
    transition: transform .15s, box-shadow .15s;
    text-decoration: none;
    display: block;
    text-align: center;
}

.pd-btn-buy:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(5, 150, 105, .45);
    color: #fff;
}

.pd-btn-bought {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff !important;
    font-weight: 700;
    font-size: 1rem;
    padding: .85rem 1.5rem;
    border-radius: 12px;
    border: none;
    box-shadow: 0 4px 16px rgba(99, 102, 241, .35);
    transition: transform .15s, box-shadow .15s;
    text-decoration: none;
    display: block;
    text-align: center;
}

.pd-btn-bought:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, .45);
    color: #fff;
}

.pd-btn-edit {
    background: #f1f5f9;
    color: #475569 !important;
    font-weight: 700;
    font-size: .9rem;
    padding: .75rem 1.5rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: background .15s;
    text-decoration: none;
    display: block;
    text-align: center;
}

.pd-btn-edit:hover {
    background: #e2e8f0;
    color: #1e293b !important;
}

.pd-own-product {
    text-align: center;
    font-size: .85rem;
    color: #6366f1;
    font-weight: 600;
    margin-bottom: .5rem;
}

/* File info rows */
.pd-fileinfo {
    padding: .5rem 0;
}

.pd-fi-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .6rem 1.5rem;
    font-size: .85rem;
    border-bottom: 1px solid #f8fafc;
    gap: .5rem;
}

.pd-fi-row:last-child {
    border-bottom: none;
}

.pd-fi-label {
    color: #94a3b8;
    flex-shrink: 0;
}

.pd-fi-val {
    color: #1e293b;
    font-weight: 600;
    text-align: left;
}

.pd-fi-trunc {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
}

/* ── Related products ────────────────────────── */
.pd-related {
}

.pd-related-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    transition: transform .2s, box-shadow .2s;
    color: inherit;
}

.pd-related-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .1);
    color: inherit;
}

.pd-related-placeholder {
    height: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    border-radius: 10px 10px 0 0;
}

.pd-related-info {
    padding: .75rem;
}

.pd-related-title {
    font-size: .82rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.4;
    margin-bottom: .35rem;
}

.pd-related-price {
    font-size: .82rem;
    font-weight: 700;
    color: #059669;
}

/* ── Lightbox ────────────────────────────────── */
.pd-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(8, 8, 24, .93);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(6px);
    cursor: zoom-out;
}

.pd-lb-img-wrap {
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: default;
}

.pd-lb-img-wrap img {
    max-width: 90vw;
    max-height: 88vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .6);
}

.pd-lb-close {
    position: fixed;
    top: 1rem;
    left: 1rem;
    background: rgba(255, 255, 255, .15);
    border: none;
    color: #fff;
    font-size: 1.5rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
    z-index: 10000;
}

.pd-lb-close:hover {
    background: rgba(255, 255, 255, .28);
}

.pd-lb-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, .15);
    border: none;
    color: #fff;
    font-size: 2.5rem;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
    z-index: 10000;
    line-height: 1;
}

.pd-lb-nav:hover {
    background: rgba(255, 255, 255, .28);
}

.pd-lb-prev {
    left: 1.5rem;
}

.pd-lb-next {
    right: 1.5rem;
}

.pd-lb-counter {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, .7);
    font-size: .85rem;
    background: rgba(0, 0, 0, .4);
    padding: .3rem 1rem;
    border-radius: 50px;
}

/* ═══════════════════════════════════════════════════════════════
   SELLER PUBLIC PROFILE PAGE
═══════════════════════════════════════════════════════════════ */

.sp-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 60%, #0f3460 100%);
    padding: 3.5rem 0 3rem;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
}

.sp-hero-inner {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.sp-avatar-wrap {
    flex-shrink: 0;
}

.sp-avatar {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, .2);
    object-fit: cover;
    display: block;
}

.sp-avatar-placeholder {
    background: linear-gradient(135deg, #6366f1, #10b981);
    color: #fff;
    font-weight: 800;
    font-size: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sp-hero-info {
    flex: 1;
    min-width: 0;
}

.sp-seller-name {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 800;
    color: #fff;
    margin-bottom: .5rem;
}

.sp-bio {
    color: #94a3b8;
    font-size: .95rem;
    line-height: 1.7;
    max-width: 600px;
    margin-bottom: 1rem;
    white-space: pre-wrap;
}

.sp-stats {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.sp-stat strong {
    display: block;
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
}

.sp-stat span {
    font-size: .8rem;
    color: #64748b;
}

.sp-grid-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
}

.sp-grid-title span {
    color: #6366f1;
}

.view-all-btn {
    transition: all .3s ease;
}

.view-all-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(13, 110, 253, .25);
}

