/* Total Tech Core – component styles.
   Colours follow Elementor global colours when present, with brand fallbacks. */
:root {
	--tt-navy: var(--e-global-color-primary, #0B1F4D);
	--tt-blue: var(--e-global-color-accent, #1266F1);
	--tt-blue-d: #0B54CC;
	--tt-ink: var(--e-global-color-secondary, #172033);
	--tt-body: var(--e-global-color-text, #596579);
	--tt-bg: #F4F6FA;
	--tt-line: #E5E9F0;
	--tt-green: #16865C;
	--tt-warn: #B45309;
	--tt-red: #C8372D;
	--tt-radius: 12px;
	--tt-radius-s: 8px;
	--tt-shadow: 0 1px 2px rgba(11,31,77,.06), 0 4px 16px rgba(11,31,77,.06);
	--tt-shadow-h: 0 2px 4px rgba(11,31,77,.08), 0 12px 28px rgba(11,31,77,.12);
}
.tt-no-scroll, .tt-no-scroll body { overflow: hidden; }
.tt-ico { width: 22px; height: 22px; flex-shrink: 0; }
.tt-admin-hint { font-size: 13px; color: var(--tt-warn); background: #FFF6E5; border: 1px dashed #F5DDB0; padding: 8px 12px; border-radius: 6px; }

/* Buttons */
.tt-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--tt-blue); color: #fff !important; font-weight: 600; font-size: 15px; line-height: 1.2; padding: 13px 20px; border: 0; border-radius: var(--tt-radius-s); cursor: pointer; text-decoration: none !important; transition: background .2s; }
.tt-btn:hover, .tt-btn:focus-visible { background: var(--tt-blue-d); }
.tt-btn--block { width: 100%; }
:where(.tt-search, .tt-drawer, .tt-filters, .tt-finder) :focus-visible { outline: 3px solid var(--tt-blue); outline-offset: 2px; }

/* Announcement */
.tt-announce { font-size: 13px; text-align: center; }
.tt-announce a { color: inherit; text-decoration: underline; font-weight: 600; }

/* ---------------- Search ---------------- */
.tt-search { position: relative; width: 100%; }
.tt-search > .tt-ico { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: #667085; pointer-events: none; width: 20px; height: 20px; }
.tt-search input[type="search"] { width: 100%; height: 48px; border: 1.5px solid var(--tt-line); border-radius: var(--tt-radius-s); padding: 0 110px 0 44px; font: inherit; font-size: 14px; color: var(--tt-ink); background: var(--tt-bg); transition: border-color .2s, background .2s; -webkit-appearance: none; appearance: none; }
.tt-search input[type="search"]:focus { outline: none; border-color: var(--tt-blue); background: #fff; }
.tt-search-btn { position: absolute; right: 5px; top: 5px; bottom: 5px; padding: 0 18px; background: var(--tt-blue); color: #fff; border: 0; border-radius: 6px; font-weight: 600; font-size: 14px; cursor: pointer; }
.tt-search-btn:hover { background: var(--tt-blue-d); }
.tt-search-list { position: absolute; z-index: 60; left: 0; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--tt-line); border-radius: var(--tt-radius); box-shadow: var(--tt-shadow-h); max-height: min(70vh, 520px); overflow-y: auto; padding: 6px; }
.tt-sl-head { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #667085; padding: 8px 10px 4px; font-weight: 600; }
.tt-sl-item, .tt-sl-cat { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 8px; color: var(--tt-ink); text-decoration: none; }
.tt-sl-item img { width: 44px; height: 44px; object-fit: contain; background: var(--tt-bg); border-radius: 6px; flex-shrink: 0; }
.tt-sl-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tt-sl-name { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tt-sl-sku { font-size: 12px; color: #667085; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.tt-sl-price { font-size: 13px; font-weight: 600; white-space: nowrap; }
.tt-sl-price del { color: #667085; font-weight: 400; }
.tt-sl-item[aria-selected="true"], .tt-sl-item:hover, .tt-sl-cat[aria-selected="true"], .tt-sl-cat:hover { background: var(--tt-bg); }
.tt-sl-all { display: block; width: 100%; margin-top: 4px; padding: 10px; border: 0; border-top: 1px solid var(--tt-line); background: none; color: var(--tt-blue); font-weight: 600; cursor: pointer; text-align: left; }
.tt-sl-empty { padding: 14px 12px; font-size: 14px; color: var(--tt-body); }

/* ---------------- Header actions ---------------- */
.tt-header-actions { display: flex; align-items: center; gap: 4px; justify-content: flex-end; }
.tt-hact { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--tt-radius-s); color: var(--tt-ink) !important; font-size: 14px; font-weight: 500; text-decoration: none !important; }
.tt-hact:hover { background: var(--tt-bg); }
.tt-cart-count { position: absolute; top: 2px; left: 24px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--tt-blue); color: #fff; font-size: 10px; font-weight: 700; display: none; place-items: center; border: 2px solid #fff; line-height: 1; }
.tt-cart-count.has-items { display: grid; }
@media (max-width: 767px) { .tt-hact-label { display: none; } .tt-search input[type="search"] { height: 44px; padding-right: 16px; } .tt-search-btn { display: none; } }

/* ---------------- Category & brand grids ---------------- */
.tt-cat-grid, .tt-brand-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(var(--tt-cols, 6), minmax(0, 1fr)); gap: 16px; }
.tt-cat { display: flex; flex-direction: column; align-items: center; gap: 12px; height: 100%; padding: 20px 12px 18px; background: #fff; border: 1px solid var(--tt-line); border-radius: var(--tt-radius); text-align: center; text-decoration: none !important; transition: border-color .2s, box-shadow .2s, transform .2s; }
.tt-cat:hover { border-color: #B9CFF8; box-shadow: var(--tt-shadow-h); transform: translateY(-2px); }
.tt-cat-media { width: 96px; height: 96px; border-radius: 50%; background: var(--tt-bg); display: grid; place-items: center; overflow: hidden; color: var(--tt-navy); transition: background .2s, color .2s; }
.tt-cat:hover .tt-cat-media { background: #EAF1FE; color: var(--tt-blue); }
.tt-cat-media img { width: 100%; height: 100%; object-fit: cover; }
.tt-cat-icon .tt-ico { width: 44px; height: 44px; stroke-width: 1.4; }
.tt-cat-name { font-size: 14px; font-weight: 600; color: var(--tt-ink); line-height: 1.35; }
.tt-brand { height: 84px; display: grid; place-items: center; padding: 12px; background: #fff; border: 1px solid var(--tt-line); border-radius: var(--tt-radius); font-weight: 700; font-size: 17px; color: #3D4A63 !important; text-decoration: none !important; transition: border-color .2s, color .2s, box-shadow .2s; }
.tt-brand img { max-height: 48px; width: auto; object-fit: contain; }
.tt-brand:hover { border-color: var(--tt-blue); color: var(--tt-blue) !important; box-shadow: var(--tt-shadow); }
.tt-disclaimer { font-size: 12px; color: #667085; margin-top: 14px; }
@media (max-width: 1180px) { .tt-cat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } .tt-brand-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 767px) {
	.tt-cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
	.tt-cat { padding: 14px 6px; gap: 8px; }
	.tt-cat-media { width: 64px; height: 64px; }
	.tt-cat-icon .tt-ico { width: 30px; height: 30px; }
	.tt-cat-name { font-size: 12.5px; }
	.tt-brand-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.tt-brand { height: 64px; font-size: 15px; }
}
@media (max-width: 380px) { .tt-cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------------- Product card extras ---------------- */
.tt-loop-sku { display: block; font-size: 12px; color: #667085; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; margin: 2px 0 6px; }
.tt-stock { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; color: var(--tt-green); margin-bottom: 8px; }
.tt-stock::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.tt-stock--low { color: var(--tt-warn); }
.tt-stock--out { color: #667085; }
.woocommerce span.onsale.tt-sale, .tt-sale { background: var(--tt-red); color: #fff; border-radius: 5px; font-size: 12px; font-weight: 700; line-height: 1; min-height: 0; min-width: 0; padding: 5px 9px; top: 12px; left: 12px; right: auto; margin: 0; }
.tt-sale-end { font-size: 13px; color: var(--tt-warn); margin: 4px 0 12px; }
.tt-free { color: var(--tt-green); font-weight: 700; }

/* Section head used by [tt_sale_section] */
.tt-sec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 28px; }
.tt-sec-title { margin: 0; }
.tt-sec-sub { margin: 6px 0 0; }
.tt-link-arrow { color: var(--tt-blue); font-weight: 600; font-size: 14px; white-space: nowrap; text-decoration: none; }
@media (max-width: 767px) { .tt-sec-head { flex-direction: column; align-items: flex-start; gap: 10px; } }

/* Sub-category chips */
.tt-subcats ul, .tt-subcats-list { list-style: none; margin: 0 0 20px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tt-subcats a, .tt-subcats-list a { display: inline-block; padding: 7px 14px; border: 1px solid var(--tt-line); border-radius: 999px; font-size: 14px; color: var(--tt-ink); background: #fff; text-decoration: none; transition: border-color .2s, color .2s; }
.tt-subcats a:hover, .tt-subcats-list a:hover { border-color: var(--tt-blue); color: var(--tt-blue); }
.tt-no-results { margin-top: 16px; }

/* ---------------- Filters ---------------- */
.tt-filters-toggle { display: none; align-items: center; gap: 8px; padding: 10px 16px; border: 1.5px solid var(--tt-line); border-radius: var(--tt-radius-s); background: #fff; color: var(--tt-ink); font-weight: 600; cursor: pointer; }
.tt-badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; border-radius: 10px; background: var(--tt-blue); color: #fff; font-size: 11px; padding: 0 6px; }
.tt-filter-panel-head { display: none; }
.tt-fgroup { border: 0; border-bottom: 1px solid var(--tt-line); padding: 0 0 16px; margin: 0 0 16px; min-width: 0; }
.tt-fgroup legend { font-weight: 700; color: var(--tt-ink); font-size: 14px; padding: 0; margin-bottom: 10px; }
.tt-fgroup label { display: flex; align-items: center; gap: 8px; font-size: 14px; padding: 4px 0; cursor: pointer; color: var(--tt-ink); }
.tt-fgroup input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--tt-blue); }
.tt-fgroup details summary { cursor: pointer; font-weight: 600; font-size: 14px; padding: 4px 0; color: var(--tt-ink); }
.tt-fgroup details label { padding-left: 16px; }
.tt-fscroll { max-height: 280px; overflow-y: auto; }
.tt-count { color: #667085; font-size: 12px; }
.tt-price-row { display: flex; align-items: center; gap: 8px; }
.tt-price-row input { width: 100%; height: 40px; border: 1.5px solid var(--tt-line); border-radius: 6px; padding: 0 10px; font: inherit; }
.tt-filter-actions { display: flex; align-items: center; gap: 14px; }
.tt-reset { font-size: 14px; color: var(--tt-blue); font-weight: 600; }
.tt-active-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; }
.tt-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: #EAF1FE; color: var(--tt-blue) !important; font-size: 13px; font-weight: 600; text-decoration: none !important; }
@media (max-width: 1024px) {
	.tt-filters-toggle { display: inline-flex; }
	.tt-filter-panel { position: fixed; z-index: 1000; inset: 0 auto 0 0; width: min(360px, 90vw); background: #fff; padding: 0 20px 24px; overflow-y: auto; transform: translateX(-100%); transition: transform .25s; box-shadow: var(--tt-shadow-h); visibility: hidden; }
	.tt-filters.is-open .tt-filter-panel { transform: none; visibility: visible; }
	.tt-filter-panel-head { display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; background: #fff; padding: 16px 0; margin-bottom: 8px; border-bottom: 1px solid var(--tt-line); z-index: 1; }
	.tt-filters-close { font-size: 28px; line-height: 1; background: none; border: 0; cursor: pointer; color: var(--tt-ink); width: 40px; height: 40px; }
	.tt-filter-actions { position: sticky; bottom: -24px; background: #fff; padding: 12px 0; }
	.tt-filter-actions .tt-btn { flex: 1; }
}

/* ---------------- Device finder ---------------- */
.tt-finder { background: var(--tt-navy); color: #B7C3DD; border-radius: var(--tt-radius); padding: 32px; }
.tt-finder-title { color: #fff; margin: 0 0 18px; font-size: 22px; }
.tt-finder label { display: block; font-size: 12px; font-weight: 600; color: #DCE4F5; margin: 0 0 6px; letter-spacing: .02em; }
.tt-finder select { width: 100%; height: 46px; border-radius: var(--tt-radius-s); border: 1px solid rgba(255,255,255,.18); background-color: #132B63; color: #fff; padding: 0 14px; font: inherit; font-size: 14px; margin-bottom: 14px; }
.tt-finder .tt-btn { width: 100%; margin-top: 4px; }
.tt-finder-note { font-size: 12px; color: #8FA0C4; margin: 14px 0 0; }

/* ---------------- Single product ---------------- */
.tt-compat-notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; margin: 12px 0 18px; background: #FFF6E5; border: 1px solid #F5DDB0; border-radius: var(--tt-radius-s); color: #7A3E06; font-size: 14px; font-weight: 500; }
.tt-compat-notice svg { flex-shrink: 0; margin-top: 1px; }
.tt-product-meta { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 0 0 12px; font-size: 13px; }
.tt-product-meta > div { display: flex; gap: 6px; }
.tt-product-meta dt { color: #667085; font-weight: 400; }
.tt-product-meta dd { margin: 0; color: var(--tt-ink); font-weight: 600; }
.tt-compat-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin-top: 12px; }
.tt-compat-group h3 { font-size: 15px; margin: 0 0 6px; }
.tt-compat-group ul, .tt-included { margin: 0; padding-left: 18px; }

/* ---------------- Rewards ---------------- */
.tt-rewards { display: grid; gap: 12px; padding: 14px 16px; background: var(--tt-bg); border-radius: var(--tt-radius-s); margin-bottom: 16px; }
.tt-reward-msg { margin: 0 0 6px; font-size: 13px; color: var(--tt-ink); }
.tt-reward-check { color: var(--tt-bar-done, #16865C); font-weight: 700; }
.tt-reward-track { height: 6px; border-radius: 3px; background: var(--tt-bar-track, #E5E9F0); overflow: hidden; }
.tt-reward-track span { display: block; height: 100%; background: var(--tt-bar, #1266F1); border-radius: 3px; transition: width .35s ease; }
.tt-reward.is-done .tt-reward-track span { background: var(--tt-bar-done, #16865C); }
.tt-claim-gift { justify-self: start; background: none; border: 1.5px solid var(--tt-blue); color: var(--tt-blue); border-radius: 6px; padding: 6px 12px; font-weight: 600; font-size: 13px; cursor: pointer; }
.tt-rewards--cart { margin-bottom: 24px; }

/* ---------------- Side cart drawer ---------------- */
.tt-drawer { position: fixed; inset: 0; z-index: 9999; }
.tt-drawer[hidden] { display: none; }
.tt-drawer__overlay { position: absolute; inset: 0; background: rgba(11,31,77,.5); opacity: 0; transition: opacity .22s; }
.tt-drawer__panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(420px, 100vw); background: #fff; display: flex; flex-direction: column; transform: translateX(100%); transition: transform .22s ease; outline: none; box-shadow: -8px 0 32px rgba(11,31,77,.18); }
.tt-drawer.is-open .tt-drawer__overlay { opacity: 1; }
.tt-drawer.is-open .tt-drawer__panel { transform: none; }
.tt-drawer__head { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--tt-line); }
.tt-drawer__head h2 { margin: 0; font-size: 18px; color: var(--tt-navy); }
.tt-drawer__close { width: 40px; height: 40px; font-size: 28px; line-height: 1; border: 0; background: none; color: var(--tt-ink); cursor: pointer; border-radius: 8px; }
.tt-drawer__close:hover { background: var(--tt-bg); }
.tt-drawer__msg { display: none; margin: 12px 20px 0; padding: 10px 12px; border-radius: 6px; background: #FDECEA; color: #8A1F17; font-size: 13px; }
.tt-drawer__msg.is-visible { display: block; }
.tt-drawer__content { flex: 1; display: flex; flex-direction: column; min-height: 0; overflow-y: auto; padding: 16px 20px 0; }
.tt-drawer.is-busy .tt-drawer__content { opacity: .6; pointer-events: none; }
.tt-drawer__loading { padding: 24px 0; color: var(--tt-body); }
.tt-drawer__empty { text-align: center; padding: 40px 0; color: var(--tt-body); }
.tt-drawer__empty .tt-ico { width: 48px; height: 48px; margin: 0 auto 12px; color: #B5BECE; }
.tt-drawer__items { list-style: none; margin: 0; padding: 0; flex: 1; }
.tt-ci { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--tt-line); }
.tt-ci__img { width: 72px; height: 72px; flex-shrink: 0; background: var(--tt-bg); border-radius: 8px; overflow: hidden; }
.tt-ci__img img { width: 100%; height: 100%; object-fit: contain; }
.tt-ci__body { flex: 1; min-width: 0; }
.tt-ci__name { display: block; font-weight: 600; font-size: 14px; color: var(--tt-ink) !important; line-height: 1.35; text-decoration: none !important; }
.tt-ci__meta, .tt-ci__sku { font-size: 12px; color: #667085; }
.tt-ci__meta dl { margin: 2px 0; }
.tt-ci__meta dt, .tt-ci__meta dd { display: inline; margin: 0; }
.tt-ci__meta dd p { display: inline; margin: 0; }
.tt-ci__row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 8px; }
.tt-ci__price { font-weight: 700; color: var(--tt-ink); font-size: 14px; }
.tt-ci__remove { margin-top: 6px; padding: 0; border: 0; background: none; color: #667085; font-size: 12px; text-decoration: underline; cursor: pointer; }
.tt-ci__remove:hover { color: var(--tt-red); }
.tt-ci--gift { background: linear-gradient(90deg, #EFFAF5, transparent); }
.tt-gift-badge { font-size: 12px; font-weight: 700; color: var(--tt-green); background: #E3F5EC; padding: 3px 8px; border-radius: 5px; }
.tt-qty { display: inline-flex; align-items: center; border: 1.5px solid var(--tt-line); border-radius: 8px; overflow: hidden; }
.tt-qty button { width: 34px; height: 34px; border: 0; background: #fff; font-size: 18px; cursor: pointer; color: var(--tt-ink); }
.tt-qty button:hover { background: var(--tt-bg); }
.tt-qty input { width: 42px; height: 34px; border: 0; text-align: center; font: inherit; font-weight: 600; -moz-appearance: textfield; padding: 0; }
.tt-qty input::-webkit-outer-spin-button, .tt-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.tt-drawer__foot { position: sticky; bottom: 0; background: #fff; padding: 16px 0 20px; border-top: 1px solid var(--tt-line); margin-top: auto; }
.tt-totals { margin: 0 0 6px; }
.tt-totals > div { display: flex; justify-content: space-between; font-size: 15px; padding: 2px 0; }
.tt-totals dt { color: var(--tt-ink); font-weight: 600; }
.tt-totals dd { margin: 0; font-weight: 700; color: var(--tt-ink); }
.tt-discount dd { color: var(--tt-green); }
.tt-drawer__note { font-size: 12px; color: #667085; margin: 0 0 14px; }
.tt-drawer__links { display: flex; justify-content: space-between; margin-top: 12px; font-size: 14px; }
.tt-drawer__links a, .tt-drawer__links button { color: var(--tt-blue); font-weight: 600; background: none; border: 0; padding: 0; cursor: pointer; font-size: 14px; }
@media (max-width: 480px) { .tt-drawer__panel { width: 100vw; } }

/* ---------------- Contact / social / WhatsApp ---------------- */
.tt-contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.tt-contact-list li { display: flex; gap: 10px; align-items: flex-start; }
.tt-contact-list .tt-ico { width: 18px; height: 18px; color: var(--tt-blue); margin-top: 2px; }
.tt-contact-list a { color: inherit; }
.tt-social { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tt-social a { display: inline-block; padding: 6px 12px; border: 1px solid currentColor; border-radius: 8px; font-size: 13px; font-weight: 600; color: inherit; opacity: .85; text-decoration: none; }
.tt-social a:hover { opacity: 1; }
.tt-wa-float { position: fixed; right: 20px; bottom: 20px; z-index: 900; width: 56px; height: 56px; border-radius: 50%; background: #1FA855; color: #fff; display: grid; place-items: center; box-shadow: var(--tt-shadow-h); }
.tt-wa-float .tt-ico { width: 28px; height: 28px; }

@media (prefers-reduced-motion: reduce) {
	.tt-drawer__panel, .tt-drawer__overlay, .tt-filter-panel, .tt-cat, .tt-reward-track span { transition: none !important; }
}
