:root {
    --primary: #3f3d8e;
    --primary-dark: #312f73;
    --secondary: #ef7f1a;
    --secondary-dark: #d96f12;
    --text: #222222;
    --muted: #6b7280;
    --border: #ececec;
    --surface: #ffffff;
    --surface-soft: #f8f9fb;
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
    --shadow-hover: 0 14px 30px rgba(0, 0, 0, 0.08);
    --radius: 18px;
}

@font-face {
    font-family: "Vazir";
    src: url("assets/fonts/Vazir.eot");
    src: url("assets/fonts/Vazir.eot?#iefix") format("embedded-opentype"), url("assets/fonts/Vazir.woff2") format("woff2"), url("assets/fonts/Vazir.woff") format("woff"), url("assets/fonts/Vazir.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Vazir", sans-serif;
    color: var(--text);
    background: #fff;
    direction: rtl;
    text-align: right;
    line-height: 1.7;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

button,
input {
    font: inherit;
}

.container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: var(--primary);
}

.logo-mark {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    box-shadow: var(--shadow);
}

.logo-text {
    font-weight: 700;
}

.nav {
    display: flex;
    align-items: center;
    gap: 24px;
    color: var(--muted);
}

.nav a:hover {
    color: var(--primary);
}

.hero-section {
    padding: 56px 0 28px;
    background:
        radial-gradient(circle at top right, rgba(63, 61, 142, 0.08), transparent 36%),
        radial-gradient(circle at top left, rgba(239, 127, 26, 0.08), transparent 32%);
}

.hero-inner {
    display: grid;
    align-items: center;
    min-height: 280px;
}

.hero-content {
    max-width: 760px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(63, 61, 142, 0.08);
    color: var(--primary);
    font-size: 0.92rem;
    font-weight: 700;
}

.hero-content h1 {
    margin: 0 0 14px;
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 1.25;
    color: var(--primary-dark);
}

.hero-content p {
    margin: 0;
    font-size: 1.04rem;
    color: var(--muted);
    max-width: 60ch;
}

.products-section,
.info-section {
    padding: 36px 0;
}

.section-header {
    margin-bottom: 22px;
}

.section-header h2 {
    margin: 0 0 8px;
    font-size: clamp(1.4rem, 2vw, 2rem);
    color: var(--primary-dark);
}

.section-header p {
    margin: 0;
    color: var(--muted);
}

.toolbar {
    display: grid;
    gap: 14px;
    margin-bottom: 18px;
}

.search-box {
    width: 100%;
}

.search-box input {
    width: 100%;
    height: 52px;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 0 16px;
    background: var(--surface);
    color: var(--text);
    outline: none;
    box-shadow: var(--shadow);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-family: inherit;
}

.search-box input::placeholder {
    color: #9aa0a6;
    font-family: inherit;
    opacity: 1;
}

.search-box input:focus {
    border-color: rgba(63, 61, 142, 0.45);
    box-shadow: 0 0 0 4px rgba(63, 61, 142, 0.08);
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.brand-btn {
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    border-radius: 999px;
    padding: 10px 16px;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.brand-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(63, 61, 142, 0.28);
}

.brand-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.results-row {
    margin-bottom: 18px;
    color: var(--muted);
    font-size: 0.96rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.product-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 0 0 var(--radius) var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}


.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(63, 61, 142, 0.16);
}

/* مهم: چون تصاویر شما مربع هستند، کادر هم همیشه مربع باشد */
.product-image-wrap {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: var(--surface-soft);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.product-body {
    padding: 16px;
}

.product-title {
    margin: 0 0 10px;
    font-size: 1.02rem;
    color: var(--primary-dark);
}

.product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    font-size: 0.88rem;
    color: var(--muted);
    margin-bottom: 10px;
}

.product-description {
    margin: 0 0 16px;
    color: #4b5563;
    font-size: 0.94rem;
    min-height: 56px;
}

.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.product-price {
    color: var(--secondary);
    font-weight: 800;
    font-size: 1rem;
}

.price-button {
    border: 1px solid rgba(239, 127, 26, 0.2);
    padding: 8px 16px;
    background: rgba(239, 127, 26, 0.07);
    color: var(--secondary);
    font: inherit;
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.price-button:hover {
    background: var(--secondary);
    color: #fff;
    border-color: var(--secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 127, 26, 0.25);
}

.price-button:active {
    transform: translateY(0);
}

.price-button:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 3px;
}

.stock-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 0.84rem;
    font-weight: 700;
    white-space: nowrap;
}

.stock-in {
    background: rgba(34, 197, 94, 0.1);
    color: #15803d;
}

.stock-out {
    background: rgba(239, 68, 68, 0.1);
    color: #b91c1c;
}

.empty-state {
    margin-top: 24px;
    padding: 28px;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    background: var(--surface-soft);
    text-align: center;
    color: var(--muted);
}

.empty-state h3 {
    margin: 0 0 8px;
    color: var(--primary-dark);
}

.info-card {
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.contact-card a {
    display: inline-block;
    margin-top: 8px;
    color: var(--secondary);
    font-weight: 700;
}

.site-footer {
    padding: 22px 0 32px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    text-align: center;
}

#contactDialog {
    width: min(90vw, 460px);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 0;
    color: var(--text);
    box-shadow: var(--shadow-hover);
}

#contactDialog::backdrop {
    background: rgb(0 0 0 / 0.5);
}

.contact-dialog {
    padding: 24px;
    background: var(--surface);
}

.contact-dialog h2 {
    margin: 0 0 12px;
    color: var(--primary);
}

.contact-dialog p {
    margin: 0 0 18px;
    line-height: 1.9;
}

.contact-dialog a {
    color: var(--secondary);
    font-weight: 700;
    text-decoration: none;
}

.contact-dialog a:hover {
    text-decoration: underline;
}

.dialog-close {
    border: 0;
    border-radius: 10px;
    padding: 10px 16px;
    background: var(--primary);
    color: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.dialog-close:hover {
    background: var(--primary-dark);
}

.dialog-close:focus-visible {
    outline: 3px solid var(--secondary);
    outline-offset: 3px;
}

@media (max-width: 1100px) {
    .products-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .header-inner {
        flex-direction: column;
        justify-content: center;
        padding: 14px 0;
    }

    .nav {
        gap: 16px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .container {
        width: min(100% - 20px, 1180px);
    }

    .hero-section {
        padding-top: 34px;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .product-footer {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .filters {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 4px;
    }

    .price-button {
        padding: 6px 12px;
        font-size: 0.95rem;
    }
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: var(--primary);
}

.logo-mark {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #fff;
    box-shadow: var(--shadow);
    flex-shrink: 0;
}

.logo-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.logo-text {
    font-weight: 700;
    line-height: 1;
}

.info-section {
    padding: 40px 0;
}

.contact-card {
    text-align: center;
}

.contact-phone {
    display: inline-block;
    margin-top: 10px;
    font-size: 20px;
    font-weight: bold;
    text-decoration: none;
}

.enamad-box {
    margin-top: 20px;
}

