/*==========================
        Product Page
  (استایل سبد خرید در css/cart.css و toast در css/navbar.css است)
==========================*/

.productPage{

    width:90%;
    max-width:1300px;
    margin:140px auto 80px;

    display:grid;
    grid-template-columns:1fr 1fr;

    gap:70px;

    align-items:start;

}

/*==========================
        Gallery
==========================*/

.gallery{

    position:sticky;

    top:120px;

    min-width:0;

}

.mainImage{

    position:relative;

    background:#181818;

    border-radius:22px;

    overflow:hidden;

    margin-bottom:16px;

}

.mainImage.canZoom{

    cursor:zoom-in;

}

.mainImage img{

    width:100%;

    height:auto;

    aspect-ratio:4/5;

    max-height:650px;

    object-fit:cover;

    transition:transform .15s linear, opacity .2s ease;

    transform-origin:center;

}

.thumbs{

    display:flex;

    gap:12px;

    overflow-x:auto;

    scrollbar-width:none;

    padding:6px 2px;

}

.thumbs::-webkit-scrollbar{

    display:none;

}

.thumb{

    flex-shrink:0;

    width:100px;

    height:120px;

    padding:0;

    border-radius:14px;

    overflow:hidden;

    cursor:pointer;

    border:2px solid transparent;

    background:#181818;

    transition:border-color .35s, transform .35s;

}

.thumb img{

    width:100%;

    height:100%;

    object-fit:cover;

}

.thumb:hover{

    border-color:var(--gold);

}

.thumb.active{

    border-color:var(--gold);

}

/*==========================
        Details
==========================*/

.details{

    padding-top:10px;

    min-width:0;

}

.breadcrumb{

    display:flex;

    flex-wrap:wrap;

    gap:8px;

    font-size:13px;

    color:var(--gray);

    margin-bottom:22px;

}

.breadcrumb a{

    color:#bbb;

    transition:.3s;

}

.breadcrumb a:hover{

    color:var(--gold);

}

.brand{

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

    color:var(--gold);

    letter-spacing:3px;

    font-size:15px;

}

.details h1{

    font-size:clamp(26px, 3.4vw, 46px);

    margin:14px 0 16px;

    line-height:1.35;

}

.stars{

    color:var(--gold);

    font-size:20px;

    margin-bottom:18px;

}

.stars[hidden]{

    display:none;

}

.stars span{

    color:#999;

    font-size:15px;

    margin-right:10px;

}

.price{

    font-size:clamp(24px, 2.8vw, 38px);

    font-weight:700;

    margin-bottom:24px;

}

.description{

    color:#bdbdbd;

    line-height:2;

    margin-bottom:32px;

}

.optionTitle{

    font-size:17px;

    font-weight:600;

}

.optionTitle span{

    font-weight:400;

    color:var(--gray);

    font-size:15px;

}

/*==========================
        Sizes / Colors
==========================*/

.sizes{

    display:flex;

    flex-wrap:wrap;

    gap:12px;

    margin:16px 0 32px;

    border-radius:14px;

}

.sizes button{

    min-width:55px;

    height:55px;

    padding:0 12px;

    border-radius:12px;

    border:1px solid #444;

    color:white;

    background:#181818;

    font-size:16px;

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

    transition:.3s;

}

.sizes button:hover{

    border-color:var(--gold);

}

.sizes button.active{

    background:var(--gold);

    border-color:var(--gold);

    color:black;

}

.colors{

    display:flex;

    flex-wrap:wrap;

    gap:18px;

    margin:18px 0 36px;

    padding:4px;

    border-radius:14px;

}

.colors .swatch{

    width:36px;

    height:36px;

    padding:0;

    border-radius:50%;

    cursor:pointer;

    border:3px solid #fff;

    box-shadow:0 0 0 1px #444;

    transition:transform .3s, box-shadow .3s;

}

.colors .swatch:hover{

    transform:scale(1.1);

}

.colors .swatch.selected{

    transform:scale(1.12);

    box-shadow:0 0 0 3px var(--gold);

}

/* وقتی کاربر بدون انتخاب سایز/رنگ روی «افزودن» می‌زند */
.needsChoice{

    animation:needsChoice .6s ease;

}

@keyframes needsChoice{

    0%, 100%{ box-shadow:0 0 0 0 rgba(212,175,55,0); transform:translateX(0); }
    20%{ transform:translateX(-6px); }
    40%{ transform:translateX(6px); box-shadow:0 0 0 2px rgba(212,175,55,.7); }
    60%{ transform:translateX(-4px); }
    80%{ transform:translateX(4px); }

}

/*==========================
        Actions
==========================*/

.actions{

    display:flex;

    gap:14px;

}

.addtocart{

    flex:1;

    height:60px;

    display:flex;

    align-items:center;

    justify-content:center;

    gap:8px;

    background:linear-gradient(135deg,#D4AF37,#e9cc6e);

    color:#000;

    border:none;

    border-radius:14px;

    font-size:18px;

    font-weight:700;

    cursor:pointer;

    box-shadow:0 10px 25px rgba(212,175,55,.35);

    transition:.35s ease;

}

@media (hover:hover){

    .addtocart:hover{

        background:#fff;

        transform:translateY(-5px);

        box-shadow:0 14px 30px rgba(212,175,55,.25);

    }

    .favorite:hover{

        transform:translateY(-4px);

    }

}

.addtocart:active{

    transform:scale(.98);

}

.addtocart.added{

    background:#000;

    color:#22c55e;

    box-shadow:0 10px 25px rgba(0,0,0,.4);

    cursor:default;

}

.addtocart .checkIcon{

    width:22px;

    height:22px;

    animation:checkPop .45s ease;

}

@keyframes checkPop{

    0%{ transform:scale(0) rotate(-25deg); opacity:0; }

    60%{ transform:scale(1.25) rotate(6deg); opacity:1; }

    100%{ transform:scale(1) rotate(0); opacity:1; }

}

.favorite{

    width:60px;

    flex-shrink:0;

    border:none;

    background:#181818;

    color:#fff;

    border-radius:14px;

    cursor:pointer;

    display:flex;

    justify-content:center;

    align-items:center;

    transition:.35s;

}

.favorite svg{

    width:24px;

    height:24px;

    stroke:currentColor;

    fill:none;

    transition:fill .3s;

}

.favorite.liked{

    background:#ff3355;

    animation:heartBeat .45s;

}

.favorite.liked svg{

    fill:currentColor;

}

@keyframes heartBeat{

    0%{ transform:scale(1); }

    25%{ transform:scale(1.2); }

    45%{ transform:scale(.92); }

    70%{ transform:scale(1.1); }

    100%{ transform:scale(1); }

}

/*==========================
        Not found
==========================*/

.productPage.notFound{

    display:flex;

    justify-content:center;

    min-height:50vh;

    align-items:center;

}

.notFoundBox{

    text-align:center;

}

.notFoundBox h1{

    font-size:32px;

    margin-bottom:12px;

}

.notFoundBox p{

    color:#bbb;

    margin-bottom:28px;

}

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

@media (max-width:992px){

    .productPage{

        gap:40px;

    }

}

@media (max-width:820px){

    .productPage{

        grid-template-columns:1fr;

        width:100%;

        margin:92px auto 50px;

        padding:0 16px;

        gap:24px;

    }

    .gallery{

        position:static;

    }

    .mainImage{

        border-radius:18px;

        margin-bottom:12px;

    }

    .mainImage img{

        max-height:none;

    }

    .thumbs{

        gap:10px;

    }

    .thumb{

        width:68px;

        height:84px;

        border-radius:12px;

    }

    .details{

        padding-top:0;

    }

    .breadcrumb{

        margin-bottom:14px;

    }

    .details h1{

        margin:10px 0 12px;

    }

    .stars{

        font-size:17px;

        margin-bottom:12px;

    }

    .stars span{

        font-size:13px;

    }

    .price{

        margin-bottom:16px;

    }

    .description{

        font-size:15px;

        line-height:1.9;

        margin-bottom:24px;

    }

    .sizes{

        gap:10px;

        margin:12px 0 24px;

    }

    .sizes button{

        min-width:52px;

        height:48px;

        font-size:15px;

    }

    .colors{

        margin:12px 0 28px;

    }

    .addtocart{

        height:56px;

        font-size:17px;

    }

    .favorite{

        width:56px;

    }

}

/*==========================
        عکس‌های بدون پس‌زمینه (کفش‌ها)
  کفش روی زمینه‌ی تیره با یک نور موضعی ملایم و سایه‌ی زیرین
==========================*/

.mainImage.isCutout{

    background:
        radial-gradient(70% 55% at 50% 42%, rgba(255,244,214,.10), transparent 70%),
        radial-gradient(55% 14% at 50% 90%, rgba(0,0,0,.6), transparent 70%),
        linear-gradient(180deg, #1c1b18, #111110);

    border:1px solid #262521;

}

.mainImage.isCutout img{

    object-fit:contain;

    padding:8% 7%;

    filter:drop-shadow(0 22px 26px rgba(0,0,0,.55));

}

.thumbs.isCutout .thumb{

    background:radial-gradient(80% 70% at 50% 45%, #25231f, #151412);

}

.thumbs.isCutout .thumb img{

    object-fit:contain;

    padding:10%;

}

/* عکس مدل (دورس‌ها): بدن در پایین کادر بریده شده؛ عکس به لبه‌ی پایین
   می‌چسبد و آن لبه محو می‌شود. عکس‌های نمای نزدیک (-detail) تمام‌کادرند. */
.mainImage.isModel img{

    object-position:50% 100%;

    padding:6% 6% 0;

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

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

    filter:drop-shadow(0 12px 22px rgba(0,0,0,.5));

}

.thumbs.isModel .thumb img{

    object-position:50% 100%;

    padding:10% 10% 0;

}

/* پسوند نام عکس = جایی که کادر عکاسی بدن را بریده:
   -full سر تا پا | -top فقط بالا (شلوار از کمر) | -tb بالا و پایین */
.mainImage.isModel img[src*="-full"]{

    object-position:50% 50%;

    padding:5%;

    -webkit-mask-image:none;

    mask-image:none;

}

.mainImage.isModel img[src*="-top"]{

    object-position:50% 0;

    padding:0 6% 6%;

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

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

}

.mainImage.isModel img[src*="-tb"]{

    object-position:50% 50%;

    padding:0 6%;

    -webkit-mask-image:linear-gradient(to bottom, transparent 0, #000 12%, #000 88%, transparent 100%);

    mask-image:linear-gradient(to bottom, transparent 0, #000 12%, #000 88%, transparent 100%);

}

.thumbs.isModel .thumb img[src*="-full"],
.thumbs.isModel .thumb img[src*="-tb"]{

    object-position:50% 50%;

    padding:8%;

}

.thumbs.isModel .thumb img[src*="-top"]{

    object-position:50% 0;

    padding:0 10% 10%;

}

.mainImage.isModel img[src*="-detail"],
.thumbs.isModel .thumb img[src*="-detail"]{

    object-fit:cover;

    padding:0;

    -webkit-mask-image:none;

    mask-image:none;

    filter:none;

}

/*==========================
        استعلام قیمت
==========================*/

.price.isInquiry{

    font-size:clamp(20px, 2vw, 26px);

    color:var(--gold);

}

.inquiryNote{

    margin:-6px 0 26px;

    color:#bdbdbd;

    font-size:15px;

    line-height:2;

}

.inquiryBtn{

    flex:1;

    height:60px;

    display:flex;

    align-items:center;

    justify-content:center;

    background:linear-gradient(135deg,#D4AF37,#e9cc6e);

    color:#000;

    border-radius:14px;

    font-size:18px;

    font-weight:700;

    box-shadow:0 10px 25px rgba(212,175,55,.35);

    transition:.35s ease;

}

@media (hover:hover){

    .inquiryBtn:hover{

        background:#fff;

        transform:translateY(-5px);

    }

}

.inquiryCall{

    display:inline-flex;

    align-items:center;

    gap:8px;

    margin-top:18px;

    padding:6px 0;

    color:#cfcfcf;

    font-size:15px;

    transition:color .3s;

}

.inquiryCall svg{

    width:18px;

    height:18px;

    color:var(--gold);

}

.inquiryCall:hover{

    color:var(--gold);

}

.inquiryCall bdi{

    direction:ltr;

    font-weight:600;

    color:#fff;

}

@media (max-width:820px){

    .inquiryBtn{

        height:56px;

        font-size:17px;

    }

    .inquiryNote{

        font-size:14.5px;

        margin-bottom:22px;

    }

}

/*==========================
        سایزها: دایره + هاور + ناموجود
==========================*/

.sizes button{

    position:relative;

    width:52px;

    min-width:52px;

    height:52px;

    padding:0;

    border-radius:50%;

    font-variant-numeric:tabular-nums;

    transition:border-color .25s, background .25s, color .25s, transform .25s, box-shadow .25s;

}

.sizes button.isLong{

    font-size:13px;

    letter-spacing:-.02em;

}

@media (hover:hover){

    .sizes button:not(.isSoldOut):not(.active):hover{

        border-color:var(--gold);

        color:var(--gold);

        transform:translateY(-3px);

        box-shadow:0 8px 18px rgba(212,175,55,.18);

    }

}

.sizes button.active{

    transform:none;

    box-shadow:0 0 0 3px rgba(212,175,55,.25);

}

/* سایز ناموجود: کم‌رنگ با ضربدر قرمز روی دایره */
.sizes button.isSoldOut{

    color:#6b6b6b;

    background:#141414;

    border-color:#333;

    cursor:not-allowed;

    overflow:hidden;

}

.sizes button.isSoldOut::before,
.sizes button.isSoldOut::after{

    content:"";

    position:absolute;

    top:50%;

    left:50%;

    width:120%;

    height:2px;

    background:#e5484d;

    box-shadow:0 0 6px rgba(229,72,77,.45);

    pointer-events:none;

}

.sizes button.isSoldOut::before{ transform:translate(-50%, -50%) rotate(45deg); }

.sizes button.isSoldOut::after{ transform:translate(-50%, -50%) rotate(-45deg); }

/*==========================
        محصول کاملاً ناموجود
==========================*/

.productPage.isSoldOut .mainImage img,
.productPage.isSoldOut .thumb img{

    filter:grayscale(1) brightness(.85);

}

.productPage.isSoldOut .mainImage.isCutout img{

    filter:grayscale(1) brightness(.85) drop-shadow(0 22px 26px rgba(0,0,0,.55));

}

.productPage.isSoldOut .mainImage.isModel img[src*="-detail"],
.productPage.isSoldOut .thumbs.isModel .thumb img[src*="-detail"]{

    filter:grayscale(1) brightness(.85);

}

.soldOutBadge{

    position:absolute;

    top:16px;

    right:16px;

    z-index:2;

    padding:7px 16px;

    border-radius:30px;

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

    border:1px solid rgba(229,72,77,.6);

    color:#ff6b6f;

    font-size:14px;

    font-weight:700;

    pointer-events:none;

}

.price.isSoldOut{

    font-size:clamp(20px, 2vw, 26px);

    color:#ff6b6f;

}

.soldOutNote{

    margin:-6px 0 26px;

    color:#bdbdbd;

    font-size:15px;

    line-height:2;

}

.soldOutBtn{

    flex:1;

    height:60px;

    border-radius:14px;

    border:1px solid #3a3a3a !important;

    background:#1a1a1a !important;

    color:#8a8a8a;

    font-size:18px;

    font-weight:700;

    cursor:not-allowed;

}

@media (max-width:820px){

    .sizes button{

        width:48px;

        min-width:48px;

        height:48px;

    }

    .soldOutBtn{

        height:56px;

        font-size:17px;

    }

}

@media (max-width:360px){
    .sizes{ gap:8px; }
    .sizes button{ width:42px; min-width:42px; height:42px; font-size:14px; }
}

/*==========================
        راهنمای سایز
==========================*/

.sizeHead{

    display:flex;

    align-items:center;

    justify-content:space-between;

    gap:12px;

}

.sizeGuideBtn{

    display:inline-flex;

    align-items:center;

    gap:6px;

    min-height:40px;

    padding:0 4px;

    color:var(--gold);

    font-size:14px;

    font-weight:500;

    text-decoration:underline;

    text-underline-offset:5px;

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

    transition:color .25s;

}

.sizeGuideBtn svg{

    width:18px;

    height:18px;

    fill:none;

    stroke:currentColor;

    stroke-width:1.6;

    stroke-linejoin:round;

}

.sizeGuideBtn:hover{

    color:var(--goldHover);

}

.sizeGuide{

    width:min(520px, calc(100% - 32px));

    max-height:min(88vh, 760px);

    margin:auto;

    padding:0;

    border:1px solid #2c2a25;

    border-radius:22px;

    background:#141412;

    color:#f3efe6;

    box-shadow:0 30px 80px rgba(0,0,0,.6);

    overflow:auto;

    overscroll-behavior:contain;

}

.sizeGuide::backdrop{

    background:rgba(0,0,0,.65);

    backdrop-filter:blur(6px);

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

}

.sizeGuide[open]{

    animation:sgIn .3s cubic-bezier(.16,1,.3,1);

}

@keyframes sgIn{

    from{ opacity:0; transform:translateY(16px); }

}

.sgPanel{

    padding:22px 22px 26px;

    text-align:right;

}

.sgHead{

    display:flex;

    align-items:center;

    justify-content:space-between;

    margin-bottom:18px;

}

.sgHead h2{

    font-size:20px;

    font-weight:700;

}

.sgClose{

    width:40px;

    height:40px;

    display:grid;

    place-items:center;

    border-radius:50%;

    background:#222;

    color:#fff;

    transition:background .25s, color .25s;

}

.sgClose svg{

    width:18px;

    height:18px;

    fill:none;

    stroke:currentColor;

    stroke-width:2;

    stroke-linecap:round;

}

.sgClose:hover{

    background:var(--gold);

    color:#000;

}

.sgCalc label{

    display:block;

    margin-bottom:8px;

    color:#c6bfb1;

    font-size:14px;

}

.sgRow{

    display:flex;

    gap:10px;

}

.sgRow input{

    flex:1;

    min-width:0;

    height:50px;

    padding:0 14px;

    border:1px solid #39352e;

    border-radius:12px;

    background:#0f0f0f;

    color:#fff;

    font-family:inherit;

    font-size:17px;

    outline:none;

    transition:border-color .2s, box-shadow .2s;

}

.sgRow input:focus{

    border-color:var(--gold);

    box-shadow:0 0 0 3px rgba(212,175,55,.15);

}

.sgRow input[aria-invalid="true"]{

    border-color:#e5484d;

}

.sgGo,
.sgPick{

    height:50px;

    padding:0 18px;

    border-radius:12px;

    background:var(--gold);

    color:#000;

    font-family:inherit;

    font-size:15px;

    font-weight:700;

    white-space:nowrap;

    transition:background .25s;

}

.sgGo:hover,
.sgPick:hover{

    background:var(--goldHover);

}

.sgResult:empty{

    display:none;

}

.sgResult{

    margin-top:14px;

    padding:14px 16px;

    border-radius:14px;

    font-size:14.5px;

    line-height:1.9;

}

.sgResult.isOk{

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

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

}

.sgResult.isOk b{

    color:var(--gold);

    font-size:22px;

    margin-inline-start:4px;

}

.sgResult.isError{

    background:rgba(229,72,77,.08);

    border:1px solid rgba(229,72,77,.4);

    color:#ffb3b5;

}

.sgResult small{

    display:block;

    color:#bdb6a8;

    font-size:13px;

}

.sgResult .sgOut{

    color:#ff8a8d;

}

.sgPick{

    width:100%;

    margin-top:10px;

    height:46px;

}

.sgTable{

    width:100%;

    margin-top:22px;

    border-collapse:collapse;

    font-size:15px;

}

.sgTable caption{

    margin-bottom:10px;

    color:#9a9387;

    font-size:13px;

    text-align:right;

}

.sgTable th{

    padding:10px 12px;

    background:#1c1b18;

    color:#c6bfb1;

    font-weight:600;

    font-size:13px;

    text-align:right;

}

.sgTable th:first-child{ border-radius:0 10px 10px 0; }

.sgTable th:last-child{ border-radius:10px 0 0 10px; text-align:left; }

.sgTable td{

    padding:11px 12px;

    border-bottom:1px solid #24221e;

    font-variant-numeric:tabular-nums;

}

.sgTable td:last-child{

    text-align:left;

}

.sgTable td b{

    font-size:16px;

}

.sgTable tr.isMatch td{

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

    color:#fff;

}

.sgTable tr.isMatch td b{

    color:var(--gold);

}

.sgTable tr.isSoldOut td{

    color:#777;

}

.sgTable tr.isSoldOut small{

    color:#e5484d;

    font-size:12px;

}

.sgHow{

    margin-top:22px;

    padding-top:18px;

    border-top:1px solid #24221e;

}

.sgHow h3{

    font-size:15px;

    margin-bottom:10px;

}

.sgHow ol{

    padding-right:20px;

    color:#c6bfb1;

    font-size:14px;

    line-height:2;

}

.sgHow p{

    margin-top:10px;

    color:var(--gold);

    font-size:13.5px;

}

/* موبایل: برگه‌ی پایین صفحه */
@media (max-width:600px){

    .sizeGuide{

        width:100%;

        max-width:100%;

        max-height:88vh;

        max-height:88dvh;

        margin:auto 0 0;

        border-radius:22px 22px 0 0;

        border-bottom:none;

    }

    .sizeGuide[open]{

        animation:sgUp .35s cubic-bezier(.16,1,.3,1);

    }

    @keyframes sgUp{

        from{ transform:translateY(100%); }

    }

    .sgPanel{

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

    }

    .sgGo{

        padding:0 14px;

        font-size:14px;

    }

}

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

    .sizeGuide[open]{ animation:none; }

}
