/* Reset & base */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font-family, 'Vazirmatn', Tahoma, sans-serif);
    background: var(--background-color, #F7F3EE);
    color: var(--text-color, #2B2B2B);
    direction: rtl;
    line-height: 1.7;
    min-height: 100vh;
}

img { max-width: 100%; display: block; }

button, input, select, textarea {
    font-family: inherit;
}

.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 16px;
}

a { color: inherit; text-decoration: none; }

/* Header */
.site-header {
    background: var(--card-color, #fff);
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
}

.site-logo { height: 42px; width: auto; border-radius: 8px; }
.site-title { font-size: 1.2rem; font-weight: 700; color: var(--primary-color); }

.notes-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--primary-color);
    color: #fff;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.85rem;
    position: relative;
}

.notes-count {
    background: #fff;
    color: var(--primary-color);
    border-radius: 999px;
    min-width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0 4px;
}

/* Main content */
.main-content { padding: 20px 16px 60px; }

/* Cafe intro */
.cafe-intro { text-align: center; margin-bottom: 28px; }
.cafe-logo-big { width: 90px; height: 90px; object-fit: cover; border-radius: 50%; margin: 0 auto 12px; }
.site-icon-display { width: 48px; height: 48px; object-fit: contain; margin: 0 auto 10px; }
.cafe-name { font-size: 1.6rem; font-weight: 800; color: var(--primary-color); margin-bottom: 6px; }
.cafe-desc { color: var(--text-color); opacity: 0.8; margin-bottom: 12px; }
.cafe-contact { font-size: 0.9rem; opacity: 0.75; display: flex; flex-direction: column; gap: 4px; }

.social-icons { display: flex; justify-content: center; gap: 16px; margin-top: 14px; }
.social-icon-link { display: inline-flex; }
.social-icon-link img { width: 34px; height: 34px; object-fit: contain; }

/* Categories grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.category-card {
    background: var(--card-color, #fff);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    transition: transform 0.15s ease;
}
.category-card:active { transform: scale(0.97); }

.category-image { aspect-ratio: 4/3; background: var(--secondary-color); overflow: hidden; }
.category-image img { width: 100%; height: 100%; object-fit: cover; }
.no-image {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem; opacity: 0.5;
}

.category-info { padding: 10px 12px; }
.category-info h3 { font-size: 0.95rem; margin-bottom: 4px; }
.category-info p { font-size: 0.78rem; opacity: 0.7; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Breadcrumb */
.breadcrumb { display: flex; gap: 6px; font-size: 0.85rem; opacity: 0.7; margin-bottom: 16px; }

/* Page header */
.page-header { margin-bottom: 18px; }
.page-header h1 { font-size: 1.4rem; color: var(--primary-color); margin-bottom: 6px; }
.page-desc { opacity: 0.75; font-size: 0.9rem; }

/* Products list */
.products-list { display: flex; flex-direction: column; gap: 14px; }

.product-card {
    background: var(--card-color, #fff);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    display: flex;
}

.product-image {
    width: 110px;
    min-width: 110px;
    position: relative;
    background: var(--secondary-color);
}
.product-image img { width: 100%; height: 100%; object-fit: cover; }

.badge-unavailable {
    position: absolute; top: 6px; right: 6px;
    background: #c0392b; color: #fff;
    font-size: 0.65rem; padding: 2px 8px; border-radius: 999px;
}

.product-info { padding: 10px 14px; flex: 1; display: flex; flex-direction: column; }
.product-info h3 { font-size: 1rem; margin-bottom: 4px; }
.product-desc { font-size: 0.8rem; opacity: 0.7; margin-bottom: 8px; flex: 1; }

.product-footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.product-price { font-weight: 700; color: var(--primary-color); font-size: 0.95rem; }
.product-price small { font-weight: 400; font-size: 0.7rem; opacity: 0.7; }

.btn-note-toggle {
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    cursor: pointer;
    transition: background 0.15s;
}
.btn-note-toggle.active { background: #2e7d32; }

/* Notes page */
.notes-list { display: flex; flex-direction: column; gap: 12px; }
.note-item {
    background: var(--card-color, #fff);
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.note-image { width: 60px; height: 60px; border-radius: 10px; overflow: hidden; background: var(--secondary-color); flex-shrink: 0; }
.note-image img { width: 100%; height: 100%; object-fit: cover; }
.note-info { flex: 1; }
.note-category { font-size: 0.7rem; opacity: 0.6; }
.note-info h3 { font-size: 0.95rem; margin: 2px 0; }
.note-price { font-size: 0.85rem; font-weight: 700; color: var(--primary-color); }
.note-price small { font-weight: 400; opacity: 0.7; font-size: 0.7rem; }

.btn-note-remove {
    background: #f5f5f5;
    border: none;
    width: 32px; height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    color: #c0392b;
}

.empty-msg { text-align: center; opacity: 0.6; padding: 40px 0; }

/* Footer */
.site-footer { text-align: center; padding: 20px; font-size: 0.8rem; opacity: 0.6; }

/* Tablet+ */
@media (min-width: 640px) {
    .categories-grid { grid-template-columns: repeat(3, 1fr); }
}
