/*
Theme Name:   e-doosje
Theme URI:    https://www.e-doosje.nl
Description:  Huisstijl voor e-doosje.nl. Child-thema van Storefront met zoekgerichte header, USP-balk, categoriemenu en productkaarten met levertijd.
Author:       e-doosje.nl
Template:     storefront
Version:      1.0.0
Requires at least: 6.4
Requires PHP: 7.4
Text Domain:  e-doosje
License:      GPL-2.0-or-later
*/

/* ---------- Tokens ---------- */
:root {
	--ed-bg: #f6f7f5;
	--ed-surface: #ffffff;
	--ed-sunk: #eef1ee;
	--ed-line: #dde3df;
	--ed-ink: #16231f;
	--ed-muted: #5d6b66;
	--ed-brand: #14524a;
	--ed-brand-ink: #ffffff;
	--ed-brand-soft: #e2efec;
	--ed-accent: #f2a516;
	--ed-accent-ink: #2a1d00;
	--ed-ok: #1d7a3e;
	--ed-warn: #a86200;
	--ed-radius: 10px;
	--ed-display: "Bricolage Grotesque", "Trebuchet MS", system-ui, -apple-system, "Segoe UI", sans-serif;
	--ed-body: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

body {
	background: var(--ed-bg);
	color: var(--ed-ink);
	font-family: var(--ed-body);
	font-size: 15px;
	line-height: 1.55;
}
h1, h2, h3, h4, .site-title, .woocommerce-loop-product__title, .product_title {
	font-family: var(--ed-display);
	color: var(--ed-ink);
	letter-spacing: -0.015em;
	text-wrap: balance;
}
h1, .product_title { font-weight: 800; }
a { color: var(--ed-brand); }
a:hover, a:focus { color: var(--ed-ink); }
:focus-visible { outline: 2px solid var(--ed-accent); outline-offset: 2px; }

/* ---------- Header ---------- */
.site-header {
	background: var(--ed-brand);
	color: var(--ed-brand-ink);
	border-bottom: 0;
	padding-top: 0;
	margin-bottom: 0;
	position: sticky;
	top: 0;
	z-index: 50;
}
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 0; position: relative; } }

.site-header .col-full {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 20px;
	padding-top: 12px;
	padding-bottom: 12px;
}
.site-header .site-branding,
.site-header .site-search,
.site-header .site-header-cart,
.site-header .ed-header-account {
	float: none !important;
	width: auto !important;
	margin: 0 !important;
	clear: none !important;
}
.site-header .site-branding { flex: 0 0 auto; }
.site-header .site-search { flex: 1 1 320px; min-width: 0; }
.site-header .ed-header-account,
.site-header .site-header-cart { flex: 0 0 auto; }

.ed-logo {
	display: flex;
	align-items: center;
	gap: 8px;
	font-family: var(--ed-display);
	font-weight: 800;
	font-size: 26px;
	letter-spacing: -0.02em;
	color: var(--ed-brand-ink) !important;
	text-decoration: none !important;
	line-height: 1;
}
.ed-logo svg { width: 36px; height: 36px; flex: none; }
.ed-logo small { font-size: 15px; font-weight: 600; opacity: .75; }
.site-branding .custom-logo-link img { max-height: 44px; width: auto; }

/* Zoekbalk */
.site-header .widget_product_search form { display: flex; margin: 0; }
.site-header .widget_product_search form::before { display: none; }
.site-header .widget_product_search input[type="search"],
.site-header .widget_product_search .search-field {
	flex: 1;
	min-width: 0;
	padding: 12px 14px !important;
	border: 0;
	border-radius: 8px 0 0 8px;
	background: var(--ed-surface);
	color: var(--ed-ink);
	box-shadow: none;
	font-size: 15px;
}
.site-header .widget_product_search button[type="submit"] {
	position: static !important;
	clip: auto !important;
	clip-path: none !important;
	width: auto !important;
	height: auto !important;
	overflow: visible !important;
	margin: 0;
	padding: 0 18px;
	border: 0;
	border-radius: 0 8px 8px 0;
	background: var(--ed-accent);
	color: var(--ed-accent-ink);
	font-weight: 700;
}

/* Account en winkelwagen */
.ed-header-account a,
.site-header-cart .cart-contents {
	display: flex !important;
	align-items: center;
	gap: 8px;
	padding: 9px 14px !important;
	border: 1px solid rgba(255, 255, 255, .35);
	border-radius: 8px;
	color: var(--ed-brand-ink) !important;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}
.ed-header-account a:hover,
.site-header-cart .cart-contents:hover { background: rgba(255, 255, 255, .12); }
.site-header-cart .cart-contents::after { display: none; }
.site-header-cart .cart-contents .amount { color: var(--ed-brand-ink); }
.site-header-cart .cart-contents .count {
	background: var(--ed-accent);
	color: var(--ed-accent-ink);
	border-radius: 999px;
	padding: 0 8px;
	font-size: 12px;
	font-weight: 700;
	opacity: 1;
}
.site-header-cart .widget_shopping_cart { background: var(--ed-surface); color: var(--ed-ink); border-radius: 0 0 var(--ed-radius) var(--ed-radius); }
.site-header-cart .widget_shopping_cart a { color: var(--ed-ink); }

/* Categoriemenu */
.storefront-primary-navigation {
	background: var(--ed-brand);
	clear: both;
	width: 100%;
	flex-basis: 100%;
}
.site-header .storefront-primary-navigation .col-full { padding-top: 0; padding-bottom: 6px; }
.main-navigation ul.menu > li > a,
.main-navigation ul.nav-menu > li > a {
	color: var(--ed-brand-ink);
	padding: 8px 12px;
	border-radius: 6px;
	font-weight: 500;
}
.main-navigation ul.menu > li > a:hover,
.main-navigation ul.menu > li.current-menu-item > a { background: rgba(255, 255, 255, .14); }
.main-navigation ul.menu ul { background: var(--ed-surface); border-radius: 0 0 var(--ed-radius) var(--ed-radius); }
.main-navigation ul.menu ul a { color: var(--ed-ink); }
.menu-toggle { color: var(--ed-brand-ink); border-color: rgba(255, 255, 255, .5); }
.menu-toggle::before, .menu-toggle::after, .menu-toggle span::before { background-color: var(--ed-brand-ink); }

/* USP-balk */
.ed-usp { background: var(--ed-brand-soft); color: var(--ed-ink); font-size: 13px; }
.ed-usp .col-full {
	display: flex;
	gap: 28px;
	padding-top: 7px;
	padding-bottom: 7px;
	overflow-x: auto;
	white-space: nowrap;
	scrollbar-width: none;
}
.ed-usp span::before { content: "\2713\00a0"; color: var(--ed-ok); font-weight: 700; }

.site-content { padding-top: 24px; }
.storefront-breadcrumb { margin-bottom: 16px; padding: 0; }
.storefront-breadcrumb, .woocommerce-breadcrumb { background: transparent; font-size: 13px; }

/* ---------- Productkaarten ---------- */
ul.products li.product {
	background: var(--ed-surface);
	border: 1px solid var(--ed-line);
	border-radius: var(--ed-radius);
	overflow: hidden;
	padding: 0 0 14px !important;
	text-align: left !important;
	display: flex;
	flex-direction: column;
}
ul.products li.product img {
	margin: 0 0 12px !important;
	aspect-ratio: 1 / 1;
	object-fit: contain;
	background: var(--ed-surface);
	padding: 12px;
	border-radius: 0;
}
ul.products li.product .woocommerce-loop-product__title,
ul.products li.product .star-rating,
ul.products li.product .price,
ul.products li.product .ed-delivery,
ul.products li.product .button,
ul.products li.product .onsale { margin-left: 14px; margin-right: 14px; }
ul.products li.product .woocommerce-loop-product__title {
	font-family: var(--ed-body);
	font-weight: 600;
	font-size: 15px;
	line-height: 1.35;
	letter-spacing: 0;
}
ul.products li.product .star-rating { margin-top: 2px; margin-bottom: 6px; color: var(--ed-accent); font-size: 12px; }
ul.products li.product .price {
	font-family: var(--ed-display);
	font-size: 22px;
	font-weight: 800;
	color: var(--ed-ink);
	margin-bottom: 2px;
	font-variant-numeric: tabular-nums;
}
ul.products li.product .price del { font-size: 14px; font-weight: 500; opacity: .6; }
ul.products li.product .price ins { text-decoration: none; }
ul.products li.product .button {
	margin-top: auto;
	background: var(--ed-brand);
	color: var(--ed-brand-ink);
	border-radius: 8px;
	font-weight: 700;
	text-align: center;
}
ul.products li.product .button:hover { background: var(--ed-ink); color: var(--ed-brand-ink); }
.onsale {
	background: var(--ed-accent);
	color: var(--ed-accent-ink);
	border: 0;
	border-radius: 5px;
	font-weight: 700;
	text-transform: uppercase;
	font-size: 11px;
	letter-spacing: .04em;
}

.ed-delivery { font-size: 13px; font-weight: 600; color: var(--ed-ok); margin-bottom: 10px; }
.ed-delivery.is-late { color: var(--ed-warn); }
.ed-delivery.is-out { color: var(--ed-muted); }

/* ---------- Productpagina ---------- */
.single-product div.product {
	background: var(--ed-surface);
	border: 1px solid var(--ed-line);
	border-radius: var(--ed-radius);
	padding: 24px;
}
.single-product div.product p.price {
	font-family: var(--ed-display);
	font-size: 34px;
	font-weight: 800;
	color: var(--ed-ink);
	font-variant-numeric: tabular-nums;
}
.single-product div.product .ed-delivery { font-size: 15px; }
.single-product div.product form.cart .button,
.button.alt, .checkout-button, #place_order {
	background: var(--ed-accent) !important;
	color: var(--ed-accent-ink) !important;
	border-radius: 8px;
	font-weight: 800;
}
.button.alt:hover, .checkout-button:hover, #place_order:hover { filter: brightness(1.06); }
.ed-trust {
	list-style: none;
	margin: 18px 0 0;
	padding: 14px 16px;
	background: var(--ed-sunk);
	border-radius: 8px;
	font-size: 14px;
	display: grid;
	gap: 4px;
}
.ed-trust li::before { content: "\2713\00a0"; color: var(--ed-ok); font-weight: 700; }

/* Knoppen algemeen */
button, input[type="button"], input[type="reset"], input[type="submit"], .button, .added_to_cart {
	background: var(--ed-brand);
	color: var(--ed-brand-ink);
	border-radius: 8px;
	font-weight: 700;
}
button:hover, input[type="submit"]:hover, .button:hover { background: var(--ed-ink); color: var(--ed-brand-ink); }

/* Gratis verzending-melding */
.ed-free-shipping {
	background: var(--ed-brand-soft);
	border-radius: 8px;
	padding: 10px 14px;
	margin-bottom: 16px;
	font-weight: 600;
}
.ed-free-shipping progress { width: 100%; height: 8px; accent-color: var(--ed-brand); display: block; margin-top: 6px; }

/* Sidebar-filters */
.widget-area .widget .widget-title, .widget-area .widget h2 {
	font-family: var(--ed-body);
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: .06em;
	color: var(--ed-muted);
	border: 0;
}

/* Footer */
.site-footer { background: var(--ed-ink); color: #c9d4d0; }
.site-footer a { color: #ffffff; }
.site-footer h2, .site-footer h3 { color: #ffffff; }

/* Mobiel */
@media (max-width: 767px) {
	.site-header .site-search { order: 4; flex-basis: 100%; }
	.ed-header-account { display: none; }
	.storefront-handheld-footer-bar { background: var(--ed-surface); border-top: 1px solid var(--ed-line); }
	ul.products li.product .price { font-size: 19px; }
}
