/* TABUTECH Home Blocks
   ფერები მოდის Elementor-ის გლობალური ფერებიდან; fallback-ები = TABUTECH-ის ფერები. */

.tthb {
	--tthb-primary: var(--e-global-color-primary, #4F46E5);
	--tthb-primary-soft: color-mix(in srgb, var(--tthb-primary) 8%, #fff);
	--tthb-accent: var(--e-global-color-accent, #00C16C);
	--tthb-text: var(--e-global-color-text, #111827);
	--tthb-soft: var(--e-global-color-secondary, #F3F4F6);
	--tthb-muted: #6B7280;
	--tthb-line: #E5E7EB;
	--tthb-danger: #E11D48;
	--tthb-radius: 12px;

	box-sizing: border-box;
	width: 100%;
	max-width: 2000px;
	margin-inline: auto;
	color: var(--tthb-text);
	display: block;
	min-width: 0;
	line-height: 1.4;
}
[class*="elementor-widget-tthb_"] { width: 100% !important; max-width: 100% !important; min-width: 0; flex: 1 1 100%; align-self: stretch; }
[class*="elementor-widget-tthb_"] > .elementor-widget-container { width: 100%; }
.tthb *, .tthb *::before, .tthb *::after { box-sizing: border-box; }
.tthb a { text-decoration: none; }
.tthb img { max-width: 100%; height: auto; }
.tthb-note { padding: 14px 16px; border: 1px dashed var(--tthb-line); border-radius: var(--tthb-radius); color: var(--tthb-muted); font-size: 13px; }

/* ---------- Section head ---------- */
.tthb-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 16px; }
.tthb-title { margin: 0; padding: 0 0 0 12px; border-left: 4px solid var(--tthb-primary); font-size: 20px; line-height: 1.2; font-weight: 700; color: var(--tthb-text); }
.tthb-all { margin-left: auto; font-size: 13px; color: var(--tthb-primary); white-space: nowrap; }
.tthb-all:hover { text-decoration: underline; }

.tthb-tabbar { order: 3; width: 100%; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
.tthb-tabbar::-webkit-scrollbar { display: none; }
.tthb .tthb-tab {
	appearance: none; flex: 0 0 auto; min-height: 40px; padding: 0 18px;
	border: 1px solid var(--tthb-line); border-radius: 999px; background: #fff; color: var(--tthb-text);
	font: inherit; font-size: 14px; font-weight: 500; line-height: 1; white-space: nowrap; cursor: pointer;
	transition: background-color .15s, color .15s, border-color .15s;
}
.tthb .tthb-tab:hover { border-color: var(--tthb-primary); color: var(--tthb-primary); background: #fff; }
.tthb .tthb-tab[aria-selected="true"] { background: var(--tthb-primary); border-color: var(--tthb-primary); color: #fff; }
.tthb .tthb-tab:focus-visible, .tthb a:focus-visible, .tthb .tthb-btn:focus-visible { outline: 2px solid var(--tthb-primary); outline-offset: 2px; }

/* ---------- Product grid ---------- */
.tthb-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tthb-empty { margin: 0; padding: 32px 16px; text-align: center; color: var(--tthb-muted); background: var(--tthb-soft); border-radius: var(--tthb-radius); }
.tthb-retry { appearance: none; border: 0; background: none; color: var(--tthb-primary); font: inherit; text-decoration: underline; cursor: pointer; padding: 8px; min-height: 40px; }

.tthb-card { position: relative; display: flex; flex-direction: column; min-width: 0; background: #fff; border: 1px solid var(--tthb-line); border-radius: var(--tthb-radius); overflow: hidden; transition: transform .2s, box-shadow .2s, border-color .2s; }
@media (hover: hover) {
	.tthb-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(17, 24, 39, .08); border-color: color-mix(in srgb, var(--tthb-primary) 35%, var(--tthb-line)); }
}
.tthb-media-wrap { position: relative; }
.tthb-media { display: block; aspect-ratio: 1 / 1; padding: 12px; background: #fff; }
.tthb-media img { display: block; width: 100%; height: 100%; object-fit: contain; }

.tthb-badges { position: absolute; top: 8px; left: 8px; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.tthb-badge { display: inline-block; padding: 5px 8px; border-radius: 6px; background: var(--tthb-primary); color: #fff; font-size: 11px; font-weight: 700; line-height: 1; }
.tthb-badge--sale { background: var(--tthb-danger); }

.tthb-body { display: flex; flex: 1; flex-direction: column; gap: 4px; padding: 4px 12px 12px; }
.tthb-brand { font-size: 11px; font-weight: 600; letter-spacing: .04em; color: var(--tthb-muted); }
.tthb-name { margin: 0; font-size: 13px; font-weight: 500; line-height: 1.35; min-height: 2.7em; }
.tthb-name a { color: var(--tthb-text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tthb-name a:hover { color: var(--tthb-primary); }

.tthb-swatches { display: flex; flex-wrap: wrap; gap: 2px; margin-top: 2px; }
.tthb-sw { position: relative; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; }
.tthb-sw::before { content: ""; width: 14px; height: 14px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(17, 24, 39, .18); transition: transform .15s; }
.tthb-sw.is-cur::after { content: ""; position: absolute; inset: 2px; border-radius: 50%; border: 2px solid var(--tthb-primary); }
.tthb-sw:hover::before { transform: scale(1.15); }

.tthb-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 6px; }
.tthb-prices { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.tthb-price { font-size: 16px; font-weight: 700; line-height: 1.2; white-space: nowrap; }
.tthb-price small { font-size: 11px; font-weight: 500; color: var(--tthb-muted); }
.tthb-old { font-size: 12px; color: var(--tthb-muted); text-decoration: line-through; }
.tthb-inst { font-size: 12px; color: var(--tthb-muted); white-space: nowrap; }
.tthb-inst b { font-weight: 600; color: var(--tthb-primary); }
.tthb-low { font-size: 11px; font-weight: 600; color: #B45309; }

.tthb-cart { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; background: var(--tthb-primary); color: #fff; transition: background-color .15s, transform .15s; }
.tthb-cart:hover { background: color-mix(in srgb, var(--tthb-primary) 85%, #000); color: #fff; }
.tthb-cart:active { transform: scale(.95); }
.tthb-cart--link { background: var(--tthb-primary-soft); color: var(--tthb-primary); }
.tthb-cart--link:hover { background: var(--tthb-primary); color: #fff; }
.tthb-cart.loading, .tthb-btn.loading { opacity: .6; pointer-events: none; animation: tthb-pulse 1s infinite; }
.tthb-cart.added, .tthb-btn.added { background: var(--tthb-accent); color: #fff; }
.tthb .add_to_cart_button::after, .tthb .added_to_cart { display: none !important; }

/* ---------- Skeleton ---------- */
.tthb-sk { background: linear-gradient(90deg, #F3F4F6 25%, #E5E7EB 40%, #F3F4F6 60%); background-size: 400% 100%; animation: tthb-shimmer 1.3s infinite linear; }
.tthb-sk-line { display: block; height: 12px; border-radius: 6px; margin-top: 8px; }
.tthb-sk-line.s { width: 55%; }
.tthb-card.is-skel .tthb-media { aspect-ratio: 1 / 1; }
@keyframes tthb-shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
@keyframes tthb-pulse { 50% { opacity: .35; } }

/* ---------- Deal of the week ---------- */
.tthb-deal { display: grid; grid-template-columns: minmax(0, 1fr); background: var(--tthb-primary-soft); border: 1px solid var(--tthb-line); border-radius: 16px; overflow: hidden; }
.tthb-deal-media { position: relative; background: #fff; padding: 16px; aspect-ratio: 1 / 1; max-height: 420px; }
.tthb-deal-media a { display: block; width: 100%; height: 100%; }
.tthb-deal-media img { display: block; width: 100%; height: 100%; object-fit: contain; }
.tthb-badge--lg { position: absolute; top: 14px; left: 14px; font-size: 14px; padding: 8px 12px; border-radius: 8px; }
.tthb-deal-info { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 18px 16px 20px; }
.tthb-chip { display: inline-block; padding: 6px 10px; border-radius: 6px; background: var(--tthb-danger); color: #fff; font-size: 12px; font-weight: 700; line-height: 1; }
.tthb-deal-title { margin: 2px 0 0; font-size: 20px; line-height: 1.3; font-weight: 700; }
.tthb-deal-title a { color: var(--tthb-text); }
.tthb-deal-title a:hover { color: var(--tthb-primary); }
.tthb-deal-prices { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.tthb-deal-price { font-size: 28px; font-weight: 800; line-height: 1.1; }
.tthb-deal-price small { font-size: 13px; font-weight: 500; color: var(--tthb-muted); }
.tthb-deal .tthb-old { font-size: 15px; }
.tthb-save { font-size: 13px; font-weight: 600; color: #047857; }
.tthb-deal .tthb-inst { font-size: 14px; }

.tthb-timer { width: 100%; margin-top: 6px; }
.tthb-timer-label { display: block; margin-bottom: 6px; font-size: 13px; color: var(--tthb-muted); }
.tthb-countdown { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; max-width: 360px; }
.tthb-cd { padding: 8px 4px; text-align: center; background: #fff; border: 1px solid var(--tthb-line); border-radius: 10px; }
.tthb-cd b { display: block; font-size: 22px; line-height: 1.1; font-weight: 700; font-variant-numeric: tabular-nums; }
.tthb-cd span { font-size: 11px; color: var(--tthb-muted); }
.tthb-countdown.is-ended { opacity: .5; }

.tthb-actions { display: flex; flex-direction: column; gap: 10px; width: 100%; margin-top: 10px; }
.tthb .tthb-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 24px; border-radius: 12px; background: var(--tthb-primary); color: #fff; font-size: 15px; font-weight: 600; line-height: 1; border: 1px solid var(--tthb-primary); transition: background-color .15s, color .15s; }
.tthb .tthb-btn:hover { background: color-mix(in srgb, var(--tthb-primary) 85%, #000); color: #fff; }
.tthb .tthb-btn--ghost { background: #fff; color: var(--tthb-primary); }
.tthb .tthb-btn--ghost:hover { background: var(--tthb-primary); color: #fff; }

/* ---------- Brands (soft tiles, one line) ---------- */
.tthb-brand-tile { display: flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 112px; height: 52px; padding: 8px 14px; background: var(--tthb-soft); border-radius: var(--tthb-radius); color: var(--tthb-text); font-size: 13px; font-weight: 700; letter-spacing: .04em; text-align: center; scroll-snap-align: start; transition: background-color .2s, box-shadow .2s; }
.tthb-brand-tile:hover { background: #fff; box-shadow: 0 0 0 1px var(--tthb-line), 0 6px 16px rgba(17, 24, 39, .06); }
.tthb-brand-tile img, .tthb-brand-tile .tthb-brand-logo { display: block; width: auto; height: 26px; max-width: 100%; object-fit: contain; }
.tthb-brand-tile span { color: var(--tthb-muted); transition: color .2s; }
.tthb-brand-tile:hover span { color: var(--tthb-primary); }

.tthb-bstrip { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.tthb-bstrip::-webkit-scrollbar { display: none; }

.tthb-marq { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.tthb-marq-track { display: flex; gap: 10px; width: max-content; padding-right: 10px; animation: tthb-marq var(--dur, 40s) linear infinite; }
.tthb-marq:hover .tthb-marq-track, .tthb-marq:focus-within .tthb-marq-track { animation-play-state: paused; }
@keyframes tthb-marq { to { transform: translateX(-50%); } }

.tthb-brands-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tthb-brands-grid .tthb-brand-tile { width: auto; }

/* ---------- Trust bar ---------- */
.tthb-trust-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.tthb-trust-item { display: flex; align-items: center; gap: 10px; min-width: 0; margin: 0; padding: 10px; background: #fff; border: 1px solid var(--tthb-line); border-radius: var(--tthb-radius); }
.tthb-trust-ico { display: inline-flex; flex: 0 0 36px; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; background: var(--tthb-primary-soft); color: var(--tthb-primary); font-size: 16px; }
.tthb-trust-ico svg { width: 16px; height: 16px; fill: currentColor; }
.tthb-trust-txt { display: flex; flex-direction: column; min-width: 0; }
.tthb-trust-t { font-size: 12px; font-weight: 600; line-height: 1.3; }
.tthb-trust-s { font-size: 11px; color: var(--tthb-muted); line-height: 1.3; }

/* ---------- Responsive ---------- */
@media (min-width: 560px) {
	.tthb-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
	.tthb-brands-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
	.tthb-brand-tile { width: 128px; height: 56px; }
	.tthb-trust-grid { gap: 10px; }
	.tthb-trust-item { padding: 12px 14px; gap: 12px; }
	.tthb-trust-ico { flex-basis: 40px; width: 40px; height: 40px; }
	.tthb-trust-t { font-size: 13px; }
	.tthb-trust-s { font-size: 12px; }
	.tthb-actions { flex-direction: row; }
	.tthb .tthb-btn { flex: 0 0 auto; }
}
@media (min-width: 800px) {
	.tthb-head { gap: 10px 24px; margin-bottom: 20px; }
	.tthb-tabbar { order: 0; width: auto; }
	.tthb-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
	.tthb-trust-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
	.tthb-title { font-size: 22px; }
	.tthb-media { padding: 16px; }
	.tthb-body { padding: 4px 16px 16px; gap: 5px; }
	.tthb-name { font-size: 14px; }
	.tthb-price { font-size: 17px; }

	.tthb-deal { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
	.tthb-deal-media { aspect-ratio: auto; max-height: none; min-height: 380px; padding: 28px; }
	.tthb-deal-info { justify-content: center; gap: 10px; padding: 32px 36px; }
	.tthb-deal-title { font-size: 26px; }
	.tthb-deal-price { font-size: 36px; }
}
@media (min-width: 1100px) {
	.tthb-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
	.tthb-brands-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
	.tthb-deal-info { padding: 40px 48px; }
}

/* ---------- Deals strip (კვირის შეთავაზების ზოლი) ---------- */
.tthb-strip { position: relative; overflow: hidden; padding: 16px; border-radius: 16px; color: #fff;
	background: linear-gradient(135deg, color-mix(in srgb, var(--tthb-primary) 72%, #000) 0%, var(--tthb-primary) 52%, color-mix(in srgb, var(--tthb-primary) 72%, #8B5CF6) 100%); }
.tthb-strip::before, .tthb-strip::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; background: radial-gradient(circle, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0) 68%); }
.tthb-strip::before { width: 420px; height: 420px; right: -120px; top: -220px; }
.tthb-strip::after { width: 320px; height: 320px; left: 22%; bottom: -230px; opacity: .8; }
.tthb-strip-head { position: relative; z-index: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-bottom: 14px; }
.tthb-strip-ico { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; background: rgba(255, 255, 255, .18); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); }
.tthb-strip-txt { flex: 1 1 200px; min-width: 0; }
.tthb-strip-title { margin: 0; font-size: 20px; line-height: 1.2; font-weight: 800; color: #fff; }
.tthb-strip-sub { margin: 4px 0 0; font-size: 13px; line-height: 1.4; color: rgba(255, 255, 255, .82); }
.tthb-strip .tthb-countdown { grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; max-width: none; gap: 6px; }
.tthb-strip .tthb-cd { padding: 6px 4px; background: #fff; border: 0; border-radius: 10px; color: var(--tthb-text); }
.tthb-strip .tthb-cd b { font-size: 18px; }
.tthb-strip .tthb-cd span { font-size: 10px; }

.tthb-strip-track { position: relative; z-index: 1; display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 10px) / 2.15); gap: 10px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
.tthb-strip-track::-webkit-scrollbar { display: none; }
.tthb-strip-track > .tthb-card { scroll-snap-align: start; border: 0; }
.tthb-strip .tthb-brand { display: none; }
.tthb-strip .tthb-name { min-height: 2.7em; }
.tthb-strip .tthb-media { padding: 10px; }

@media (min-width: 560px) {
	.tthb-strip-track { grid-auto-columns: calc((100% - 24px) / 3.2); gap: 12px; }
}
@media (min-width: 800px) {
	.tthb-strip { padding: 22px 24px 24px; }
	.tthb-strip-head { flex-wrap: nowrap; margin-bottom: 18px; gap: 16px; }
	.tthb-strip-ico { width: 52px; height: 52px; border-radius: 14px; }
	.tthb-strip-title { font-size: 24px; }
	.tthb-strip-sub { font-size: 14px; }
	.tthb-strip .tthb-countdown { width: auto; grid-template-columns: repeat(4, 60px); gap: 8px; margin-left: auto; }
	.tthb-strip .tthb-cd { padding: 8px 4px; }
	.tthb-strip .tthb-cd b { font-size: 20px; }
	.tthb-strip-track { grid-auto-columns: calc((100% - 42px) / 4.2); gap: 14px; }
}
@media (min-width: 1100px) {
	.tthb-strip-track { grid-auto-columns: calc((100% - (var(--n, 6) - 1) * 16px) / var(--n, 6)); gap: 16px; }
}

/* ბრენდები ტელეფონზე: მოძრავი ზოლის ნაცვლად სტატიკური ბადე (3 სვეტი, მაქს. 9) */
@media (max-width: 559px) {
	.tthb-marq { overflow: visible; -webkit-mask-image: none; mask-image: none; }
	.tthb-marq-track, .tthb-bstrip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; width: auto; padding: 0; overflow: visible; animation: none; }
	.tthb-marq-track > [aria-hidden="true"] { display: none; }
	.tthb-marq-track > .tthb-brand-tile:nth-child(n+10), .tthb-bstrip > .tthb-brand-tile:nth-child(n+10) { display: none; }
	.tthb-marq .tthb-brand-tile, .tthb-bstrip .tthb-brand-tile { width: auto; height: 48px; padding: 8px 10px; }
}

@media (prefers-reduced-motion: reduce) {
	.tthb *, .tthb *::before, .tthb *::after { animation: none !important; transition: none !important; }
	.tthb-marq { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
	.tthb-marq-track > [aria-hidden="true"] { display: none; }
}
