/*
Theme Name: getloqta
Theme URI: https://getloqta.com
Author: getloqta
Description: Arabic-first, mobile-first WooCommerce storefront for getloqta.com. Classic theme, RTL, cash on delivery. Pairs with the getloqta-cod plugin.
Version: 1.0.0
Requires at least: 6.3
Tested up to: 6.8
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: getloqta
Tags: e-commerce, rtl-language-support, custom-logo
WC requires at least: 8.0
*/

/* ---------- Tokens ---------- */
:root {
	--violet: #5A2DF5;
	--lime: #C7F23A;
	--lavender: #F6F2FF;
	--ink: #1E1650;
	--deep: #2A0F9E;
	--deep-2: #3A1DB0;
	--muted: #4A3D8F;
	--muted-2: #6B6790;
	--border: #DCD2FF;
	--border-2: #E4DCFF;
	--field-border: #8A7ED0; /* form field edges: 3.5:1 on white (WCAG 1.4.11); #DCD2FF is only 1.4:1 */
	--white: #FFFFFF;

	--font-display: "Baloo Bhaijaan 2", "Cairo", system-ui, sans-serif;
	--font-body: "Cairo", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;

	--radius-sm: 10px;
	--radius: 14px;
	--radius-lg: 22px;
	--gutter: 16px;
	--maxw: 1200px;
	--tap: 44px;
	--bottom-nav-h: 64px;
	--shadow: 0 6px 24px rgba(42, 15, 158, .10);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--white);
	color: var(--ink);
	font-family: var(--font-body);
	font-weight: 500;
	font-size: 16px;
	line-height: 1.7;
	overflow-x: clip;
	padding-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px));
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--violet); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--deep); }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 800; line-height: 1.25; margin: 0 0 .5em; color: var(--ink); }
p { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; border-radius: 6px; }
.screen-reader-text, .sr-only {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link:focus {
	position: fixed; inset-inline-start: 8px; top: 8px; z-index: 1000; width: auto; height: auto; clip: auto;
	background: var(--ink); color: var(--white); padding: 10px 16px; border-radius: var(--radius-sm);
}
.ltr { direction: ltr; unicode-bidi: isolate; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- Wordmark + mark ---------- */
.wordmark {
	display: inline-flex; align-items: center; gap: 4px;
	font-family: "Baloo Bhaijaan 2", system-ui, sans-serif; font-weight: 800; font-size: 26px; line-height: 1;
	color: var(--ink); text-decoration: none; direction: ltr; white-space: nowrap;
}
.wordmark__get { font-weight: 500; }
.wordmark__pill {
	display: inline-block; background: var(--lime); color: var(--ink);
	border-radius: 12px; padding: 4px 10px 2px; transform: rotate(-2deg);
}
.wordmark--invert { color: var(--white); }
.wordmark--invert .wordmark__pill { color: var(--ink); }
.logo-mark { width: 36px; height: 36px; flex: none; }

/* ---------- Buttons ---------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 52px; padding: 0 24px; border: 0; border-radius: var(--radius);
	font-family: var(--font-display); font-weight: 800; font-size: 18px; line-height: 1;
	text-decoration: none; cursor: pointer; transition: transform .15s ease, background-color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn--lime { background: var(--lime); color: var(--ink); }
.btn--lime:hover { background: #B8E42A; color: var(--ink); }
.btn--violet { background: var(--violet); color: var(--white); }
.btn--violet:hover { background: var(--deep-2); color: var(--white); }
.btn--block { width: 100%; }

.icon-btn {
	display: inline-grid; place-items: center; position: relative;
	width: var(--tap); height: var(--tap); min-width: var(--tap);
	border: 0; border-radius: 12px; background: var(--lavender); color: var(--ink);
	cursor: pointer; text-decoration: none;
}
.icon-btn:hover { background: var(--border-2); color: var(--ink); }
.icon-btn svg { width: 22px; height: 22px; }
.badge-count {
	position: absolute; top: -4px; inset-inline-end: -4px;
	min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px;
	background: var(--violet); color: var(--white);
	font: 800 12px/20px var(--font-display); text-align: center;
}
.badge-count[data-count="0"] { display: none; }

/* ---------- Announcement + header ---------- */
.announce {
	background: var(--lime); color: var(--ink); text-align: center;
	font-weight: 700; font-size: 14px; line-height: 1.4; padding: 9px var(--gutter);
}
.site-header {
	position: sticky; top: 0; z-index: 50;
	background: var(--white); border-bottom: 1px solid var(--border-2);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.header-inner--product { display: grid; grid-template-columns: var(--tap) 1fr var(--tap); }
.header-inner--product .brand { justify-self: center; }
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.header-actions .desktop-only { display: none; }
.icon-btn--back svg { transform: scaleX(1); }

.site-search { border-top: 1px solid var(--border-2); padding-block: 12px; }
.site-search[hidden] { display: none; }
.search-form { display: flex; gap: 8px; }
.search-form input[type="search"] {
	flex: 1; min-width: 0; height: 48px; padding: 0 14px;
	border: 2px solid var(--field-border); border-radius: var(--radius); background: var(--white);
}
.search-form input[type="search"]:focus { border-color: var(--violet); outline: none; }
.search-form .btn { min-height: 48px; padding: 0 18px; font-size: 16px; }

/* ---------- Hero ---------- */
.hero {
	position: relative; overflow: hidden; isolation: isolate;
	background: var(--violet); color: var(--white);
	padding-block: 32px 40px;
}
.hero__inner { position: relative; z-index: 1; }
.hero__copy { position: relative; z-index: 1; max-width: 560px; }
.pill {
	display: inline-flex; align-items: center; gap: 6px;
	padding: 6px 14px; border-radius: 999px; font-weight: 700; font-size: 14px; line-height: 1.4;
}
.pill--on-violet { background: var(--deep); color: var(--lime); }
.hero h1 { color: var(--white); font-size: clamp(44px, 13vw, 76px); margin: 14px 0 8px; }
.hero__sub { font-size: 18px; color: var(--white); max-width: 28ch; margin-bottom: 22px; }
.hero__tag {
	position: absolute; z-index: 0; pointer-events: none;
	/* Mobile: tucked into the empty bottom corner beside the button, never behind the text. */
	width: 150px; height: 150px; inset-inline-end: -30px; bottom: -44px;
	transform: rotate(18deg);
}
.hero__tag svg { width: 100%; height: 100%; }

/* ---------- Chips ---------- */
.chips {
	display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
	padding: 16px var(--gutter); margin: 0; list-style: none;
	scroll-snap-type: x proximity; overscroll-behavior-x: contain;
}
.chips::-webkit-scrollbar { display: none; }
.chips li { flex: none; scroll-snap-align: start; }
.chip {
	display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 18px;
	border: 2px solid var(--border); border-radius: 999px; background: var(--white);
	color: var(--ink); font-weight: 700; text-decoration: none; white-space: nowrap;
}
.chip:hover { border-color: var(--violet); color: var(--ink); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: var(--white); }

/* ---------- Sections ---------- */
.section { padding-block: 8px 28px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.section-head h2 { font-size: 24px; margin: 0; }
.countdown {
	display: inline-flex; align-items: center; gap: 6px;
	background: var(--ink); color: var(--lime); border-radius: 999px; padding: 6px 12px;
	font: 800 14px/1.3 var(--font-display);
}
.countdown[hidden] { display: none; }
.countdown svg { width: 16px; height: 16px; }
.countdown__time { direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; }
.section-note { color: var(--muted-2); font-size: 14px; margin: -6px 0 14px; }

/* ---------- Product grid + cards ---------- */
.product-grid, .woocommerce ul.products.product-grid {
	display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px;
	list-style: none; margin: 0; padding: 0;
}
.woocommerce ul.products.product-grid::before, .woocommerce ul.products.product-grid::after { display: none; }
.woocommerce ul.products.product-grid li.product { width: auto; margin: 0; float: none; padding: 0; }
.card {
	position: relative; display: flex; flex-direction: column; height: 100%;
	background: var(--white); border: 1px solid var(--border-2); border-radius: var(--radius-lg);
	overflow: hidden;
}
.card__link { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; }
.card__media { aspect-ratio: 1 / 1; background: var(--lavender); display: grid; place-items: center; overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__body { padding: 10px 12px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card__title {
	font-family: var(--font-body); font-weight: 700; font-size: 15px; line-height: 1.5; margin: 0; color: var(--ink);
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card__price { margin-top: auto; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price-now { font-family: var(--font-display); font-weight: 800; color: var(--violet); font-size: 19px; line-height: 1.2; }
.price-was { color: var(--muted-2); font-size: 14px; text-decoration: line-through; text-decoration-thickness: 1.5px; }
.price-from { font-size: 13px; color: var(--muted); font-weight: 700; }
.discount-badge {
	position: absolute; top: 10px; inset-inline-start: 10px; z-index: 1;
	background: var(--violet); color: var(--white); border-radius: 999px; padding: 4px 10px;
	font: 800 13px/1.3 var(--font-display);
}
.card__oos { font-size: 13px; color: var(--muted); font-weight: 700; }

/* ---------- Trust strip ---------- */
.trust { background: var(--lavender); padding-block: 20px; }
.trust__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.trust__item { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; font-weight: 700; font-size: 14px; line-height: 1.4; color: var(--ink); }
.trust__item a { color: inherit; text-decoration: none; display: contents; }
.trust__icon { width: 48px; height: 48px; border-radius: 14px; background: var(--white); display: grid; place-items: center; color: var(--violet); border: 1px solid var(--border-2); }
.trust__icon svg { width: 24px; height: 24px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--violet); color: var(--white); padding-block: 32px 28px; }
.site-footer a { color: var(--white); }
.footer-grid { display: grid; gap: 20px; }
.footer-slogan { margin: 10px 0 0; font-family: var(--font-display); font-weight: 800; font-size: 20px; }
.footer-tagline { margin: 0; opacity: .9; font-size: 14px; direction: ltr; text-align: end; unicode-bidi: isolate; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.footer-links a { display: inline-flex; min-height: var(--tap); align-items: center; text-decoration: none; font-weight: 700; }
.footer-links a:hover { text-decoration: underline; }
.footer-copy { border-top: 1px solid rgba(255, 255, 255, .2); padding-top: 16px; font-size: 13px; opacity: .9; }

/* ---------- Bottom nav ---------- */
.bottom-nav {
	position: fixed; inset-inline: 0; bottom: 0; z-index: 60;
	background: var(--white); border-top: 1px solid var(--border-2);
	padding-bottom: env(safe-area-inset-bottom, 0px);
	box-shadow: 0 -4px 20px rgba(42, 15, 158, .06);
}
.bottom-nav ul { list-style: none; margin: 0 auto; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); max-width: 560px; }
.bottom-nav a {
	position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
	height: var(--bottom-nav-h); color: var(--muted-2); text-decoration: none; font-size: 12px; font-weight: 700;
}
.bottom-nav a svg { width: 24px; height: 24px; }
.bottom-nav a[aria-current="page"] { color: var(--violet); }
.bottom-nav a[aria-current="page"]::before {
	content: ""; position: absolute; top: 0; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--violet);
}
.bottom-nav .badge-count { top: 6px; inset-inline-end: calc(50% - 22px); }

/* ---------- WhatsApp float ---------- */
.wa-float {
	position: fixed; z-index: 55; inset-inline-start: auto; inset-inline-end: 16px;
	bottom: calc(var(--bottom-nav-h) + 16px + env(safe-area-inset-bottom, 0px));
	width: 56px; height: 56px; border-radius: 50%;
	background: #1F8F4E; color: var(--white); display: grid; place-items: center;
	box-shadow: var(--shadow); text-decoration: none;
}
.wa-float:hover { background: #18773F; color: var(--white); }
.wa-float svg { width: 30px; height: 30px; }
body.single-product .wa-float { bottom: calc(84px + 16px + env(safe-area-inset-bottom, 0px)); }

/* ---------- Generic page content ---------- */
.page-content { padding-block: 24px 40px; }
.page-content > h1, .page-title { font-size: 28px; }
.entry-content > * { max-width: 100%; }
.notice-box { background: var(--lavender); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }

/* ---------- Product page ---------- */
.pp { padding-bottom: 24px; }
.pp-grid { display: grid; gap: 0; padding-inline: 0; }
.pp-media { position: relative; background: var(--lime); height: 380px; overflow: hidden; }
.pp-track {
	display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
	overscroll-behavior-x: contain;
}
.pp-track::-webkit-scrollbar { display: none; }
.pp-slide { flex: 0 0 100%; height: 100%; scroll-snap-align: center; display: grid; place-items: center; padding: 28px; }
.pp-slide img { max-height: 100%; width: auto; max-width: 100%; object-fit: contain; border-radius: var(--radius); }
.pp-media .discount-badge { top: 16px; inset-inline-start: 16px; font-size: 15px; padding: 6px 14px; }
.pp-dots { position: absolute; bottom: 12px; inset-inline: 0; display: flex; justify-content: center; gap: 0; }
.pp-dot {
	width: 28px; height: 28px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center;
}
.pp-dot::before { content: ""; width: 8px; height: 8px; border-radius: 99px; background: rgba(30, 22, 80, .35); transition: width .2s; }
.pp-dot[aria-current="true"]::before { width: 22px; background: var(--ink); }

.pp-info { padding: 20px var(--gutter) 0; }
.pp-title { font-size: 28px; font-weight: 800; line-height: 1.3; margin: 0 0 10px; }
.pp-price { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 12px; margin-bottom: 18px; }
.pp-price .price-now { font-size: 40px; line-height: 1.1; }
.pp-price .price-was { font-size: 18px; }
.save-badge { background: var(--lime); color: var(--ink); border-radius: 999px; padding: 4px 12px; font: 800 14px/1.4 var(--font-display); }

.delivery-box {
	background: var(--lavender); border: 1px solid var(--border-2); border-radius: var(--radius);
	padding: 14px 16px; display: grid; gap: 10px; margin-bottom: 18px;
}
.delivery-box p { margin: 0; display: flex; gap: 10px; align-items: flex-start; font-weight: 700; color: var(--ink); line-height: 1.5; }
.delivery-box p span.sub { font-weight: 500; color: var(--muted); }
.delivery-box svg { width: 22px; height: 22px; flex: none; color: var(--violet); margin-top: 1px; }

.benefits { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 10px; }
.benefits li { display: flex; gap: 10px; align-items: flex-start; line-height: 1.5; }
.check-circle { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--lime); color: var(--ink); display: grid; place-items: center; }
.check-circle svg { width: 16px; height: 16px; }

.pp-oos { background: var(--lavender); border-radius: var(--radius); padding: 16px; font-weight: 700; }
.pp-details { border-top: 1px solid var(--border-2); margin-top: 24px; }
.pp-details summary { cursor: pointer; min-height: 52px; display: flex; align-items: center; font: 800 18px/1.3 var(--font-display); list-style-position: inside; }
.pp-details .entry-content { padding-bottom: 12px; color: var(--ink); }

/* Fallback add-to-cart (variable products / plugin inactive) */
.pp-fallback-cart form.cart { display: grid; gap: 12px; }
.pp-fallback-cart .single_add_to_cart_button { min-height: 58px; border-radius: var(--radius) !important; background: var(--violet) !important; color: var(--white) !important; font-family: var(--font-display) !important; font-weight: 800 !important; font-size: 18px !important; width: 100%; }
.pp-fallback-cart table.variations select { min-height: 52px; border: 2px solid var(--field-border); border-radius: var(--radius); padding: 0 12px; width: 100%; }

/* ---------- WooCommerce general tidy ---------- */
.woocommerce-breadcrumb { font-size: 13px; color: var(--muted-2); padding-top: 8px; }
.woocommerce .woocommerce-result-count, .woocommerce .woocommerce-ordering { margin: 0 0 12px; font-size: 14px; color: var(--muted); }
.woocommerce .woocommerce-ordering select { min-height: var(--tap); border: 2px solid var(--field-border); border-radius: 12px; padding: 0 10px; }
.woocommerce-pagination ul { display: flex; gap: 6px; justify-content: center; list-style: none; padding: 0; border: 0 !important; }
.woocommerce-pagination ul li { border: 0 !important; }
.woocommerce-pagination a, .woocommerce-pagination span { min-width: var(--tap); min-height: var(--tap); display: grid; place-items: center; border-radius: 12px; }
.woocommerce a.button, .woocommerce button.button, .woocommerce input.button, .woocommerce #respond input#submit,
.wc-block-components-button:not(.is-link) {
	background: var(--violet); color: var(--white); border-radius: var(--radius); font-family: var(--font-display); font-weight: 800; min-height: 48px;
}
.woocommerce a.button:hover, .woocommerce button.button:hover { background: var(--deep-2); color: var(--white); }
.woocommerce a.button.alt, .woocommerce button.button.alt { background: var(--violet); color: var(--white); }
.woocommerce-message, .woocommerce-info, .woocommerce-error { border-top-color: var(--violet); background: var(--lavender); color: var(--ink); }
.woocommerce form .form-row input.input-text, .woocommerce form .form-row textarea, .woocommerce form .form-row select {
	min-height: 52px; border: 2px solid var(--field-border); border-radius: var(--radius); padding: 10px 14px; background: var(--white);
}
.woocommerce-shop-head { padding-top: 16px; }
.woocommerce-shop-head h1 { font-size: 28px; margin: 0; }

/* ---------- Tablet / desktop ---------- */
@media (min-width: 640px) {
	.product-grid, .woocommerce ul.products.product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
	.footer-grid { grid-template-columns: 1fr 1fr; align-items: start; }
}
@media (min-width: 960px) {
	body { padding-bottom: 0; }
	.bottom-nav { display: none; }
	.header-actions .desktop-only { display: inline-grid; }
	.wa-float, body.single-product .wa-float { bottom: 24px; }
	.chips { max-width: var(--maxw); margin-inline: auto; flex-wrap: wrap; overflow: visible; }

	.hero { padding-block: 64px 72px; }
	.hero__inner { display: grid; grid-template-columns: 1.2fr 1fr; align-items: center; gap: 32px; }
	.hero__tag { position: relative; inset: auto; width: 340px; height: 340px; justify-self: center; transform: rotate(14deg); }

	.product-grid, .woocommerce ul.products.product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }

	.pp { padding-top: 28px; }
	.pp-grid { grid-template-columns: 1fr 1fr; gap: 40px; padding-inline: var(--gutter); align-items: start; }
	.pp-media { position: sticky; top: 88px; height: 520px; border-radius: var(--radius-lg); }
	.pp-info { padding: 0; }
	.pp-title { font-size: 34px; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition: none !important; animation: none !important; }
}
