/*
Theme Name: Quickbasket
Theme URI: https://example.com/quickbasket
Author: Your Name
Description: A fast, product-first WooCommerce theme built to turn a first glance into a purchase. Big product hero, one-click Buy now, slide-out cart, distraction-free checkout, and clean support for Paystack and other WooCommerce plugins.
Version: 1.1.0
Requires at least: 6.2
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: quickbasket
Tags: e-commerce, two-columns, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, wide-blocks
*/

/* ==========================================================================
   Tokens
   ========================================================================== */
:root {
	--qb-ink: #1b1740;
	--qb-ink-2: #55517a;
	--qb-paper: #ffffff;
	--qb-wash: #f1effb;
	--qb-stage: #dad5fa;
	--qb-line: #e3e0f2;
	--qb-cta: #ffb400;
	--qb-ok: #12805c;
	--qb-danger: #b3261e;

	--qb-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
	--qb-body: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;

	--qb-r-s: 10px;
	--qb-r-m: 14px;
	--qb-r-l: 22px;
	--qb-gap: clamp(16px, 2.4vw, 28px);
	--qb-section: clamp(40px, 6vw, 80px);
	--qb-header-h: 68px;
}

/* ==========================================================================
   Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--qb-header-h) + 16px); }

body {
	margin: 0;
	background: var(--qb-paper);
	color: var(--qb-ink);
	font-family: var(--qb-body);
	font-size: 1rem;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	overflow-x: clip;
}

img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--qb-display); line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 .5em; font-weight: 800; }
p { margin: 0 0 1em; }
ul { padding: 0; }

.container { width: min(100% - 2 * var(--qb-gap), 1240px); margin-inline: auto; }
.container--narrow { width: min(100% - 2 * var(--qb-gap), 760px); }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
	clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip-link:focus {
	clip: auto; clip-path: none; width: auto; height: auto; margin: 0; padding: 12px 18px;
	background: var(--qb-ink); color: #fff; z-index: 1000; top: 8px; left: 8px; border-radius: var(--qb-r-s);
}

:focus-visible { outline: 3px solid var(--qb-ink); outline-offset: 3px; border-radius: 4px; }

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

/* ==========================================================================
   Buttons
   ========================================================================== */
.qb-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 46px; padding: 0 22px;
	border: 2px solid var(--qb-ink); border-radius: var(--qb-r-m);
	background: transparent; color: var(--qb-ink);
	font: 700 1rem/1 var(--qb-body); text-decoration: none; cursor: pointer; white-space: nowrap;
	transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, color .15s ease;
}
.qb-btn:hover { background: var(--qb-ink); color: #fff; }

/* The one warm colour on the site: every "buy" action uses it. */
.qb-btn--buy {
	background: var(--qb-cta); color: var(--qb-ink);
	box-shadow: 0 4px 0 var(--qb-ink);
}
.qb-btn--buy:hover { background: var(--qb-cta); color: var(--qb-ink); transform: translateY(-2px); box-shadow: 0 6px 0 var(--qb-ink); }
.qb-btn--buy:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--qb-ink); }

.qb-btn--lg { min-height: 54px; padding: 0 28px; font-size: 1.0625rem; }
.qb-btn--xl { min-height: 62px; padding: 0 38px; font-size: 1.25rem; border-radius: var(--qb-r-l); }
.qb-btn--block { display: flex; width: 100%; }
.qb-btn--wide { flex: 1; }
.qb-btn--icon { width: 46px; padding: 0; flex: none; }
.qb-btn--icon.loading { opacity: .6; pointer-events: none; }
.qb-btn--icon.added { background: var(--qb-ink); color: #fff; }
.qb-btn--disabled { flex: 1; border-style: dashed; color: var(--qb-ink-2); border-color: var(--qb-line); cursor: not-allowed; }
.qb-btn--disabled:hover { background: transparent; color: var(--qb-ink-2); }

.qb-link { font-weight: 700; color: var(--qb-ink); }

.qb-iconbtn {
	position: relative; display: inline-grid; place-items: center; width: 44px; height: 44px;
	border: 0; background: transparent; color: var(--qb-ink); border-radius: 50%; cursor: pointer; text-decoration: none;
}
.qb-iconbtn:hover { background: var(--qb-wash); }

/* ==========================================================================
   Announcement + header
   ========================================================================== */
.qb-announce { background: var(--qb-ink); color: #fff; text-align: center; font-size: .9rem; font-weight: 600; }
.qb-announce p { margin: 0; padding: 8px var(--qb-gap); }

.qb-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--qb-line); }
.admin-bar .qb-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .qb-header { top: 46px; } }

.qb-header__row { display: flex; align-items: center; gap: 16px; min-height: var(--qb-header-h); }
.qb-burger { display: none; margin-left: -10px; }

.qb-brand { flex: none; }
.qb-brand__name, .qb-brand .custom-logo-link { font: 800 1.5rem/1 var(--qb-display); letter-spacing: -0.03em; text-decoration: none; display: block; }
.qb-brand .custom-logo { max-height: 44px; width: auto; }

.qb-nav { flex: 1; }
.qb-menu, .qb-menu ul { list-style: none; margin: 0; padding: 0; }
.qb-menu { display: flex; gap: 6px; flex-wrap: wrap; }
.qb-menu a { display: block; padding: 10px 14px; border-radius: var(--qb-r-s); font-weight: 600; text-decoration: none; }
.qb-menu a:hover, .qb-menu .current-menu-item > a { background: var(--qb-wash); }
.qb-menu li { position: relative; }
.qb-menu .sub-menu {
	position: absolute; left: 0; top: 100%; min-width: 200px; padding: 8px; background: #fff;
	border: 1px solid var(--qb-line); border-radius: var(--qb-r-m); box-shadow: 0 16px 40px rgba(27,23,64,.14);
	display: none; z-index: 10;
}
.qb-menu li:hover > .sub-menu, .qb-menu li:focus-within > .sub-menu { display: block; }

.qb-tools { display: flex; align-items: center; gap: 2px; margin-left: auto; }

.qb-cart-count {
	position: absolute; top: 2px; right: 0; min-width: 20px; height: 20px; padding: 0 5px;
	display: grid; place-items: center; border-radius: 10px;
	background: var(--qb-cta); color: var(--qb-ink); border: 2px solid #fff;
	font: 800 .72rem/1 var(--qb-body);
}
.qb-cart-count[data-count="0"] { display: none; }

.qb-searchbar { border-top: 1px solid var(--qb-line); background: #fff; padding: 14px 0; }
.qb-searchbar[hidden] { display: none; }

.woocommerce-product-search, .search-form { display: flex; gap: 8px; }
.woocommerce-product-search input[type="search"], .search-form input[type="search"] {
	flex: 1; min-height: 48px; padding: 0 16px; font: inherit; color: var(--qb-ink);
	border: 2px solid var(--qb-line); border-radius: var(--qb-r-m); background: #fff;
}
.woocommerce-product-search input[type="search"]:focus, .search-form input[type="search"]:focus { border-color: var(--qb-ink); outline: 0; }
.woocommerce-product-search button, .search-form .search-submit {
	min-height: 48px; padding: 0 22px; border: 2px solid var(--qb-ink); border-radius: var(--qb-r-m);
	background: var(--qb-ink); color: #fff; font: 700 1rem var(--qb-body); cursor: pointer;
}

/* Mobile navigation */
@media (max-width: 860px) {
	.qb-burger { display: inline-grid; }
	.qb-nav {
		position: absolute; left: 0; right: 0; top: 100%; display: none; flex: none;
		background: #fff; border-bottom: 1px solid var(--qb-line); padding: 8px var(--qb-gap) 16px;
		box-shadow: 0 20px 30px rgba(27,23,64,.1);
	}
	.qb-nav.is-open { display: block; }
	.qb-menu { flex-direction: column; gap: 0; }
	.qb-menu a { padding: 14px 8px; font-size: 1.1rem; }
	.qb-menu .sub-menu { position: static; display: block; box-shadow: none; border: 0; padding: 0 0 0 14px; }
	.qb-account { display: none; }
}

/* Distraction-free checkout: nothing competes with the pay button. */
.qb-focus .qb-announce,
.qb-focus .qb-nav,
.qb-focus .qb-burger,
.qb-focus .qb-searchbar,
.qb-focus [data-qb-search-toggle],
.qb-focus .qb-account,
.qb-focus .qb-footer__nav,
.qb-focus .qb-whatsapp { display: none !important; }

/* ==========================================================================
   Home: hero
   ========================================================================== */
.qb-hero { background: var(--qb-wash); overflow: hidden; }
.qb-hero__grid {
	display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: center;
	gap: clamp(24px, 5vw, 72px); padding-block: clamp(28px, 5vw, 72px);
}
.qb-hero__badge {
	display: inline-block; margin: 0 0 16px; padding: 6px 14px; border-radius: 999px;
	background: var(--qb-ink); color: #fff; font-weight: 700; font-size: .9rem;
}
.qb-hero__title { font-size: clamp(2.5rem, 6.2vw, 5.25rem); line-height: .96; letter-spacing: -0.035em; margin-bottom: 18px; text-wrap: balance; }
.qb-hero__text { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--qb-ink-2); max-width: 46ch; }

.qb-hero__buy { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin: 20px 0 26px; }
.qb-hero__price { font: 800 clamp(1.9rem, 3.6vw, 2.75rem)/1 var(--qb-display); letter-spacing: -0.03em; }
.qb-hero__price del { font-size: .55em; font-weight: 600; color: var(--qb-ink-2); margin-right: 10px; }
.qb-hero__price ins { text-decoration: none; }
.qb-hero__cta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.qb-hero__note { display: flex; align-items: center; gap: 8px; margin: 22px 0 0; font-size: .95rem; color: var(--qb-ink-2); }
.qb-hero__note .qb-icon { color: var(--qb-ok); flex: none; }

.qb-hero__stage { position: relative; display: grid; place-items: center; aspect-ratio: 1 / 1; text-decoration: none; }
.qb-hero__stage::before { content: ""; position: absolute; inset: 5%; border-radius: 50%; background: var(--qb-stage); }
.qb-hero__img {
	position: relative; width: 88%; height: 88%; object-fit: contain;
	filter: drop-shadow(0 28px 28px rgba(27,23,64,.28));
	animation: qb-pop .7s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes qb-pop { from { opacity: 0; transform: scale(.88) translateY(14px); } to { opacity: 1; transform: none; } }

/* On phones the product comes first, then the words. */
@media (max-width: 820px) {
	.qb-hero__grid { grid-template-columns: 1fr; gap: 8px; }
	.qb-hero__stage { order: -1; width: min(86%, 420px); margin-inline: auto; }
	.qb-hero__cta .qb-btn--xl { flex: 1 1 100%; }
	.qb-hero__copy { padding-bottom: 12px; }
}

/* Trust strip */
.qb-trust { border-bottom: 1px solid var(--qb-line); }
.qb-trust__list { list-style: none; margin: 0 auto; padding-block: 18px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 28px; }
.qb-trust__list li { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.qb-trust__list .qb-icon { color: var(--qb-ink); }
@media (max-width: 700px) { .qb-trust__list { flex-direction: column; align-items: flex-start; } }

/* Sections */
.qb-section { padding-block: var(--qb-section); }
.qb-section--wash { background: var(--qb-wash); }
.qb-section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.qb-section__title { font-size: clamp(1.6rem, 3vw, 2.4rem); margin: 0 0 24px; }
.qb-section__head .qb-section__title { margin: 0; }
.qb-cats { padding-bottom: 0; }

.qb-chips { list-style: none; margin: 0; padding: 2px 0 8px; display: flex; gap: 10px; overflow-x: auto; scrollbar-width: thin; }
.qb-chips a {
	display: block; white-space: nowrap; padding: 12px 22px; border: 2px solid var(--qb-ink);
	border-radius: 999px; font-weight: 700; text-decoration: none;
}
.qb-chips a:hover { background: var(--qb-ink); color: #fff; }

/* Closing call to action */
.qb-final { background: var(--qb-ink); color: #fff; padding-block: clamp(44px, 7vw, 88px); }
.qb-final :focus-visible { outline-color: var(--qb-cta); }
.qb-final__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px 40px; flex-wrap: wrap; }
.qb-final h2 { font-size: clamp(1.9rem, 4.4vw, 3.4rem); margin: 0; max-width: 18ch; }
.qb-final .qb-btn--buy { border-color: var(--qb-cta); box-shadow: 0 4px 0 rgba(255,255,255,.35); }

/* ==========================================================================
   Generic pages and blog
   ========================================================================== */
.qb-page { padding-block: clamp(24px, 4vw, 56px) var(--qb-section); }
.qb-page__title { font-size: clamp(2rem, 4.5vw, 3.2rem); margin-bottom: 24px; }
.qb-content { max-width: 100%; }
.qb-content > * + * { margin-top: 1em; }
.qb-meta { color: var(--qb-ink-2); font-size: .9rem; }
.qb-article__img { margin: 0 0 24px; border-radius: var(--qb-r-l); overflow: hidden; }
.qb-posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--qb-gap); }
.qb-post { border: 1px solid var(--qb-line); border-radius: var(--qb-r-l); padding: 20px; }
.qb-post h2 { font-size: 1.35rem; }
.qb-post h2 a { text-decoration: none; }
.qb-post__img { display: block; margin: -20px -20px 16px; overflow: hidden; border-radius: var(--qb-r-l) var(--qb-r-l) 0 0; }
.qb-404 { text-align: center; }
.qb-404 .woocommerce-product-search, .qb-404 .search-form { max-width: 480px; margin: 24px auto; }
.navigation.pagination { margin-top: 32px; }
.nav-links { display: flex; gap: 8px; flex-wrap: wrap; }
.nav-links .page-numbers { padding: 8px 14px; border: 2px solid var(--qb-line); border-radius: var(--qb-r-s); text-decoration: none; font-weight: 700; }
.nav-links .page-numbers.current { background: var(--qb-ink); color: #fff; border-color: var(--qb-ink); }

/* ==========================================================================
   Slide-out cart
   ========================================================================== */
.qb-drawer-overlay { position: fixed; inset: 0; z-index: 90; background: rgba(27,23,64,.5); opacity: 0; transition: opacity .25s ease; }
.qb-drawer-overlay.is-open { opacity: 1; }
.qb-drawer-overlay[hidden] { display: none; }

.qb-drawer {
	position: fixed; top: 0; right: 0; bottom: 0; z-index: 100; width: min(100%, 440px);
	display: flex; flex-direction: column; background: #fff;
	transform: translateX(100%); visibility: hidden;
	transition: transform .3s cubic-bezier(.2,.8,.2,1), visibility 0s linear .3s;
	box-shadow: -20px 0 50px rgba(27,23,64,.2);
}
.qb-drawer.is-open { transform: none; visibility: visible; transition-delay: 0s; }
.qb-drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 14px 24px; border-bottom: 1px solid var(--qb-line); }
.qb-drawer__head h2 { font-size: 1.4rem; margin: 0; }
.qb-drawer__body { flex: 1; display: flex; flex-direction: column; min-height: 0; padding: 0; overflow: auto; }

.qb-drawer .woocommerce-mini-cart { list-style: none; margin: 0; padding: 8px 24px; flex: 1; overflow: auto; }
.qb-drawer .woocommerce-mini-cart-item {
	position: relative; display: grid; grid-template-columns: 72px 1fr; gap: 4px 14px;
	padding: 16px 28px 16px 0; border-bottom: 1px solid var(--qb-line); font-weight: 600;
}
.qb-drawer .woocommerce-mini-cart-item img { grid-row: 1 / span 3; width: 72px; height: 72px; object-fit: cover; border-radius: var(--qb-r-s); margin: 0; float: none; }
.qb-drawer .woocommerce-mini-cart-item a:not(.remove) { text-decoration: none; }
.qb-drawer .woocommerce-mini-cart-item .quantity { color: var(--qb-ink-2); font-weight: 500; }
.qb-drawer a.remove {
	position: absolute; top: 14px; right: 0; width: 26px; height: 26px; display: grid; place-items: center;
	border-radius: 50%; background: var(--qb-wash); color: var(--qb-ink) !important; text-decoration: none; font-size: 18px; line-height: 1;
}
.qb-drawer a.remove:hover { background: var(--qb-ink); color: #fff !important; }
.qb-drawer .woocommerce-mini-cart__empty-message { padding: 40px 24px 16px; text-align: center; color: var(--qb-ink-2); margin: 0; }
.qb-drawer .woocommerce-mini-cart__total {
	display: flex; justify-content: space-between; align-items: baseline; margin: 0; padding: 16px 24px 8px;
	font-size: 1.15rem; border-top: 1px solid var(--qb-line);
}
.qb-drawer .woocommerce-mini-cart__buttons { display: grid; gap: 12px; margin: 0; padding: 8px 24px 24px; text-align: center; }
.qb-drawer .woocommerce-mini-cart__empty-message + .qb-btn { margin: 8px 24px 24px; width: calc(100% - 48px); }

.qb-ship { padding: 4px 24px 8px; }
.qb-ship p { margin: 0 0 6px; font-size: .92rem; font-weight: 600; }
.qb-ship__bar { height: 8px; border-radius: 999px; background: var(--qb-wash); overflow: hidden; }
.qb-ship__bar span { display: block; height: 100%; background: var(--qb-ok); border-radius: 999px; transition: width .4s ease; }

body.qb-lock { overflow: hidden; }

/* ==========================================================================
   Footer
   ========================================================================== */
.qb-footer { background: var(--qb-ink); color: #e9e7f7; padding-top: clamp(36px, 5vw, 64px); }
.qb-footer :focus-visible { outline-color: var(--qb-cta); }
.qb-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; padding-bottom: 32px; }
.qb-footer__name { font: 800 1.6rem/1 var(--qb-display); color: #fff; margin-bottom: 12px; }
.qb-footer__menu { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.qb-footer__menu a { text-decoration: none; }
.qb-footer__menu a:hover { text-decoration: underline; }
.qb-footer__pay p { font-weight: 700; color: #fff; }
.qb-pills { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.qb-pills li { padding: 6px 14px; border: 1.5px solid rgba(255,255,255,.4); border-radius: 999px; font-size: .9rem; font-weight: 600; }
.qb-footer__bar { border-top: 1px solid rgba(255,255,255,.18); padding-block: 18px; font-size: .9rem; }
.qb-footer__bar p { margin: 0; }
@media (max-width: 760px) { .qb-footer__grid { grid-template-columns: 1fr; } }

/* WhatsApp quick order */
.qb-whatsapp {
	position: fixed; right: 16px; bottom: 16px; z-index: 40; display: inline-flex; align-items: center; gap: 8px;
	min-height: 48px; padding: 0 18px; border-radius: 999px; background: #1f9d55; color: #fff;
	font-weight: 700; text-decoration: none; box-shadow: 0 8px 24px rgba(0,0,0,.25);
}
.qb-whatsapp:hover { background: #17824a; }
.single-product .qb-whatsapp { bottom: 84px; }
@media (max-width: 600px) { .qb-whatsapp span { display: none; } .qb-whatsapp { width: 52px; height: 52px; padding: 0; justify-content: center; } }

/* Mobile polish */
@media (max-width: 600px) {
	.qb-announce { font-size: .82rem; }
	.qb-header__row { gap: 8px; }
	.qb-brand__name, .qb-brand .custom-logo-link { font-size: 1.3rem; }
	.qb-hero__title { font-size: clamp(2.1rem, 11vw, 3rem); }
	.qb-btn--xl { min-height: 58px; padding: 0 28px; font-size: 1.15rem; }
	.qb-section__head { flex-wrap: wrap; }
	.qb-final__inner .qb-btn { width: 100%; }
	.qb-drawer { width: 100%; }
}
