/* ===== خوشمزه — استایل پایه ===== */
@font-face { font-family: "Vazirmatn FD"; src: url("../fonts/Vazirmatn-FD-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Vazirmatn FD"; src: url("../fonts/Vazirmatn-FD-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Vazirmatn FD"; src: url("../fonts/Vazirmatn-FD-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Vazirmatn FD"; src: url("../fonts/Vazirmatn-FD-ExtraBold.woff2") format("woff2"); font-weight: 800 900; font-display: swap; }

:root {
	--khm-accent: #FF6B00;
	--khm-accent-2: #FF8A2B;
	--khm-accent-soft: #FFF1E5;
	--khm-bg: #FFF8F0;
	--khm-surface: #FFFFFF;
	--khm-ink: #1A1A1A;
	--khm-muted: #6B6B6B;
	--khm-line: #F1E6D8;
	--khm-success: #1E9E5A;
	--khm-danger: #D93025;
	--khm-radius: 12px;
	--khm-font: "Vazirmatn FD", Vazirmatn, Tahoma, sans-serif;
}

html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
	background: var(--khm-bg);
	color: var(--khm-ink);
	font-family: var(--khm-font);
	-webkit-font-smoothing: antialiased;
}
body, button, input, select, textarea,
.elementor-widget-heading .elementor-heading-title,
.elementor-widget-text-editor,
.elementor-button,
.elementor-icon-box-title, .elementor-icon-box-description,
.elementor-icon-list-text,
.elementor-field-group .elementor-field, .elementor-field-label,
.woocommerce, .woocommerce :is(h1, h2, h3, h4, p, a, span, td, th, label, input, button, select, textarea, li, strong, bdi) {
	font-family: var(--khm-font) !important;
}
a { color: inherit; }
a:hover { color: var(--khm-accent); }
img { max-width: 100%; height: auto; }

.khm-container { max-width: 1200px; margin-inline: auto; padding-inline: 20px; }
.khm-muted { color: var(--khm-muted); }

/* ---------- Header ---------- */
.khm-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--khm-bg) 92%, transparent); backdrop-filter: saturate(1.4) blur(8px); }
.admin-bar .khm-header { top: 32px; }
.khm-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 84px; }
.khm-logo { color: var(--khm-accent) !important; font-weight: 900; font-size: 30px; text-decoration: none; line-height: 1; }
.khm-logo img { max-height: 44px; width: auto; }
.khm-nav { display: flex; align-items: center; gap: 36px; }
.khm-menu { display: flex; gap: 32px; list-style: none; margin: 0; padding: 0; }
.khm-menu a { text-decoration: none; font-size: 15px; font-weight: 500; color: var(--khm-ink); transition: color .2s; }
.khm-menu .current-menu-item > a, .khm-menu a:hover { color: var(--khm-accent); font-weight: 700; }
.khm-cart-link { position: relative; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font-size: 15px; color: var(--khm-ink); }
.khm-cart-count {
	min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
	background: var(--khm-accent); color: #fff; font-size: 12px; font-weight: 700;
	display: inline-flex; align-items: center; justify-content: center;
	transition: transform .25s;
}
.khm-cart-count.is-empty { display: none; }
.khm-cart-count.khm-bump { animation: khm-bump .45s ease; }
@keyframes khm-bump { 0%,100% { transform: scale(1); } 40% { transform: scale(1.45); } }

@media (max-width: 767px) {
	.admin-bar .khm-header { top: 0; }
	.khm-header-inner { min-height: 68px; flex-direction: row; }
	.khm-logo { font-size: 26px; }
	.khm-nav { gap: 16px; }
	.khm-menu { gap: 16px; overflow-x: auto; scrollbar-width: none; }
	.khm-menu a { font-size: 13px; white-space: nowrap; }
	.khm-menu li:nth-child(n+3) { display: none; } /* درباره/تماس در فوتر */
	.khm-cart-link { font-size: 13px; }
}

/* ---------- Footer ---------- */
.khm-footer { margin-top: 24px; }
.khm-footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 32px 40px; border-top: 1px solid var(--khm-line); }
.khm-footer-brand { display: flex; align-items: center; gap: 24px; }
.khm-footer-phone { font-size: 13px; color: var(--khm-muted); text-decoration: none; }
.khm-footer .khm-menu { gap: 24px; }
.khm-footer .khm-menu a { font-size: 13px; color: var(--khm-muted); font-weight: 400; }
@media (max-width: 767px) {
	.khm-footer-inner { flex-direction: column-reverse; align-items: stretch; gap: 24px; }
	.khm-footer-brand { justify-content: space-between; }
	.khm-footer .khm-menu li { display: list-item !important; }
}

/* ---------- Hero ---------- */
.khm-hero-img img { animation: khm-float 5s ease-in-out infinite; }
@keyframes khm-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@media (max-width: 767px) { .khm-hero-title br { display: none; } }

/* ---------- Menu widget ---------- */
.khm-menu-title { font-size: 34px; font-weight: 800; margin: 0 0 24px; }
.khm-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 40px; }
.khm-tab {
	border: 0; background: transparent; color: var(--khm-muted);
	padding: 11px 26px; border-radius: 8px; font-size: 15px; cursor: pointer;
	transition: background .2s, color .2s;
}
.khm-tab:hover { color: var(--khm-ink); background: var(--khm-accent-soft); }
.khm-tab.is-active { background: var(--khm-accent, #FF6B00); color: var(--khm-ink); font-weight: 700; }
.khm-tab:focus-visible { outline: 2px solid var(--khm-accent); outline-offset: 2px; }

.khm-grid { display: grid; grid-template-columns: repeat(var(--khm-cols, 4), minmax(0, 1fr)); gap: 48px 56px; }
.khm-card-item { display: flex; flex-direction: column; transition: opacity .25s, transform .25s; }
.khm-card-item.is-hidden { display: none; }
.khm-card-item.is-in { animation: khm-in .35s ease both; }
@keyframes khm-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.khm-item-img { display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; margin-bottom: 20px; }
.khm-item-img img { width: 100%; height: 100%; object-fit: contain; transition: transform .35s; }
.khm-card-item:hover .khm-item-img img { transform: scale(1.05) rotate(-2deg); }
.khm-item-name { font-size: 17px; font-weight: 800; margin: 0 0 14px; line-height: 1.6; }
.khm-item-name a { text-decoration: none; }
.khm-item-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; }
.khm-item-meta { display: flex; flex-direction: column; gap: 2px; }
.khm-item-price { font-size: 14px; color: var(--khm-muted); }
.khm-item-prep { font-size: 12px; color: #A0A0A0; }
.khm-add, .khm-menu-widget .khm-add.button {
	width: 44px; height: 44px; min-width: 44px; padding: 0 !important; border-radius: 8px !important;
	display: inline-flex !important; align-items: center; justify-content: center;
	background: var(--khm-accent, #FF6B00) !important; color: var(--khm-ink) !important;
	font-size: 26px !important; font-weight: 400 !important; line-height: 1 !important; text-decoration: none; border: 0 !important;
	transition: transform .15s, background .2s; position: relative;
}
.khm-add:hover { background: var(--khm-accent-2) !important; transform: translateY(-2px); }
.khm-add:active { transform: scale(.92); }
.khm-add.loading { color: transparent !important; }
.khm-add.loading::after { content: ""; position: absolute; inset: 0; margin: auto; width: 18px; height: 18px; border: 2px solid var(--khm-ink); border-top-color: transparent; border-radius: 50%; animation: khm-spin .7s linear infinite; }
.khm-add.added { font-size: 0 !important; }
.khm-add.added::before { content: "✓"; font-size: 20px; }
.khm-menu-widget .added_to_cart { display: none !important; }
.khm-soldout { font-size: 12px; color: var(--khm-danger); }
@keyframes khm-spin { to { transform: rotate(360deg); } }

@media (max-width: 1024px) { .khm-grid { gap: 40px 32px; } }
@media (max-width: 767px) {
	.khm-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 32px; }
	.khm-tab { padding: 11px 6px; font-size: 13px; }
	.khm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 16px; }
	.khm-item-name { font-size: 14px; margin-bottom: 10px; }
	.khm-item-price { font-size: 12px; }
	.khm-item-prep { display: none; }
}

/* ---------- Buttons ---------- */
.khm-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 52px; padding: 0 32px; border: 0; border-radius: 8px;
	background: var(--khm-accent); color: var(--khm-ink); font-size: 16px; font-weight: 700;
	cursor: pointer; text-decoration: none; transition: background .2s, transform .15s;
}
.khm-btn:hover { background: var(--khm-accent-2); color: var(--khm-ink); }
.khm-btn:active { transform: scale(.98); }
.khm-btn[disabled], .khm-btn.is-loading { opacity: .65; pointer-events: none; }
.khm-btn-block { width: 100%; }
.khm-btn-ghost { background: transparent; border: 1px solid var(--khm-line); }
.khm-link { background: none; border: 0; padding: 0; color: var(--khm-accent); font-weight: 700; cursor: pointer; text-decoration: none; font-size: 14px; }
.khm-card { background: var(--khm-surface); border: 1px solid var(--khm-line); border-radius: 16px; padding: 28px; }

/* ---------- WooCommerce: صفحات عمومی ---------- */
.woocommerce .button, .woocommerce button.button, .woocommerce a.button, .woocommerce #respond input#submit,
.woocommerce a.button.alt, .woocommerce button.button.alt {
	background: var(--khm-accent) !important; color: var(--khm-ink) !important; border-radius: 8px !important;
	font-weight: 700 !important; padding: 14px 24px !important; border: 0 !important;
}
.woocommerce .button:hover { background: var(--khm-accent-2) !important; }
.woocommerce-cart .site-main, .woocommerce-checkout .site-main, .woocommerce-account .site-main { max-width: 1200px; margin-inline: auto; padding: 32px 20px 64px; }
.woocommerce-cart .page-header .entry-title, .woocommerce-checkout .page-header .entry-title { font-size: 32px; font-weight: 800; }
.woocommerce table.shop_table { border-radius: 16px; border-color: var(--khm-line); background: var(--khm-surface); }
.woocommerce table.shop_table td, .woocommerce table.shop_table th { border-color: var(--khm-line); padding: 14px 16px; }
.woocommerce-message, .woocommerce-info, .woocommerce-error { border-radius: 12px; border-top-color: var(--khm-accent); background: var(--khm-surface); }
.woocommerce-message::before, .woocommerce-info::before { color: var(--khm-accent); }
.woocommerce .quantity .qty { border: 1px solid var(--khm-line); border-radius: 8px; padding: 8px; }
.woocommerce .cart-collaterals .cart_totals h2 { font-size: 20px; font-weight: 800; }
.woocommerce-shipping-totals, .woocommerce-shipping-calculator { display: none !important; }
