/*
Theme Name: KeyhanBazaar
Theme URI: https://keyhanbazaar.com/
Description: KeyhanBazaar
Author: Barfaraz, UIkitBase
Author URI: https://uikitbase.com/
Version: 3.1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/

/* ==========================================================================
   Global Resets & Layout Shift Prevention (Core Web Vitals)
   ========================================================================== */
img {
	height: auto;
	max-width: 100%;
}

/* تثبیت ابعاد تصاویر بندانگشتی و محصولات برای جلوگیری از CLS */
.woocommerce ul.products li.product a img,
.woocommerce-product-gallery__image img,
.attachment-woocommerce_thumbnail {
	aspect-ratio: 1 / 1;
	object-fit: contain;
	background-color: #fcfcfc;
}

/* جلوگیری از دفورمه شدن بنرهای صفحه */
img.uk-border-rounded {
	aspect-ratio: auto !important;
	height: auto !important;
}

/* ==========================================================================
   Base & RTL
   ========================================================================== */
.kb-direction-rtl {
	direction: rtl;
	display: inline-block;
	unicode-bidi: embed;
}

.kb-media-box-wrap > * {
	width: auto;
}

/* ==========================================================================
   Header & Search Bar (اصلاح ابعاد و کنتراست)
   ========================================================================== */
.kb-toolbar-nav .toolbar-text,
.kb-toolbar-nav .toolbar-text .kb-toolbar-tel,
.kb-toolbar-nav .toolbar-text a.kb-toolbar-tel:link,
.kb-toolbar-nav .toolbar-text a.kb-toolbar-tel:visited,
.kb-toolbar-nav .toolbar-text a.kb-toolbar-tel:hover {
	color: #ffffff !important;
	font-weight: 700;
	font-size: 15px;
}

@media (max-width: 959px) {
	.kb-header-mobile .kb-toolbar-nav {
		background-color: #2b6cb0 !important;
	}
}

/* فیکس فشرده نشدن لوگو */
.kb-header-logo img,
.custom-logo {
	width: auto !important;
	max-height: 45px !important;
	flex-shrink: 0 !important;
}

/* تنظیم عرض استاندارد فرم سرچ */
.kb-search-box form,
.kb-header-search form {
	width: 480px !important;
	max-width: 100% !important;
}

.kb-search-box input[type="search"],
.kb-header-search input[type="search"] {
	width: 100% !important;
}

/* منوی موبایل کشویی */
.digikala-style-menu {
	display: flex;
	height: calc(100vh - 60px);
	overflow: hidden;
}

.digikala-style-menu .menu-right-side, 
.digikala-style-menu ul.parent-menu {
	width: 30%;
	background-color: #f5f5f5;
	height: 100%;
	overflow-y: auto;
	list-style: none;
	padding: 0;
	margin: 0;
	border-left: 1px solid #e0e0e0;
}

.digikala-style-menu .menu-left-side,
.digikala-style-menu .sub-menu-wrapper {
	width: 70%;
	background-color: #fff;
	height: 100%;
	overflow-y: auto;
	padding: 15px;
}

.digikala-style-menu ul.parent-menu li a {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 15px 5px;
	font-size: 11px;
	text-align: center;
	color: #333333;
	border-bottom: 1px solid #eee;
	text-decoration: none;
}

.digikala-style-menu ul.parent-menu li.active a {
	background-color: #fff;
	color: #ef4056;
	font-weight: bold;
}

.digikala-style-menu .sub-menu {
	display: none;
}

.digikala-style-menu .sub-menu.active {
	display: block;
}

/* ==========================================================================
   WooCommerce Single Product & Sticky Tabs
   ========================================================================== */
body.single-product {
	background-color: #fff !important;
}

.sp-feature img {
	width: 50px;
	height: 50px;
	aspect-ratio: 1 / 1;
}

.product-summary-card .uk-card-body,
.product-summary-card .uk-card-footer {
	padding: 20px;
}

.sp-gallery {
	width: 350px;
}

.sp-gallery .uk-thumbnav {
	margin-top: 15px;
}

.sp-gallery .uk-thumbnav > * {
	padding-right: 10px;
}

.sp-gallery .uk-thumbnav > * > * {
	border: solid 1px #e5e5e5;
	border-radius: 5px;
	overflow: hidden;
}

.sp-discounted-price {
	text-decoration: line-through;
	color: #595959 !important;
}

.uk-tab > * > a {
	border-width: 3px !important;
}

.kb-product-tabs-nav {
	position: sticky;
	top: 0;
	z-index: 900;
	direction: rtl;
	background: #fff;
	border-top: 1px solid #e0e0e2;
	border-bottom: 1px solid #e0e0e2;
}

.kb-product-tabs-nav__list {
	display: flex;
	align-items: stretch;
	margin: 0;
	padding: 0;
	list-style: none;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}

.kb-product-tabs-nav__list::-webkit-scrollbar {
	display: none;
}

.kb-product-tabs-nav__item {
	flex: 0 0 auto;
}

.kb-product-tabs-nav__link {
	display: flex;
	align-items: center;
	min-height: 56px;
	padding: 0 18px;
	color: #4a4d52;
	font-family: "IRANYekan", Tahoma, sans-serif;
	font-size: 13px;
	font-weight: 500;
	line-height: 1;
	text-decoration: none !important;
	white-space: nowrap;
	border-bottom: 2px solid transparent;
	transition: color 0.2s ease, border-bottom-color 0.2s ease;
}

.kb-product-tabs-nav__link:hover {
	color: #ef4056;
}

.kb-product-tabs-nav__link.is-active {
	color: #ef4056;
	font-weight: 700;
	border-bottom-color: #ef4056;
}

@media (max-width: 767px) {
	.kb-product-tabs-nav__link {
		min-height: 48px;
		padding: 0 14px;
		font-size: 12px;
	}
}

/* ==========================================================================
   Homepage Layout Setup
   ========================================================================== */
body.home,
body.front-page {
	overflow-x: hidden;
}

body.home .kb-site-content,
body.front-page .kb-site-content {
	display: block !important;
	width: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
	overflow: visible !important;
}

/* ==========================================================================
   Hero Slider (Full-Width Edge-to-Edge & Zero-CLS)
   ========================================================================== */
.kb-home-hero-slider {
	position: relative !important;
	display: block !important;
	width: 100% !important;
	max-width: 100% !important;
	margin: 0 0 24px 0 !important;
	padding: 0 !important;
	overflow: hidden;
}

.kb-home-hero-slider__container {
	position: relative;
	display: block;
	width: 100%;
	max-width: none;
	margin: 0;
	padding: 0;
}

/* رزرو داینامیک ارتفاع بر اساس فرمول clamp برای پیشگیری از پرش (CLS) */
.kb-home-hero-slider__items {
	display: block !important;
	width: 100% !important;
	max-width: none !important;
	height: clamp(200px, 31.25vw, 500px) !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	overflow: hidden;
	background-color: #f5f5f5;
}

.kb-home-hero-slider__slide {
	position: absolute !important;
	inset: 0 !important;
	width: 100% !important;
	height: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
	overflow: hidden;
	background-color: #f5f5f5;
}

.kb-home-hero-slider__slide > a,
.kb-home-hero-slider__slide > picture {
	display: block !important;
	width: 100% !important;
	height: 100% !important;
}

.kb-home-hero-slider__image {
	display: block !important;
	width: 100% !important;
	max-width: none !important;
	height: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
	object-fit: cover !important;
	object-position: center !important;
}

/* دکمه‌های ناوبری گرد اسلایدر */
.kb-home-hero-slider .uk-slidenav-round {
	position: absolute !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 42px !important;
	height: 42px !important;
	padding: 0 !important;
	color: #222 !important;
	background: rgba(255, 255, 255, 0.88) !important;
	border-radius: 50% !important;
	box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15) !important;
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	transition: transform 0.2s ease, background-color 0.2s ease;
	z-index: 20;
}

.kb-home-hero-slider .uk-slidenav-round:hover {
	background-color: #ffffff !important;
	transform: scale(1.08);
}

.kb-home-hero-slider .uk-slidenav-round:focus-visible {
	outline: 2px solid #ef4056;
	outline-offset: 3px;
}

/* دات‌ناو (Dots) اسلایدر */
.kb-home-hero-slider .uk-dotnav {
	gap: 6px;
}

.kb-home-hero-slider .uk-dotnav > * > * {
	width: 8px;
	height: 8px;
	background: rgba(255, 255, 255, 0.65);
	border: 1px solid rgba(0, 0, 0, 0.15);
	border-radius: 4px;
	transition: width 0.25s ease, background-color 0.25s ease;
}

.kb-home-hero-slider .uk-dotnav > .uk-active > * {
	width: 24px;
	background-color: #ffffff;
}

/* ریسپانسیو اسلایدر در تبلت */
@media (max-width: 959px) {
	.kb-home-hero-slider {
		margin-bottom: 16px !important;
	}
	.kb-home-hero-slider .uk-slidenav-round {
		width: 38px !important;
		height: 38px !important;
	}
}

/* ریسپانسیو اسلایدر در موبایل */
@media (max-width: 639px) {
	.kb-home-hero-slider {
		margin-bottom: 12px !important;
	}
	.kb-home-hero-slider__items {
		height: 200px !important;
	}
	.kb-home-hero-slider .uk-position-small {
		margin: 8px !important;
	}
	.kb-home-hero-slider .uk-slidenav-round {
		width: 34px !important;
		height: 34px !important;
	}
	.kb-home-hero-slider .uk-slidenav-round svg {
		width: 12px;
		height: 20px;
	}
}

@media (max-width: 389px) {
	.kb-home-hero-slider__items {
		height: 180px !important;
	}
}

/* ==========================================================================
   Category Bubbles Section (Circular Carousel)
   ========================================================================== */
.kb-home-section-categories {
	display: block;
	width: 100%;
	padding: 20px 0 30px;
	background-color: #ffffff;
	border-bottom: 1px solid #f2f2f2;
}

.kb-category-bubble-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	padding: 8px 4px;
	text-decoration: none !important;
	transition: transform 0.2s ease;
}

.kb-category-bubble-card:hover {
	transform: translateY(-2px);
}

.kb-cat-icon-holder {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 80px;
	height: 80px;
	min-width: 80px;
	min-height: 80px;
	overflow: hidden;
	border-radius: 50%;
	background-color: #f4f4f5;
	transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.kb-category-bubble-card:hover .kb-cat-icon-holder {
	background-color: #f0f2f5;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.kb-category-image,
.kb-cat-icon-holder img {
	display: block;
	width: 80px;
	height: 80px;
	max-width: none;
	aspect-ratio: 1 / 1;
	padding: 8px;
	object-fit: contain;
}

.kb-cat-name {
	display: -webkit-box;
	max-width: 100%;
	overflow: hidden;
	color: #27272a;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.4;
	text-align: center;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.kb-category-bubble-card:hover .kb-cat-name {
	color: #ef394e;
}

@media (max-width: 639px) {
	.kb-home-section-categories {
		padding-top: 16px;
		padding-bottom: 22px;
	}

	.kb-cat-icon-holder {
		width: 72px;
		height: 72px;
		min-width: 72px;
		min-height: 72px;
	}

	.kb-category-image,
	.kb-cat-icon-holder img {
		width: 72px;
		height: 72px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.kb-category-bubble-card {
		transition: none;
	}

	.kb-category-bubble-card:hover {
		transform: none;
	}
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer-contact-heading {
	display: inline-flex;
	align-items: center;
}

.footer-contact-heading::after {
	content: "";
	display: inline-block;
	height: 14px;
	width: 1px;
	background-color: rgba(255, 255, 255, 0.25);
	margin-right: 15px;
	margin-left: 5px;
}

.footer-phone-icon svg {
	transform: scaleX(-1);
}
