/*
Theme Name:   CELLTOUCH
Theme URI:    https://celltouch.co.il
Description:  ערכת בת ל-Blocksy עם המיתוג של CELLTOUCH — צבעי הלוגו, טיפוגרפיה עברית, ורכיבי סיטונאות.
Author:       CELLTOUCH
Template:     blocksy
Version:      1.0.0
Text Domain:  celltouch
*/

/* ==========================================================================
   משתני המותג — נגזרו מהלוגו.
   שינוי צבע כאן משנה אותו בכל האתר.
   ========================================================================== */

:root {
	--celltouch-magenta: #d6217e;
	--celltouch-magenta-dark: #b01565;
	--celltouch-magenta-soft: rgba(214, 33, 126, 0.08);
	--celltouch-purple: #3b2a6b;
	--celltouch-purple-dark: #2a1d4f;
	--celltouch-ink: #1c1b22;
	--celltouch-muted: #6b6a75;
	--celltouch-line: #e7e5ee;
	--celltouch-surface: #ffffff;
	--celltouch-surface-alt: #f7f6fa;

	--celltouch-gradient: linear-gradient(135deg, var(--celltouch-magenta) 0%, var(--celltouch-purple) 100%);
	--celltouch-radius: 12px;
	--celltouch-shadow: 0 2px 14px rgba(28, 27, 34, 0.07);
	--celltouch-shadow-lift: 0 8px 28px rgba(59, 42, 107, 0.16);
}

body {
	color: var(--celltouch-ink);
	font-family: "Assistant", "Heebo", system-ui, -apple-system, "Segoe UI", sans-serif;
}

h1, h2, h3, h4, h5, h6,
.entry-title,
.woocommerce-loop-product__title {
	font-family: "Heebo", "Assistant", system-ui, sans-serif;
	font-weight: 700;
	letter-spacing: -0.01em;
}

/* ==========================================================================
   לוגו ההדר

   הלוגו נשמר ברזולוציה גבוהה כדי להיראות חד במסכי Retina, ולכן חייבים
   להגביל את גובה התצוגה כאן — אחרת הוא נפרס על חצי מסך.
   ========================================================================== */

.site-logo-container img,
.custom-logo-link img,
img.custom-logo {
	height: auto;
	max-height: 52px;
	width: auto;
}

/* הלוגו כבר מכיל את השם "CELLTOUCH", ולכן כותרת טקסט לצדו היא כפילות.
   להחזרתה: מחק את הכלל הזה. */
.wp-custom-logo .site-title-container {
	display: none;
}

@media (max-width: 782px) {
	.site-logo-container img,
	.custom-logo-link img,
	img.custom-logo {
		max-height: 40px;
	}
}

/* ==========================================================================
   תפריט ראשי

   ברירת המחדל של Blocksy קטנה מדי לתפריט קטגוריות שחנות סורקת בזריזות.
   ========================================================================== */

/* Blocksy מגדיר 12px — קטן מדי. הסלקטור כאן חזק ממנו בזכות ה-id.
   רוצה גדול או קטן יותר? שנה את המספר בשורה אחת. */
#header-menu-1 > ul > li > .ct-menu-link {
	font-size: 16px;
	font-weight: 600;

	/* uppercase לא משנה אותיות עבריות אבל כן מרחיב את הפריטים ודוחף
	   קטגוריות אל תוך תפריט ה-MORE. ביטולו מחזיר מקום לשורה. */
	text-transform: none;
	letter-spacing: 0;
}

/* פריטי תת-התפריט מעט קטנים מהראשיים, לשמירת היררכיה ברורה. */
#header-menu-1 .sub-menu .ct-menu-link {
	font-size: 15px;
	text-transform: none;
}

/* ==========================================================================
   כפתורים
   ========================================================================== */

.wp-element-button,
.wc-block-components-button,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit {
	background: var(--celltouch-magenta);
	border: 0;
	border-radius: 999px;
	color: #fff;
	font-weight: 600;
	padding: 0.7em 1.6em;
	transition: background-color 0.18s ease, transform 0.18s ease;
}

.wp-element-button:hover,
.wc-block-components-button:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover {
	background: var(--celltouch-magenta-dark);
	color: #fff;
	transform: translateY(-1px);
}

.woocommerce button.button.alt,
.woocommerce a.button.alt {
	background: var(--celltouch-purple);
}

.woocommerce button.button.alt:hover,
.woocommerce a.button.alt:hover {
	background: var(--celltouch-purple-dark);
}

/* כפתור מושבת — מוצר שאזל מהמלאי */
.woocommerce button.button:disabled,
.woocommerce button.button.disabled {
	background: var(--celltouch-line);
	color: var(--celltouch-muted);
	cursor: not-allowed;
	transform: none;
}

/* ==========================================================================
   כרטיס מוצר בקטלוג
   ========================================================================== */

.woocommerce ul.products li.product {
	background: var(--celltouch-surface);
	border: 1px solid var(--celltouch-line);
	border-radius: var(--celltouch-radius);
	overflow: hidden;
	padding: 0.85rem;
	transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.woocommerce ul.products li.product:hover {
	border-color: transparent;
	box-shadow: var(--celltouch-shadow-lift);
	transform: translateY(-3px);
}

.woocommerce ul.products li.product img {
	aspect-ratio: 1 / 1;
	border-radius: 8px;
	object-fit: contain;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
	font-size: 0.95rem;
	line-height: 1.4;
	min-height: 2.8em;
}

/* מק"ט מתחת לשם המוצר — קריטי לחנויות שמזמינות לפי מספר */
.celltouch-sku {
	color: var(--celltouch-muted);
	direction: ltr;
	display: block;
	font-size: 0.75rem;
	letter-spacing: 0.03em;
	text-align: start;
}

/* תגית מלאי */
.celltouch-stock {
	border-radius: 999px;
	display: inline-block;
	font-size: 0.72rem;
	font-weight: 600;
	margin-block-start: 0.35rem;
	padding: 0.15em 0.65em;
}

.celltouch-stock--in {
	background: rgba(26, 127, 55, 0.1);
	color: #1a7f37;
}

.celltouch-stock--low {
	background: rgba(187, 85, 4, 0.1);
	color: #bb5504;
}

.celltouch-stock--out {
	background: var(--celltouch-surface-alt);
	color: var(--celltouch-muted);
}

/* ==========================================================================
   כותרות מקטע בדף הבית — קו הדגשה בצבע המותג
   ========================================================================== */

.home .entry-content > .wp-block-heading {
	margin-block-end: 2rem;
	padding-block-end: 0.7rem;
	position: relative;
}

.home .entry-content > .wp-block-heading::after {
	background: var(--celltouch-magenta);
	border-radius: 999px;
	bottom: 0;
	content: "";
	height: 4px;

	/* מרכוז שעובד גם ב-RTL וגם ב-LTR, בלי להסתמך על transform
	   שאינו מודע לכיוון הכתיבה. */
	inset-inline: 0;
	margin-inline: auto;
	position: absolute;
	width: 132px;
}

/* ==========================================================================
   קרוסלה
   ========================================================================== */

.celltouch-carousel {
	align-items: center;
	display: flex;
	gap: 0.5rem;
	position: relative;
}

.celltouch-carousel__nav {
	align-items: center;
	background: var(--celltouch-surface);
	border: 1px solid var(--celltouch-line);
	border-radius: 50%;
	color: var(--celltouch-purple);
	cursor: pointer;
	display: flex;
	flex: 0 0 auto;
	height: 44px;
	justify-content: center;
	padding: 0;
	transition: background-color 0.18s ease, color 0.18s ease, opacity 0.18s ease;
	width: 44px;
}

.celltouch-carousel__nav svg {
	height: 22px;
	width: 22px;
}

.celltouch-carousel__nav:hover:not(:disabled) {
	background: var(--celltouch-magenta);
	border-color: var(--celltouch-magenta);
	color: #fff;
}

.celltouch-carousel__nav:disabled {
	cursor: default;
	opacity: 0.3;
}

/* אם כל הפריטים נכנסים במסך אין צורך בחצים כלל. */
.celltouch-carousel.is-static .celltouch-carousel__nav {
	display: none;
}

/* ==========================================================================
   רשת קטגוריות ומותגים  [celltouch_categories] [celltouch_brands]
   ========================================================================== */

.celltouch-cats {
	display: grid;
	gap: 1rem;
	grid-auto-columns: minmax(160px, 1fr);
	grid-auto-flow: column;
	list-style: none;
	margin: 0;
	overflow-x: auto;
	padding: 0.25rem;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}

.celltouch-cats::-webkit-scrollbar {
	display: none;
}

.celltouch-cats__item {
	margin: 0;
	scroll-snap-align: start;
}

/* כשהקרוסלה סטטית הפריטים נפרסים על כל הרוחב במקום להיצמד לצד. */
.celltouch-carousel.is-static .celltouch-cats {
	grid-auto-flow: row;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.celltouch-cats__link {
	align-items: center;
	background: var(--celltouch-surface);
	border: 1px solid var(--celltouch-line);
	border-radius: var(--celltouch-radius);
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
	height: 100%;
	padding: 1.1rem 0.75rem;
	text-align: center;
	text-decoration: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.celltouch-cats__link:hover {
	border-color: var(--celltouch-magenta);
	box-shadow: var(--celltouch-shadow-lift);
	transform: translateY(-3px);
}

.celltouch-cats__image {
	align-items: center;
	background: var(--celltouch-surface-alt);
	border-radius: 50%;
	display: flex;
	height: 76px;
	justify-content: center;
	overflow: hidden;
	width: 76px;
}

.celltouch-cats__image img {
	height: 100%;
	object-fit: contain;
	width: 100%;
}

/* קטגוריה ללא תמונה — מציגים את האות הראשונה על גרדיאנט המותג */
.celltouch-cats__initial {
	background: var(--celltouch-gradient);
	color: #fff;
	font-size: 1.6rem;
	font-weight: 700;
	height: 100%;
	line-height: 76px;
	width: 100%;
}

.celltouch-cats__name {
	color: var(--celltouch-ink);
	font-size: 0.92rem;
	font-weight: 600;
	line-height: 1.35;
}

.celltouch-cats__count {
	color: var(--celltouch-muted);
	font-size: 0.78rem;
}

/* ==========================================================================
   מקטע "למה לקנות אצלנו"  [celltouch_benefits]
   ========================================================================== */

.celltouch-benefits {
	background: var(--celltouch-surface);
	border: 1px solid var(--celltouch-line);
	border-radius: 18px;
	padding: 2.25rem 1.75rem;
}

.celltouch-benefits__list {
	display: grid;
	gap: 1.75rem 1rem;
	grid-template-columns: repeat(6, 1fr);
	list-style: none;
	margin: 0;
	padding: 0;
}

.celltouch-benefits__item {
	align-items: center;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	margin: 0;
	text-align: center;
}

.celltouch-benefits__icon {
	height: 60px;
	object-fit: contain;
	width: 60px;
}

.celltouch-benefits__title {
	font-size: 1rem;
	font-weight: 700;
}

.celltouch-benefits__text {
	color: var(--celltouch-muted);
	font-size: 0.85rem;
	line-height: 1.5;
}

@media (max-width: 1100px) {
	.celltouch-benefits__list {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 600px) {
	.celltouch-benefits {
		padding: 1.5rem 1rem;
	}

	.celltouch-benefits__list {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* ==========================================================================
   דף מוצר
   ========================================================================== */

.woocommerce div.product .product_title {
	font-size: clamp(1.35rem, 1rem + 1.4vw, 1.9rem);
}

.woocommerce div.product .quantity input.qty {
	border: 1px solid var(--celltouch-line);
	border-radius: 8px;
	height: 3rem;
	width: 5rem;
}

/* ==========================================================================
   נגישות ותנועה
   ========================================================================== */

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
	outline: 2px solid var(--celltouch-magenta);
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
	}
}
