/* -------------------------
   قالب قهوه‌ای (Coffee Theme Brown)
   ریسپانسیو، با دو تم روشن/تیره
   کاملاً بازنویسی شده بدون کد تکراری
-------------------------- */

/* ===================== VARIABLES ===================== */
:root {
    --shell: #b9977e;
    --shell-dark: #9d7b64;
    --text: #3a2f28;
    --muted: #a08f84;
    --background: #f6f0ea;
    --card: #ffffff;
    --accent: #d7c0ae;
    --shadow: 0 18px 38px rgba(84, 62, 48, 0.18);
    --shadow-strong: 0 5px 15px rgba(84, 62, 48, 0.2);
    --success: #2f9e71;
    --danger: #c15e4a;

    --primary: var(--shell);
    --primary-dark: var(--shell-dark);
    --bg-primary: var(--background);
    --bg-card: var(--card);
    --bg-secondary: #f0e8e2;
    --text-primary: var(--text);
    --text-secondary: var(--muted);
}

body.dark {
    --shell: #8c7562;
    --shell-dark: #6d5a4b;
    --text: #e9e1db;
    --muted: #9d8e83;
    --background: #1a1614;
    --card: #2a2420;
    --accent: #443a32;
    --shadow: 0 18px 38px rgba(0, 0, 0, 0.3);
    --shadow-strong: 0 5px 15px rgba(0, 0, 0, 0.4);
    --success: #3ab989;
    --danger: #d87a68;

    --primary: var(--shell);
    --primary-dark: var(--shell-dark);
    --bg-primary: var(--background);
    --bg-card: var(--card);
    --bg-secondary: #3a322c;
    --text-primary: var(--text);
    --text-secondary: var(--muted);
}

/* ===================== RESET & BASE ===================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    margin: 0;
    background: var(--background);
    color: var(--text);
    font-family: 'KalamehWebFaNum', 'Poppins', sans-serif;
    font-weight: 400;
    min-height: 100vh;
    direction: rtl;
    text-align: right;
    transition: background-color 0.3s ease, color 0.3s ease;
}

main {
    display: block;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ===================== CONTAINER & SCREEN ===================== */
.screen {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--background);
    position: relative;
}

/* برای صفحات فرعی مثل about/reviews که screen وجود دارد */
.secondary-shell .screen {
    max-width: 420px;
    margin: 0 auto;
}

/* ===================== PRELOADER ===================== */
#preloader {
    position: fixed;
    inset: 0;
    background: var(--background);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.6s ease;
}
#preloader.hide {
    opacity: 0;
    pointer-events: none;
}
.loader-box {
    text-align: center;
    color: var(--text);
}
.loader-title {
    font-family: 'Playfair Display', serif;
    font-size: 32px;
    margin: 0;
    color: var(--shell-dark);
}
.logo-circle {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}
.logo-circle .cup {
    width: 32px;
    height: 12px;
    border: 2px solid #fff;
    border-top: none;
    border-radius: 0 0 12px 12px;
    position: relative;
}
.logo-circle .cup::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    border: 2px solid #fff;
    border-left: none;
    border-radius: 0 10px 10px 0;
    right: -8px;
    top: 2px;
}
.steam-line {
    width: 2px;
    height: 14px;
    background: #fff;
    border-radius: 999px;
    animation: steam 3s ease-in-out infinite;
}
@keyframes steam {
    0%, 100% { transform: translateY(0); opacity: 0.5; }
    50% { transform: translateY(-4px); opacity: 1; }
}

/* ===================== HERO (MAIN HEADER) ===================== */
.hero {
    position: relative;
    background: var(--shell);
    color: #fff;
    padding: 32px 26px 72px;
    border-bottom-left-radius: 60% 20%;
    border-bottom-right-radius: 60% 20%;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(136, 101, 79, 0.35);
}
.hero::before,
.hero::after {
    content: '';
    position: absolute;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    z-index: 0;
}
.hero::before {
    width: 180px;
    height: 180px;
    top: -60px;
    right: -40px;
}
.hero::after {
    width: 120px;
    height: 120px;
    bottom: 20px;
    left: -35px;
}
.hero-top,
.hero-copy {
    position: relative;
    z-index: 1;
}
.hero-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}
.hero-copy .hero-title {
    font-family: 'Playfair Display', serif;
    font-size: 36px;
    margin: 0 0 10px;
}
.hero-desc {
    opacity: 0.9;
    line-height: 1.5;
}
.hero-links {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}
.hero-link {
    border-radius: 999px;
    padding: 8px 16px;
    border: 1px solid transparent;
    font-size: 13px;
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    transition: 0.2s;
}
.hero-link:hover {
    border-color: rgba(255, 255, 255, 0.7);
}

/* ===================== HEADER ICONS & SHOPPING CART BUTTON ===================== */
.header-icons {
    display: flex;
    gap: 16px;
}
.icon-note {
    position: relative;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: none;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s;
}
.icon-note:hover {
    background: rgba(255, 255, 255, 0.25);
}
.notes-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--danger);
    color: white;
    font-size: 11px;
    font-weight: 600;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}
#openNotesBtnSticky {
    background: rgba(185, 151, 126, 0.15);
    color: var(--shell-dark);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 22px;
}
#openNotesBtnSticky:hover {
    background: rgba(185, 151, 126, 0.25);
}

/* ===================== STICKY HEADER (اصلاح شده برای دسکتاپ) ===================== */
/* حالت اولیه: مخفی */
.sticky-header {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%) translateY(-100%);
    width: 100%;
    max-width: 420px;
    background: var(--background);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 998;
    border-bottom: 1px solid #eee;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    height: 108px;
    border-radius: 0 0 20px 20px;
}

/* حالت نمایش: با اسکرول ظاهر شود */
.sticky-header.visible {
    transform: translateX(-50%) translateY(0);
}

/* فضای خالی برای جلوگیری از پرش محتوا */
.screen.has-sticky {
    padding-top: 108px;
}
.sticky-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 20px;
    height: 60px;
}
.sticky-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}
.sticky-shop-name {
    font-family: 'KalamehWebFaNum', sans-serif;
    font-weight: 600;
    font-size: 18px;
    color: var(--shell-dark);
}
.sticky-logo .logo-circle {
    width: 48px;
    height: 48px;
    border-color: var(--shell-dark);
}
.sticky-logo .cup {
    border-color: var(--shell-dark);
}
.sticky-logo .cup::after {
    border-color: var(--shell-dark);
}
.sticky-logo .steam-line {
    background: var(--shell-dark);
}
#stickyTabBarContainer {
    background: var(--shell);
    padding: 0 16px;
    height: 48px;
    display: flex;
    align-items: center;
    overflow-x: auto;
    scrollbar-width: none;
}
#stickyTabBarContainer::-webkit-scrollbar {
    display: none;
}
.sticky-tab-bar {
    display: flex;
    gap: 8px;
    flex: 1;
    height: 100%;
    align-items: center;
}
.sticky-tab-bar .tab {
    flex-shrink: 0;
    padding: 8px 16px;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    font-weight: 500;
    display: flex;
    align-items: center;
}
.sticky-tab-bar .tab i {
    margin-left: 6px;
    font-size: 16px;
}
.sticky-tab-bar .tab.active {
    background: white;
    color: var(--shell-dark);
    font-weight: 600;
}

/* ===================== SEARCH BOX ===================== */
.search-box {
    width: calc(100% - 48px);
    margin: 12px auto 18px;
    background: var(--card);
    border-radius: 28px;
    padding: 12px 0;
    display: flex;
    align-items: center;
    box-shadow: var(--shadow);
}
.search-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--muted);
    margin-right: 12px;
    position: relative;
    display: inline-block;
}
.search-icon::after {
    content: '';
    width: 8px;
    height: 2px;
    background: var(--muted);
    border-radius: 4px;
    position: absolute;
    bottom: -4px;
    right: -5px;
    transform: rotate(45deg);
}
.search-box input {
    border: none;
    outline: none;
    width: 100%;
    font-size: 14px;
    color: var(--text);
    background: transparent;
    font-family: 'KalamehWebFaNum', sans-serif;
}

/* ===================== PROMO BOXES ===================== */
.promo-box,
.promo-box-secondary {
    position: relative;
    margin: 15px;
    background: var(--shell);
    border-radius: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}
.promo-box::before,
.promo-box-secondary::before {
    content: '';
    position: absolute;
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    pointer-events: none;
}
.promo-box::after,
.promo-box-secondary::after {
    content: '';
    position: absolute;
    left: 0;
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    pointer-events: none;
}
.promo-box h3,
.promo-box-secondary h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: white;
    font-weight: 700;
}
.promo-box p,
.promo-box-secondary p {
    font-size: 12px;
    font-weight: 500;
    color: #333;
    margin-bottom: 18px;
}
.promo-btn {
    background: white;
    color: var(--shell);
    border: none;
    padding: 6px 12px;
    border-radius: 10px;
    margin-top: 10px;
    cursor: pointer;
    text-decoration: none;
}
.promo-img {
    width: 90px;
    transform: translateY(10px);
    border-radius: 8px;
}

/* ===================== BRANDS SECTION ===================== */
.brands-section {
    margin: 10px 15px;
    overflow: hidden;
}
.brands-section > div {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 5px 0 10px;
    scrollbar-width: none;
}
.brands-section > div::-webkit-scrollbar {
    display: none;
}
.brand-item {
    min-width: 70px;
    background: var(--accent);
    border-radius: 16px;
    padding: 10px 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: var(--background);
}
.brand-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-strong);
}
.brand-item.active {
    background: var(--shell);
    color: white;
}
.brand-item.active p {
    color: white;
}
.brand-item img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 8px;
    border: 2px solid var(--primary);
}
.brand-item.active img {
    border-color: white;
}
.brand-placeholder {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    border: 2px solid var(--primary);
}
.brand-placeholder i {
    font-size: 24px;
    color: var(--primary);
}
.brand-placeholder span {
    font-weight: bold;
    font-size: 18px;
    color: var(--primary);
}
.brand-item p {
    font-size: 12px;
    color: var(--text-primary);
    font-weight: 500;
    margin: 0;
    line-height: 1.4;
}
.brand-item:not(:has(img)) p {
    font-size: 13px;
    font-weight: 600;
}

/* ===================== TABS (اصلی و استیکی) ===================== */
.tab-bar {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    padding: 12px 15px;
    margin-top: 10px;
    scrollbar-width: none;
}
.tab-bar::-webkit-scrollbar {
    display: none;
}
.tab {
    flex: 1;
    min-width: fit-content;
    border: none;
    padding: 8px 16px;
    color: var(--card);
    font-weight: 500;
    font-size: 15px;
    transition: 0.2s;
    border-radius: 25px;
    background-color: var(--accent);
    cursor: pointer;
}
.tab.active {
    color: white;
    background-color: var(--shell);
}

/* ===================== PRODUCTS GRID ===================== */
.products-grid {
    padding: 16px 24px 80px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}
.menu-card {
    position: relative;
    background: var(--card);
    border-radius: 28px;
    padding: 22px 20px 22px 24px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 14px;
    align-items: center;
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}
.menu-card.disabled {
    opacity: 0.6;
}
.drink-shot {
    width: 88px;
    height: 88px;
    border-radius: 10%;
    background: #f4ebe4;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.drink-shot img {
    width: 86px;
    height: 86px;
    object-fit: cover;
}
.drink-copy h3 {
    margin: 0 0 8px;
    font-size: 19px;
    font-weight: 600;
}
.drink-desc {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}
.price-line {
    margin-top: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.price {
    font-weight: 700;
    color: var(--shell-dark);
    font-size: 19px;
}
.discount-badge,
.soldout-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    font-size: 11px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 99px;
    z-index: 2;
}
.discount-badge {
    background: #e63946;
    color: white;
}
.soldout-badge {
    background: var(--muted);
    color: white;
}
.action-btn-container {
    position: absolute;
    top: 58px;
    left: 20px;
    z-index: 3;
}
.add-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--shell);
    color: #fff;
    font-size: 28px;
    font-weight: 500;
    border: none;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}
.add-btn.quantity-mode {
    width: auto;
    min-width: 110px;
    height: 36px;
    padding: 0 10px;
    border-radius: 99px;
    background: white;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
}
.add-btn.quantity-mode button {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--shell);
    color: white;
    font-size: 18px;
    cursor: pointer;
    border-radius: 50%;
}
.add-btn.quantity-mode span {
    min-width: 12px;
    text-align: center;
    font-weight: 600;
    color: var(--text);
    font-size: 18px;
}
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--muted);
    font-size: 15px;
}
.category-header {
    background: linear-gradient(135deg, var(--shell), var(--shell-dark));
    color: white;
    padding: 20px 24px;
    margin: 30px 0 20px;
    border-radius: 24px;
    text-align: center;
}
.category-title {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
}

/* ===================== SHOPPING CART DRAWER ===================== */
.notes-drawer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 80vh;
    background: var(--card);
    border-top-left-radius: 32px;
    border-top-right-radius: 32px;
    box-shadow: 0 -20px 40px rgba(0, 0, 0, 0.15);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 1000;
    display: flex;
    flex-direction: column;
}
.notes-drawer.open {
    transform: translateY(0);
}
.drawer-header {
    padding: 20px 24px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
}
.drawer-header h3 {
    margin: 0;
    font-size: 20px;
}
.drawer-header button {
    background: none;
    border: none;
    font-size: 28px;
    color: var(--muted);
    cursor: pointer;
    width: 40px;
    height: 40px;
}
.notes-list {
    flex: 1;
    overflow-y: auto;
    padding: 16px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.note-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: #f9f5f2;
    border-radius: 20px;
}
.qty-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}
.qty-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--shell);
    color: white;
    font-size: 18px;
    cursor: pointer;
}
.delNote {
    background: none;
    border: none;
    color: var(--danger);
    font-size: 20px;
    cursor: pointer;
}
.drawer-footer {
    padding: 20px 24px;
    border-top: 1px solid #eee;
    background: var(--card);
}
.total-line {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--shell-dark);
}
.checkout-btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 99px;
    background: var(--shell);
    color: white;
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s;
}
.checkout-btn:hover {
    background: var(--shell-dark);
}
.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s;
    z-index: 999;
}
.drawer-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* ===================== ABOUT PAGE STYLES ===================== */
.sub-hero {
    background: var(--card);
    margin: 24px;
    padding: 26px 24px;
    border-radius: 32px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}
.secondary-content {
    padding: 0 24px 40px;
    display: flex;
    flex-direction: column;
    gap: 26px;
}
.about-panel {
    background: var(--card);
    border-radius: 28px;
    padding: 22px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.about-panel h2 {
    text-align: center;
    font-size: 22px;
}
.image-slider {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
}
.slider-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    touch-action: pan-x;
}
.slider-image {
    width: 100%;
    height: 280px;
    object-fit: cover;
    flex-shrink: 0;
}
.slider-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}
.dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--muted);
    cursor: pointer;
    transition: all 0.3s;
}
.dot.active {
    background: var(--shell-dark);
    transform: scale(1.3);
}
.story-card {
    background: var(--bg-secondary);
    border-radius: 20px;
    padding: 20px;
}
.story-text {
    line-height: 1.8;
    text-align: justify;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
.stat-card {
    background: var(--card);
    border-radius: 24px;
    padding: 24px 16px;
    text-align: center;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}
.stat-card span {
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: var(--shell-dark);
    margin-bottom: 8px;
}
.highlights-section {
    background: linear-gradient(145deg, var(--bg-secondary), var(--card));
    border-radius: 24px;
    padding: 25px;
}
.highlights-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.highlight-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--card);
    padding: 12px 18px;
    border-radius: 50px;
}
.highlight-icon {
    color: var(--shell);
    font-size: 22px;
}
.contact-info {
    background: var(--card);
    border-radius: 24px;
    padding: 25px;
}
.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}
.contact-icon {
    color: var(--shell);
    font-size: 22px;
}
.contact-text.ltr {
    direction: ltr;
}
.map-container {
    margin: 20px 0 30px;
    border-radius: 24px;
    overflow: hidden;
}
.social-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}
.social-btn {
    padding: 12px 25px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    transition: all 0.3s;
    color: white;
}
.social-btn.instagram {
    background: linear-gradient(45deg, #f09433, #d62976, #962fbf);
}
.social-btn.whatsapp {
    background: #25D366;
}
.social-btn.telegram {
    background: #0088cc;
}
.social-btn.bale {
    background: #00b894;
}
.social-btn.bale:hover {
    background: #218838;
}
.social-btn:hover {
    transform: translateY(-2px);
}

/* ===================== REVIEWS PAGE ===================== */
.review-stream {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.review-card {
    background: var(--card);
    border-radius: 28px;
    padding: 20px;
    box-shadow: var(--shadow);
}
.review-user-avatar {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: var(--shell);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    color: white;
    flex-shrink: 0;
}
.review-stars {
    color: #f1c40f;
    font-size: 14px;
    letter-spacing: 2px;
}
.review-image {
    max-width: 100%;
    max-height: 200px;
    border-radius: 16px;
    cursor: pointer;
    margin-top: 10px;
}
.admin-response {
    background: rgba(185, 151, 126, 0.1);
    border-right: 3px solid var(--shell);
    padding: 14px;
    border-radius: 16px;
    margin-top: 12px;
    margin-right: 55px;
}
/* مودال ثبت نظر */
.review-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}
.star-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: center;
    gap: 8px;
    font-size: 35px;
}
.star-rating input {
    display: none;
}
.star-rating label {
    cursor: pointer;
    color: #ccc;
    transition: 0.2s;
}
.star-rating input:checked ~ label,
.star-rating label:hover,
.star-rating label:hover ~ label {
    color: #f1c40f !important;
}

/* ===================== PRODUCT MODAL ===================== */
.product-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100000;
    align-items: center;
    justify-content: center;
}
.product-modal.show {
    display: flex;
}
.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}
.modal-content {
    position: relative;
    background: var(--card);
    width: 90%;
    max-width: 400px;
    max-height: 80vh;
    overflow-y: auto;
    border-radius: 24px;
    padding: 25px;
    z-index: 100001;
    animation: modalFadeIn 0.3s ease;
}
@keyframes modalFadeIn {
    from { transform: translateY(-30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.modal-close {
    position: absolute;
    left: 15px;
    top: 15px;
    background: var(--primary);
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
}
.modal-description {
    line-height: 1.8;
    padding: 15px;
    background: var(--bg-secondary);
    border-radius: 12px;
    max-height: 300px;
    overflow-y: auto;
}
.share-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--bg-secondary);
}
.share-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
}
.share-btn {
    padding: 8px 15px;
    border-radius: 30px;
    font-size: 13px;
    cursor: pointer;
    border: none;
}
.share-btn.copy-link {
    background: var(--primary);
    color: white;
}
.share-btn.telegram {
    background: #0088cc;
    color: white;
}
.share-btn.whatsapp {
    background: #25D366;
    color: white;
}

/* ===================== BACK TO TOP BUTTON (اصلاح شده) ===================== */
.back-to-top-btn {
    position: fixed;
    bottom: 80px;
    /*left: 50%;*/
    /*transform: translateX(-50%);*/
    right: calc(50% - 210px + 15px); /* دقیقاً داخل container 420px */
    left: auto;
    transform: none;
    width: 45px;
    height: 45px;
    background: var(--accent);
    color: white;
    border: none;
    font-size: 22px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    transition: all 0.2s;
}
.back-to-top-btn:hover {
    background: var(--shell-dark);
    transform: translateX(-50%) scale(1.05);
}

/* ===================== CREDIT FOOTER ===================== */
.credit {
    text-align: center;
    padding: 16px 10px 40px;
    font-size: 12px;
    color: var(--muted);
}

/* ===================== SHAKE ANIMATION ===================== */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
    20%, 40%, 60%, 80% { transform: translateX(4px); }
}
.icon-note.shake,
#openNotesBtnSticky.shake {
    animation: shake 0.6s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

/* ===================== RESPONSIVE (موبایل) ===================== */
@media (max-width: 480px) {
    .sticky-header {
        left: 0;
        transform: translateY(-100%);
        max-width: 100%;
        border-radius: 0;
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .sticky-header.visible {
        transform: translateY(0);
    }
    .sticky-header-top {
        padding: 8px 16px;
    }
    .sticky-shop-name {
        font-size: 16px;
    }
    #stickyTabBarContainer {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        padding: 0 12px;
    }
    .sticky-tab-bar {
        display: flex;
        flex-wrap: nowrap;
        gap: 8px;
    }
    .sticky-tab-bar .tab {
        flex-shrink: 0;
        padding: 6px 12px;
        font-size: 12px;
        white-space: nowrap;
    }
    .sticky-tab-bar .tab i {
        font-size: 14px;
    }
    .screen.has-sticky {
        padding-top: 104px;
    }
    .category-header {
        padding: 16px 20px;
        margin: 20px 0 15px;
    }
    .category-title {
        font-size: 18px;
    }
    .back-to-top-btn {
        left: auto;
        right: 15px;
        transform: none;
        margin-left: 0;
        bottom: 70px;
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
}

/* ===================== UTILITIES ===================== */
.farsi-num {
    font-family: 'KalamehWebFaNum', sans-serif;
}
.text-muted {
    color: var(--muted);
}
.text-muted.center {
    text-align: center;
}
