/*
Theme Name:   OneStopBasket
Theme URI:    https://onestopbasket.co.uk
Description:  Storefront child theme for OneStopBasket: a virtual British high street. Needs the OneStopBasket Core plugin.
Author:       Autofreight Global Logistics Ltd
Template:     storefront
Version:      0.1.2
Requires PHP: 8.0
Text Domain:  onestopbasket
*/

:root {
	--osb-bg: #ffffff;
	--osb-ink: #16131a;
	--osb-soft: #5d5862;
	--osb-line: #e6e1e4;
	--osb-panel: #f6f3f1;
	--osb-red: #d0140f;
	--osb-red-ink: #b00f0b;
	--osb-navy: #0f2a6e;
	--osb-mustard: #f58200;
	--osb-sky1: #cfe5f7;
	--osb-sky2: #f4f8fb;
}

body { background: var(--osb-bg); color: var(--osb-ink); font: 16px/1.55 Inter, system-ui, sans-serif; overflow-x: clip; }
h1, h2, h3, .site-title, .woocommerce-loop-product__title { font-family: Archivo, Inter, sans-serif; letter-spacing: -.02em; color: var(--osb-ink); }
h1 { font-weight: 800; line-height: 1.05; font-size: clamp(32px, 4.4vw, 52px); text-wrap: balance; }
h2 { font-weight: 800; line-height: 1.1; font-size: clamp(24px, 2.6vw, 32px); }
a { color: var(--osb-red-ink); }
* { min-width: 0; }

/* Header */
.site-header { background: var(--osb-bg); border-bottom: 1px solid var(--osb-line); padding-top: 14px; margin-bottom: 0; }
.site-header .site-branding { margin-bottom: 10px; }
.osb-logo, .custom-logo-link { display: inline-block; line-height: 0; }
.osb-logo img, .custom-logo-link img { height: 52px; width: auto; max-width: 100%; }
.site-header .site-search { margin-bottom: 10px; }
.site-search .search-field { border: 2px solid var(--osb-navy); border-radius: 999px; min-height: 44px; padding: 10px 18px; background: var(--osb-bg); }
.osb-header-links { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; margin: 0 0 10px; }
.osb-hl { padding: 10px 12px; border-radius: 8px; font-weight: 600; text-decoration: none; color: var(--osb-ink); white-space: nowrap; }
.osb-hl:hover { background: var(--osb-panel); }
.main-navigation ul.menu > li > a, .main-navigation ul.nav-menu > li > a { font-weight: 600; color: var(--osb-ink); }
.storefront-primary-navigation { background: var(--osb-bg); }

/* Full-width bands on the front page */
.osb-band { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); padding: clamp(28px, 4vw, 56px) max(5vw, 16px); }
.osb-band > .osb-wrap { max-width: 1240px; margin: 0 auto; }
.osb-hero { background: linear-gradient(var(--osb-sky1), var(--osb-sky2)); padding-bottom: 0; }
.osb-hero .osb-lead-row { display: flex; flex-wrap: wrap; gap: 12px 32px; align-items: flex-end; justify-content: space-between; }
.osb-hero p { margin: 8px 0 0; max-width: 52ch; color: var(--osb-soft); font-size: 17px; }
.osb-how { display: flex; flex-wrap: wrap; gap: 8px 28px; font-weight: 600; font-size: 15px; }
.osb-how span { white-space: nowrap; }
.osb-how i { font-style: normal; color: var(--osb-red-ink); margin-right: 6px; }
.osb-hero .osb-street { margin-top: 18px; }
.osb-red { background: var(--osb-red); color: #fff; }
.osb-red h2, .osb-red a:not(.osb-store) { color: #fff; }
.osb-red .osb-soft-text { color: #ffd9de; }
.osb-red .osb-note { color: #ffd9de; }
.osb-panel { background: var(--osb-panel); }
.osb-head { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: flex-end; margin-bottom: 20px; }
.osb-head h2 { margin: 0; }
.osb-split { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; }
@media (max-width: 760px) { .osb-split { grid-template-columns: minmax(0, 1fr); } }
.osb-red .osb-store { background: #fff; color: #16131a; }

/* Product cards */
ul.products li.product { border: 1px solid var(--osb-line); border-radius: 14px; padding: 0 0 14px; overflow: hidden; text-align: left; }
ul.products li.product img { border-radius: 0; margin-bottom: 10px; }
ul.products li.product .woocommerce-loop-product__title, ul.products li.product .price, ul.products li.product .osb-at, ul.products li.product .osb-acts { padding: 0 14px; }
ul.products li.product .price { font: 800 20px/1 Archivo, sans-serif; color: var(--osb-ink); }
ul.products li.product .price del { font: 400 14px Inter, sans-serif; color: var(--osb-soft); }
ul.products li.product .onsale { background: var(--osb-mustard); color: #16131a; border: 0; border-radius: 6px; font-weight: 700; }
ul.products li.product .osb-acts .osb-btn { min-height: 40px; padding: 6px 12px; font-size: 14px; }

/* Single product Buy button */
.single-product .single_add_to_cart_button.button { background: var(--osb-red); border-radius: 10px; min-height: 48px; font-weight: 700; }

/* Footer */
.site-footer { background: var(--osb-navy); color: #e6ebf7; }
.site-footer a { color: #e6ebf7; }
.osb-disclosure { background: var(--osb-navy); color: #b8c3e0; }

/* Phones: compact header, street inside the first screen */
@media (max-width: 600px) {
	.site-header { padding-top: 8px; }
	.osb-logo img, .custom-logo-link img { height: 40px; }
	.osb-header-links { justify-content: flex-start; margin-bottom: 6px; }
	.osb-hero { display: flex; flex-direction: column; padding-top: 16px; }
	.osb-hero .osb-wrap, .osb-hero .osb-lead-row { display: contents; }
	.osb-hero h1 { font-size: 30px; }
	.osb-hero p { font-size: 15px; }
	.osb-hero .osb-how { order: 3; font-size: 14px; gap: 6px 16px; padding: 12px 0 4px; }
	.osb-street svg { width: 820px; height: 261px; }
}


/* Utility bar and department bar */
.osb-util { background: var(--osb-navy); color: #fff; font-size: 13px; padding: 7px max(5vw, 16px); display: flex; gap: 6px 22px; justify-content: center; flex-wrap: wrap; }
.osb-util span { white-space: nowrap; }
.osb-deptbar { border-bottom: 1px solid var(--osb-line); padding: 0 max(5vw, 16px); overflow-x: auto; display: flex; gap: 2px; white-space: nowrap; scrollbar-width: none; background: var(--osb-bg); }
.osb-deptbar a { flex: none; padding: 12px 10px; font-size: 14px; font-weight: 500; text-decoration: none; color: var(--osb-ink); border-bottom: 2px solid transparent; }
.osb-deptbar a:hover { border-bottom-color: var(--osb-red); }

/* Photo hero */
.osb-photohero { position: relative; min-height: clamp(480px, 74vh, 720px); display: grid; align-items: end; color: #fff; overflow: hidden; background: #1b2238; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }
.osb-photohero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 58% 62%; }
.osb-photohero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8,14,40,.82) 0%, rgba(8,14,40,.5) 42%, rgba(8,14,40,0) 72%), linear-gradient(0deg, rgba(8,14,40,.6), rgba(8,14,40,0) 55%); }
.osb-photohero .osb-in { position: relative; z-index: 1; padding: clamp(32px, 5vw, 72px) max(5vw, 16px); max-width: 1240px; width: 100%; margin: 0 auto; }
.osb-photohero h1 { color: #fff; font-size: clamp(40px, 6.2vw, 78px); max-width: 11ch; line-height: 1; }
.osb-photohero p { font-size: clamp(16px, 1.6vw, 20px); max-width: 44ch; color: #e6e9f3; margin: 16px 0 0; }
.osb-herocta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.osb-btn.osb-white { background: #fff; border-color: #fff; color: var(--osb-navy); }
.osb-btn.osb-ghost { border-color: rgba(255,255,255,.85); color: #fff; }
.osb-stats { display: flex; flex-wrap: wrap; gap: 12px 36px; margin-top: 36px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.28); max-width: 560px; }
.osb-stats b { display: block; font: 800 30px/1 Archivo, sans-serif; }
.osb-stats span { font-size: 14px; color: #d3d9ea; }

/* Department mosaic */
.osb-mosaic { display: grid; gap: 12px; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 210px; }
.osb-mosaic a { position: relative; border-radius: 16px; overflow: hidden; color: #fff; text-decoration: none; display: flex; align-items: flex-end; padding: 18px; background: #222; }
.osb-mosaic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.osb-mosaic a:hover img { transform: scale(1.05); }
.osb-mosaic a::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(6,10,28,.72), rgba(6,10,28,0) 58%); }
.osb-mosaic span { position: relative; z-index: 1; font: 700 19px/1.15 Archivo, sans-serif; }
.osb-mosaic small { display: block; font: 500 13px Inter, sans-serif; opacity: .88; margin-top: 4px; }
.osb-mosaic .big { grid-column: span 2; grid-row: span 2; }
.osb-mosaic .big span { font-size: 30px; }
.osb-mosaic .wide { grid-column: span 2; }
@media (max-width: 900px) { .osb-mosaic { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 180px; } }
@media (prefers-reduced-motion: reduce) { .osb-mosaic img { transition: none; } }

/* Photos beside text, how it works */
.osb-photo { border-radius: 18px; overflow: hidden; min-height: 400px; position: relative; background: #222; }
.osb-photo.osb-tall { min-height: 460px; }
.osb-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.osb-trust { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); margin-top: 24px; }
.osb-trust b { display: block; font: 700 18px/1.2 Archivo, sans-serif; margin-bottom: 6px; }
.osb-trust p { margin: 0; color: var(--osb-soft); }
.osb-n { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #fbe3e2; color: var(--osb-red-ink); font-weight: 700; margin-bottom: 10px; }

/* Department page banner */
.osb-deptban { position: relative; border-radius: 18px; overflow: hidden; min-height: 260px; display: flex; align-items: flex-end; padding: clamp(20px, 4vw, 36px); color: #fff; margin-bottom: 24px; background: #222; }
.osb-deptban img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.osb-deptban::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8,14,40,.8), rgba(8,14,40,.15)); }
.osb-deptban > div { position: relative; z-index: 1; }
.osb-deptban h1 { color: #fff; margin: 0; }
.osb-deptban p { color: #e6e9f3; margin: 8px 0 0; }

/* Product cards: buttons on two rows, gentle lift */
ul.products li.product .osb-acts .osb-main { flex: 1 1 100%; }
ul.products li.product .osb-acts .osb-btn:not(.osb-main) { flex: 1 1 0; }
ul.products li.product { transition: box-shadow .2s, transform .2s; }
ul.products li.product:hover { box-shadow: 0 10px 30px rgba(15,42,110,.12); transform: translateY(-2px); }

@media (max-width: 600px) {
	.osb-util span:not(:first-child) { display: none; }
	.osb-photohero { min-height: 520px; }
	.osb-photohero > img { object-position: 62% 50%; }
	.osb-photohero::after { background: linear-gradient(0deg, rgba(8,14,40,.88) 0%, rgba(8,14,40,.55) 55%, rgba(8,14,40,.15) 100%); }
	.osb-stats b { font-size: 24px; }
	.osb-mosaic { grid-auto-rows: 150px; gap: 8px; }
	.osb-mosaic .big { grid-row: span 1; }
	.osb-mosaic .big span { font-size: 22px; }
	.osb-mosaic a { padding: 12px; }
	.osb-mosaic span { font-size: 16px; }
}


/* Remove Storefront's homepage header gap */
.site-header { margin-bottom: 0 !important; padding-bottom: 8px !important; }
.home .site-main, .home #main { margin-bottom: 0; }

/* Department shop lists and storefronts without products yet */
.osb-deptshops { margin: 0 0 32px; }
.osb-deptshops h2 { font-size: 1.25rem; margin: 0 0 14px; }
.osb-storesoon { margin: 0 0 24px; }
