﻿@import url("https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;600;700;800&display=swap");

:root {
    --ivory: #faf7f0;
    --paper: #fffefb;
    --gold: #c9a44c;
    --gold-deep: #9c7a2e;
    --gold-soft: #efe2bd;
    --gold-pale: #f6efd9;
    --ink: #241f19;
    --ink-soft: #6b6152;
    --line: #e7ddc6;
    --shadow: rgba(120, 92, 32, 0.16);
}


*{
    font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

img {
    max-width: 100%;
}

/* ================= HEADER ================= */
.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px clamp(16px, 5vw, 40px);
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 40;
    flex-wrap: wrap;
    gap: 12px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-mark {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(145deg, var(--gold), var(--gold-deep));
    font-size: 15px;
}

.brand-name {
    font-weight: 800;
    font-size: 18px;
    letter-spacing: 0.02em;
}

.site-nav {
    display: flex;
    gap: 28px;
}

    .site-nav a {
        color: var(--ink-soft);
        text-decoration: none;
        font-size: 14px;
        font-weight: 500;
        position: relative;
        padding-bottom: 4px;
    }

        .site-nav a.active,
        .site-nav a:hover {
            color: var(--gold-deep);
        }

            .site-nav a.active::after {
                content: "";
                position: absolute;
                right: 0;
                bottom: -2px;
                width: 100%;
                height: 2px;
                background: linear-gradient(90deg, var(--gold), var(--gold-deep));
                border-radius: 2px;
            }

/* ---- hamburger toggle (mobile/tablet) ---- */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--paper);
    cursor: pointer;
    flex-shrink: 0;
}

    .menu-toggle span {
        display: block;
        width: 18px;
        height: 2px;
        margin: 0 auto;
        background: var(--ink);
        border-radius: 2px;
        transition: 0.2s ease;
    }

    .menu-toggle.open span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .menu-toggle.open span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.open span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

@media (max-width: 780px) {
    .menu-toggle {
        display: flex;
    }

    .site-nav {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 4px;
        order: 3;
        padding-top: 10px;
        border-top: 1px solid var(--line);
    }

        .site-nav.open {
            display: flex;
        }

        .site-nav a {
            padding: 10px 4px;
        }

            .site-nav a.active::after {
                display: none;
            }

            .site-nav a.active {
                background: var(--gold-pale);
                border-radius: 8px;
                padding-inline: 10px;
            }
}

/* ================= MAIN WRAP ================= */
.wrap {
    max-width: 1180px;
    margin: 0 auto;
    padding: clamp(28px, 6vw, 56px) clamp(16px, 4vw, 24px) 60px;
}

.page-head {
    max-width: 640px;
    margin-bottom: clamp(26px, 5vw, 42px);
}

.eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: var(--gold-deep);
    padding: 5px 14px;
    border: 1px solid var(--gold-soft);
    border-radius: 999px;
    background: var(--gold-pale);
    margin-bottom: 14px;
}

.page-head h1 {
    font-size: clamp(22px, 5vw, 32px);
    font-weight: 800;
    line-height: 1.5;
    margin: 0 0 12px;
}

.lead {
    font-size: 14.5px;
    color: var(--ink-soft);
    line-height: 1.9;
    margin: 0;
}

/* ================= GALLERY (masonry-style grid) ================= */
.gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 90px;
    gap: 16px;
}

/* large tablets / small desktops */
@media (max-width: 1080px) {
    .gallery {
        grid-template-columns: repeat(3, 1fr);
        grid-auto-rows: 82px;
    }
}

/* tablets (portrait) */
@media (max-width: 860px) {
    .gallery {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 76px;
        gap: 12px;
    }
}

/* phones */
@media (max-width: 560px) {
    .gallery {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
        gap: 14px;
    }
}

.product-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid var(--line);
    background: var(--paper);
    isolation: isolate;
}

    .product-card img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    }

    .product-card::after {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient( to top, rgba(36, 31, 25, 0.78) 0%, rgba(36, 31, 25, 0.28) 40%, rgba(36, 31, 25, 0) 62% );
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .product-card:hover img {
        transform: scale(1.06);
    }

    .product-card:hover::after {
        opacity: 1;
    }

    .product-card:hover {
        border-color: var(--gold);
        box-shadow: 0 18px 34px -20px var(--shadow);
    }

.card-info {
    position: absolute;
    right: 0;
    left: 0;
    bottom: 0;
    padding: 14px;
    color: #fff;
    transform: translateY(10px);
    opacity: 0;
    transition: 0.3s ease;
    z-index: 2;
}

.product-card:hover .card-info {
    transform: translateY(0);
    opacity: 1;
}

.card-info .p-name {
    font-size: 13.5px;
    font-weight: 700;
    margin-bottom: 4px;
}

.card-info .p-price {
    font-size: 12px;
    font-weight: 600;
    color: var(--gold-soft);
}

/* touch devices have no hover state, so keep info + gradient always visible */
@media (hover: none) {
    .product-card::after {
        opacity: 1;
    }

    .card-info {
        transform: translateY(0);
        opacity: 1;
    }
}

.card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    background: rgba(255, 255, 255, 0.9);
    color: var(--gold-deep);
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    backdrop-filter: blur(4px);
}

/* varied sizes for a magazine-style masonry layout */
.size-tall {
    grid-row: span 4;
}

.size-med {
    grid-row: span 3;
}

.size-short {
    grid-row: span 2;
}

.size-wide {
    grid-column: span 2;
    grid-row: span 3;
}
/* کارت دوتایی (duo): دو محصول در یک کارت، عکس روی هم؛ ارتفاع بیشتر لازم دارد */
.size-duo-tall {
    grid-row: span 7;
}

.size-duo-med {
    grid-row: span 6;
}

@media (max-width: 560px) {
    .size-tall,
    .size-med,
    .size-short,
    .size-wide {
        grid-column: span 1;
        grid-row: auto;
        aspect-ratio: 4 / 3;
    }

    .size-duo-tall,
    .size-duo-med {
        grid-column: span 1;
        grid-row: auto;
        aspect-ratio: 4 / 5;
    }
}

/* پشته‌ی دو عکس داخل کارت دوتایی */
.card-img-stack {
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 2px;
    background: var(--line);
}

    .card-img-stack .stack-half {
        position: relative;
        flex: 1 1 50%;
        overflow: hidden;
    }

        .card-img-stack .stack-half img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }

/* ================= FOOTER ================= */
.site-footer {
    text-align: center;
    padding: 26px 16px 40px;
    color: var(--ink-soft);
    font-size: 12.5px;
    border-top: 1px solid var(--line);
}

/* ================= HOTSPOT BUTTONS (روی عکس هر کارت) ================= */
.hotspot-single {
    top: 50%;
}

.hotspot-duo-top {
    top: 25%;
}

.hotspot-duo-bottom {
    top: 75%;
}

.hotspot-btn {
    position: absolute;
    right: 50%;
    transform: translate(50%, -50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.94);
    color: var(--gold-deep);
    font-size: 17px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3;
    box-shadow: 0 6px 16px -6px rgba(24, 20, 14, 0.45);
    transition: 0.2s ease;
    line-height: 1;
}

    .hotspot-btn::before {
        content: "";
        position: absolute;
        inset: -8px;
        border-radius: 50%;
        border: 1.5px solid rgba(255, 255, 255, 0.55);
        opacity: 0;
        transition: 0.2s ease;
    }

    .hotspot-btn:hover,
    .hotspot-btn.active {
        background: var(--gold);
        color: #fff;
        transform: translate(50%, -50%) scale(1.1);
    }

        .hotspot-btn:hover::before,
        .hotspot-btn.active::before {
            opacity: 1;
        }

/* دکمه‌ها همیشه دیده بشن؛ کارت با هاور کمی تیره‌تر می‌شود تا دکمه بهتر خودنمایی کند */
.product-card:hover .hotspot-btn,
.product-card .hotspot-btn.active {
    box-shadow: 0 10px 22px -8px rgba(24, 20, 14, 0.55);
}

@media (hover: none) {
    .hotspot-btn {
        background: rgba(255, 255, 255, 0.96);
    }
}

/* ================= FLOATING DETAIL POPUP ================= */
.hover-popup {
    position: fixed;
    width: 250px;
    max-width: calc(100vw - 24px);
    background: var(--paper);
    border: 1px solid var(--gold-soft);
    border-radius: 18px;
    box-shadow: 0 30px 60px -24px rgba(24, 20, 14, 0.5);
    z-index: 210;
    opacity: 0;
    transform: translateY(6px) scale(0.97);
    pointer-events: none;
    transition: opacity 0.16s ease, transform 0.16s ease;
    overflow: hidden;
}

    .hover-popup.open {
        opacity: 1;
        transform: translateY(0) scale(1);
        pointer-events: auto;
    }

.hover-popup-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(24, 20, 14, 0.4);
    z-index: 205;
    opacity: 0;
    transition: opacity 0.16s ease;
}

    .hover-popup-backdrop.open {
        display: block;
        opacity: 1;
    }

.hover-popup-close {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.92);
    color: var(--ink);
    font-size: 12px;
    cursor: pointer;
    z-index: 3;
    display: none;
}

.hp-image {
    height: 130px;
    background: var(--gold-pale);
}

    .hp-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

.hp-body {
    padding: 14px 16px 16px;
}

.hp-eyebrow {
    display: block;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--gold-deep);
    margin-bottom: 6px;
}

.hp-body h3 {
    font-size: 14.5px;
    font-weight: 800;
    margin: 0 0 6px;
    line-height: 1.5;
}

.hp-price {
    font-size: 13.5px;
    font-weight: 800;
    color: var(--gold-deep);
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px dashed var(--line);
}

.hp-specs {
    margin: 0 0 12px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

    .hp-specs > div {
        display: flex;
        justify-content: space-between;
        font-size: 11.5px;
        padding: 5px 0;
        border-bottom: 1px solid var(--line);
        gap: 8px;
    }

    .hp-specs dt {
        color: var(--ink-soft);
        font-weight: 500;
        flex-shrink: 0;
    }

    .hp-specs dd {
        margin: 0;
        font-weight: 700;
        color: var(--ink);
        text-align: left;
    }

.hp-cart-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--gold), var(--gold-deep));
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 10px;
    font-family: "Vazirmatn", sans-serif;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: 0.2s ease;
}

    .hp-cart-btn:hover {
        opacity: 0.92;
        transform: translateY(-1px);
    }

    .hp-cart-btn:active {
        transform: translateY(0);
    }

.cart-icon {
    font-size: 13px;
}

/* موبایل / لمسی: پاپ‌آپ به‌صورت باکس ثابت وسط صفحه با بک‌دراپ نمایش داده می‌شود */
@media (hover: none), (max-width: 560px) {
    .hover-popup {
        position: fixed;
        left: 50% !important;
        top: 50% !important;
        right: auto !important;
        bottom: auto !important;
        transform: translate(-50%, -50%) scale(0.97);
        width: min(320px, calc(100vw - 40px));
    }

        .hover-popup.open {
            transform: translate(-50%, -50%) scale(1);
        }

    .hover-popup-close {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .hp-image {
        height: 160px;
    }
}

/* ================= TOAST ================= */
.toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%) translateY(16px);
    background: var(--ink);
    color: #fff;
    padding: 12px 22px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    opacity: 0;
    pointer-events: none;
    transition: 0.25s ease;
    z-index: 200;
}

    .toast.show {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
