/* ═══════════════════════════════════════════════════════════
   KafeZare App Sync - هماهنگی کامل قالب با اپلیکیشن
   نسخه نهایی و اصلاح‌شده
   ═══════════════════════════════════════════════════════════ */

:root {
    --color-app-primary: #e91e4f;
    --color-app-secondary: #00acc1;
    --color-app-buttons: #f44336;
}

/* ── پس‌زمینه سفید مثل اپ ── */
body { background-color: #ffffff !important; }

/* ═══════════════════════════════════════════════════════════
   هدر: قاب تیره برند، چیدمان مرتب
   ═══════════════════════════════════════════════════════════ */
#site-header {
    background: linear-gradient(135deg, #2C1810, #1A0E0A) !important;
    box-shadow: 0 2px 14px rgba(0,0,0,.3);
    position: relative;
}
#site-header .header-inner {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 16px;
    flex-wrap: nowrap;
    padding: 10px 0;
}
#site-header .site-logo { flex: 0 0 auto; }
#site-header .site-logo img {
    max-height: 52px;
    width: auto;
    border-radius: 0;
    padding: 0;
    background: transparent;
}
#site-header .logo-text strong,
#site-header .logo-name strong { color: #ffffff !important; }
#site-header .logo-text span,
#site-header .logo-name span { color: #D4A574 !important; }
#site-header .logo-icon { color: #ffffff; }

#site-header .main-nav {
    flex: 0 1 auto;
    display: flex !important;
    align-items: center;
}
#site-header .nav-menu {
    display: flex !important;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
    flex-wrap: wrap;
}
#site-header .nav-menu li { position: relative; }
#site-header .nav-menu li a {
    display: block;
    padding: 8px 12px;
    border-radius: 10px;
    color: #F5D5B0 !important;
    font-weight: 600;
    font-size: 14px;
}
#site-header .nav-menu li a:hover {
    color: #ffffff !important;
    background: rgba(255,255,255,.08);
}

#site-header .header-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
}
#site-header .header-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #F5D5B0 !important;
    background: rgba(255,255,255,.08) !important;
}
#site-header .header-icon:hover {
    color: #ffffff !important;
    background: rgba(255,255,255,.16) !important;
}

/* ── هدر موبایل: چسبان و مرتب ── */
@media (max-width: 768px) {
    #site-header { position: sticky; top: 0; z-index: 100; }
    #site-header .header-inner { gap: 10px; padding: 8px 0; }
    #site-header .main-nav { display: none !important; }
    #site-header .site-logo img { max-height: 44px; }
}

/* ═══════════════════════════════════════════════════════════
   منوی موبایل: سفید، تمیز و جذاب
   ═══════════════════════════════════════════════════════════ */
.mobile-menu { background: #ffffff !important; }
.mobile-menu-header {
    background: linear-gradient(135deg, #e91e4f, #d48a2c) !important;
    padding: 18px 16px !important;
}
.mobile-menu-header .logo-text,
.mobile-menu-header strong { color: #ffffff !important; }
.mobile-menu-close { color: #ffffff !important; }
.mobile-menu-content { padding: 10px; }
.mobile-nav-menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.mobile-nav-menu li a {
    display: block;
    padding: 13px 14px;
    border-radius: 12px;
    color: #333333 !important;
    font-weight: 700;
    font-size: 14px;
}
.mobile-nav-menu li a:hover,
.mobile-nav-menu li a:active { background: #fff0f4; color: #e91e4f !important; }
.mobile-menu-footer { border-top: 1px solid #eee; padding: 14px; }
.mobile-menu-phone {
    display: block;
    text-align: center;
    background: #22a45d !important;
    color: #ffffff !important;
    border-radius: 12px;
    padding: 12px;
    font-weight: 700;
}
.mobile-menu-overlay { background: rgba(0,0,0,.45) !important; }

/* ── برگه PWA: چیدمان مرتب ── */
body.page-id-19096 .site-main { padding: 16px; max-width: 1280px; margin: 0 auto; }

/* ── دسته‌بندی‌های PWA ── */
.kz-pwa-categories { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 16px 0; }
.kz-pwa-category { display: block; text-align: center; background: #fff; border-radius: 14px; padding: 10px; box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.kz-pwa-category-image { display: block; width: 70px; height: 70px; margin: 0 auto 8px; border-radius: 50%; overflow: hidden; }
.kz-pwa-category-image img { width: 100%; height: 100%; object-fit: cover; }
.kz-pwa-category-name { font-size: 13px; font-weight: 700; color: #333; }

/* ── محصولات PWA ── */
.kz-pwa-products { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 16px 0; }
.kz-pwa-product { background: #fff; border-radius: 14px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,.06); position: relative; display: flex; flex-direction: column; }
.kz-pwa-product-image { position: relative; display: block; aspect-ratio: 1; background: #f7f7f7; }
.kz-pwa-product-image img { width: 100%; height: 100%; object-fit: cover; }
.kz-pwa-discount { position: absolute; top: 8px; left: 8px; background: #e91e4f; color: #fff; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 8px; z-index: 2; }
.kz-pwa-product-content { padding: 10px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.kz-pwa-product-title { font-size: 13px; font-weight: 700; line-height: 1.6; margin: 0; }
.kz-pwa-product-title a { color: #222; }
.kz-pwa-product-price { font-size: 13px; color: #e91e4f; font-weight: 700; }
.kz-pwa-product-price del { color: #999; font-size: 11px; font-weight: 400; }
.kz-pwa-add-cart {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: linear-gradient(135deg, #e91e4f, #f44336);
    color: #fff !important;
    border-radius: 10px;
    padding: 9px 10px;
    font-size: 12px;
    font-weight: 700;
    margin-top: auto;
    text-decoration: none;
}
.kz-pwa-add-cart svg { width: 16px !important; height: 16px !important; fill: #fff !important; flex-shrink: 0; }

@media (max-width: 1024px) { .kz-pwa-products { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px) {
    .kz-pwa-products { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .kz-pwa-categories { grid-template-columns: repeat(4, 1fr); gap: 8px; }
    .kz-pwa-category-image { width: 56px; height: 56px; }
}

/* ── دکمه‌ها هماهنگ با اپ ── */
.btn-primary,
.woocommerce .button,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
input#submit,
.wp-block-button__link {
    background: linear-gradient(135deg, #e91e4f, #f44336) !important;
    border: none !important;
    color: #fff !important;
}
.btn-primary:hover,
.woocommerce .button:hover,
input#submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(233, 30, 79, 0.3);
}

/* ── لینک‌ها و قیمت‌ها ── */
a { color: #e91e4f; }
a:hover { color: #f44336; }
.woocommerce div.product p.price,
.woocommerce div.product span.price { color: #e91e4f !important; font-weight: 700 !important; }
.woocommerce div.product p.price del { color: #999 !important; }

/* ── بج تخفیف و سبد ── */
.badge-sale, .onsale { background: linear-gradient(135deg, #e91e4f, #f44336) !important; color: #fff !important; }
.cart-count { background: #f44336 !important; color: #fff !important; }

/* ── فرم‌ها ── */
.form-input:focus, .form-textarea:focus, .form-select:focus {
    border-color: #e91e4f !important;
    box-shadow: 0 0 0 3px rgba(233, 30, 79, 0.15) !important;
}

/* ── اسکرول‌بار و انتخاب متن ── */
::-webkit-scrollbar-thumb { background: #e91e4f !important; }
::selection { background-color: #e91e4f !important; color: #fff !important; }