/* ==================================================
   GLOBAL
================================================== */

* {
    box-sizing: border-box;
}


html {
    scroll-behavior: smooth;
}


body {
    margin: 0;

    font-family: 'Vazirmatn', sans-serif;

    background: radial-gradient(
            circle at 10% 15%,
            rgba(25, 118, 210, 0.08),
            transparent 28%
    ),
    radial-gradient(
            circle at 90% 35%,
            rgba(30, 58, 95, 0.07),
            transparent 30%
    ),
    radial-gradient(
            circle at 50% 100%,
            rgba(25, 118, 210, 0.05),
            transparent 35%
    ),
    linear-gradient(
            135deg,
            #f8fafc 0%,
            #f3f7fb 50%,
            #f8fafc 100%
    );

    background-attachment: fixed;

    color: #263238;
}

a {
    font-family: 'Vazirmatn', sans-serif;
}


/* ==================================================
   NAVBAR
================================================== */

.shop-navbar {

    width: 100%;

    background: #ffffff;

    border-bottom: 1px solid #eeeeee;

    box-shadow: 0 2px 12px rgba(0, 0, 0, .05);

    position: sticky;

    top: 0;

    z-index: 9999;

    direction: rtl;
}


.shop-navbar-inner {

    width: 100%;

    max-width: 1250px;

    min-height: 70px;

    margin: 0 auto;

    padding: 0 20px;

    display: flex;

    align-items: center;

    gap: 25px;
}


/* ==================================================
   LOGO
================================================== */

.shop-logo {

    display: flex;

    align-items: center;

    gap: 10px;

    color: #263238;

    text-decoration: none;

    flex-shrink: 0;
}


.shop-logo:hover {

    color: #263238;
}


.shop-logo-icon {

    width: 42px;

    height: 42px;

    display: flex;

    align-items: center;

    justify-content: center;

    background: #1976d2;

    color: #ffffff;

    border-radius: 11px;

    font-size: 20px;
}


.shop-logo-text {

    display: flex;

    flex-direction: column;

    line-height: 1.5;
}


.shop-logo-title {

    font-size: 15px;

    font-weight: 800;
}


.shop-logo-subtitle {

    color: #90a4ae;

    font-size: 9px;
}


/* ==================================================
   MENU
================================================== */

.shop-menu {

    display: flex;

    align-items: center;

    gap: 3px;

    flex: 1;
}


.shop-menu-link,
.shop-category-button {

    display: flex;

    align-items: center;

    gap: 7px;

    padding: 10px 12px;

    border: none;

    border-radius: 9px;

    background: transparent;

    color: #546e7a;

    font-family: 'Vazirmatn', sans-serif;

    font-size: 12px;

    cursor: pointer;

    text-decoration: none;

    white-space: nowrap;

    transition: background .2s ease,
    color .2s ease;
}


.shop-menu-link:hover,
.shop-category-button:hover {

    background: #eef6fd;

    color: #1976d2;
}


.shop-menu-link i,
.shop-category-button i {

    font-size: 15px;
}


.shop-menu-chevron {

    font-size: 9px !important;
}


/* ==================================================
   DROPDOWN
================================================== */

.shop-category {

    position: relative;
}


.shop-category-menu {

    position: absolute;

    top: calc(100% + 7px);

    right: 0;

    width: 245px;

    padding: 7px;

    background: #ffffff;

    border: 1px solid #eeeeee;

    border-radius: 12px;

    box-shadow: 0 12px 35px rgba(0, 0, 0, .10);

    opacity: 0;

    visibility: hidden;

    transform: translateY(-5px);

    transition: opacity .2s ease,
    visibility .2s ease,
    transform .2s ease;

    z-index: 10000;
}


/* ==================================================
   DESKTOP HOVER
================================================== */

@media (min-width: 951px) {

    .shop-category:hover
    .shop-category-menu {

        opacity: 1;

        visibility: visible;

        transform: translateY(0);
    }

}


/* ==================================================
   DROPDOWN ITEM
================================================== */

.shop-category-item {

    display: flex;

    align-items: center;

    justify-content: space-between;

    padding: 10px 11px;

    border-radius: 8px;

    color: #546e7a;

    font-size: 12px;

    text-decoration: none;

    transition: background .2s ease,
    color .2s ease;
}


.shop-category-item:hover {

    background: #e3f2fd;

    color: #1976d2;
}


.shop-category-item span {

    display: flex;

    align-items: center;

    gap: 7px;
}


.shop-category-item span i {

    font-size: 8px;

    color: #90a4ae;
}


.shop-category-item > i {

    font-size: 9px;

    color: #b0bec5;
}


/* ==================================================
   LIBRARY DIVIDER
================================================== */

.shop-category-divider {

    height: 1px;

    margin: 6px 5px;

    background: #f0f2f4;
}


.supervisor-library-item {

    color: #546e7a;
}


/* ==================================================
   EMPTY CATEGORY
================================================== */

.shop-category-empty {

    padding: 15px;

    text-align: center;

    color: #90a4ae;

    font-size: 11px;
}


/* ==================================================
   ACTIONS
================================================== */

.shop-actions {

    display: flex;

    align-items: center;

    gap: 5px;

    flex-shrink: 0;
}


/* ==================================================
   SEARCH
================================================== */

.shop-search {

    display: flex;

    align-items: center;

    width: 220px;

    height: 38px;

    margin-right: auto;

    background: #f8fafb;

    border: 1px solid #e5e7eb;

    border-radius: 9px;

    overflow: hidden;

    transition: border-color .2s ease,
    box-shadow .2s ease,
    background .2s ease;
}


.shop-search:focus-within {

    background: #ffffff;

    border-color: #90caf9;

    box-shadow: 0 0 0 3px rgba(25, 118, 210, .08);
}


.shop-search input {

    width: 100%;

    height: 100%;

    padding: 0 12px;

    border: none;

    outline: none;

    background: transparent;

    color: #455a64;

    font-family: 'Vazirmatn', sans-serif;

    font-size: 11px;
}


.shop-search input::placeholder {

    color: #90a4ae;
}


.shop-search button {

    width: 38px;

    height: 100%;

    flex-shrink: 0;

    border: none;

    background: transparent;

    color: #546e7a;

    cursor: pointer;

    display: flex;

    align-items: center;

    justify-content: center;

    transition: background .2s ease,
    color .2s ease;
}


.shop-search button:hover {

    background: #eef6fd;

    color: #1976d2;
}


.shop-search button i {

    font-size: 15px;
}


/* ==================================================
   ACTION BUTTON
================================================== */

.shop-action {

    position: relative;

    width: 38px;

    height: 38px;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 9px;

    color: #546e7a;

    text-decoration: none;

    transition: background .2s ease,
    color .2s ease;
}


.shop-action:hover {

    background: #eef6fd;

    color: #1976d2;
}


.shop-action i {

    font-size: 17px;
}


/* ==================================================
   CART COUNT
================================================== */

.shop-cart-count {

    position: absolute;

    top: 2px;

    right: 1px;

    min-width: 15px;

    height: 15px;

    padding: 0 3px;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 50%;

    background: #e53935;

    color: #ffffff;

    font-size: 8px;

    font-weight: 700;
}


/* ==================================================
   USER
================================================== */

.shop-user {

    position: relative;

    flex-shrink: 0;
}


.shop-user-button {

    position: relative;

    width: 38px;

    height: 38px;

    display: flex;

    align-items: center;

    justify-content: center;

    border: none;

    border-radius: 9px;

    background: transparent;

    color: #546e7a;

    cursor: pointer;

    font-family: 'Vazirmatn', sans-serif;

    transition: background .2s ease,
    color .2s ease;
}


.shop-user-button:hover {

    background: #eef6fd;

    color: #1976d2;
}


.shop-user-button i {

    font-size: 18px;
}


/* ==================================================
   USER DROPDOWN
================================================== */

.shop-user-menu {

    position: absolute;

    top: calc(100% + 10px);

    left: 0;

    width: 260px;

    padding: 8px;

    background: #ffffff;

    border: 1px solid #e5e7eb;

    border-radius: 14px;

    box-shadow: 0 15px 40px rgba(15, 23, 42, 0.12);

    opacity: 0;

    visibility: hidden;

    pointer-events: none;

    transform: translateY(-8px);

    transition: opacity .18s ease,
    transform .18s ease,
    visibility .18s ease;

    z-index: 10001;
}


.shop-user.open .shop-user-menu {

    opacity: 1;

    visibility: visible;

    pointer-events: auto;

    transform: translateY(0);
}


/* ==================================================
   USER HEADER
================================================== */

.shop-user-menu-header {

    display: flex;

    align-items: center;

    gap: 11px;

    padding: 10px 10px 12px;

    margin-bottom: 5px;

    border-bottom: 1px solid #f0f2f4;
}


.shop-user-menu-avatar {

    width: 38px;

    height: 38px;

    flex-shrink: 0;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 10px;

    background: #eef6fd;

    color: #1976d2;

    font-size: 18px;
}


.shop-user-menu-title {

    display: flex;

    flex-direction: column;

    min-width: 0;
}


.shop-user-menu-title strong {

    color: #263238;

    font-size: 12px;

    font-weight: 700;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}


.shop-user-menu-title span {

    margin-top: 2px;

    color: #90a4ae;

    font-size: 9px;
}


/* ==================================================
   USER MENU ITEM
================================================== */

.shop-user-menu-item {

    width: 100%;

    display: flex;

    align-items: center;

    gap: 10px;

    min-height: 42px;

    padding: 9px 10px;

    border-radius: 9px;

    color: #546e7a;

    background: transparent;

    text-decoration: none;

    font-family: 'Vazirmatn', sans-serif;

    font-size: 11px;

    transition: background .18s ease,
    color .18s ease;
}


.shop-user-menu-item:hover {

    background: #eef6fd;

    color: #1976d2;
}


.shop-user-menu-item i {

    width: 22px;

    flex-shrink: 0;

    text-align: center;

    font-size: 15px;
}


.shop-user-menu-item span {

    flex: 1;

    text-align: right;
}


.shop-user-menu-arrow {

    width: auto !important;

    color: #b0bec5;

    font-size: 9px !important;
}


/* ==================================================
   USER DIVIDER
================================================== */

.shop-user-menu-divider {

    height: 1px;

    margin: 6px 5px;

    background: #f0f2f4;
}


/* ==================================================
   LOGOUT
================================================== */

.shop-user-menu-item.logout-item {

    color: #e53935;
}


.shop-user-menu-item.logout-item:hover {

    background: #fff1f1;

    color: #d32f2f;
}


/* ==================================================
   LOGIN
================================================== */

.shop-login {

    display: flex;

    align-items: center;

    gap: 6px;

    padding: 9px 14px;

    border-radius: 9px;

    background: #1976d2;

    color: #ffffff;

    font-size: 11px;

    text-decoration: none;

    transition: background .2s ease,
    transform .2s ease;
}


.shop-login:hover {

    background: #1565c0;

    color: #ffffff;

    transform: translateY(-1px);
}


/* ==================================================
   MOBILE BUTTON
================================================== */

.shop-mobile-button {

    display: none;

    width: 40px;

    height: 40px;

    border: none;

    border-radius: 9px;

    background: #eef6fd;

    color: #1976d2;

    font-size: 21px;

    cursor: pointer;
}


/* ==================================================
   DJANGO MESSAGES
================================================== */

.shop-messages {

    width: 100%;

    max-width: 1250px;

    margin: 15px auto 0;

    padding: 0 20px;

    direction: rtl;
}


.shop-message {

    position: relative;

    display: flex;

    align-items: center;

    gap: 12px;

    width: 100%;

    min-height: 52px;

    margin-bottom: 10px;

    padding: 10px 14px;

    background: #ffffff;

    border: 1px solid #eeeeee;

    border-radius: 11px;

    box-shadow: 0 5px 18px rgba(0, 0, 0, .06);

    font-family: 'Vazirmatn', sans-serif;

    font-size: 12px;

    color: #455a64;

    opacity: 1;

    transform: translateY(0);

    transition: opacity .5s ease,
    transform .5s ease,
    max-height .5s ease,
    margin .5s ease,
    padding .5s ease;
}


.shop-message.fade-out {

    opacity: 0;

    transform: translateY(-8px);

    max-height: 0;

    margin-bottom: 0;

    padding-top: 0;

    padding-bottom: 0;

    overflow: hidden;
}


.shop-message-icon {

    width: 34px;

    height: 34px;

    flex-shrink: 0;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 8px;

    font-size: 15px;
}


.shop-message-text {

    flex: 1;

    line-height: 1.8;
}


.shop-message-close {

    width: 28px;

    height: 28px;

    flex-shrink: 0;

    display: flex;

    align-items: center;

    justify-content: center;

    border: none;

    border-radius: 7px;

    background: transparent;

    color: #90a4ae;

    cursor: pointer;

    transition: background .2s ease,
    color .2s ease;
}


.shop-message-close:hover {

    background: #f1f3f4;

    color: #455a64;
}


/* ==================================================
   SUCCESS
================================================== */

.shop-message-success {

    border-right: 4px solid #43a047;
}


.shop-message-success
.shop-message-icon {

    background: #e8f5e9;

    color: #2e7d32;
}


/* ==================================================
   ERROR
================================================== */

.shop-message-error {

    border-right: 4px solid #e53935;
}


.shop-message-error
.shop-message-icon {

    background: #ffebee;

    color: #c62828;
}


/* ==================================================
   WARNING
================================================== */

.shop-message-warning {

    border-right: 4px solid #fb8c00;
}


.shop-message-warning
.shop-message-icon {

    background: #fff3e0;

    color: #ef6c00;
}


/* ==================================================
   INFO
================================================== */

.shop-message-info {

    border-right: 4px solid #1976d2;
}


.shop-message-info
.shop-message-icon {

    background: #e3f2fd;

    color: #1565c0;
}


/* ==================================================
   MAIN CONTENT
================================================== */

.shop-main-content {

    width: 100%;

    min-height: calc(100vh - 70px);
}


/* ==================================================
   FOOTER
================================================== */

.shop-footer {

    width: 100%;

    margin-top: 40px;

    padding: 20px;

    border-top: 1px solid #eeeeee;

    box-sizing: border-box;

    text-align: center;

    color: #90a4ae;

    font-size: 11px;
}


/* ==================================================
   SEARCH RESPONSIVE
================================================== */

@media (max-width: 950px) {

    .shop-search {

        width: 190px;
    }

}


@media (max-width: 700px) {

    .shop-search {

        width: 170px;
    }

}


/* ==================================================
   TABLET
================================================== */

@media (max-width: 950px) {

    .shop-navbar-inner {
        min-height: 65px;
        padding: 0 15px;
        gap: 10px;
    }


    /* ==================================================
       MOBILE BUTTON
    ================================================== */
    .shop-mobile-button {
        display: flex;

        align-items: center;
        justify-content: center;

        width: 40px;
        height: 40px;

        flex: 0 0 40px;

        order: 3;

        border: none;
        border-radius: 9px;

        background: #eef6fd;
        color: #1976d2;

        font-size: 21px;

        cursor: pointer;
    }


    /* ==================================================
       MAIN MOBILE MENU
    ================================================== */
    .shop-menu {
        position: absolute;

        top: 65px;
        right: 0;
        left: 0;

        width: 100%;

        display: none;

        flex-direction: column;
        align-items: stretch;

        gap: 3px;

        padding: 10px 15px;

        background: #ffffff;

        border-bottom: 1px solid #eeeeee;

        box-shadow: 0 10px 25px rgba(0, 0, 0, .08);

        z-index: 10000;
    }


    .shop-menu.active {
        display: flex;
    }


    /* ==================================================
       MENU LINKS
    ================================================== */
    .shop-menu-link,
    .shop-category-button {
        width: 100%;

        min-height: 44px;

        display: flex;

        align-items: center;

        justify-content: flex-start;

        padding: 11px 12px;

        border-radius: 9px;
    }


    /* ==================================================
       CATEGORY
    ================================================== */
    .shop-category {
        width: 100%;
    }


    .shop-category-button {
        cursor: pointer;
    }


    .shop-category-menu {
        position: static;

        width: 100%;

        margin-top: 4px;

        padding: 6px;

        display: none;

        opacity: 1;
        visibility: visible;

        transform: none;

        box-shadow: none;

        border-radius: 10px;

        background: #f8fafb;
    }


    .shop-category-menu.show {
        display: block;
    }


    /*
       جلوگیری از باز شدن Hover در موبایل
    */
    .shop-category:hover .shop-category-menu {
        display: none;
    }


    .shop-category:hover .shop-category-menu.show {
        display: block;
    }


    /* ==================================================
       DROPDOWN ITEMS
    ================================================== */
    .shop-category-item {
        min-height: 42px;

        padding: 10px 11px;
    }


    /* ==================================================
       ACTIONS
    ================================================== */
    .shop-actions {
        display: flex;

        align-items: center;

        justify-content: flex-start;

        gap: 4px;

        flex-shrink: 0;

        margin-right: auto;
    }


    /* ==================================================
       USER
    ================================================== */
    .shop-user {
        position: relative;

        width: auto;

        flex-shrink: 0;
    }


    .shop-user-button {
        width: 38px;
        height: 38px;

        padding: 0;

        display: flex;

        align-items: center;
        justify-content: center;
    }


    .shop-user-menu {
        position: absolute;

        top: calc(100% + 8px);

        left: 0;
        right: auto;

        width: 260px;

        margin-top: 0;

        display: none;

        opacity: 1;
        visibility: visible;

        pointer-events: none;

        transform: none;

        box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);

        background: #ffffff;

        border: 1px solid #e5e7eb;

        border-radius: 14px;

        z-index: 10002;
    }


    .shop-user.open .shop-user-menu {
        display: block;

        pointer-events: auto;
    }


    .shop-user-menu-header {
        display: flex;
    }

}


/* ==================================================
   MOBILE
================================================== */

@media (max-width: 600px) {

    .shop-navbar-inner {
        min-height: 62px;

        padding: 0 10px;

        gap: 6px;
    }


    /* ==================================================
       LOGO
    ================================================== */
    .shop-logo {
        flex-shrink: 0;
    }


    .shop-logo-text {
        display: none;
    }


    .shop-logo-icon {
        width: 40px;
        height: 40px;

        border-radius: 10px;

        font-size: 19px;
    }


    /* ==================================================
       MOBILE MENU BUTTON
    ================================================== */
    .shop-mobile-button {
        width: 38px;
        height: 38px;

        flex-basis: 38px;

        font-size: 20px;
    }


    /* ==================================================
       MAIN MENU
    ================================================== */
    .shop-menu {
        top: 62px;

        padding: 9px 10px;

        max-height: calc(100vh - 62px);

        overflow-y: auto;
        overflow-x: hidden;
    }


    /* ==================================================
       ACTIONS
    ================================================== */
    .shop-actions {
        gap: 3px;

        margin-right: auto;
    }


    /* ==================================================
       SEARCH
    ================================================== */
    .shop-search {
        width: 36px;
        height: 36px;

        margin-right: 0;

        border: none;

        background: transparent;

        overflow: visible;
    }


    .shop-search input {
        display: none;
    }


    .shop-search button {
        width: 36px;
        height: 36px;

        border-radius: 9px;

        background: #eef6fd;

        color: #1976d2;
    }


    /* ==================================================
       ACTION BUTTONS
    ================================================== */
    .shop-action {
        width: 36px;
        height: 36px;
    }


    .shop-action i {
        font-size: 16px;
    }


    /* ==================================================
       USER
    ================================================== */
    .shop-user-button {
        width: 36px;
        height: 36px;
    }


    .shop-user-menu {
        width: min(260px, calc(100vw - 20px));

        left: 0;
    }


    /* ==================================================
       LOGIN
    ================================================== */
    .shop-login {
        width: 36px;
        height: 36px;

        padding: 0;

        display: flex;

        align-items: center;
        justify-content: center;

        border-radius: 9px;
    }


    .shop-login span {
        display: none;
    }


    /* ==================================================
       MESSAGES
    ================================================== */
    .shop-messages {
        margin-top: 10px;

        padding: 0 10px;
    }


    .shop-message {
        font-size: 11px;

        padding: 9px 10px;
    }

}


/* ==================================================
   VERY SMALL MOBILE
================================================== */

@media (max-width: 380px) {

    .shop-navbar-inner {
        padding: 0 7px;

        gap: 4px;
    }


    .shop-logo-icon {
        width: 37px;
        height: 37px;
    }


    .shop-mobile-button {
        width: 36px;
        height: 36px;

        flex-basis: 36px;
    }


    .shop-action {
        width: 34px;
        height: 34px;
    }


    .shop-search,
    .shop-search button {
        width: 34px;
        height: 34px;
    }


    .shop-user-button {
        width: 34px;
        height: 34px;
    }

}

/* ==================================================
   MOBILE
================================================== */

@media (max-width: 600px) {

    .shop-search {

        width: 42px;

        height: 36px;

        margin-right: 0;

        border: none;

        background: transparent;

        overflow: visible;
    }


    .shop-search input {

        display: none;
    }


    .shop-search button {

        width: 36px;

        height: 36px;

        border-radius: 9px;

        background: #eef6fd;

        color: #1976d2;
    }


    .shop-logo-text {

        display: none;
    }


    .shop-navbar-inner {

        min-height: 62px;
    }


    .shop-menu {

        top: 62px;
    }


    .shop-action {

        width: 36px;

        height: 36px;
    }


    .shop-user-button {

        width: 36px;

        height: 36px;
    }


    .shop-login {

        padding: 8px 11px;
    }


    .shop-login span {

        display: none;
    }


    .shop-messages {

        margin-top: 10px;

        padding: 0 12px;
    }


    .shop-message {

        font-size: 11px;

        padding: 9px 10px;
    }

}


/* ==================================================
   SMALL MOBILE USER MENU
================================================== */

@media (max-width: 400px) {

    .shop-user-menu-item {

        min-height: 40px;

        font-size: 10px;
    }

}