/* =========================================================
   Font Face: Estedad
========================================================= */

@font-face {
    font-family: 'Estedad';
    src:
        url('../fonts/Estedad-Medium.woff2') format('woff2'),
        url('../fonts/Estedad-Medium.woff') format('woff');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Estedad';
    src:
        url('../fonts/Estedad-Bold.woff2') format('woff2'),
        url('../fonts/Estedad-Bold.woff') format('woff');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

/* =========================================================
   Variables (Manli Light Theme: Red, Green & White)
========================================================= */

:root {
    /* تم استخراج‌شده از پوستر فیزیکی مانلی */
    --maneli-green: #19633B;         /* سبز حاشیه و لوگو */
    --maneli-green-hover: #134E2E;
    --maneli-red: #E30613;           /* قرمز دایره لوگو */
    --maneli-red-hover: #B8040F;
    --maneli-mustard: #D99427;       /* خردلی عناوین و خطوط کادر */
    
    --bg-main: #F2F4F2;              /* پس‌زمینه کلی با ته‌رنگ ملایم سبز */
    --card-bg: #FFFFFF;              /* زمینه سفید کارت‌ها */
    --border-card: #D99427;          /* کادر دور باکس‌ها مشابه کادرهای پوستر */
    --border-light: #E2E8F0;
    
    --text-primary: #1A2421;
    --text-secondary: #5A6A64;
    
    /* متغیرهای رفتاری */
    --accent-color: var(--maneli-red);
    --secondary-color: var(--maneli-green);
}

/* =========================================================
   Base
========================================================= */

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: 'Estedad', Tahoma, sans-serif !important;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

body.menu-dark {
    background-color: var(--bg-main);
    color: var(--text-primary);
}

body.drawer-is-open {
    overflow: hidden;
}

body,
button,
input,
select,
textarea {
    font-family: 'Estedad', Tahoma, sans-serif !important;
    -webkit-font-smoothing: antialiased;
    box-sizing: border-box;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

/* =========================================================
   Header / Navigation
========================================================= */

.menu-header-nav {
    position: relative;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--card-bg);
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.back-btn {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    transition: color 0.2s;
}

.back-btn:hover {
    color: var(--accent-color);
}

.header-actions {
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
    overflow: visible;
}

.action-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 10px;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-primary);
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.3s, transform 0.2s, border-color 0.2s;
}

.action-btn:hover {
    background: #E2E8F0;
    border-color: var(--border-hover);
}

.action-btn:active {
    transform: scale(0.96);
}

.action-btn:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 3px;
}

.action-icon {
    width: 26px !important;
    height: 26px !important;
    object-fit: contain;
    pointer-events: none;
    user-select: none;
}

.badge {
    position: absolute;
    top: -4px;
    right: -4px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background-color: var(--danger-color);
    color: #ffffff;
    font-size: 11px;
    font-weight: bold;
    border-radius: 50%;
    border: 2px solid #ffffff;
    pointer-events: none;
}

/* =========================================================
   Language Dropdown
========================================================= */

.lang-switch-container {
    position: relative;
    display: inline-flex;
    align-items: center;
    overflow: visible;
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    z-index: 10000;
    display: block;
    min-width: 155px;
    padding: 6px 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity 0.18s ease, visibility 0.18s ease, transform 0.18s ease;
}

.lang-switch-container.active .lang-dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.lang-dropdown a {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 11px 14px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 13px;
    line-height: 1.5;
    white-space: nowrap;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 0.2s, color 0.2s;
}

.lang-dropdown a:hover,
.lang-dropdown a:focus-visible,
.lang-dropdown a.active {
    background: var(--bg-main);
    color: var(--accent-color);
}

.lang-dropdown a:focus-visible {
    outline: none;
}

.lang-flag {
    width: 22px;
    height: 16px;
    object-fit: cover;
    border-radius: 2px;
    flex: 0 0 auto;
    pointer-events: none;
}

html[dir="rtl"] .lang-dropdown a {
    text-align: right;
}

html[dir="ltr"] .lang-dropdown a {
    text-align: left;
}

/* =========================================================
   Topbar
========================================================= */

.topbar h1 {
    margin-top: 0;
    color: var(--text-primary);
}

/* =========================================================
   Main Layout
========================================================= */

.menu-layout-wrapper {
    display: flex;
    gap: 25px;
    margin-top: 20px;
    align-items: flex-start;
    overflow: visible !important;
}

html[dir="rtl"] .menu-layout-wrapper {
    flex-direction: row;
}

html[dir="ltr"] .menu-layout-wrapper {
    flex-direction: row-reverse;
}

/* =========================================================
   Sidebar Categories (Light Pinned)
========================================================= */

.category-sidebar {
    position: relative;
    width: 105px;
    min-width: 105px;
    flex: 0 0 105px;
    align-self: flex-start;
    overflow: visible;
}

.sidebar-sticky {
    position: relative;
    width: 100%;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    overscroll-behavior: contain;
    z-index: 200;
    padding: 15px 5px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
}

.sidebar-sticky.is-pinned {
    position: fixed !important;
    top: 16px !important;
    margin: 0 !important;
    max-height: calc(100vh - 32px);
    z-index: 500;
}

.sidebar-sticky.is-at-bottom {
    position: absolute !important;
    top: auto !important;
    bottom: 0 !important;
    left: 0 !important;
    right: auto !important;
}

.sidebar-sticky::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

.sidebar-sticky h3 {
    display: none;
}

.category-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-links li {
    width: 100%;
}

.category-item-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
    text-decoration: none;
    transition: transform 0.2s;
}

.category-item-link:hover {
    transform: scale(1.04);
}

.category-icon-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 65px;
    height: 65px;
    padding: 6px;
    overflow: hidden;
    background: #F8FAFC;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
}

.category-item-link:hover .category-icon-wrapper,
.category-item-link.active .category-icon-wrapper {
    border-color: var(--accent-color);
    background: #FFF5F5;
    box-shadow: 0 4px 12px rgba(230, 0, 0, 0.15);
}

.category-icon-wrapper img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.category-name {
    display: block;
    max-width: 90px;
    overflow: hidden;
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
    text-overflow: ellipsis;
    transition: color 0.2s;
}

.category-item-link:hover .category-name,
.category-item-link.active .category-name {
    color: var(--accent-color) !important;
}

/* =========================================================
   Main Content
========================================================= */

.menu-main-content {
    flex-grow: 1;
    min-width: 0;
}

.category-section {
    margin-bottom: 40px;
    scroll-margin-top: 24px;
}

.category-title {
    margin-bottom: 20px;
    padding-bottom: 8px;
    color: var(--text-primary);
    font-size: 20px;
    font-weight: 800;
    border-bottom: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.category-title::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 22px;
    background: var(--accent-color);
    border-radius: 4px;
}

/* =========================================================
   Products Grid
========================================================= */

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 18px;
}

/* =========================================================
   Product Card (Clean White)
========================================================= */

.product-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.product-card:hover {
    transform: translateY(-3px);
    border-color: #CBD5E1;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.product-card:active {
    transform: scale(0.98);
}

.product-image {
    width: 100%;
    height: 170px;
    overflow: hidden;
    background: #F1F5F9;
}

.product-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: 8px;
    padding: 14px;
}

.product-title {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.05rem;
    font-weight: 800;
}

.product-desc {
    height: 3em;
    overflow: hidden;
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.5;
}

.product-price-action {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    margin-top: 10px;
}

.product-price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    color: var(--secondary-color);
    font-size: 0.95rem;
    font-weight: 800;
    white-space: nowrap;
}

.price-amount {
    font-size: 1.15rem;
}

.currency {
    font-size: 0.8rem;
    font-weight: normal;
    color: var(--text-secondary);
}

.add-to-notes-btn {
    width: 100%;
    padding: 9px 14px;
    background: var(--accent-color);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 10px rgba(230, 0, 0, 0.2);
}

.add-to-notes-btn:hover {
    background: var(--accent-hover);
    box-shadow: 0 6px 14px rgba(230, 0, 0, 0.3);
}

.add-to-notes-btn:active {
    transform: scale(0.96);
}

/* =========================================================
   Drawer / Cart Sidebar (Light)
========================================================= */

.drawer-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(2px);
}

.drawer-overlay.is-active {
    display: block;
}

.notes-drawer {
    position: fixed;
    top: 0;
    bottom: 0;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    width: 340px;
    background: var(--drawer-bg);
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease-in-out;
}

html[dir="rtl"] .notes-drawer {
    left: 0;
    border-right: 1px solid var(--border-color);
    transform: translateX(-100%);
}

html[dir="rtl"] .notes-drawer.is-open {
    transform: translateX(0);
}

html[dir="ltr"] .notes-drawer {
    right: 0;
    border-left: 1px solid var(--border-color);
    transform: translateX(100%);
}

html[dir="ltr"] .notes-drawer.is-open {
    transform: translateX(0);
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    background: #F8FAFC;
}

.drawer-header h2 {
    margin: 0;
    font-size: 17px;
    font-weight: 800;
    color: var(--text-primary);
}

.close-drawer-btn {
    padding: 0;
    background: none;
    color: var(--text-secondary);
    border: none;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s;
}

.close-drawer-btn:hover {
    color: var(--accent-color);
}

.drawer-body {
    flex-grow: 1;
    padding: 16px 20px;
    overflow-y: auto;
}

.drawer-empty-message {
    padding: 40px 0;
    color: var(--text-secondary);
    text-align: center;
    font-size: 14px;
}

.drawer-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.drawer-item-img {
    width: 52px;
    height: 52px;
    object-fit: cover;
    border-radius: 8px;
    background: #F1F5F9;
}

.drawer-item-details {
    flex-grow: 1;
    min-width: 0;
}

.drawer-item-title {
    margin: 0 0 4px;
    overflow: hidden;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    text-overflow: ellipsis;
}

.drawer-item-price {
    color: var(--secondary-color);
    font-size: 13px;
    font-weight: 800;
}

.drawer-qty-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.qty-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 28px;
    height: 28px;
    padding: 0;
    background: #F1F5F9;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    touch-action: manipulation;
    transition: all 0.2s;
}

.qty-btn:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: #ffffff;
}

.qty-val {
    min-width: 16px;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    color: var(--text-primary);
}

.drawer-footer {
    padding: 20px;
    background: #F8FAFC;
    border-top: 1px solid var(--border-color);
}

.total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 16px;
    color: var(--text-primary);
}

.total-row strong {
    color: var(--secondary-color);
    font-size: 18px;
}

.clear-all-btn {
    width: 100%;
    padding: 10px;
    background: #E2E8F0;
    color: #475569;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.clear-all-btn:hover {
    background: #CBD5E1;
    color: #1E293B;
}

.notes-trigger-btn {
    position: relative;
}

.notes-trigger-btn .badge {
    top: -5px;
    right: -5px;
    padding: 2px 6px;
    font-size: 0.75rem;
}

/* =========================================================
   Checkout Modal
========================================================= */

.checkout-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(2px);
    z-index: 99999;
}

.checkout-modal-content {
    position: relative;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    background: #ffffff;
    color: #1E293B;
    border-radius: 20px;
    padding: 24px;
    direction: rtl;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.checkout-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.checkout-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    color: #0F172A;
}

.close-checkout-modal {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    background: #F1F5F9;
    color: #64748B;
    font-size: 20px;
    cursor: pointer;
    flex: 0 0 auto;
    transition: all 0.2s;
}

.close-checkout-modal:hover {
    background: #E2E8F0;
    color: #0F172A;
}

.checkout-modal .form-group {
    margin-bottom: 16px;
}

.checkout-modal label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 700;
    color: #334155;
}

.checkout-modal .form-control,
.checkout-modal input,
.checkout-modal textarea,
.checkout-modal select {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    background: #F8FAFC;
    color: #1E293B;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.checkout-modal .form-control:focus,
.checkout-modal input:focus,
.checkout-modal textarea:focus,
.checkout-modal select:focus {
    border-color: var(--accent-color);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(230, 0, 0, 0.12);
}

.checkout-modal textarea {
    min-height: 110px;
    resize: vertical;
}

.checkout-modal .form-control::placeholder,
.checkout-modal input::placeholder,
.checkout-modal textarea::placeholder {
    color: #94A3B8;
}

.submit-order-btn,
.checkout-btn,
.checkout-modal .submit-order-btn {
    width: 100%;
    padding: 14px 16px;
    border: none;
    border-radius: 12px;
    background: var(--secondary-color);
    color: #fff;
    font-weight: 800;
    font-size: 15px;
    cursor: pointer;
    margin-bottom: 10px;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 12px rgba(11, 110, 57, 0.25);
}

.submit-order-btn:hover,
.checkout-btn:hover,
.checkout-modal .submit-order-btn:hover {
    background: var(--secondary-hover);
    box-shadow: 0 6px 16px rgba(11, 110, 57, 0.35);
}

.checkout-modal .submit-order-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

body.checkout-modal-open {
    overflow: hidden;
}

.modal-close-btn {
    position: absolute;
    top: 14px;
    left: 14px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: #F1F5F9;
    color: #64748B;
    font-size: 22px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 100;
}

.modal-close-btn:hover {
    background: #E2E8F0;
    color: #0F172A;
    transform: scale(1.05);
}

.modal-close-btn:active {
    transform: scale(0.96);
}

.product-price-action .original-price {
    display: block;
    color: #94A3B8 !important;
    font-size: 0.8em;
    font-weight: normal;
    text-decoration: line-through !important;
    text-decoration-thickness: 1.5px;
}

.product-price-action .discount-price {
    display: block;
    color: var(--gold-color) !important;
    font-size: 1.1em;
    font-weight: 800;
}

.product-price-action .normal-price {
    display: block;
    color: var(--secondary-color) !important;
    font-weight: 800;
}

/* =========================================================
   Active category while scrolling
========================================================= */
.category-item-link.active .category-icon-wrapper {
    border-color: var(--accent-color) !important;
    background: #FFF5F5 !important;
    box-shadow: 0 4px 12px rgba(230, 0, 0, 0.2);
    transform: scale(1.05);
}

.category-item-link.active .category-name {
    color: var(--accent-color) !important;
}

.category-item-link.active {
    opacity: 1;
}

/* =========================================================
   Responsive: Mobile
========================================================= */

@media (max-width: 768px) {
    .menu-header-nav {
        padding: 12px 0;
        margin-bottom: 14px;
    }

    .header-actions {
        gap: 14px;
    }

    .lang-dropdown {
        top: calc(100% + 8px);
        min-width: 150px;
    }

    .lang-dropdown a {
        min-height: 44px;
        padding: 11px 14px;
    }

    .menu-layout-wrapper {
        gap: 12px;
        margin-top: 12px;
    }

    .category-sidebar {
        width: 80px;
        min-width: 80px;
        flex: 0 0 80px;
        height: auto;
    }

    .sidebar-sticky {
        max-height: calc(100vh - 20px);
        padding: 10px 4px;
        border-radius: 12px;
    }

    .sidebar-sticky.is-pinned {
        top: 10px !important;
        max-height: calc(100vh - 20px);
    }

    .category-links {
        gap: 12px;
    }

    .category-icon-wrapper {
        width: 54px;
        height: 54px;
        padding: 4px;
    }

    .category-name {
        max-width: 72px;
        font-size: 10px;
    }

    .products-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .product-card {
        flex-direction: row;
        align-items: stretch;
    }

    .product-image {
        width: 95px;
        height: auto;
        min-height: 95px;
        flex-shrink: 0;
    }

    .product-content {
        justify-content: space-between;
        gap: 6px;
        padding: 10px 12px;
    }

    .product-title {
        font-size: 14px;
    }

    .product-desc {
        height: auto;
        max-height: 36px;
        font-size: 11px;
        line-height: 1.45;
    }

    .product-price-action {
        margin-top: 0;
    }

    .product-price {
        font-size: 13px;
    }

    .add-to-notes-btn {
        padding: 6px 12px;
        border-radius: 8px;
        font-size: 11px;
    }

    .notes-drawer {
        width: 92%;
        max-width: 330px;
    }
}

/* =========================================================
   Extra Small Phones
========================================================= */

@media (max-width: 420px) {
    .menu-layout-wrapper {
        gap: 10px;
    }

    .category-sidebar {
        width: 74px;
        min-width: 74px;
        flex-basis: 74px;
    }

    .category-icon-wrapper {
        width: 48px;
        height: 48px;
    }

    .category-name {
        max-width: 66px;
        font-size: 9.5px;
    }

    .product-image {
        width: 86px;
        min-height: 86px;
    }

    .product-title {
        font-size: 13px;
    }

    .product-desc {
        max-height: 32px;
    }

    .header-actions {
        gap: 10px;
    }

    .action-btn {
        width: 42px;
        height: 42px;
    }

    .lang-dropdown {
        min-width: 145px;
    }
}

/* =========================================================
   Devices Without Real Hover
========================================================= */

@media (hover: none) and (pointer: coarse) {
    .action-btn:hover {
        background: var(--bg-main);
    }

    .lang-dropdown a:hover {
        background: transparent;
        color: var(--text-primary);
    }

    .lang-dropdown a.active {
        background: var(--bg-main);
        color: var(--accent-color);
    }

    .product-card:hover {
        transform: none;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    }

    .category-item-link:hover {
        transform: none;
    }

    .add-to-notes-btn:hover {
        background: var(--accent-color);
    }
}

/* تنظیم دکمه سبد خرید با تم سبز */
.action-btn {
    background: #F0FDF4 !important; /* پس‌زمینه سبز بسیار روشن */
    border: 1.5px solid var(--secondary-color, #0B6E39) !important;
    color: var(--secondary-color, #0B6E39) !important;
    border-radius: 50% !important;
}

.action-btn:hover {
    background: var(--secondary-color, #0B6E39) !important;
    box-shadow: 0 4px 12px rgba(11, 110, 57, 0.2) !important;
}

/* سبز کردن دقیق آیکون با فیلتر CSS */
.action-btn .action-icon,
.notes-trigger-btn img {
    /* معادل کد رنگ #0B6E39 */
    filter: invert(28%) sepia(85%) saturate(1005%) hue-rotate(119deg) brightness(96%) contrast(93%) !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* سفید شدن آیکون هنگام رفتن موس روی دکمه (Hover) */
.action-btn:hover .action-icon,
.action-btn:hover img {
    filter: invert(100%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(100%) contrast(100%) !important;
}

/* استایل بج (تعداد آیتم سبد خرید) - قرمز برای جلب توجه */
.notes-trigger-btn .badge {
    background-color: var(--accent-color, #E60000) !important;
    color: #ffffff !important;
    border: 2px solid #ffffff !important;
    font-size: 12px !important;
    font-weight: bold !important;
}

/* =========================================================
   Maneli Menu Theme Overrides (Color Only)
========================================================= */

.product-card {
    border: 1.5px solid #EAD4AA !important;
    background-color: #FFFFFF !important;
    box-shadow: 0 4px 12px rgba(25, 99, 59, 0.05) !important;
}

.product-card:hover {
    border-color: var(--maneli-mustard, #D99427) !important;
    box-shadow: 0 8px 20px rgba(217, 148, 39, 0.15) !important;
}

.category-title {
    color: var(--maneli-mustard, #D99427) !important;
    border-bottom: 2px solid var(--maneli-mustard, #D99427) !important;
}

.category-title::before {
    background: var(--maneli-green, #19633B) !important;
}

.category-item-link.active .category-icon-wrapper {
    border-color: var(--maneli-green, #19633B) !important;
    background: #EAF4EE !important;
    box-shadow: 0 4px 12px rgba(25, 99, 59, 0.2) !important;
}

.category-item-link.active .category-name {
    color: var(--maneli-green, #19633B) !important;
}

.product-price {
    color: var(--maneli-green, #19633B) !important;
}

.add-to-notes-btn {
    background: var(--maneli-red, #E30613) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(227, 6, 19, 0.25) !important;
}

.add-to-notes-btn:hover {
    background: var(--maneli-red-hover, #B8040F) !important;
}

/* =========================================================
   اصلاح کامل سبد خرید (Cart Drawer)
========================================================= */
.notes-drawer {
    background-color: #FFFFFF !important;
    border-right: 1px solid #E2E8F0 !important;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.12) !important;
}

.drawer-header {
    background: #FAFAF7 !important;
    border-bottom: 1px solid #EAD4AA !important;
}

.drawer-header h2 {
    color: #1A2421 !important;
    font-weight: 800 !important;
}

.close-drawer-btn {
    color: #64748B !important;
}

.close-drawer-btn:hover {
    color: var(--maneli-red, #E30613) !important;
}

.drawer-body {
    background-color: #FFFFFF !important;
}

.drawer-item {
    border-bottom: 1px solid #F1F5F9 !important;
    padding: 12px 0 !important;
}

.drawer-item-title {
    color: #1A2421 !important;
    font-weight: 700 !important;
}

.drawer-item-price {
    color: var(--maneli-green, #19633B) !important;
    font-weight: 800 !important;
}

/* اصلاح دکمه‌های مثبت و منفی در سبد خرید */
.drawer-qty-controls .qty-btn {
    background: #F8FAFC !important;
    color: #1A2421 !important;
    border: 1px solid #CBD5E1 !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    font-weight: bold !important;
    transition: all 0.2s ease !important;
}

.drawer-qty-controls .qty-btn:hover {
    background: var(--maneli-red, #E30613) !important;
    border-color: var(--maneli-red, #E30613) !important;
    color: #FFFFFF !important;
}

.drawer-qty-controls .qty-val {
    color: #1A2421 !important;
    font-weight: 800 !important;
}

.drawer-footer {
    background: #FAFAF7 !important;
    border-top: 1px solid #EAD4AA !important;
}

.total-row {
    color: #1A2421 !important;
}

.total-row strong {
    color: var(--maneli-green, #19633B) !important;
    font-size: 18px !important;
    font-weight: 800 !important;
}

.checkout-btn {
    background: var(--maneli-green, #19633B) !important;
    color: #ffffff !important;
    border-radius: 12px !important;
    font-weight: 800 !important;
    box-shadow: 0 4px 12px rgba(25, 99, 59, 0.25) !important;
}

.checkout-btn:hover {
    background: var(--maneli-green-hover, #134E2E) !important;
}

.clear-all-btn {
    background: #F1F5F9 !important;
    color: #475569 !important;
    border: 1px solid #CBD5E1 !important;
    border-radius: 10px !important;
}

.clear-all-btn:hover {
    background: #E2E8F0 !important;
    color: #1E293B !important;
}


/* =========================================================
   اصلاح کامل مودال ثبت سفارش (Checkout Modal)
========================================================= */
.checkout-modal-content {
    background: #FFFFFF !important;
    border-radius: 20px !important;
    border: 1.5px solid #EAD4AA !important;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2) !important;
}

.checkout-modal-header {
    border-bottom: 1px solid #E2E8F0 !important;
}

.checkout-modal-header h3 {
    color: #1A2421 !important;
    font-weight: 800 !important;
}

.modal-close-btn {
    background: #F1F5F9 !important;
    color: #64748B !important;
}

.modal-close-btn:hover {
    background: #E2E8F0 !important;
    color: var(--maneli-red, #E30613) !important;
}

/* استپرهای مرحله ۱ و ۲ بالای مودال */
.checkout-stepper-item {
    font-weight: 700 !important;
    font-size: 13px !important;
    border: 1px solid #CBD5E1 !important;
    transition: all 0.2s ease !important;
}

.checkout-stepper-item.active {
    background: var(--maneli-green, #19633B) !important;
    color: #FFFFFF !important;
    border-color: var(--maneli-green, #19633B) !important;
}

.checkout-stepper-item:not(.active) {
    background: #F8FAFC !important;
    color: #64748B !important;
}

/* فیلدهای ورودی (Input) و متن‌ها */
.checkout-modal label {
    color: #1A2421 !important;
    font-weight: 700 !important;
    margin-bottom: 6px !important;
}

.checkout-modal .form-control,
.checkout-modal input,
.checkout-modal textarea {
    background: #F8FAFC !important;
    color: #1A2421 !important;
    border: 1.5px solid #CBD5E1 !important;
    border-radius: 12px !important;
    padding: 10px 14px !important;
    font-size: 14px !important;
}

.checkout-modal .form-control:focus,
.checkout-modal input:focus,
.checkout-modal textarea:focus {
    background: #FFFFFF !important;
    border-color: var(--maneli-green, #19633B) !important;
    box-shadow: 0 0 0 3px rgba(25, 99, 59, 0.15) !important;
}

/* دکمه موقعیت‌یاب GPS */
.btn-location {
    background: #F0FDF4 !important;
    color: var(--maneli-green, #19633B) !important;
    border: 1.5px solid var(--maneli-green, #19633B) !important;
    border-radius: 10px !important;
    padding: 9px 14px !important;
    font-weight: 700 !important;
    font-size: 13px !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.btn-location:hover {
    background: var(--maneli-green, #19633B) !important;
    color: #FFFFFF !important;
}

/* دکمه‌های نهایی مرحله بعد و ثبت فرم */
.submit-order-btn,
.checkout-modal .submit-order-btn {
    background: var(--maneli-green, #19633B) !important;
    color: #FFFFFF !important;
    border-radius: 12px !important;
    font-weight: 800 !important;
    padding: 12px !important;
    border: none !important;
}

.submit-order-btn:hover,
.checkout-modal .submit-order-btn:hover {
    background: var(--maneli-green-hover, #134E2E) !important;
}

#backToCartBtn,
#backToStep1Btn {
    background: #E2E8F0 !important;
    color: #334155 !important;
    border: 1px solid #CBD5E1 !important;
}

#backToCartBtn:hover,
#backToStep1Btn:hover {
    background: #CBD5E1 !important;
    color: #0F172A !important;
}

/* کادر و سایه کلی برای باکس سایدبار دسته‌ها */
.sidebar-sticky {
    background: #FFFFFF !important;
    border: 1.5px solid #EAD4AA !important; /* کادر خردلی متناسب با پوستر */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05) !important;
}

/* حالت عادی دایره‌های دسته‌بندی */
.category-icon-wrapper {
    background: #FAFAF7 !important;
    border: 1.5px solid #D8DFD8 !important; /* بوردر ملایم و مشخص در حالت عادی */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04) !important;
    transition: all 0.25s ease-in-out !important;
}

.category-name {
    color: #4A5568 !important;
    font-weight: 600 !important;
    margin-top: 4px;
}

/* حالت هاور (وقتی موس روی دسته می‌رود) */
.category-item-link:hover .category-icon-wrapper {
    border-color: var(--maneli-green, #19633B) !important;
    background: #EAF4EE !important;
    transform: translateY(-2px);
}

.category-item-link:hover .category-name {
    color: var(--maneli-green, #19633B) !important;
}

/* حالت انتخاب‌شده و فعال (Active / Selected) */
.category-item-link.active .category-icon-wrapper {
    border: 2.5px solid var(--maneli-green, #19633B) !important; /* کادر سبز پررنگ و ضخیم‌تر */
    background: #EAF4EE !important;
    box-shadow: 0 0 0 3px rgba(25, 99, 59, 0.2), 0 4px 10px rgba(0, 0, 0, 0.08) !important; /* هاله دور دایره */
    transform: scale(1.06) !important;
}

.category-item-link.active .category-name {
    color: var(--maneli-green, #19633B) !important;
    font-weight: 800 !important;
}

/* =========================================================
   استایل هدر بالای صفحه منو (هماهنگ با تم خردلی و سبز مانلی)
========================================================= */
.menu-header-nav {
    background: #FAFAF7 !important; /* پس‌زمینه کرم/خردلی بسیار ملایم متناسب با پوستر */
    border: 1.5px solid #EAD4AA !important; /* کادر خردلی دور تا دور هدر */
    border-radius: 18px !important;
    padding: 12px 20px !important;
    margin-top: 15px !important;
    margin-bottom: 25px !important;
    box-shadow: 0 4px 15px rgba(217, 148, 39, 0.08) !important;
}

/* دکمه بازگشت با رنگ سبز تیره مانلی */
.back-btn {
    color: var(--maneli-green, #19633B) !important;
    font-weight: 800 !important;
    font-size: 14.5px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    background: #FFFFFF !important;
    border: 1.5px solid #EAD4AA !important;
    border-radius: 12px !important;
    padding: 8px 16px !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03) !important;
}

.back-btn:hover {
    background: #EAF4EE !important;
    border-color: var(--maneli-green, #19633B) !important;
    color: var(--maneli-green, #19633B) !important;
    transform: translateX(3px) !important;
}

/* دکمه سبد خرید داخل هدر */
.action-btn {
    background: #FFFFFF !important;
    border: 1.5px solid var(--maneli-green, #19633B) !important;
    box-shadow: 0 2px 8px rgba(25, 99, 59, 0.1) !important;
}

.action-btn:hover {
    background: var(--maneli-green, #19633B) !important;
    transform: scale(1.06) !important;
}