/*
Theme Name: Oncetech
Description: ICT storefront theme for WooCommerce. Pairs with the Oncetech Feeds plugin.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.0
Text Domain: oncetech
WC requires at least: 8.5
*/

:root {
	--ink: #0D1B2A;
	--ink-2: #16283D;
	--ground: #F3F5F8;
	--surface: #FFFFFF;
	--line: #E2E7EE;
	--line-2: #CBD3DD;
	--muted: #4B5563;
	--accent: #1D4ED8;
	--accent-soft: #EAF0FF;
	--accent-on-dark: #93B4FF;
	--warm: #C2410C;
	--warm-soft: #FFF4EC;
	--ok: #15803D;
	--radius: 14px;
	--font: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
	--display: Archivo, Inter, system-ui, sans-serif;
	--wrap: 1320px;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 400 15px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; }
h1, h2, h3, h4 { font-family: var(--display); letter-spacing: -0.4px; line-height: 1.15; margin: 0 0 .5em; }
.screen-reader-text { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.skip-link:focus { left: 12px; top: 12px; width: auto; height: auto; z-index: 999; background: #fff; padding: 10px 14px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

/* ---------- Header ---------- */
.ot-util { background: var(--ink); color: #D6DEE8; font-size: 13px; }
.ot-util .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-top: 8px; padding-bottom: 8px; }
.ot-util a { color: #D6DEE8; }
.ot-util nav { display: flex; flex-wrap: wrap; gap: 20px; }
.ot-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.ot-header__row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; padding-top: 16px; padding-bottom: 16px; }
.ot-logo { display: flex; align-items: center; gap: 10px; font: 800 26px/1 var(--display); letter-spacing: -.5px; }
.ot-logo__mark { width: 36px; height: 36px; border-radius: 8px; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.ot-logo img { max-height: 40px; width: auto; }
.ot-search { flex: 1 1 420px; display: flex; height: 48px; border: 2px solid var(--ink); border-radius: 10px; overflow: hidden; background: #fff; }
.ot-search select { border: 0; border-right: 1px solid var(--line); padding: 0 12px; font: 500 14px var(--font); background: var(--ground); color: var(--ink); max-width: 38%; }
.ot-search input[type=search] { flex: 1; min-width: 0; border: 0; padding: 0 14px; font: 400 15px var(--font); outline: none; }
.ot-search button { width: 56px; border: 0; background: var(--ink); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.ot-actions { display: flex; gap: 6px; align-items: center; }
.ot-actions a { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 8px; font-size: 14px; font-weight: 500; }
.ot-actions .ot-cart { background: var(--accent); color: #fff; font-weight: 600; padding: 10px 14px; }
.ot-actions .ot-cart:hover { background: #1E40AF; color: #fff; }
.ot-nav { border-top: 1px solid var(--line); }
.ot-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; overflow-x: auto; font-size: 14px; font-weight: 600; scrollbar-width: none; }
.ot-nav li a { display: block; padding: 14px; white-space: nowrap; }
.ot-nav li:first-child a { padding-left: 0; }
.ot-nav li.menu-item--deal a, .ot-nav li.deal a { color: var(--warm); }

/* ---------- Generic blocks ---------- */
.ot-main { padding: 24px 0 64px; }
.ot-stack { display: flex; flex-direction: column; gap: 48px; }
.ot-section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.ot-section-head h2 { font-size: 28px; font-weight: 800; margin: 0; }
.ot-section-head a { font-weight: 600; font-size: 14px; color: var(--accent); }
.ot-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.ot-eyebrow { font-size: 13px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; }
.ot-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 12px 22px; border-radius: 10px; font-weight: 600; border: 1px solid transparent; cursor: pointer; font-family: var(--font); font-size: 15px; }
.ot-btn--light { background: #fff; color: var(--ink); }
.ot-btn--ghost { border-color: #4A5B70; color: #fff; }
.ot-btn--primary { background: var(--accent); color: #fff; }
.ot-btn--primary:hover { background: #1E40AF; color: #fff; }

/* Hero */
.ot-hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.ot-hero__main { grid-column: span 2; min-height: 380px; border-radius: 16px; background: var(--ink); color: #fff; display: flex; flex-wrap: wrap; overflow: hidden; }
.ot-hero__copy { flex: 1 1 300px; padding: 40px; display: flex; flex-direction: column; gap: 16px; justify-content: center; }
.ot-hero__copy .ot-eyebrow { color: var(--accent-on-dark); }
.ot-hero__copy h1 { font-size: clamp(30px, 4vw, 44px); font-weight: 800; letter-spacing: -1px; margin: 0; color: #fff; }
.ot-hero__copy p { margin: 0; color: #C9D3E0; max-width: 420px; }
.ot-hero__price { font: 800 34px var(--display); }
.ot-hero__price small { font: 400 13px var(--font); color: #C9D3E0; margin-left: 8px; }
.ot-hero__price del { color: #93A3B8; font-size: 20px; margin-right: 8px; }
.ot-hero__btns { display: flex; flex-wrap: wrap; gap: 12px; }
.ot-hero__img { flex: 1 1 300px; background: #fff; display: flex; align-items: center; justify-content: center; padding: 24px; }
.ot-hero__img img { max-height: 300px; width: auto; object-fit: contain; }
.ot-hero__side { display: flex; flex-direction: column; gap: 16px; }
.ot-promo { flex: 1; min-height: 182px; border-radius: 16px; padding: 20px; display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line); }
.ot-promo--warm { background: var(--warm-soft); border-color: #FBD9C2; }
.ot-promo__copy { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.ot-promo__copy .ot-eyebrow { font-size: 12px; color: var(--accent); }
.ot-promo--warm .ot-eyebrow { color: var(--warm); }
.ot-promo__copy strong { font: 700 22px/1.15 var(--display); }
.ot-promo__copy span:last-child { font-size: 14px; color: var(--muted); }
.ot-promo img { width: 130px; height: 130px; object-fit: contain; mix-blend-mode: multiply; }
@media (max-width: 680px) { .ot-hero__main { grid-column: auto; } .ot-hero__copy { padding: 28px 24px; } }

/* Trust */
.ot-trust { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.ot-trust > div { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: flex; gap: 12px; align-items: center; }
.ot-trust strong { display: block; font-size: 14px; }
.ot-trust span { font-size: 13px; color: var(--muted); }
.ot-trust svg { flex-shrink: 0; color: var(--accent); }

/* Category tiles */
.ot-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.ot-cat { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 18px 14px; display: flex; flex-direction: column; gap: 10px; min-height: 120px; transition: border-color .15s, transform .15s; }
.ot-cat:hover { border-color: var(--accent); transform: translateY(-2px); }
.ot-cat__mono { width: 40px; height: 40px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; font: 800 15px var(--display); }
.ot-cat strong { font-size: 14px; line-height: 1.3; }
.ot-cat span:last-child { font-size: 12px; color: var(--muted); }

/* Dark band */
.ot-band { border-radius: 16px; background: var(--ink); color: #fff; padding: 32px; display: flex; flex-wrap: wrap; gap: 24px; align-items: center; }
.ot-band__copy { flex: 1 1 280px; }
.ot-band__copy .ot-eyebrow { color: var(--accent-on-dark); }
.ot-band__copy h2 { font-size: 30px; font-weight: 800; color: #fff; margin: 8px 0; }
.ot-band__copy p { color: #C9D3E0; margin: 0; }
.ot-band__links { flex: 2 1 480px; display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.ot-band__links a { background: var(--ink-2); color: #fff; border-radius: 12px; padding: 16px; font-weight: 600; font-size: 14px; }
.ot-band__links a:hover { background: #20395A; color: #fff; }

/* Brands */
.ot-brands { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.ot-brands a { height: 64px; background: #fff; border: 1px solid var(--line); border-radius: 10px; display: flex; align-items: center; justify-content: center; font: 700 17px var(--display); color: #334155; text-align: center; padding: 0 8px; }

/* Two-up list rows */
.ot-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; }
.ot-row-list { display: flex; flex-direction: column; gap: 12px; }
.ot-row { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: flex; gap: 16px; align-items: center; }
.ot-row img { width: 110px; height: 110px; object-fit: contain; flex-shrink: 0; }
.ot-row__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ot-row__buy { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.ot-row__buy .price { font: 800 20px var(--display); white-space: nowrap; }

/* ---------- WooCommerce product cards ---------- */
.woocommerce ul.products, ul.products { list-style: none; margin: 0; padding: 0; display: grid !important; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.woocommerce ul.products::before, .woocommerce ul.products::after { display: none !important; }
.woocommerce ul.products li.product, ul.products li.product { width: auto !important; margin: 0 !important; float: none !important; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 10px; position: relative; }
ul.products li.product a.woocommerce-LoopProduct-link { display: flex; flex-direction: column; gap: 8px; flex: 1; }
ul.products li.product img { height: 190px !important; width: 100% !important; object-fit: contain; margin: 0 0 6px !important; }
ul.products li.product .ot-brand { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .8px; }
ul.products li.product .woocommerce-loop-product__title { font: 600 15px/1.35 var(--font) !important; letter-spacing: 0; padding: 0 !important; margin: 0 !important; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
ul.products li.product .price { font: 800 22px var(--display) !important; color: var(--ink) !important; margin: auto 0 0 !important; }
ul.products li.product .price del { font-size: 14px; color: var(--muted); font-weight: 500; }
ul.products li.product .price ins { text-decoration: none; }
ul.products li.product .button { min-height: 44px; border-radius: 10px !important; background: var(--accent) !important; color: #fff !important; font: 600 14px var(--font) !important; padding: 12px 16px !important; text-align: center; margin: 0 !important; }
ul.products li.product .button:hover { background: #1E40AF !important; }
ul.products li.product .onsale { position: absolute; top: 12px; left: 12px; right: auto; margin: 0; min-height: 0; min-width: 0; line-height: 1; padding: 6px 10px; border-radius: 6px; background: var(--warm); color: #fff; font-size: 12px; font-weight: 700; }
.ot-stock { font-size: 13px; font-weight: 500; }
.ot-stock--ok { color: var(--ok); }
.ot-stock--low { color: var(--warm); }
.ot-stock--out { color: var(--muted); }
.ot-stock::before { content: "\25CF  "; }

/* Archive layout */
.ot-shop { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.ot-shop__filters { flex: 1 1 240px; max-width: 100%; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.ot-shop__filters .widget { margin-bottom: 22px; font-size: 14px; }
.ot-shop__filters .widget-title, .ot-shop__filters h2 { font: 700 14px var(--font); letter-spacing: 0; margin-bottom: 10px; }
.ot-shop__filters ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ot-shop__results { flex: 999 1 560px; min-width: 0; }
.woocommerce .woocommerce-breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.woocommerce-products-header__title { font-size: 34px; font-weight: 800; letter-spacing: -.8px; }
.woocommerce .woocommerce-result-count { color: var(--muted); font-size: 14px; }
.woocommerce .woocommerce-ordering select { height: 44px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 10px; font: 500 14px var(--font); background: #fff; }
.woocommerce nav.woocommerce-pagination ul { border: 0 !important; display: flex; gap: 8px; justify-content: center; }
.woocommerce nav.woocommerce-pagination ul li { border: 0 !important; }
.woocommerce nav.woocommerce-pagination ul li a, .woocommerce nav.woocommerce-pagination ul li span { min-width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line) !important; background: #fff; display: flex !important; align-items: center; justify-content: center; font-weight: 600; }
.woocommerce nav.woocommerce-pagination ul li span.current { background: var(--ink); color: #fff; }

/* Single product */
.woocommerce div.product { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 28px; }
.woocommerce div.product .product_title { font-size: 30px; font-weight: 800; }
.woocommerce div.product p.price { font: 800 32px var(--display); color: var(--ink); }
.woocommerce div.product .stock.in-stock { color: var(--ok); font-weight: 600; }
.woocommerce div.product form.cart .button, .woocommerce .button.alt, .woocommerce #respond input#submit.alt, .woocommerce a.button.alt, .woocommerce button.button.alt { background: var(--accent) !important; color: #fff !important; border-radius: 10px !important; min-height: 48px; padding: 14px 26px !important; font-weight: 600 !important; }
.woocommerce div.product form.cart .qty { height: 48px; border-radius: 10px; border: 1px solid var(--line-2); }
.ot-branches { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 20px; }
.ot-branches span { font-size: 13px; padding: 6px 10px; border-radius: 8px; background: var(--ground); }
.ot-branches span b { color: var(--ok); }
.ot-ships { font-size: 14px; color: var(--muted); margin: 0 0 4px; }
.woocommerce div.product .woocommerce-tabs ul.tabs li { border-radius: 10px 10px 0 0; }

/* Pages */
.ot-page { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: clamp(24px, 4vw, 48px); max-width: 920px; margin: 0 auto; }
.ot-page h1 { font-size: 36px; font-weight: 800; }
.ot-page h2 { font-size: 22px; margin-top: 1.6em; }
.ot-page p, .ot-page li { line-height: 1.7; }
.ot-page table { border-collapse: collapse; width: 100%; }
.ot-page th, .ot-page td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.ot-updated { color: var(--muted); font-size: 14px; }

/* Forms (cart/checkout/account) */
.woocommerce form .form-row input.input-text, .woocommerce form .form-row textarea, .woocommerce form .form-row select { border: 1px solid var(--line-2); border-radius: 10px; padding: 12px; min-height: 44px; }
.woocommerce-message, .woocommerce-info, .woocommerce-error { border-top-color: var(--accent); background: #fff; border-radius: 10px; }

/* Footer */
.ot-footer { background: var(--ink); color: #C9D3E0; font-size: 14px; }
.ot-footer a { color: #C9D3E0; }
.ot-footer a:hover { color: #fff; }
.ot-footer__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 32px; padding-top: 48px; padding-bottom: 32px; }
.ot-footer__grid h3 { color: #fff; font: 600 15px var(--font); letter-spacing: 0; }
.ot-footer__grid ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ot-footer__brand { font: 800 22px var(--display); color: #fff; }
.ot-footer__base { border-top: 1px solid #22344A; padding-top: 18px; padding-bottom: 24px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; font-size: 13px; }
.ot-pay { display: flex; gap: 8px; flex-wrap: wrap; }
.ot-pay span { border: 1px solid #33475F; border-radius: 6px; padding: 4px 8px; font-size: 12px; font-weight: 600; color: #D6DEE8; }

/* Cookie bar */
.ot-cookie { position: fixed; left: 16px; right: 16px; bottom: 16px; max-width: 560px; background: var(--ink); color: #E2E8F0; border-radius: 14px; padding: 16px 18px; display: none; gap: 14px; align-items: center; flex-wrap: wrap; z-index: 100; font-size: 14px; box-shadow: 0 10px 30px rgba(13,27,42,.25); }
.ot-cookie.is-on { display: flex; }
.ot-cookie a { color: var(--accent-on-dark); text-decoration: underline; }
.ot-cookie p { flex: 1 1 260px; margin: 0; }
