/* تمام نمایش‌ها اینجا هستند؛ هیچ style یا CSS داخل PHP/JS نوشته نمی‌شود. */
html {
    color-scheme:dark
}

#site-header a[aria-label] {
    display:flex;
    align-items:center;
    justify-content:center;
    color:#d4af37;
    min-width:40px
}

#site-header a[aria-label] svg {
    width:24px;
    height:24px
}

#site-header a[aria-label='حساب کاربری'] {
    font-size:13px
}

#main-nav[data-open=true] {
    transform:translateX(0);
    visibility:visible;
    opacity:1
}

#main-nav li[data-open=true]>[data-role=mega-menu] {
    opacity:1;
    visibility:visible;
    pointer-events:auto;
    display:block
}

#shop,#cart,#checkout,#account,#receipt,#terms,#calculator,#product-detail {
    max-width:1280px;
    margin:44px auto;
    padding:24px;
    width:calc(100% - 40px)
}

#shop>header {
    margin-bottom:28px
}

#shop h1 {
    color:#d4af37
}

#shop nav {
    display:flex;
    gap:12px;
    flex-wrap:wrap;
    margin:20px 0
}

#shop nav a {
    color:#d4af37;
    padding:8px 12px;
    border:1px solid #4a3b20;
    border-radius:8px
}

#shop nav a[aria-current=page] {
    background:#493b1a
}

#shop-filters {
    display:flex;
    flex-wrap:wrap;
    gap:12px;
    background:#1c1c1c;
    border:1px solid #44391e;
    border-radius:12px;
    padding:20px;
    align-items:end
}

#shop-filters label {
    flex:1;
    min-width:130px
}

#shop-filters input,#shop-filters select {
    width:100%
}

#shop-filters input[type=checkbox] {
    width:auto
}

#shop-filters button,main form button,#product-detail button,[data-role=button] {
    background:#d4af37;
    color:#17130b;
    border:0;
    border-radius:7px;
    padding:12px 20px;
    font:inherit;
    cursor:pointer
}

main form label,#product-detail form label {
    display:block
}

main form input,main form select,main form textarea,#product-detail input {
    background:#171717;
    color:#eee;
    border:1px solid #584923;
    padding:10px;
    border-radius:6px;
    font:inherit;
    margin:8px 0;
    max-width:100%;
    box-sizing:border-box
}

#checkout form,#account form {
    max-width:600px
}

#checkout input:not([type=checkbox]),#checkout textarea,#account input {
    width:100%
}

input:focus-visible,select:focus-visible,textarea:focus-visible,button:focus-visible,a:focus-visible {
    outline:2px solid #dfc15d;
    outline-offset:3px
}

[data-role=product-grid] {
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:22px
}

[data-role=product-grid]>article {
    background:linear-gradient(145deg,#222,#161616);
    border:1px solid #514225;
    border-radius:15px;
    overflow:hidden;
    padding:16px;
    display:flex;
    flex-direction:column;
    gap:10px
}

[data-role=product-grid]>article img {
    width:100%;
    height:210px;
    object-fit:contain;
    border-radius:10px;
    background:#1a1712
}

[data-role=product-grid] h3 {
    font-size:16px;
    margin:12px 0
}

[data-role=product-grid] p {
    color:#aaa;
    font-size:13px;
    margin:0
}

[data-role=product-grid] a {
    color:#dfc16e;
    text-decoration:none
}

[data-role=product-grid] strong {
    color:#f3e0a3
}

[data-role=product-grid]>article>a:last-child {
    margin-top:auto;
    padding-top:12px;
    border-top:1px solid #39301e
}

#special-offers>[data-role=product-grid],#new-arrivals>[data-role=product-grid] {
    display:grid
}

#product-detail {
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr);
    direction:ltr;
    gap:32px
}

#product-detail figure {
    margin:0;
    grid-column:1;
    grid-row:1
}

#product-detail section {
    direction:rtl;
    grid-column:2;
    grid-row:1;
    min-width:0
}

#product-detail figure>img {
    width:100%;
    max-height:520px;
    object-fit:contain;
    border-radius:16px;
    background:#201c14
}

#product-detail h1 {
    font-size:26px;
    color:#d4af37
}

#product-detail dl {
    display:grid;
    grid-template-columns:1fr 1.6fr;
    gap:10px;
    border-block:1px solid #4c3f23;
    padding:20px 0
}

#product-detail dd {
    margin:0;
    overflow-wrap:anywhere
}

#product-detail dt {
    color:#bbb
}

#product-detail [data-role=price] {
    font-size:24px;
    color:#e9cb79
}

#product-detail button:disabled {
    opacity:.5;
    cursor:default
}

#product-detail [data-role=gallery] {
    display:flex;
    gap:10px;
    margin-top:14px;
    flex-wrap:wrap
}

#product-detail [data-role=gallery] img {
    width:80px;
    height:70px;
    object-fit:contain
}

#product-dialog {
    width:min(1080px,92vw);
    max-height:88dvh;
    overflow:auto;
    background:#171717;
    border:1px solid #94763a;
    border-radius:18px;
    padding:24px;
    color:#eee
}

#product-dialog::backdrop {
    background:#0009;
    backdrop-filter:blur(9px)
}

#product-dialog>button {
    position:sticky;
    top:0;
    float:left;
    border:1px solid #5b4725;
    border-radius:50%;
    background:#222;
    color:#dfc16e;
    font-size:28px;
    width:42px;
    height:42px;
    z-index:1;
    cursor:pointer
}

#product-dialog #product-detail {
    margin:0;
    padding:12px;
    width:100%
}

html[data-dialog=open] {
    overflow:hidden
}

#cart article {
    display:flex;
    gap:20px;
    align-items:center;
    flex-wrap:wrap;
    padding:20px;
    border-bottom:1px solid #584923
}

#cart article>img {
    width:110px;
    height:100px;
    object-fit:contain
}

#cart input {
    width:80px
}

#store-message {
    margin:22px auto;
    padding:14px;
    max-width:1200px;
    background:#243522;
    border:1px solid #64814b;
    border-radius:10px
}

[data-role=honeypot] {
    position:absolute!important;
    left:auto!important;
    right:0!important;
    clip-path:inset(50%);
    width:1px;
    height:1px;
    overflow:hidden
}

#terms p {
    white-space:pre-wrap;
    line-height:2.2
}

#product-detail section>p {
    overflow-wrap:anywhere
}

@media(max-width:1000px) {
    [data-role=product-grid] {
        grid-template-columns:repeat(3,minmax(0,1fr))
    }

}

@media(max-width:700px) {
    [data-role=product-grid] {
        grid-template-columns:repeat(2,minmax(0,1fr));
        gap:12px
    }

    [data-role=product-grid]>article {
        padding:10px
    }

    [data-role=product-grid]>article img {
        height:150px
    }

    #product-detail {
        display:flex;
        flex-direction:column;
        gap:16px
    }

    #product-detail figure {
        order:0
    }

    #product-detail section {
        order:1
    }

    #shop,#cart,#checkout,#account {
        width:100%;
        padding:16px;
        box-sizing:border-box
    }

    #product-dialog {
        padding:12px
    }

    #product-detail h1 {
        font-size:21px
    }

    #shop-filters {
        padding:12px
    }

    #shop-filters label {
        min-width:100px
    }

    #cart article {
        gap:10px
    }

    #main-nav[data-open=true] {
        right:0;
        left:auto
    }

}

@media(prefers-reduced-motion:reduce) {
    *,*::before,*::after {
        animation-duration:.01ms!important;
        transition-duration:.01ms!important
    }

}

/* کارت خانه اندازه سیال دارد؛ قواعد ثابت قدیمی نباید ستون‌ها را بیرون ببرند. */
#special-offers>[data-role=product-grid]>article,#new-arrivals>[data-role=product-grid]>article {
    width:auto;
    min-width:0;
    padding:16px;
    box-sizing:border-box
}

#site-header a[data-role=quick-calc] {
    display:flex;
    align-items:center;
    color:#d4af37
}

#site-header a[data-role=quick-calc] svg {
    width:22px;
    height:22px
}

#store-location address {
    font-style:normal
}

#store-location [data-layout=map-container]>ul {
    padding:20px;
    list-style:none
}

#store-location [data-layout=map-container]>ul svg {
    width:24px;
    height:24px
}

#store-location [data-layout=map-container] {
    display:block
}

/* انتخاب مدل‌ها در منوی لمسی؛ هاور روی دسکتاپ همچنان از پوسته اصلی می‌آید. */
#main-nav [data-role=mega-nav]>li[data-open=true]>[data-role=mega-content] {
    opacity:1;
    visibility:visible;
    display:block;
    pointer-events:auto
}

@media(max-width:1032px) {
    #main-nav [data-role=mega-nav]>li>[data-role=mega-content] {
        display:none
    }

    #main-nav [data-role=mega-nav]>li[data-open=true]>[data-role=mega-content] {
        display:block;
        position:static
    }

}
/* عرض پاپ‌آپ شامل padding است؛ در موبایل محتوا از کادر خارج نمی‌شود. */
#product-dialog, #product-detail, #product-detail figure, #product-detail section {
    box-sizing: border-box;
    min-width: 0;
}
@media (max-width: 1032px) {
    #site-header > :is(div,section[data-container]):nth-of-type(1) {
        display: flex;
        gap: 6px;
        max-width: 170px;
    }
    #site-header > :is(div,section[data-container]):nth-of-type(1) > img {
        height: 32px;
        width: 28px;
        object-fit: contain;
    }
    #site-header > :is(div,section[data-container]):nth-of-type(1) > :is(div,section[data-container]) > h1 {
        white-space: nowrap;
        font-size: 15px;
        letter-spacing: 1px;
    }
    #site-header > :is(div,section[data-container]):nth-of-type(1) > :is(div,section[data-container]) > span {
        letter-spacing: 0;
        font-size: 9px;
        white-space: nowrap;
    }
    #site-header > :is(div,section[data-container]):last-child {
        gap: 8px;
    }
    #site-header a[data-role=quick-calc], #site-header a[data-role=contact-btn] {
        display: none;
    }
}
#nojs-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    padding: 18px;
    background: #191919;
}
#nojs-nav a {
    color: #d4af37;
}
/* فرم قدیمی عرض ۱۰۰٪ به‌علاوه padding داشت؛ اکنون داخل عرض والد می‌ماند. */
#custom-order-form {
    box-sizing: border-box;
    max-width: 100%;
}
