@font-face {
    font-family: "ZylonBody";
    src: url("../../fonts/BYekan.ttf") format("truetype");
    font-display: swap;
}

@font-face {
    font-family: "ZylonHeading";
    src: url("../../fonts/BTitrBd.ttf") format("truetype");
    font-display: swap;
}

@font-face {
    font-family: "ZylonUi";
    src: url("../../fonts/BTraffic.ttf") format("truetype");
    font-display: swap;
}

:root {
    --bg: #f5f5f5;
    --surface: #ffffff;
    --surface-soft: #fafafa;
    --border: #e0e0e2;
    --text: #3f4064;
    --muted: #81858b;
    --primary: #ef4056;
    --primary-dark: #d32f45;
    --success: #00a049;
    --font-body: "ZylonBody", "Vazirmatn", sans-serif;
    --font-heading: "ZylonHeading", "ZylonBody", "Vazirmatn", sans-serif;
    --font-ui: "ZylonUi", "ZylonBody", "Vazirmatn", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    direction: rtl;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    position: relative;
    min-height: 100vh;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: url("../img/brand-bg-yellow.png");
    background-size: cover;
    background-position: center;
    opacity: .12;
    z-index: -2;
    pointer-events: none;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(245, 245, 245, .88);
    z-index: -1;
    pointer-events: none;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    width: min(1320px, 94%);
    margin: 0 auto;
}

.public-page.variant-products {
    --primary: #0d9488;
    --primary-dark: #0f766e;
}

.public-page.variant-product {
    --primary: #7c3aed;
    --primary-dark: #6d28d9;
}

.public-page.variant-cart {
    --primary: #ea580c;
    --primary-dark: #c2410c;
}

.public-page.variant-checkout {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
}

.public-page.variant-tracking {
    --primary: #0f766e;
    --primary-dark: #115e59;
}

.public-page.variant-login {
    --primary: #be185d;
    --primary-dark: #9d174d;
}

.public-page.variant-register {
    --primary: #4338ca;
    --primary-dark: #3730a3;
}

.public-page.variant-profile {
    --primary: #4f46e5;
    --primary-dark: #4338ca;
}

.public-page.variant-payment {
    --primary: #16a34a;
    --primary-dark: #15803d;
}

.advanced-header {
    position: sticky;
    top: 0;
    z-index: 65;
    backdrop-filter: saturate(1.2) blur(7px);
    background: rgba(255, 255, 255, .92);
    border-bottom: 1px solid var(--border);
}

.advanced-header-inner {
    display: grid;
    grid-template-columns: auto auto 1fr;
    align-items: center;
    gap: 10px;
    min-height: 68px;
}

.advanced-brand {
    background: var(--primary);
    color: #fff;
    padding: 7px 11px;
    border-radius: 10px;
    font-family: var(--font-heading);
}

.advanced-page-tag {
    font-family: var(--font-ui);
    color: var(--primary);
}

.advanced-nav {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    flex-wrap: wrap;
}

.advanced-nav a {
    padding: 7px 11px;
    border-radius: 10px;
    color: var(--muted);
    font-family: var(--font-ui);
    transition: .2s ease;
}

.advanced-nav a:hover {
    background: #f0f0f1;
    color: var(--text);
}

.home-header {
    position: sticky;
    top: 68px;
}

.top-ticker {
    background: var(--primary);
    color: #fff;
    overflow: hidden;
    padding: 9px 0;
    white-space: nowrap;
    font-family: var(--font-ui);
}

.ticker-track {
    display: inline-block;
    padding-inline-start: 100%;
    animation: ticker 16s linear infinite;
    font-weight: 600;
}

@keyframes ticker {
    to {
        transform: translateX(-100%);
    }
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: #fff;
    border-bottom: 1px solid var(--border);
}

.header-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 72px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--primary);
    font-family: var(--font-heading);
}

.brand img {
    width: 42px;
    height: 42px;
    object-fit: contain;
    border-radius: 8px;
}

.nav {
    display: flex;
    gap: 8px;
    align-items: center;
}

.nav a {
    padding: 8px 12px;
    border-radius: 8px;
    color: var(--muted);
    font-weight: 500;
    font-family: var(--font-ui);
}

.nav a:hover {
    color: var(--text);
    background: #f0f0f1;
}

.mobile-toggle {
    display: none;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text);
    border-radius: 10px;
    padding: 8px 10px;
}

.hero {
    margin-top: 14px;
    border-radius: 16px;
    min-height: 360px;
    display: grid;
    place-items: center;
    text-align: center;
    color: #fff;
    background: linear-gradient(120deg, #ef4056 0%, #f97316 60%, #f59e0b 100%);
    box-shadow: 0 8px 28px rgba(239, 64, 86, 0.25);
    overflow: hidden;
    position: relative;
}

.hero-media {
    position: absolute;
    inset: 0;
}

.hero-bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .35;
}

.hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .34;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(130deg, rgba(41, 5, 24, .4), rgba(28, 36, 77, .35));
}

.hero-slide {
    position: relative;
    z-index: 2;
    display: none;
    padding: 40px 16px;
}

.hero-slide.active {
    display: block;
    animation: fadeIn .7s ease;
}

.hero-logo {
    width: 120px;
    height: auto;
    margin-bottom: 10px;
    filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .35));
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.hero h1 {
    margin: 0 0 12px;
    font-size: clamp(1.6rem, 3vw, 2.6rem);
}

.hero p {
    margin: 0 auto 22px;
    max-width: 760px;
    color: #fff4f6;
}

.hero h1,
.section-title,
.card-body h3 {
    font-family: var(--font-heading);
}

.btn {
    border: 0;
    border-radius: 10px;
    padding: 10px 16px;
    font-family: var(--font-ui);
    font-weight: 700;
    cursor: pointer;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: #fff;
    color: var(--primary);
}

.section {
    padding: 34px 0;
}

.section-dark {
    background: transparent;
    color: var(--text);
}

.section-title {
    margin: 0 0 16px;
    font-size: 1.4rem;
    font-weight: 800;
}

.counter-wrap {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.counter-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    text-align: center;
    padding: 18px 12px;
}

.counter-num {
    color: var(--primary);
    font-size: 1.7rem;
    font-weight: 800;
    font-family: var(--font-ui);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
    gap: 14px;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    transition: .25s ease;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, .08);
}

.card-media {
    height: 170px;
    background: linear-gradient(135deg, #f0f0f1, #e8e8ea);
}

.card-body {
    padding: 14px;
}

.card-body h3 {
    margin: 0 0 10px;
    font-size: 1rem;
    min-height: 48px;
}

.card-body p {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: .9rem;
    min-height: 44px;
}

.price {
    font-size: 1rem;
    color: var(--success);
    font-weight: 800;
    margin-bottom: 10px;
    font-family: var(--font-ui);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 14px;
}

.contact-grid>div {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px;
}

input,
textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 11px 12px;
    margin-bottom: 10px;
    font-family: var(--font-body);
    background: #fff;
}

input:focus,
textarea:focus {
    outline: 0;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(239, 64, 86, 0.14);
}

#searchResults {
    border: 1px solid var(--border);
    border-radius: 10px;
    min-height: 44px;
    background: #fff;
    margin: 8px 0 16px;
}

.search-item {
    padding: 10px 12px;
    border-bottom: 1px solid #f0f0f1;
    color: var(--muted);
}

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

.interactive-caption {
    border: 2px solid var(--primary);
    border-radius: 16px;
    padding: 18px;
    transition: transform .16s ease, box-shadow .2s ease;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .12);
    touch-action: pan-y;
}

.interactive-caption h2 {
    margin: 0 0 8px;
    font-family: var(--font-heading);
}

.interactive-caption p {
    margin: 0;
    font-size: .98rem;
    line-height: 1.9;
}

.caption-subtitle {
    position: relative;
    min-height: 2.2em;
}

.caption-subtitle::after {
    content: "";
    display: inline-block;
    width: 2px;
    height: 1.1em;
    background: currentColor;
    vertical-align: middle;
    margin-inline-start: 5px;
    animation: blink .8s infinite;
}

@keyframes blink {

    0%,
    45% {
        opacity: 1;
    }

    46%,
    100% {
        opacity: 0;
    }
}

.back-home-fab {
    position: fixed;
    left: 14px;
    bottom: 14px;
    z-index: 80;
    background: var(--primary);
    color: #fff;
    padding: 10px 12px;
    border-radius: 999px;
    font-family: var(--font-ui);
    font-weight: 700;
    box-shadow: 0 10px 20px rgba(0, 0, 0, .2);
}

.back-home-fab:hover {
    background: var(--primary-dark);
}

.advanced-footer {
    margin-top: 28px;
    background: #fff;
    border-top: 1px solid var(--border);
    padding: 18px 0 26px;
}

.advanced-footer-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.advanced-footer h3,
.advanced-footer h4 {
    margin: 0 0 8px;
    font-family: var(--font-heading);
    color: var(--text);
}

.advanced-footer p,
.advanced-footer a {
    margin: 0 0 6px;
    color: var(--muted);
    display: block;
}

footer {
    margin-top: 24px;
    background: #fff;
    border-top: 1px solid var(--border);
    padding: 22px 0;
    color: var(--muted);
    font-family: var(--font-ui);
}

[data-reveal] {
    opacity: 0;
    transform: translateY(16px);
    transition: .55s ease;
}

[data-reveal].revealed {
    opacity: 1;
    transform: none;
}

@media (max-width: 900px) {
    .mobile-toggle {
        display: inline-block;
    }

    .nav {
        position: absolute;
        top: 72px;
        right: 3%;
        left: 3%;
        display: none;
        flex-direction: column;
        align-items: stretch;
        background: #fff;
        border: 1px solid var(--border);
        border-radius: 12px;
        padding: 10px;
    }

    .nav.open {
        display: flex;
    }

    .counter-wrap {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .hero-logo {
        width: 86px;
    }

    .hero {
        min-height: 300px;
    }

    .advanced-header-inner {
        grid-template-columns: 1fr;
        padding-block: 8px;
    }

    .advanced-nav {
        justify-content: flex-start;
    }

    .home-header {
        top: 84px;
    }

    .advanced-footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .container {
        width: min(1320px, 96%);
    }

    .header-wrap {
        min-height: 62px;
    }

    .brand {
        font-size: 1.06rem;
    }

    .section {
        padding: 24px 0;
    }

    .card-body h3,
    .card-body p {
        min-height: auto;
    }

    .counter-wrap {
        grid-template-columns: 1fr;
    }

    .interactive-caption {
        padding: 14px;
        border-radius: 12px;
    }

    .top-ticker {
        font-size: .84rem;
    }

    .back-home-fab {
        left: 10px;
        bottom: 10px;
        padding: 9px 11px;
        font-size: .9rem;
    }
}

/* هر اسلاید باید مرجع موقعیت دهی باشد */
.m-slideshow .slides {
    position: relative;
    overflow: hidden;
}

/* تصویر پس زمینه */
.slide-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

/* لایه هکس رنگی */
.slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(140deg, rgba(239, 64, 86, 0.65), rgba(199, 35, 98, 0.65));
    z-index: 2;
}

/* متن روی همه چیز */
.hero-slide-card {
    position: relative;
    z-index: 3;
}


/* اضافه کردن به استایل‌های موجود */

.hero-slide-card img {
    max-width: 90%;
    height: auto;
    margin: 16px auto 0;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

@media (max-width: 760px) {
    .hero-slide-card img {
        max-width: 100%;
        margin-top: 12px;
    }
}