/* ==============================================
   MenCollection.css — تم تیره‌ی سایت + صفحه‌ی کالکشن مردانه
   (product.html هم از پایه‌ی همین فایل — فونت، رنگ‌ها، فوتر — استفاده می‌کند)
   فونت‌ها با <link> در <head> هر صفحه لود می‌شوند.
   ============================================== */

:root {

    /* Colors */

    --black: #0f0f0f;
    --black2: #181818;
    --white: #ffffff;
    --gray: #8d8d8d;
    --light: #f5f5f5;

    --gold: #D4AF37;
    --goldHover: #E8C862;

    --border: #2d2d2d;

    /* Shadow */

    --shadow: 0 15px 40px rgba(0, 0, 0, .25);

    /* Radius */

    --radius: 18px;

    /* Transition */

    --transition: .35s ease;

}

/* Vazirmatn برای متن فارسی، Noto Serif Arabic برای تیترهای شاخص.
   (Poppins گلیف فارسی ندارد) */

* {

    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Vazirmatn", sans-serif;

}

html {

    scroll-behavior: smooth;

    -webkit-text-size-adjust: 100%;

    text-size-adjust: 100%;

}

html,
body {

    /* clip برخلاف hidden اسکرول افقی iOS را هم کاملاً قفل می‌کند */
    overflow-x: hidden;

    overflow-x: clip;

}

body {

    background: var(--black);

    color: var(--white);

    -webkit-tap-highlight-color: transparent;

}

a {

    text-decoration: none;

    color: inherit;

}

img {

    width: 100%;

    display: block;

}

button {

    cursor: pointer;

    border: none;

    background: none;

    color: inherit;

}

:focus-visible {

    outline: 2px solid var(--gold);

    outline-offset: 3px;

}

[hidden] {

    display: none !important;

}

/* هدر/ناوبری اینجا تعریف نمی‌شود — کاملاً به css/navbar.css سپرده شده
   تا در همه صفحات سایت دقیقاً یکسان و از یک منبع واحد باشد. */

/* ===========================
   Hero
=========================== */

.hero {

    min-height: 100vh;

    min-height: 100svh;

    background: #111 url("img/Men.jpg") center 30% / cover no-repeat;

    display: flex;

    justify-content: center;

    align-items: center;

    position: relative;

    padding: 110px 6% 60px;

}

.overlay {

    position: absolute;

    inset: 0;

    background: linear-gradient(180deg, rgba(0, 0, 0, .45), rgba(0, 0, 0, .8) 85%);

}

.heroContent {

    position: relative;

    text-align: center;

    z-index: 5;

    max-width: 640px;

}

/* letter-spacing روی متن فارسی اتصال حروف را می‌شکند، پس فقط
   فاصله‌ی کلمات بیشتر شده */
.kicker {

    display: inline-block;

    word-spacing: 4px;

    font-size: 14px;

    color: var(--gold);

    margin-bottom: 22px;

    padding-bottom: 10px;

    border-bottom: 1px solid rgba(212, 175, 55, .4);

}

.heroContent h1 {

    font-family: "Noto Serif Arabic", serif;

    font-weight: 700;

    font-size: clamp(38px, 10vw, 92px);

    line-height: 1.2;

    margin: 10px 0 22px;

}

.heroContent p {

    font-size: 18px;

    color: #ddd;

    margin-bottom: 38px;

    line-height: 1.8;

}

.btn,
.heroBtn {

    display: inline-block;

    padding: 18px 45px;

    background: var(--gold);

    border-radius: 50px;

    color: black;

    font-weight: 600;

    transition: var(--transition);

}

@media (hover: hover) {

    .heroBtn:hover,
    .btn:hover {

        background: var(--white);

        transform: translateY(-6px);

    }

}

/* برچسب پارچه‌ای — امضای طراحی صفحه: مثل تگ روی لباس، با نخ و بند نقطه‌چین */

.heroTag {

    position: absolute;

    top: 140px;

    left: 8%;

    z-index: 6;

    display: flex;

    flex-direction: column;

    align-items: center;

    width: 110px;

    padding: 22px 10px 18px;

    background: rgba(15, 15, 15, .55);

    border: 1px dashed rgba(212, 175, 55, .55);

    border-radius: 10px;

    backdrop-filter: blur(6px);

    -webkit-backdrop-filter: blur(6px);

    transform: rotate(-6deg);

}

.heroTag::before {

    content: "";

    position: absolute;

    top: -34px;

    right: 50%;

    transform: translateX(50%);

    width: 2px;

    height: 34px;

    background: rgba(212, 175, 55, .55);

}

.heroTag .tagNo {

    font-family: "Poppins", sans-serif;

    font-size: 11px;

    letter-spacing: 2px;

    color: var(--gray);

}

.heroTag .tagNum {

    font-family: "Noto Serif Arabic", serif;

    font-size: 34px;

    font-weight: 700;

    color: var(--gold);

    line-height: 1.2;

}

.heroTag .tagLine {

    margin-top: 8px;

    font-size: 11px;

    color: #ddd;

    text-align: center;

}

@media (max-width:900px) {

    .heroTag {
        display: none;
    }

}

/* ===========================
   Marquee — نوار امضای برند زیر هیرو
=========================== */

.marquee {

    width: 100%;

    overflow: hidden;

    border-top: 1px solid var(--border);

    border-bottom: 1px solid var(--border);

    background: var(--black2);

    padding: 16px 0;

}

.marqueeTrack {

    display: flex;

    width: max-content;

    gap: 22px;

    animation: scrollMarquee 26s linear infinite;

}

.marqueeTrack span {

    font-size: 14px;

    color: var(--gray);

    white-space: nowrap;

}

.marqueeTrack span:nth-child(4n) {

    color: var(--gold);

}

@keyframes scrollMarquee {

    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }

}

@media (prefers-reduced-motion: reduce) {

    .marqueeTrack {
        animation: none;
    }

}

/* ===========================
   Collections — باکس کالکشن‌هایی که صفحه‌ی جداگانه دارند
   (عکس بدون پس‌زمینه روی زمینه‌ی تیره؛ نام کالکشن با هاور می‌آید)
=========================== */

.collections {

    width: 90%;

    max-width: 1400px;

    margin: 80px auto 0;

    text-align: center;

    /* لینک «مردانه» در صفحه‌ی کالکشن‌ها به اینجا می‌آید؛ زیر هدر نرود */
    scroll-margin-top: 100px;

}

.collectionsTitle {

    margin-bottom: 26px;

    color: var(--gold);

    font-size: 14px;

    font-weight: 600;

    letter-spacing: .2em;

}

/* باکس‌ها در ردیف‌های --cols تایی؛ ردیف آخرِ ناقص وسط‌چین می‌شود،
   پس با اضافه/کم شدن کالکشن چیدمان به هم نمی‌ریزد.
   ۱۰ کالکشن: دو ردیف پنج‌تایی در دسکتاپ، ۴ تایی در تبلت، دوتایی در موبایل */
.collectionGrid {

    --cols: 5;

    --gap: 22px;

    display: flex;

    flex-wrap: wrap;

    justify-content: center;

    max-width: 1240px;

    margin: 0 auto;

    gap: var(--gap);

}

.collectionGrid > .collectionBox {

    flex: 0 0 calc((100% - (var(--cols) - 1) * var(--gap)) / var(--cols));

    min-width: 0;

}

@media (max-width: 1100px) {

    .collectionGrid {

        --cols: 4;

        --gap: 16px;

    }

}

@media (max-width: 760px) {

    .collectionGrid {

        --cols: 2;

        --gap: 12px;

    }

}

.collectionBox {

    position: relative;

    display: block;

    aspect-ratio: 4 / 5;

    overflow: hidden;

    isolation: isolate;

    border-radius: var(--radius);

    border: 1px solid #252420;

    background:
        radial-gradient(75% 58% at 50% 40%, rgba(255, 240, 205, .13), transparent 70%),
        linear-gradient(180deg, #1d1c19, #0f0f0e);

    transition: border-color .4s ease;

}

.collectionBox img {

    position: absolute;

    inset: 0;

    width: 100%;

    height: 100%;

    object-fit: contain;

    /* عکس مدل: بدن پایین کادر بریده شده، پس به لبه‌ی پایین می‌چسبد و محو می‌شود */
    object-position: 50% 100%;

    padding: 9% 8% 0;

    -webkit-mask-image: linear-gradient(to top, transparent 0, #000 20%);
    mask-image: linear-gradient(to top, transparent 0, #000 20%);

    filter: drop-shadow(0 12px 20px rgba(0, 0, 0, .55));

    transform-origin: 50% 100%;

    transition: transform .8s cubic-bezier(.16, 1, .3, 1), filter .5s ease;

}

.collectionBox.isProduct img {

    object-position: 50% 50%;

    padding: 16% 12% 22%;

    -webkit-mask-image: none;
    mask-image: none;

    transform-origin: 50% 60%;

}

/* عکس سر تا پا (نام فایل با -full): وسط باکس، بدون محو شدن لبه‌ی پایین */
.collectionBox img[src*="-full"] {

    object-position: 50% 50%;

    /* حاشیه‌ی کم تا آدم تمام‌قد هم‌اندازه‌ی عکس‌های نیم‌تنه‌ی باکس‌های دیگر دیده شود */
    padding: 3% 4% 7%;

    -webkit-mask-image: none;
    mask-image: none;

    transform-origin: 50% 60%;

}

/* عکسی که کادرش بدن را از بالا بریده (شلوار از کمر به پایین): کفش‌ها روی کف
   باکس می‌نشینند، بالای باکس خالی می‌ماند و لبه‌ی بریده‌ی بالا نرم محو می‌شود.
   padding-top به درصد عرض است: ۱۸٪ عرض ≈ ۱۴٪ ارتفاع باکس ۴:۵ — ماسک از همان‌جا شروع می‌شود */
.collectionBox.isTopCut img {

    object-position: 50% 100%;

    padding: 18% 8% 0;

    -webkit-mask-image: linear-gradient(to bottom, transparent 0, transparent 14%, #000 27%);
    mask-image: linear-gradient(to bottom, transparent 0, transparent 14%, #000 27%);

    transform-origin: 50% 100%;

}

/* کالکشنی که هنوز محصول ندارد (کلاس isSoon): آیکن خطی طلایی + برچسب «به‌زودی» */
.collectionBox.isSoon .collectionIcon {

    position: absolute;

    left: 50%;

    top: 42%;

    width: 46%;

    height: auto;

    transform: translate(-50%, -50%);

    fill: none;

    stroke: rgba(212, 175, 55, .5);

    stroke-width: 1.6;

    stroke-linecap: round;

    stroke-linejoin: round;

    transition: stroke .4s ease, transform .8s cubic-bezier(.16, 1, .3, 1);

}

.collectionBox.isSoon:hover .collectionIcon,
.collectionBox.isSoon:focus-visible .collectionIcon {

    stroke: rgba(212, 175, 55, .85);

    transform: translate(-50%, -50%) scale(1.05);

}

.collectionBox .soonTag {

    position: absolute;

    top: 14px;

    right: 14px;

    z-index: 2;

    padding: 4px 12px;

    border-radius: 30px;

    border: 1px solid rgba(212, 175, 55, .45);

    background: rgba(15, 15, 15, .7);

    color: var(--gold);

    font-size: 12px;

    font-weight: 600;

}

/* نام کالکشن «به‌زودی» همیشه دیده شود (عکسی نیست که با هاور کنار برود) */
.collectionBox.isSoon .collectionLabel {

    opacity: 1;

    transform: none;

}

.collectionBox.isSoon .collectionLabel::after {

    transform: scaleX(1);

}

/* سایه‌ی پایین که با هاور پررنگ می‌شود تا نام خوانا باشد */
.collectionBox::after {

    content: "";

    position: absolute;

    inset: 0;

    z-index: 1;

    background: linear-gradient(to top, rgba(0, 0, 0, .82), rgba(0, 0, 0, .25) 45%, transparent 70%);

    opacity: 0;

    transition: opacity .45s ease;

    pointer-events: none;

}

.collectionLabel {

    position: absolute;

    inset: auto 0 0;

    z-index: 2;

    padding-bottom: 30px;

    font-family: "Noto Serif Arabic", serif;

    font-size: clamp(24px, 2.5vw, 34px);

    font-weight: 700;

    color: var(--white);

    opacity: 0;

    transform: translateY(16px);

    transition: opacity .45s ease, transform .6s cubic-bezier(.16, 1, .3, 1);

}

/* خط طلایی زیر نام */
.collectionLabel::after {

    content: "";

    display: block;

    width: 44px;

    height: 2px;

    margin: 10px auto 0;

    border-radius: 2px;

    background: var(--gold);

    transform: scaleX(0);

    transition: transform .6s cubic-bezier(.16, 1, .3, 1) .08s;

}

.collectionBox:hover,
.collectionBox:focus-visible {

    border-color: rgba(212, 175, 55, .5);

}

.collectionBox:hover::after,
.collectionBox:focus-visible::after,
.collectionBox:hover .collectionLabel,
.collectionBox:focus-visible .collectionLabel {

    opacity: 1;

}

.collectionBox:hover .collectionLabel,
.collectionBox:focus-visible .collectionLabel {

    transform: none;

}

.collectionBox:hover .collectionLabel::after,
.collectionBox:focus-visible .collectionLabel::after {

    transform: scaleX(1);

}

.collectionBox:hover img,
.collectionBox:focus-visible img {

    transform: scale(1.05);

    filter: drop-shadow(0 12px 20px rgba(0, 0, 0, .55)) brightness(.9);

}

/* دستگاه بدون هاور (گوشی/تبلت): نام همیشه دیده می‌شود */
/* موبایل و تبلت: نام کالکشن همیشه دیده می‌شود (هاور در لمس معنا ندارد).
   علاوه بر hover:none، عرض صفحه و صفحه‌ی لمسی هم بررسی می‌شود چون بعضی
   مرورگرهای اندروید با وجود لمسی بودن hover:hover گزارش می‌دهند. */
@media (hover: none), (pointer: coarse), (max-width: 900px) {

    .collectionBox::after,
    .collectionLabel {

        opacity: 1;

    }

    .collectionLabel {

        transform: none;

    }

    .collectionLabel::after {

        transform: scaleX(1);

    }

}

@media (prefers-reduced-motion: reduce) {

    .collectionBox img,
    .collectionLabel,
    .collectionLabel::after {

        transition: opacity .2s ease;

    }

    .collectionBox:hover img,
    .collectionBox:focus-visible img {

        transform: none;

    }

}

@media (max-width: 600px) {

    .collections {

        width: 100%;

        margin-top: 44px;

        padding: 0 12px;

    }

    .collectionsTitle {

        margin-bottom: 16px;

        font-size: 13px;

    }

    .collectionBox {

        border-radius: 16px;

    }

    .collectionLabel {

        padding-bottom: 16px;

        font-size: 24px;

    }

    .collectionLabel::after {

        width: 30px;

        margin-top: 7px;

    }

}

/* ===========================
   Categories — سویچ پارچه‌ای
=========================== */

.categories {

    width: 90%;
    margin: 80px auto 60px;

    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;

    /* وقتی با لینک ?cat=... یا دکمه‌ی هیرو به اینجا می‌آییم، زیر هدر نرود */
    scroll-margin-top: 110px;

}

.categories button,
.categories .chipLink {

    padding: 13px 32px;

    background: transparent;

    color: var(--gray);

    border: 1px solid var(--border);

    border-radius: 50px;

    font-size: 15px;

    white-space: nowrap;

    flex-shrink: 0;

    transition: var(--transition);

}

.categories button:hover,
.categories .chipLink:hover {

    border-color: var(--gold);

    color: var(--white);

}

.categories .chipLink {

    display: inline-flex;

    align-items: center;

    gap: 6px;

    color: var(--gold);

    border-color: rgba(212, 175, 55, .45);

}

.categories button.active {

    background: var(--gold);

    border-color: var(--gold);

    color: #000;

    font-weight: 600;

}

/* ===========================
   Products
=========================== */

.products {

    width: 90%;

    max-width: 1400px;

    margin: 20px auto 100px;

    display: grid;

    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));

    gap: 35px;

}

.emptyState {

    grid-column: 1/-1;

    text-align: center;

    padding: 80px 20px;

    color: var(--gray);

    font-size: 16px;

}

.product {

    display: block;

    position: relative;

    overflow: hidden;

    background: rgba(255, 255, 255, .03);

    border: 1px solid rgba(255, 255, 255, .08);

    border-radius: 22px;

    cursor: pointer;

    transform-style: preserve-3d;

    opacity: 0;

    /* انیمیشن ورود با پراپرتی translate انجام می‌شود (نه transform) تا
       افکت سه‌بعدی men.js که style.transform را ست می‌کند بعد از پایان
       انیمیشن هم کار کند */
    translate: 0 60px;

    animation: show .8s forwards;

    transition: box-shadow .35s ease, border-color .35s ease, transform .2s ease-out;

}

.product:nth-child(2) { animation-delay: .08s; }
.product:nth-child(3) { animation-delay: .16s; }
.product:nth-child(4) { animation-delay: .24s; }

@keyframes show {

    to {

        opacity: 1;

        translate: 0 0;

    }

}

@media (prefers-reduced-motion: reduce) {

    .product {

        opacity: 1;

        translate: none;

        animation: none;

    }

}

.productImage {

    position: relative;

    overflow: hidden;

    aspect-ratio: 3 / 4;

    background: #1a1a1a;

}

.productImage img {

    position: absolute;

    inset: 0;

    width: 100%;

    height: 100%;

    object-fit: cover;

    transition: .6s;

}

.productImage .back {

    opacity: 0;

    transform: scale(1.1);

}

/* کارتی که عکس اولش مدل بدون پس‌زمینه است: مثل صفحه‌های کالکشن روی زمینه‌ی تیره با نور موضعی */
.productImage.hasModel {

    background:
        radial-gradient(80% 60% at 50% 38%, rgba(255, 240, 205, .11), transparent 70%),
        linear-gradient(180deg, #1d1c19, #121211);

}

.productImage img.isModel {

    object-fit: contain;

    object-position: 50% 100%;

    padding: 7% 6% 0;

    -webkit-mask-image: linear-gradient(to top, transparent 0, #000 18%);
    mask-image: linear-gradient(to top, transparent 0, #000 18%);

    transform-origin: 50% 100%;

}

.productInfo {

    padding: 22px;

    transform: translateZ(25px);

}

.productInfo h3 {

    font-family: "Noto Serif Arabic", serif;

    margin-bottom: 10px;

    font-size: 20px;

    line-height: 1.5;

    transition: .35s;

}

.productInfo p {

    color: var(--gold);

    font-size: 20px;

    font-weight: 700;

    margin-bottom: 18px;

    transition: .35s;

}

.viewProduct {

    display: flex;

    justify-content: center;

    align-items: center;

    width: 100%;

    height: 50px;

    background: var(--gold);

    color: #000;

    border-radius: 10px;

    font-size: 16px;

    font-weight: 600;

    transition: .4s;

}

/* جلوه‌های هاور فقط روی دستگاه‌های ماوس‌دار — در موبایل هاور «گیر»
   می‌کرد و دکمه‌ی «مشاهده محصول» هم هیچ‌وقت دیده نمی‌شد */
@media (hover: hover) {

    .product:hover {

        box-shadow: 0 20px 40px rgba(0, 0, 0, .35);

    }

    .product:hover .front:not(:only-child) {

        opacity: 0;

    }

    .product:hover .back {

        opacity: 1;

        transform: scale(1);

    }

    .product:hover .productImage img {

        transform: scale(1.08);

    }

    .product:hover h3 {

        color: var(--gold);

    }

    .product:hover .productInfo p {

        color: #fff;

    }

    .viewProduct {

        opacity: 0;

        transform: translateY(20px);

    }

    .product:hover .viewProduct,
    .product:focus-visible .viewProduct {

        opacity: 1;

        transform: translateY(0);

    }

    .viewProduct:hover {

        background: #fff;

    }

    .product::before {

        content: "";

        position: absolute;

        top: -100%;

        left: -100%;

        width: 250%;

        height: 250%;

        background: linear-gradient(45deg,
                transparent,
                rgba(212, 175, 55, .06),
                transparent);

        transform: rotate(25deg);

        transition: .5s ease;

        pointer-events: none;

        z-index: 1;

    }

    .product:hover::before {

        top: -30%;

        left: -30%;

    }

    .product::after {

        content: "";

        position: absolute;

        inset: 0;

        border: 1px solid transparent;

        border-radius: 22px;

        transition: .35s;

        pointer-events: none;

    }

    .product:hover::after {

        border-color: var(--gold);

    }

}

.product:active {

    border-color: rgba(212, 175, 55, .5);

}

/* ===========================
   Footer
=========================== */

.siteFooter {

    text-align: center;

    padding: 70px 20px 50px;

    padding-bottom: calc(50px + env(safe-area-inset-bottom, 0px));

    border-top: 1px solid var(--border);

}

.footerBrand {

    display: flex;

    justify-content: center;

    align-items: center;

    gap: 12px;

    margin-bottom: 18px;

}

.footerBrand .logoIcon {

    width: 42px;

    height: 42px;

    border: 2px solid var(--gold);

    border-radius: 12px;

    display: flex;

    justify-content: center;

    align-items: center;

    font-family: "Poppins", sans-serif;

    font-size: 20px;

    font-weight: 700;

    color: var(--gold);

}

.footerBrand .logoText span {

    font-family: "Poppins", sans-serif;

    font-size: 19px;

    font-weight: 700;

    letter-spacing: 2px;

}

.footerBrand .logoText small {

    color: var(--gold);

    letter-spacing: 4px;

}

.footerNote {

    color: #ddd;

    font-size: 15px;

    margin-bottom: 10px;

}

.footerCopy {

    color: var(--gray);

    font-size: 13px;

}

/* ===========================
   Responsive
=========================== */

@media (max-width: 900px) {

    /* فیلترها در موبایل یک ردیف اسکرولی می‌شوند */
    .categories {

        width: 100%;

        margin: 44px 0 26px;

        padding: 4px 16px;

        justify-content: flex-start;

        flex-wrap: nowrap;

        overflow-x: auto;

        gap: 10px;

        scrollbar-width: none;

        scroll-margin-top: 84px;

    }

    .categories::-webkit-scrollbar {

        display: none;

    }

    .categories button,
    .categories .chipLink {

        padding: 10px 22px;

        font-size: 14px;

    }

}

@media (max-width: 600px) {

    .hero {

        padding: 100px 20px 50px;

    }

    .kicker {

        font-size: 13px;

        margin-bottom: 14px;

    }

    .heroContent p {

        font-size: 16px;

        margin-bottom: 30px;

    }

    .btn,
    .heroBtn {

        padding: 15px 36px;

    }

    .marquee {

        padding: 12px 0;

    }

    .marqueeTrack span {

        font-size: 13px;

    }

    /* گرید دوستونه‌ی استاندارد فروشگاه‌های موبایلی */
    .products {

        width: 100%;

        padding: 0 12px;

        margin: 0 auto 60px;

        grid-template-columns: repeat(2, minmax(0, 1fr));

        gap: 12px;

    }

    .product {

        border-radius: 16px;

    }

    .productInfo {

        padding: 12px 12px 14px;

    }

    .productInfo h3 {

        font-size: 14px;

        margin-bottom: 6px;

    }

    .productInfo p {

        font-size: 14px;

        margin-bottom: 12px;

    }

    .viewProduct {

        height: 38px;

        font-size: 13px;

        border-radius: 9px;

    }

    .siteFooter {

        padding-top: 50px;

    }

}
