@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;600;700&display=swap');

:root {
    --primary: #f2600c;
    --primary-dark: #c23f0a;
    --primary-light: #fdece0;
    --accent: #ffb703;
    --text-dark: #1a1a1a;
    --text-muted: #6b7280;
    --border: #e5e7eb;
    --bg: #f5f6f8;
    --radius: 14px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    background: var(--bg);
    color: var(--text-dark);
    direction: rtl;
}

@keyframes floatBlob {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-12px, 10px) scale(1.08); }
}

@keyframes pulseRing {
    0% { box-shadow: 0 0 0 0 rgba(242,96,12,.55); }
    70% { box-shadow: 0 0 0 14px rgba(242,96,12,0); }
    100% { box-shadow: 0 0 0 0 rgba(242,96,12,0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

.topbar {
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 20;
}

.topbar-inner {
    position: relative;
    overflow: hidden;
    max-width: 1100px;
    margin: 0 auto;
    padding: 26px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 0 0 22px 22px;
}

.topbar-inner::before,
.topbar-inner::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,.14);
    animation: floatBlob 7s ease-in-out infinite;
    pointer-events: none;
}

.topbar-inner::before {
    width: 160px;
    height: 160px;
    top: -80px;
    left: -40px;
}

.topbar-inner::after {
    width: 110px;
    height: 110px;
    bottom: -60px;
    right: 10%;
    background: rgba(255,183,3,.25);
    animation-delay: 2s;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 1;
}

.logo-img {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0,0,0,.2);
    border: 2px solid rgba(255,255,255,.6);
}

.brand h1 {
    font-size: 24px;
    margin: 0;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0,0,0,.15);
}

.hours-badge {
    position: relative;
    z-index: 1;
    background: rgba(255,255,255,.22);
    backdrop-filter: blur(6px);
    color: #fff;
    padding: 7px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid rgba(255,255,255,.3);
}

.tabs {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    gap: 24px;
    padding: 0 20px;
    overflow-x: auto;
}

.tab {
    display: inline-block;
    padding: 12px 4px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
}

.tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 700;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 20px 80px;
}

.search-box {
    position: relative;
    margin-bottom: 18px;
}

.search-box input {
    width: 100%;
    padding: 14px 44px 14px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-family: inherit;
    font-size: 15px;
    background: #fff;
}

.search-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    opacity: .5;
}

.filters {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 6px;
    margin-bottom: 24px;
}

.filter-btn {
    flex-shrink: 0;
    border: 1px solid var(--border);
    background: #fff;
    padding: 9px 18px;
    border-radius: 20px;
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    transition: all .15s;
}

.filter-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 18px;
}

.item-card {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: transform .15s, box-shadow .15s;
}

.item-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,.06);
}

.item-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #f0f1f3;
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b0b3ba;
    font-size: 13px;
}

.item-info {
    padding: 14px 16px 16px;
}

.item-info h3 {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 600;
}

.item-desc {
    margin: 0 0 8px;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
}

.item-price {
    font-weight: 700;
    font-size: 16px;
    color: var(--primary);
}

.item-price span {
    font-weight: 400;
    font-size: 13px;
    color: var(--text-muted);
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-muted);
    padding: 40px 0;
}

.info-section {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-top: 24px;
}

.info-section h2 {
    margin-top: 0;
    font-size: 18px;
}

.snapp-btn {
    display: inline-block;
    margin-top: 12px;
    background: var(--primary);
    color: #fff;
    padding: 10px 22px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}

.contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contact-list a {
    color: var(--text-dark);
    text-decoration: none;
    font-size: 15px;
}

.map-wrap {
    margin-top: 20px;
}

.map-wrap iframe {
    width: 100%;
    height: 320px;
    border: 0;
    border-radius: 12px;
}

.float-btn {
    position: fixed;
    bottom: 22px;
    left: 22px;
    width: 52px;
    height: 52px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    text-decoration: none;
    box-shadow: 0 6px 18px rgba(242,96,12,.35);
    z-index: 30;
}

.site-footer {
    text-align: center;
    padding: 20px;
    font-size: 12px;
}

.site-footer a {
    color: var(--text-muted);
    text-decoration: none;
}

/* ===== Admin panel ===== */
.admin-body {
    background: var(--bg);
    min-height: 100vh;
}

.admin-header {
    background: var(--primary);
    color: #fff;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.admin-header a {
    color: #fff;
    text-decoration: none;
    opacity: .9;
}

.admin-nav {
    background: #fff;
    border-bottom: 1px solid var(--border);
    display: flex;
    gap: 4px;
    padding: 0 24px;
    overflow-x: auto;
}

.admin-nav a {
    padding: 14px 16px;
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
}

.admin-nav a.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 700;
}

.admin-container {
    max-width: 900px;
    margin: 24px auto;
    padding: 0 20px 60px;
}

.card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
}

.card h2 {
    margin-top: 0;
    font-size: 17px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
}

.form-group input[type=text],
.form-group input[type=number],
.form-group input[type=password],
.form-group input[type=url],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.btn {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 11px 24px;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

.btn.secondary {
    background: #fff;
    color: var(--text-dark);
    border: 1px solid var(--border);
}

.btn.danger {
    background: #dc2626;
}

.btn.small {
    padding: 6px 14px;
    font-size: 13px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th, .admin-table td {
    text-align: right;
    padding: 10px 8px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    vertical-align: middle;
}

.admin-table img {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 8px;
}

.actions-cell {
    display: flex;
    gap: 6px;
}

.alert {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 14px;
}

.alert.success {
    background: #dcfce7;
    color: #166534;
}

.alert.error {
    background: #fee2e2;
    color: #991b1b;
}

.login-wrap {
    max-width: 380px;
    margin: 80px auto;
    background: #fff;
    padding: 32px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.login-wrap h1 {
    text-align: center;
    font-size: 20px;
    margin-bottom: 24px;
}

.current-thumb {
    display: block;
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 8px;
}

@media (max-width: 600px) {
    .form-row { grid-template-columns: 1fr; }
}