@font-face {
    font-family: homa;
    src: url(/static/fonts/homa.ttf) format("truetype");
}

@font-face {
    font-family: yekan;
    src: url(/static/fonts/yekan.ttf) format("truetype");
}

@font-face {
    font-family: dastnevis;
    src: url(/static/fonts/dastnevis.ttf) format("truetype");
}

@font-face {
    font-family: vazir;
    src: url(/static/fonts/vazir-fd.ttf) format("truetype");
}

@font-face {
    font-family: iransans;
    src: url(/static/fonts/woff/IRANSansX-Regular.woff) format("woff");
    src: url(/static/fonts/woff2/IRANSansX-Regular.woff2) format("woff2");
}

@font-face {
    font-family: material-icons;
    src: url(/static/fonts/MaterialIcons-Regular.ttf) format("truetype");
    src: url(/static/fonts/MaterialIconsSharp-Regular.otf);
}

@font-face {
    font-family: NafunTechIcons;
    src: url(/static/fonts/NafunTechIcons.ttf) format('truetype');
}
body{
    font-family: iransans vazir homa;
}

img.lazy {
    background: url('../img/no-image.png');
}

.header {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 1020;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.05), inset 0 -1px 0 rgba(0, 0, 0, 0.15)
}

.avatar {
    vertical-align: middle;
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

.avatar img {
    width: 100%;
    height: 100%;
}

.dropdown:hover .dropdown-menu {
    display: block !important;
    margin-top: 0;
    /* remove the gap so it doesn't close */
}

.rate {
    float: left;
    height: 46px;
    padding: 0 10px;
}

.rate:not(:checked)>input {
    position: absolute;
    visibility: hidden;
}

.rate:not(:checked)>label {
    float: right;
    width: 1em;
    overflow: hidden;
    white-space: nowrap;
    cursor: pointer;
    font-size: 30px;
    color: #ccc;
}

.rate:not(:checked)>label:before {
    content: '★ ';
}

.rate>input:checked~label {
    color: #ffc700;
}

.rate:not(:checked)>label:hover,
.rate:not(:checked)>label:hover~label {
    color: #deb217;
}

.rate>input:checked+label:hover,
.rate>input:checked+label:hover~label,
.rate>input:checked~label:hover,
.rate>input:checked~label:hover~label,
.rate>label:hover~input:checked~label {
    color: #c59b08;
}



.htmx-request .request-disable {
    display: none;
}

.htmx-request .customSpinner,
.loader {
    content: "";
    width: 48px;
    height: 48px;
    border-radius: 50%;
    position: relative;
    animation: rotate 1s linear infinite
}

.htmx-request .customSpinner::before,
.loader::before {
    content: "";
    box-sizing: border-box;
    position: absolute;
    inset: 0px;
    border-radius: 50%;
    border: 5px solid #FFF;
    animation: prixClipFix 2s linear infinite;
}

@keyframes rotate {
    100% {
        transform: rotate(360deg)
    }
}

@keyframes prixClipFix {
    0% {
        clip-path: polygon(50% 50%, 0 0, 0 0, 0 0, 0 0, 0 0)
    }

    25% {
        clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 0, 100% 0, 100% 0)
    }

    50% {
        clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 100%, 100% 100%, 100% 100%)
    }

    75% {
        clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 100%, 0 100%, 0 100%)
    }

    100% {
        clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 100%, 0 100%, 0 0)
    }
}



/*  start cart custom css */
.cart-form-group{
    display: flex;
    column-gap: 4px;
    align-items: stretch;
}
.cart-form-input-group{
    @apply tw-text-xs tw-ms-auto tw-mt-4;
    width: 6rem;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid #bbb;
    height: 1.8em;
    border-radius: 1em;
    overflow: hidden;
}
.cart-form-group .input-group-btn{
    border: none;
    outline: none;
    background: transparent;
    padding: 0;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color .2s;
}

.cart-form-group input[type='number']::-webkit-inner-spin-button, 
.cart-form-group input[type='number']::-webkit-outer-spin-button { 
    -webkit-appearance: none;
    margin: 0;
    display: none;
}

.cart-form-group .input-group-btn .btn{
    font-size: .6rem;
    padding: .375rem .5rem;
}
.cart-form-group .input-group-btn .btn-plus{
    -webkit-border-start: #bbb 1px solid;
    border-inline-start: 1px solid #bbb;
}
.cart-form-group .input-group-btn .btn-minus{
    -webkit-border-end: #bbb 1px solid;
    border-inline-end: 1px solid #bbb;
}

.product-item .product-action .btn {
    color: black;
}

.cart-form-group .form-control{
    padding: 0;
    text-align: center;
}
/*  end cart custom css */



/*  start sidenav custom css */
.sidemenu-open #headerSideBarShadow{
    display:block;
}
#headerSideBarShadow{
    display:none;
    position: fixed; /* Stay in place */
    inset: 0;
    z-index: 1031; /* Stay on top */
    height: 100%;
    width: 100%;
    background-color: rgba(0,0,0,0.4);
}
#headerSideBar{
    height: 100%; /* 100% Full-height */
    width: 280px; /* 0 width - change this with JavaScript */
    position: fixed; /* Stay in place */
    z-index: 1021; /* Stay on top */
    top: 0; /* Stay at the top */
    left: 0;
    overflow-x: hidden; /* Disable horizontal scroll */
    padding-top: 60px; /* Place content 60px from the top */
    transition: 0.5s; /* 0.5 second transition effect to slide in the sidenav */
}
#headerSideBarWrapper:not(.show) #headerSideBar {
    transition: 0.5s; /* 0.5 second transition effect to slide in the sidenav */
    transform: translateX(-280px);
    pointer-events: none;
}
#headerSideBarWrapper:not(.show) #headerSideBarShadow{
    display: none !important;
}
/*  end sidenav custom css */