/* متغیرها و استایل‌های پایه برای کل سایت */
:root {
    --light-purple: #faf5ff;
    --medium-purple: #ddd6fe;
    --main-purple: #a855f7;
    --dark-purple: #7e22ce;
    --text-purple: #3b0764;
    --white: #ffffff;
    --sidebar-bg: #2d144d;
    --sidebar-active: #4a1c7c;
    --bg-main: #fcf6ff;
    --bg: #fcf8ff;
    --bg-soft: #f8f1ff;
    --danger: #ef4444;
    --primary: #c77dff;
    --primary-dark: #9d4edd;
    --primary-soft: #edd3ff;
    --secondary: #f3e8ff;
    --text: #4b2e57;
    --muted: #7f6d8a;
    --border: #ead7f7;
    --shadow: 0 10px 30px rgba(157, 78, 221, 0.12);
    --shadow-hover: 0 16px 36px rgba(157, 78, 221, 0.18);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
}

   

@font-face {
    font-family: 'IRANSansX';
    src: url(../fonts/woff2/IRANSansX-Regular.woff2) format('woff2');
    font-weight: normal;
    font-style: normal;
}



* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'IRANSansX', sans-serif;
}

html {
  scroll-behavior: smooth;
}

a {
    text-decoration: none;
}

body {
    background-color: var(--light-purple);
    color: var(--text-purple);
}

body.has-navbar {
    padding-top: 78px;
}


/*----------------------------------------------------
------------------------------------------------------
------------------ Buttons ---------------------------
------------------------------------------------------
------------------------------------------------------*/


.btn {
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-weight: bold;
    border-radius: 12px;
    padding: 12px 25px;
    transition: all 0.3s ease;
}


.btn-save {
    background-color: #10b981;
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.btn-save:hover {
    background-color: #059669;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(16, 185, 129, 0.3);
}

.btn-cancel {
    background-color: #ef4444;
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}


.btn-cancel:hover {
    background-color: #dc2626;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(239, 68, 68, 0.3);
}

/* افکت فشرده شدن برای هر دو دکمه */


.btn-submit {
    background: linear-gradient(to left, var(--main-purple), var(--dark-purple));
    color: white;
    box-shadow: 0 4px 12px rgba(106, 27, 154, 0.2);
}

.btn-submit:hover {
    opacity: 0.95;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(106, 27, 154, 0.3);
}

.btn-login {
    width: 100%;
    margin-top: 10px;
    background: linear-gradient(to left, var(--main-purple), var(--dark-purple));
    color: white;
    box-shadow: 0 4px 12px rgba(106, 27, 154, 0.2);
    position: relative;
}



.btn-login.is-loading {
    pointer-events: none;
    opacity: 0.9;
    transform: none;
    /* نذار هنگام لود با hover تکان بخورد */
}

/* متن وقتی لودینگ فعاله */
.btn-login.is-loading .btn-text {
    visibility: hidden;
    /* جای متن حفظ می‌شود */
}

.btn-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    display: none;
    animation: btnSpin 0.8s linear infinite;
}

.btn-login.is-loading .btn-spinner {
    display: inline-block;
}

@keyframes btnSpin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes btnSpin {
    to {
        transform: rotate(360deg);
    }
}

/* اختیاری: وقتی disabled شد هم قیافه‌اش خوب بماند */
.btn-login:disabled {
    cursor: not-allowed;
}

.btn-login:hover {
    opacity: 0.95;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(106, 27, 154, 0.3);
}

.btn-register {
    width: 100%;
    margin-top: 10px;
    background: linear-gradient(to left, var(--main-purple), var(--dark-purple));
    color: white;
    box-shadow: 0 4px 12px rgba(106, 27, 154, 0.2);
}



.btn-register.is-loading {
    pointer-events: none;
    opacity: 0.9;
    transform: none;
    /* نذار هنگام لود با hover تکان بخورد */
}

/* متن وقتی لودینگ فعاله */
.btn-register.is-loading .btn-text {
    visibility: hidden;
    /* جای متن حفظ می‌شود */
}


.btn-register.is-loading .btn-spinner {
    display: inline-block;
}


/* اختیاری: وقتی disabled شد هم قیافه‌اش خوب بماند */
.btn-register:disabled {
    cursor: not-allowed;
}


.btn-register:hover {
    opacity: 0.95;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(106, 27, 154, 0.3);
}


.btn-edit {
    background: #3498db;
    color: white;
    box-shadow: 0 4px 12px rgba(68, 102, 239, 0.2);
}

.btn-edit:hover {
    background: #2980b9;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(68, 102, 239, 0.3);
}

.btn-delete {
    background: #e74c3c;
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.btn-delete:hover {
    background: #c0392b;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(239, 68, 68, 0.3);
}







.btn-save:active,
.btn-cancel:active,
.btn-edit:active,
.btn-delete:active {
    transform: translateY(0);
}


.btn-tbl {
    border: none;
    border-radius: 8px;
    padding: 3px 10px;
    cursor: pointer;
}

.btn-remove-row {
    background-color: #fee2e2;
    color: var(--danger);
    border: none;
    border-radius: 10px;
    padding: 3px 10px;
    cursor: pointer;
    transition: 0.2s;
}

.btn-tbl.btn-delete {
    background-color: #fee2e2;
    color: var(--danger);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.2s;
}

.btn-remove-row:hover,
.btn-tbl.btn-delete:hover {
    background-color: var(--danger);
    color: #fff;
}

.btn-add-variant {
    background-color: #fff;
    color: var(--dark-purple);
    border: 1.5px dashed var(--dark-purple);
    border-radius: 10px;
    padding: 10px 18px;
    font-weight: bold;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: 0.25s;
}

.btn-add-variant:hover {
    background-color: var(--dark-purple);
    color: #fff;
}

.btn-generate-variant {
    background-color: #fff;
    color: var(--dark-purple);
    border: 1.5px dashed var(--dark-purple);
    border-radius: 10px;
    padding: 10px 18px;
    font-weight: bold;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: 0.25s;
}

.btn-generate-variant:hover {
    background-color: var(--dark-purple);
    color: #fff;
}


.btn-tbl.btn-edit {
    background-color: #e0f2fe;
    color: #0284c7;
}

.btn-tbl.btn-edit:hover {
    background-color: #0284c7;
    color: #fff;
}

/*======================================================*/



.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    padding: 14px 30px;

    /* حالت شیشه‌ای بنفش */
    background: rgba(135, 86, 146, 0.65);

    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);

    border-bottom: 1px solid rgba(255,255,255,0.18);

    box-shadow: 0 10px 35px rgba(60, 20, 70, 0.35);

    color: #fff;
}




.logo {
    font-weight: 800;
    font-size: 1.5rem;
    color: #8e44ad;
    white-space: nowrap;
    margin-top: -20px;
}

.logo a {
    display: inline-block;
}

.logo img {
    height: 60px;
    width: auto;
    object-fit: contain;
}


.search-container {
    position: relative;
    flex: 1;
    max-width: 620px;
}

.search-container i {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #9e9e9e;
    font-size: 15px;
    pointer-events: none;
}

.search-box {
    width: 100%;
    padding: 12px 45px 12px 16px;
    border: 1px solid #ddd;
    border-radius: 999px;
    outline: none;
    background: #fff;
    transition: 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.search-box:focus {
    border-color: #8e44ad;
    box-shadow: 0 0 0 4px rgba(142, 68, 173, 0.12);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 14px;
    white-space: nowrap;
}

.btn-auth {
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid #8e44ad;
    background: #fff;
    color: #8e44ad;
    cursor: pointer;
    transition: 0.3s ease;
    font-weight: 700;
}

.btn-auth:hover {
    background: #8e44ad;
    color: #fff;
    transform: translateY(-1px);
}


/* -------------------------------- modal --------------------------- */

/* پس زمینه مودال */
.modal {
    display: none;
    /* پیشفرض مخفی */
    position: fixed;

    inset: 0;
    /* معادل top:0; left:0; right:0; bottom:0 */

    background: rgba(0, 0, 0, 0.45);

    align-items: center;
    justify-content: center;
}


.modal.show {
    display: flex;
    /* وقتی باز میشه این کلاس اضافه میشه */
}

.modal-content {
    background: #fff;
    width: 700px;
    max-width: 95%;
    max-height: 85vh;

    border-radius: 12px;
    padding: 20px;

    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.25);

    overflow-y: auto;
}


/* دکمه بستن */
.close-button {
    float: left;
    font-size: 22px;
    cursor: pointer;
    color: #888;
}

.close-button:hover {
    color: #000;
}



/*--------------------------------------------------------------*/



/* ===== Auth Avatar Menu ===== */
.auth-menu {
    position: relative;
}

.avatar-trigger {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #eee;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s ease;
}

.avatar-trigger:hover {
    border-color: #ccc;
    transform: scale(1.03);
}

.avatar-trigger img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* منوی کشویی */
.avatar-dropdown {
    position: absolute;
    top: 52px;
    left: 0;
    min-width: 190px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    border: 1px solid #eee;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.22s ease;
    z-index: 9999;
}

.auth-menu:hover .avatar-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.avatar-dropdown a,
.avatar-dropdown button {
    width: 100%;
    border: none;
    background: none;
    text-align: right;
    padding: 12px 16px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    transition: background 0.2s ease;
}

.avatar-dropdown a:hover,
.avatar-dropdown button:hover {
    background: #f7f7f7;
}

.avatar-dropdown .logout-btn {
    color: #c62828;
}

.avatar-dropdown .menu-divider {
    height: 1px;
    background: #eee;
    margin: 6px 0;
}

/* نمایش نام کاربر */
.avatar-user-info {
    padding: 10px 16px 8px;
    border-bottom: 1px solid #f1f1f1;
    margin-bottom: 6px;
}

.avatar-user-info strong {
    display: block;
    font-size: 14px;
    color: #222;
}

.avatar-user-info span {
    display: block;
    font-size: 12px;
    color: #777;
    margin-top: 3px;
}

.cart-icon {
    position: relative;
    cursor: pointer;
    font-size: 1.25rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8e44ad;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: 0.3s ease;
}

.cart-icon:hover {
    transform: translateY(-1px);
    background: #f8ecfb;
}

.cart-count {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #ff3b30;
    color: white;
    font-size: 11px;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid #fff;
}


/* --- استایل‌های Drawer --- */
.drawer {
    height: 100%;
    width: 280px;
    position: fixed;
    top: 0;
    right: -280px;
    /* مخفی در سمت راست */
    background-color: var(--white);
    transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10000;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.drawer.open {
    right: 0;
    /* نمایش منو */
}

.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 9999;
}

.drawer-overlay.active {
    display: block;
}

.drawer-header {
    padding: 15px 20px;
    background: #875692;
    /* کمی تیره‌تر برای تمایز */
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    font-size: 1.1rem;
}

.drawer nav a {
    padding: 15px 20px;
    display: block;
    color: var(--text-purple);
    text-decoration: none;
    border-bottom: 1px solid var(--light-purple);
    transition: 0.2s;
}

.drawer nav a i {
    margin-left: 10px;
    width: 20px;
    text-align: center;
}

.drawer nav a:hover {
    background: var(--light-purple);
}

/* --- تنظیمات دکمه و واکنش‌گرایی --- */
.menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--dark-purple);
    cursor: pointer;
    order: 1;
}

/* استایل دکمه بستن داخل دراور */
.drawer .close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 30px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: transform 0.2s;
}

.drawer .close-btn:hover {
    transform: scale(1.2);
}


#page-loader {
    position: fixed;
    inset: 0; /* top/right/bottom/left = 0 */
    background: #fff; /* رنگ پس‌زمینه دلخواه */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.3s ease;
}

    #page-loader img {
        width: 80px; /* اندازه گیف */
        height: auto;
    }

    #page-loader.hidden {
        opacity: 0;
        pointer-events: none;
    }



/* =========================
   Product Sections
========================= */


.products-section .view-all {
    font-size: 14px;
    color: #666;
    text-decoration: none;
    transition: color 0.2s ease;
}

.products-section .view-all:hover {
    color: #000;
}

.products-grid {
    width: min(1100px, 92%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}












/* --- Footer Professional Styles --- */
.footer {
    background-color: #2d1346;
    /* بنفش بسیار تیره برای کنتراست */
    color: #eee;
    padding: 60px 0 20px 0;
    margin-top: 50px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* ۴ ستون در دسکتاپ */
    gap: 30px;
    padding: 0 20px;
}

.footer-col h3.footer-title {
    color: var(--main-purple);
    font-size: 1.2rem;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h3.footer-title::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: 0;
    width: 50px;
    height: 2px;
    background-color: var(--main-purple);
}

.footer-about {
    line-height: 1.8;
    font-size: 0.9rem;
    text-align: justify;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    color: #ccc;
    text-decoration: none;
    transition: 0.3s;
    font-size: 0.9rem;
}

.footer-col ul li a:hover {
    color: var(--white);
    padding-right: 5px;
}

.contact-info p {
    margin-bottom: 15px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.social-links {
    margin-top: 20px;
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 35px;
    height: 35px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: 0.3s;
}

.social-links a:hover {
    background: var(--main-purple);
    transform: translateY(-3px);
}

.namad-container {
    display: flex;
    gap: 10px;
}

.namad-box {
    width: 80px;
    height: 90px;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    font-size: 0.7rem;
    font-weight: bold;
}

.footer-bottom {
    text-align: center;
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.8rem;
}


/* ===== Cart Popup Styles ===== */
.cart-popup {
    text-align: center;
}

.popup-image {
    max-width: 180px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.popup-price {
    font-size: 20px;
    font-weight: 700;
    color: #333;
}



.cart-attribute-title {
    font-size: 15px;
    font-weight: 700;
    color: #555;
}

.cart-attribute-values {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.cart-option {
    position: relative;
    cursor: pointer;
}

    .cart-option input[type="radio"] {
        position: absolute;
        opacity: 0;
    }

    .cart-option span {
        display: inline-block;
        padding: 8px 16px;
        background: #f7f7f7;
        border: 2px solid #eee;
        border-radius: 10px;
        font-size: 14px;
        font-weight: 600;
        color: #555;
        transition: all 0.2s ease;
    }

    .cart-option input[type="radio"]:checked + span {
        background: #8e44ad;
        color: #fff;
        border-color: #8e44ad;
    }

    .cart-option:hover span {
        border-color: #8e44ad;
    }

/* Popup Stock */
.popup-stock {
    margin-top: 15px;
    margin-bottom: 15px;
    font-size: 14px;
    font-weight: 600;
}





/* SweetAlert2 Custom Buttons */
.swal2-confirm {
    background: #8e44ad !important;
    border-radius: 10px !important;
    padding: 10px 24px !important;
    font-weight: 700 !important;
}

.swal2-cancel {
    background: #f3f4f6 !important;
    color: #4b5563 !important;
    border-radius: 10px !important;
    padding: 10px 24px !important;
    font-weight: 700 !important;
}


.footer-bottom span {
    color: var(--main-purple);
}


/* ===== Quantity Selector Styles ===== */
.qty-selector {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: #f7f7f7;
    border-radius: 10px;
    padding: 6px 10px;
}

    .qty-selector button {
        width: 32px;
        height: 32px;
        border: none;
        background: #fff;
        border-radius: 8px;
        font-size: 18px;
        font-weight: 700;
        color: #555;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background 0.2s ease, color 0.2s ease;
    }

        .qty-selector button:hover {
            background: #8e44ad;
            color: #fff;
        }

        .qty-selector button:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

            .qty-selector button:disabled:hover {
                background: #fff;
                color: #555;
            }

    .qty-selector .qty-input {
        width: 50px;
        text-align: center;
        border: none;
        background: transparent;
        font-size: 15px;
        font-weight: 600;
        color: #333;
        outline: none;
        /* حذف فلش‌های input number */
        -moz-appearance: textfield;
    }

        .qty-selector .qty-input::-webkit-outer-spin-button,
        .qty-selector .qty-input::-webkit-inner-spin-button {
            -webkit-appearance: none;
            margin: 0;
        }

.mobile-user-wrapper {
    position: relative;
}

.mobile-user-entry {
    position: relative;
    width: 45px;
    height: 45px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1002;
}

.mobile-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
    border: 2px solid #eee;
}

.mobile-cart-count {
    position: absolute;
    top: -6px;
    left: -6px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 999px;
    background: #e53935;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: none;
    align-items: center;
    justify-content: center;
    line-height: 1;
    z-index: 2;
}

.mobile-user-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    width: 230px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0,0,0,.12);
    padding: 12px;
    display: none;
    flex-direction: column;
    gap: 6px;
    z-index: 1005;
}

    .mobile-user-menu.open {
        display: flex;
    }

.mobile-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 4px 10px;
}

.mobile-menu-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #eee;
    flex-shrink: 0;
}

.mobile-user-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

    .mobile-user-meta strong {
        font-size: 14px;
        color: #222;
    }

    .mobile-user-meta span {
        font-size: 12px;
        color: #777;
    }

.mobile-user-menu a,
.mobile-user-menu .mobile-logout-btn {
    width: 100%;
    border: none;
    background: none;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    text-decoration: none;
    color: #333;
    cursor: pointer;
    font-size: 14px;
}

    .mobile-user-menu a:hover,
    .mobile-user-menu .mobile-logout-btn:hover {
        background: #f7f7f7;
    }

.mobile-user-menu .mobile-logout-btn {
    color: #c62828;
}

.menu-divider {
    height: 1px;
    background: #eee;
    margin: 4px 0;
}

/* ===== Search Autocomplete ===== */
.search-container {
    position: relative;
}

.search-results {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: 0;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
    max-height: 420px;
    overflow-y: auto;
    z-index: 10000;
    display: none;
    padding: 6px;
}

    .search-results.open {
        display: block;
    }

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 10px;
    text-decoration: none;
    color: #333;
    transition: background 0.15s ease;
}

    .search-result-item:hover {
        background: #f7f0fb;
    }

.search-result-thumb {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .search-result-thumb img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

.search-result-info {
    flex: 1;
    min-width: 0;
}

.search-result-title {
    font-size: 13px;
    font-weight: 600;
    color: #222;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-price {
    font-size: 12px;
    color: #8e44ad;
    font-weight: 700;
    margin-top: 3px;
}

.search-result-empty,
.search-result-loading {
    padding: 16px;
    text-align: center;
    font-size: 13px;
    color: #888;
}

label.disabled {
    opacity: 0.45;
    pointer-events: none;
    cursor: not-allowed;
}


@media (max-width: 576px) {

    .products-section .section-head {

        align-items: flex-start;
        gap: 8px;
    }
}


/* واکنش‌گرایی فوتر */
@media (max-width: 992px) {
    .footer-container {
        grid-template-columns: repeat(2, 1fr);
        /* ۲ ستون در تبلت */
    }
}

@media (max-width: 768px) {

    .footer-about {
        text-align: center;
    }

    .footer-container {
        grid-template-columns: 1fr;
        /* ۱ ستون در موبایل */
        text-align: center;
    }

    .footer-col h3.footer-title::after {
        right: 50%;
        transform: translateX(50%);
    }

    .contact-info p {
        justify-content: center;
    }

    .social-links {
        justify-content: center;
    }

    .namad-container {
        justify-content: center;
    }

    .menu-btn {
        display: block;
    }

    .top-bar {
        flex-wrap: wrap;
        padding: 10px 15px;
        gap: 5px;
    }

    .logo {
        order: 2;
        width: auto;
        margin-right: 10px;
        margin-top: -40px;
    }

    .logo img{
        height :40px;
    }

    .nav-links {
        order:4;
        width: auto;
        gap: 10px;
    }

    .search-container {
        order:3;
        width: 100%;
        margin-top: 8px;
        max-width: 100%;
    }




    .mobile-user-wrapper {
        display: block;
    }

    .cart-icon {
        display: none;
    }

    .guest-auth-btn {
        display: inline-flex;
    }

    body.has-navbar {
        padding-top: 78px;
    }
}
.mobile-user-entry,
.desktop-auth-menu {
    display: none;
}

@media (max-width: 768px) {
    .cart-icon {
        display: none;
    }

    #authArea.guest-mode .guest-auth-btn {
        display: inline-flex;
    }

    #authArea.guest-mode .desktop-auth-menu,
    #authArea.guest-mode .mobile-user-entry {
        display: none;
    }

    #authArea.user-mode .guest-auth-btn,
    #authArea.user-mode .desktop-auth-menu {
        display: none;
    }

    #authArea.user-mode .mobile-user-entry {
        display: flex;
    }
}

@media (min-width: 769px) {
    #authArea.guest-mode .guest-auth-btn {
        display: inline-flex;
    }

    #authArea.guest-mode .desktop-auth-menu {
        display: none;
    }

    #authArea.user-mode .guest-auth-btn {
        display: none;
    }

    #authArea.user-mode .desktop-auth-menu {
        display: block;
    }

    #authArea.user-mode .mobile-user-entry {
        display: none;
    }
}


.drawer-submenu {
    display: flex;
    flex-direction: column;
}

.drawer-submenu-toggle {
    width: 100%;
    border: none;
    background: transparent;
    color: inherit;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    cursor: pointer;
    font: inherit;
    text-align: right;
}

.drawer-submenu-label {
    display: flex;
    align-items: center;
    gap: 10px;
}

.drawer-submenu-list {
    display: none;
    padding-right: 28px;
    padding-bottom: 8px;
}

.drawer-category-item {
    display: block;
    padding: 10px 0;
    color: inherit;
    text-decoration: none;
    font-size: 14px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

    .drawer-category-item:last-child {
        border-bottom: none;
    }

    .drawer-category-item:hover {
        opacity: 0.85;
    }

.submenu-arrow {
    transition: transform 0.25s ease;
    font-size: 13px;
}

.drawer-submenu.open .submenu-arrow {
    transform: rotate(180deg);
}

.drawer-category-loading,
.drawer-category-empty,
.drawer-category-error {
    padding: 10px 0;
    font-size: 13px;
    opacity: 0.85;
}



/*            Pending               */
.payment-reminder-banner {
    position: sticky;
    top: 0;
    z-index: 1100;
    background: linear-gradient(135deg, #fff4d6, #ffe4a6);
    border-bottom: 1px solid #f1c45b;
    color: #6c4300;
    padding: 10px 0;
    box-shadow: 0 3px 12px rgba(85, 54, 0, 0.08);
}

.payment-reminder-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.payment-reminder-text {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 14px;
}

    .payment-reminder-text i {
        color: #d98700;
        font-size: 18px;
    }

.payment-reminder-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.payment-reminder-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    background: #d98700;
    color: #fff;
    border-radius: 10px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: 0.2s ease;
    border: none;
}

    .payment-reminder-button:hover {
        background: #b97000;
        color: #fff;
        transform: translateY(-1px);
    }

.payment-reminder-cancel {
    border: 1px solid #c86d5a;
    border-radius: 10px;
    background: transparent;
    color: #9d3c2b;
    padding: 8px 12px;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s ease;
}

    .payment-reminder-cancel:hover {
        background: #fff0ed;
    }

    .payment-reminder-cancel:disabled {
        opacity: 0.7;
        cursor: not-allowed;
    }

@media (max-width: 576px) {
    .payment-reminder-content {
        align-items: flex-start;
        flex-direction: column;
    }

    .payment-reminder-actions {
        width: 100%;
    }

        .payment-reminder-actions > * {
            flex: 1;
            text-align: center;
            justify-content: center;
        }
}
