/* font */
@font-face {
    font-family: 'Vazirmatn';
    src: url('/static/font/Vazirmatn[wght].woff2') format('woff2 supports variations'),
    url('/static/font/Vazirmatn[wght].woff2') format('woff2-variations');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn RD';
    src: url('/static/font/Vazirmatn-RD[wght].woff2') format('woff2 supports variations'),
    url('/static/font/Vazirmatn-RD[wght].woff2') format('woff2-variations');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'YekanBakh';
    src: url('/static/font/YekanBakh_FaNum_Light.woff') format('woff');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'YekanBakh';
    src: url('/static/font/YekanBakh_FaNum_Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'YekanBakh';
    src: url('/static/font/YekanBakh_FaNum_Bold.woff') format('woff');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'YekanBakh';
    src: url('/static/font/YekanBakh_FaNum_Heavy.woff') format('woff');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'YekanBakh';
    src: url('/static/font/iranyekanwebbold.e298fdc6.32p70333a8ifw.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'YekanBakh';
    src: url('/static/font/iranyekanwebmedium.2d4f96e5.136e760rx0pbd.woff') format('woff');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'YekanBakh';
    src: url('/static/font/iranyekanwebregular.b95439c1.26xpsrtw74cat.woff') format('woff');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'IranianSans';
    src: url('/static/font/IRANSans-web.woff') format('woff');
}

/* general */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'YekanBakh', Tahoma, sans-serif;
}

.english-font {
    font-family: "Archivo Black", sans-serif;
    font-weight: 400;
    font-style: normal;
}

.prose :is(
    p,h1,h2,h3,h4,h5,h6,
    ul,ol,li,
    blockquote,
    strong,b,em,i,u,s,del,
    span,small,mark,
    table,thead,tbody,tfoot,tr,th,td,caption,
    pre,code,kbd,samp,
    figure,figcaption,
    img,picture,video,audio,
    hr,br,
    dl,dt,dd,
    sub,sup
) {
    all: revert !important;
    line-height: 1.6 !important;
}

.prose :is(p,h1,h2,h3,h4,h5,h6,li,blockquote,td,th,dd,dt,figcaption) {
    text-align: justify !important;
}

.prose a {
    color: revert !important;
    text-decoration: underline !important;
}

.prose table {
    width: 100% !important;
    border-collapse: collapse !important;
}

.prose :is(th,td) {
    padding: 8px !important;
    border: 1px solid #ddd !important;
    vertical-align: middle !important;
}

.prose img {
    max-width: 100% !important;
    height: auto !important;
}

.prose pre {
    overflow-x: auto !important;
    white-space: pre !important;
}

.prose code {
    direction: ltr;
}

.prose :is(ul,ol) {
    padding-inline-start: 2rem !important;
}

.prose ul {
    list-style: disc !important;
}

.prose ol {
    list-style: decimal !important;
}

.htmx-indicator {
    opacity: 0;
    pointer-events: none;
    transition: opacity 200ms ease-in;
}

.htmx-request .htmx-indicator {
    opacity: 1;
}

.htmx-request.htmx-indicator {
    opacity: 1;
}

/* PRODUCT */
#product-list-page {
    overflow-anchor: none;
}

#product-list-page #product-list-container {
    min-height: calc(100svh - 12rem);
    opacity: 1;
    visibility: visible;
}

#product-list-page .product-filter-form {
    display: contents;
}

#product-list-page .product-filter-toolbar {
    grid-column: 1 / -1;
}

@media (min-width: 1024px) {
    #product-list-page .product-filter-layout {
        grid-template-columns: 260px minmax(0, 1fr);
    }

    #product-list-page .product-filter-toolbar {
        grid-row: 1;
    }

    #product-list-page #product-filter-panel {
        grid-column: 1;
        grid-row: 2;
        inset: auto;
        top: 9.375rem;
    }

    #product-list-page #product-list-container {
        grid-column: 2;
        grid-row: 2;
    }
}

#product-list-page .filter-scroll {
    scrollbar-width: thin;
    scrollbar-color: #eab308 #f5f5f5;
    scrollbar-gutter: stable;
}

@supports selector(::-webkit-scrollbar) {
    #product-list-page .filter-scroll {
        scrollbar-width: auto;
    }
}

#product-list-page .filter-scroll::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

#product-list-page .filter-scroll::-webkit-scrollbar-track {
    border: 3px solid white;
    border-radius: 999px;
    background: #f5f5f5;
}

#product-list-page .filter-scroll::-webkit-scrollbar-thumb {
    min-height: 40px;
    border: 3px solid white;
    border-radius: 999px;
    background: #eab308;
}

#product-list-page .filter-scroll::-webkit-scrollbar-thumb:hover {
    background: #ca8a04;
}

#product-list-page .filter-scroll::-webkit-scrollbar-button {
    display: none;
    width: 0;
    height: 0;
}

#product-list-page .filter-choice {
    transition: background-color .18s, border-color .18s, box-shadow .18s;
}

#product-list-page .filter-choice:hover {
    background: #fafafa;
}

#product-list-page .filter-choice:has(input:checked) {
    border-color: #eab308;
    background: #fefce8;
    color: #713f12;
    box-shadow: inset 0 0 0 1px #fef08a;
}

#product-list-page .filter-choice input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    display: grid;
    place-content: center;
    flex-shrink: 0;
    width: 19px;
    height: 19px;
    margin: 0;
    border: 1.5px solid #d4d4d4;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    transition: background-color .18s, border-color .18s, box-shadow .18s;
}

#product-list-page .filter-choice input[type="checkbox"]::before {
    content: "";
    width: 10px;
    height: 10px;
    background: #422006;
    clip-path: polygon(14% 44%, 0 60%, 40% 100%, 100% 19%, 83% 5%, 38% 69%);
    transform: scale(0);
    transition: transform .15s;
}

#product-list-page .filter-choice input[type="checkbox"]:checked {
    border-color: #eab308;
    background: #facc15;
    box-shadow: 0 2px 5px #eab30826;
}

#product-list-page .filter-choice input[type="checkbox"]:checked::before {
    transform: scale(1);
}

#product-list-page .filter-choice input[type="checkbox"]:focus-visible {
    outline: 2px solid #a16207;
    outline-offset: 3px;
}

#product-list-page .attribute-filter[open] summary iconify-icon {
    transform: rotate(180deg);
}

@media (max-width: 1023px) {
    body:has(#product-list-page #filter-panel-toggle:checked) {
        overflow: hidden;
    }

    #product-list-page:has(#filter-panel-toggle:checked) #product-filter-panel,
    #product-list-page:has(#filter-panel-toggle:checked) .product-filter-backdrop {
        display: block;
    }

    #product-list-page:has(#filter-panel-toggle:focus-visible) label[for="filter-panel-toggle"] {
        outline: 2px solid currentColor;
        outline-offset: 3px;
    }
}

#product-detail-page [x-cloak] {
    display: none !important;
}

.detail-comment-form .comment-field input:not([type=radio]):not([type=hidden]), .detail-comment-form .comment-field textarea {
    padding-right: 3rem;
}

.detail-comment-form .comment-field textarea {
    min-height: 220px;
}

.detail-comments-scroll {
    scrollbar-width: thin;
    scrollbar-color: #eab308 #fafafa;
}

.detail-comments-scroll::-webkit-scrollbar {
    width: 6px;
}

.detail-comments-scroll::-webkit-scrollbar-thumb {
    border-radius: 99px;
    background: #eab308;
}

#product-detail-page {
    overflow-anchor: none;
}

#product-detail-form {
    min-height: 30rem;
}

.detail-comment-form input:not([type=radio]):not([type=hidden]), .detail-comment-form textarea {
    width: 100%;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 12px 16px;
    background: white;
    font-size: 13px;
}

.detail-comment-form input:focus-visible, .detail-comment-form textarea:focus-visible {
    outline: 2px solid #fde047;
    outline-offset: 2px;
}

.detail-thumbnails {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.detail-thumbnails::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

/* ANIMATION */
@keyframes float-hero-plane {
    0% {
        transform: translate(-50%, -50%) translateY(0px) rotate(1deg);
    }
    50% {
        transform: translate(-50%, -50%) translateY(-15px) rotate(-1deg);
    }
    100% {
        transform: translate(-50%, -50%) translateY(0px) rotate(1deg);
    }
}

.animate-float-hero {
    animation: float-hero-plane 6s ease-in-out infinite;
}

@keyframes float-element {
    0% {
        transform: translateY(0px) rotate(0deg);
    }
    33% {
        transform: translateY(-10px) rotate(5deg);
    }
    66% {
        transform: translateY(5px) rotate(-5deg);
    }
    100% {
        transform: translateY(0px) rotate(0deg);
    }
}

.animate-floating {
    animation: float-element 8s ease-in-out infinite;
}

@keyframes orbit {
    0% {
        transform: translateX(0px) scale(1) translateZ(100px);
        z-index: 20;
        opacity: 1;
    }
    25% {
        transform: translateX(180px) scale(0.7) translateZ(0);
        z-index: 10;
        opacity: 0.8;
    }
    50% {
        transform: translateX(0px) scale(0.4) translateZ(-100px);
        z-index: 5;
        opacity: 0.5;
    }
    75% {
        transform: translateX(-180px) scale(0.7) translateZ(0);
        z-index: 10;
        opacity: 0.8;
    }
    100% {
        transform: translateX(0px) scale(1) translateZ(100px);
        z-index: 20;
        opacity: 1;
    }
}
