/* فونت فارسی */
@font-face {
    font-family: 'Vazir';
    src: url('../fonts/Vazir.woff') format('woff'),
        url('../fonts/Vazir.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazir';
    src: url('../fonts/Vazir-Bold.woff') format('woff'),
        url('../fonts/Vazir-Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

/* استایل اصلی */
.cafe-menu-container {
    position: relative;
    min-height: 100vh;
    padding-bottom: 50px;
    font-family: 'Vazir', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    direction: rtl;
    text-align: right;
    background: #111;
    color: #eee;
    overflow-x: hidden;
}

/* حالت روشن */
body:not(.dark-mode) .cafe-menu-container {
    background: #f9f9f9;
    color: inherit;
}

/* هدر */
.cafe-header {
    background: linear-gradient(135deg, var(--primary-color, #c98949), var(--primary-color-dark, #a06d3a));
    color: white;
    text-align: center;
    padding: 120px 20px 80px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    background-size: cover;
    background-position: center;
    z-index: 10;
}

.cafe-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
}

.cafe-header-content {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
}

.cafe-logo {
    max-width: 200px;
    max-height: 120px;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.3));
    transition: all 0.3s ease;
}

.cafe-logo:hover {
    transform: scale(1.05);
}

.cafe-header h1 {
    font-size: 2.8rem;
    margin: 0;
    position: relative;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    font-weight: 700;
}

.cafe-header p {
    font-size: 1.4rem;
    margin: 15px 0 0;
    position: relative;
    opacity: 0.9;
    font-weight: 300;
}

/* بخش جستجو */
.cafe-menu-search-box {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 20px;
    gap: 15px;
    padding: 0 20px;
    max-width: 1200px;
    margin: 0 auto 20px;
    position: relative;
    z-index: 5;
}

#menu-search {
    padding: 12px 20px;
    border: 1px solid #ddd;
    border-radius: 30px;
    font-size: 16px;
    width: 300px;
    transition: all 0.3s ease;
    font-family: 'Vazir', sans-serif;
    background: rgba(255, 255, 255, 0.9);
}

#menu-search:focus {
    border-color: var(--primary-color, #c98949);
    outline: none;
    box-shadow: 0 0 0 3px rgba(201, 137, 73, 0.2);
}

.theme-toggle-btn {
    background: var(--primary-color, #c98949);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    font-size: 16px;
    font-family: 'Vazir', sans-serif;
}

.theme-toggle-btn:hover {
    background: var(--primary-color-dark, #a06d3a);
    transform: translateY(-2px);
}

.theme-toggle-btn i {
    font-size: 18px;
}

/* ناوبار */
.cafe-navbar {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 95px;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), var(--navbar-bg) center/cover;
    border-radius: 15px 0 0 15px;
    padding: 15px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    border-right: 4px solid var(--primary-color, #c98949);
    overflow-y: auto;
}

.cafe-navbar::-webkit-scrollbar {
    width: 5px;
}

.cafe-navbar::-webkit-scrollbar-thumb {
    background: var(--primary-color, #c98949);
    border-radius: 5px;
}

.cafe-nav-item {
    margin: 0;
    padding: 10px 5px;
    width: 85%;
    min-height: 75px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
    position: relative;
}

.cafe-nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.cafe-nav-item.active {
    background: rgba(255, 255, 255, 0.15);
}

.cafe-nav-item.active::before {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: var(--category-color, var(--primary-color, #c98949));
}

.nav-icon-wrapper {
    width: 40px;
    height: 40px;
    margin: 0 auto 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    padding: 5px;
    transition: all 0.3s ease;
}

.cafe-nav-item:hover .nav-icon-wrapper {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.cafe-nav-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.5));
    transition: all 0.3s ease;
}

.cafe-nav-item span {
    display: block;
    color: #fff;
    margin-top: 5px;
    font-size: 11px;
    font-weight: bold;
    text-align: center;
    text-shadow: 0 0 3px #000;
    transition: all 0.3s ease;
    line-height: 1.3;
    padding: 0 2px;
}

.cafe-nav-item:hover span {
    color: var(--category-color, var(--primary-color, #c98949));
}

/* محتوا */
.cafe-content {
    margin-right: 120px;
    padding: 30px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
    margin-bottom: 20px;
}

.section-title {
    position: relative;
    padding-bottom: 10px;
    margin-bottom: 30px;
    color: var(--category-color, var(--primary-color, #c98949));
    font-size: 2rem;
    font-weight: 700;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 50px;
    height: 3px;
    background: var(--category-color, var(--primary-color, #c98949));
}

.cafe-items {
    display: grid;
    gap: 25px;
    padding: 20px 0;
}

/* کارت محصول */
.cafe-card {
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid #eee;
}

.cafe-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.card-image {
    position: relative;
    overflow: hidden;
    height: 200px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s ease;
}

.no-image-placeholder {
    color: #999;
    font-size: 14px;
}

.cafe-card:hover .card-image img {
    transform: scale(1.05);
}

.price-badge {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: var(--category-color, var(--primary-color, #c98949));
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 14px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

.card-info {
    padding: 20px;
}

.card-info h3 {
    margin: 0 0 10px;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

.item-description {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 15px;
}

.item-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #888;
}

.calories::before {
    content: '🔥';
    margin-left: 5px;
}

/* فوتر */
.cafe-footer {
    background: linear-gradient(135deg, #3d2512, #6b4427);
    color: #f0e6dc;
    text-align: center;
    padding: 50px 20px 30px;
    margin-top: 50px;
    position: relative;
    z-index: 10;
    border-top: 3px solid var(--primary-color, #c98949));
}

.cafe-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary-color, #c98949));
}

.cafe-footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    text-align: right;
}

.cafe-footer-section {
    padding: 0 15px;
}

.cafe-footer-section h3 {
    color: #ffd8a8;
    font-size: 1.3rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
    font-family: 'Vazir', cursive;
}

.cafe-footer-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 2px;
    background: var(--primary-color, #c98949));
}

.cafe-footer-section p {
    line-height: 1.8;
    margin-bottom: 15px;
    color: #e0c6ad;
}

.cafe-footer-section i {
    margin-left: 8px;
    color: var(--primary-color, #c98949));
}

.read-more {
    color: #ffd8a8;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    display: inline-block;
    margin-top: 10px;
    border: 1px solid #ffd8a8;
    padding: 5px 15px;
    border-radius: 20px;
}

.read-more:hover {
    text-decoration: underline;
    background: rgba(255, 216, 168, 0.1);
}

.cafe-social-links {
    display: flex;
    justify-content: flex-start;
    gap: 15px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.cafe-social-links a {
    color: #f0e6dc;
    background: rgba(201, 137, 73, 0.2);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 18px;
}

.cafe-social-links a:hover {
    background: var(--primary-color, #c98949);
    transform: translateY(-3px);
}

.cafe-social-links img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.cafe-copyright {
    font-size: 0.9rem;
    opacity: 0.8;
    line-height: 1.6;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #f0e6dc;
}

.cafe-copyright a {
    color: var(--primary-color, #c98949);
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
}

.cafe-copyright a:hover {
    color: #fff;
    text-decoration: underline;
}

/* اصلاحات برای نسخه موبایل */
@media (max-width: 768px) {
    .cafe-navbar {
      z-index: 1001; /* افزایش z-index برای نمایش بالاتر از سایر عناصر */
      height: auto; /* ارتفاع خودکار بر اساس محتوا */
      bottom: 0;
      top: auto !important; /* تغییر موقعیت به پایین صفحه */
      width: 100% !important;
      flex-direction: row !important;
      border-radius: 15px 15px 0 0 !important;
      border-left: none !important;
      border-top: 3px solid var(--primary-color, #c98949);
      padding: 10px 5px;
      justify-content: space-around;
      overflow-x: auto;
    }
  
    .cafe-nav-item {
      min-height: 60px;
      width: auto !important;
      padding: 8px 10px !important;
      margin: 0 3px !important;
      flex-shrink: 0;
    }
  
    .cafe-nav-item span {
      font-size: 9px !important;
    }
  
    .nav-icon-wrapper {
      width: 30px !important;
      height: 30px !important;
    }
  
    .cafe-content {
      margin-right: 0 !important;
      padding-bottom: 80px !important; /* فضای اضافه برای ناوبار موبایل */
    }
  
    .cafe-header {
      padding-bottom: 120px !important; /* فضای اضافه برای ناوبار موبایل */
    }
  
    .cafe-footer {
      padding-bottom: 70px !important; /* فضای اضافه برای ناوبار موبایل */
    }
  }

/* حالت تاریک */
body.dark-mode .cafe-card {
    background: #222;
    border-color: #444;
}

body.dark-mode .card-info h3 {
    color: #eee;
}

body.dark-mode .item-description {
    color: #aaa;
}

body.dark-mode #menu-search {
    background: #333;
    border-color: #444;
    color: #eee;
}

body.dark-mode .card-image {
    background: #333;
}

body.dark-mode .no-image-placeholder {
    color: #aaa;
}

body.dark-mode .cafe-header {
    background: linear-gradient(135deg, #222, #444);
}

body.dark-mode .cafe-footer {
    background: linear-gradient(135deg, #1a1a1a, #333);
}

body.dark-mode .cafe-content {
    background: rgba(34, 34, 34, 0.95);
    color: #eee;
}

/* استایل‌های تنظیمات */
.cafe-settings-grid {
    display: grid;
    gap: 15px;
    grid-template-columns: repeat(3, 1fr);
}

.cafe-social-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(2, 1fr);
}

.social-platform {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.social-icon-upload {
    margin-bottom: 10px;
}

.icon-preview {
    max-width: 50px;
    height: auto;
    display: block;
    margin-top: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* رسپانسیو */
@media (max-width: 1200px) {
    .cafe-content {
        margin-right: 100px;
        padding: 20px;
    }
}

@media (max-width: 992px) {
    .cafe-navbar {
        width: 80px;
    }

    .cafe-items {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .cafe-footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .cafe-header {
        padding: 80px 15px 40px;
    }

    .cafe-header h1 {
        font-size: 2rem;
    }

    .cafe-header p {
        font-size: 1.2rem;
    }

    .cafe-logo {
        max-width: 150px;
    }

    .cafe-menu-search-box {
        margin-top: 20px;
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    #menu-search {
        width: 100%;
    }

    .cafe-items {
        grid-template-columns: 1fr !important;
        gap: 15px;
    }

    .cafe-footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .cafe-header {
        padding: 60px 15px 30px;
    }

    .cafe-header h1 {
        font-size: 1.8rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .cafe-footer-section {
        margin-bottom: 30px;
    }

    .price-badge {
        font-size: 12px;
        padding: 5px 10px;
    }

    .card-image {
        height: 150px;
    }

    .card-info {
        padding: 15px;
    }
}