/*
Theme Name:   SetVibes
Theme URI:    https://www.setvibes.nl/
Description:  Custom Storefront child theme for SetVibes. Replaces the stock generated "EmPiStore" child theme with a real brand system (colors/typography/logo) plus WooCommerce conversion and SEO enhancements. See PROJECT_PLAN.md in the repo root for the full proposal.
Author:       Mark Scholten
Template:     storefront
Version:      1.0.0
Text Domain:  setvibes
*/

/* =========================================================
   1. DESIGN TOKENS
   ========================================================= */
:root {
	/* Brand */
	--sv-navy:          #1B3A6B;
	--sv-navy-dark:     #122747;
	--sv-accent:        #FF6B4A;
	--sv-accent-dark:   #E5502F;
	--sv-gold:          #F2A93B;

	/* Feedback / trust */
	--sv-success:       #1DA362;
	--sv-success-bg:    #E8F6EF;
	--sv-warning:       #C77700;

	/* Neutrals */
	--sv-bg:            #FAF8F5;
	--sv-surface:       #FFFFFF;
	--sv-text:          #1C1F26;
	--sv-text-muted:    #616A76;
	--sv-border:        #E7E2DA;

	/* Type */
	--sv-font-heading:  'Poppins', 'Segoe UI', Arial, sans-serif;
	--sv-font-body:     'Inter', 'Segoe UI', Arial, sans-serif;

	/* Shape / motion */
	--sv-radius:        10px;
	--sv-radius-sm:     6px;
	--sv-shadow:        0 2px 10px rgba(27, 58, 107, 0.08);
	--sv-shadow-lift:   0 8px 24px rgba(27, 58, 107, 0.14);
	--sv-transition:    160ms ease;
}

/* =========================================================
   2. BASE / TYPOGRAPHY
   ========================================================= */
body {
	background-color: var(--sv-bg);
	color: var(--sv-text);
	font-family: var(--sv-font-body);
	font-size: 16px;
	line-height: 1.6;
}

h1, h2, h3, h4, h5, h6,
.site-title, .woocommerce-loop-product__title,
.product_title, .storefront-product-section .section-title {
	font-family: var(--sv-font-heading);
	color: var(--sv-navy);
	font-weight: 700;
	letter-spacing: -0.01em;
}

a { color: var(--sv-navy); transition: color var(--sv-transition); }
a:hover, a:focus { color: var(--sv-accent); }

::selection { background: var(--sv-accent); color: #fff; }

/* =========================================================
   3. HEADER / LOGO / NAVIGATION
   ========================================================= */
.site-header {
	background-color: var(--sv-surface);
	border-bottom: 1px solid var(--sv-border);
	box-shadow: var(--sv-shadow);
}

.site-branding .custom-logo-link img,
.site-branding .custom-logo {
	max-height: 96px;
	width: auto;
}

.site-header-cart .cart-contents,
.main-navigation ul li > a {
	font-family: var(--sv-font-body);
	font-weight: 600;
	color: var(--sv-navy);
}

.main-navigation ul li > a:hover,
.main-navigation ul li.current-menu-item > a {
	color: var(--sv-accent);
}

.site-header-cart .cart-contents {
	background-color: var(--sv-navy);
	color: #fff;
	border-radius: 999px;
	padding: 8px 16px;
}

.site-header-cart .cart-contents:hover { background-color: var(--sv-accent); }

/* =========================================================
   4. BUTTONS
   ========================================================= */
.button,
button,
input[type="submit"],
.woocommerce a.button,
.woocommerce button.button,
.woocommerce #respond input#submit {
	font-family: var(--sv-font-body);
	font-weight: 600;
	background-color: var(--sv-navy);
	color: #fff;
	border: none;
	border-radius: var(--sv-radius-sm);
	padding: 0.85em 1.6em;
	transition: background-color var(--sv-transition), transform var(--sv-transition);
}

.button:hover, button:hover, input[type="submit"]:hover,
.woocommerce a.button:hover, .woocommerce button.button:hover,
.woocommerce #respond input#submit:hover {
	background-color: var(--sv-navy-dark);
	transform: translateY(-1px);
}

/* Primary conversion actions get the accent color — add to cart, checkout, place order */
.woocommerce a.add_to_cart_button,
.woocommerce button.single_add_to_cart_button,
.woocommerce #place_order,
.woocommerce a.checkout-button,
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button {
	background-color: var(--sv-accent);
	font-weight: 700;
}

.woocommerce a.add_to_cart_button:hover,
.woocommerce button.single_add_to_cart_button:hover,
.woocommerce #place_order:hover,
.woocommerce a.checkout-button:hover {
	background-color: var(--sv-accent-dark);
}

/* =========================================================
   5. HOMEPAGE / SHOP LOOP — product & category cards
   ========================================================= */
.woocommerce ul.products li.product,
ul.products li.product-category {
	background: var(--sv-surface);
	border: 1px solid var(--sv-border);
	border-radius: var(--sv-radius);
	padding: 1.1em;
	box-shadow: var(--sv-shadow);
	transition: box-shadow var(--sv-transition), transform var(--sv-transition);
}

.woocommerce ul.products li.product:hover,
ul.products li.product-category:hover {
	box-shadow: var(--sv-shadow-lift);
	transform: translateY(-3px);
}

ul.products li.product-category .woocommerce-loop-category__title {
	font-family: var(--sv-font-heading);
	color: var(--sv-navy);
}

.woocommerce ul.products li.product .price {
	color: var(--sv-navy);
	font-weight: 700;
}

.woocommerce span.onsale {
	background-color: var(--sv-accent);
	font-family: var(--sv-font-body);
	font-weight: 700;
	border-radius: var(--sv-radius-sm);
}

/* =========================================================
   6. TRUST BAR (injected by inc/woocommerce.php, front page only)
   ========================================================= */
.sv-trust-bar {
	background-color: var(--sv-navy);
	color: #fff;
}

.sv-trust-bar__inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0.75em 1em;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 1.75em;
	font-size: 0.9rem;
	font-weight: 600;
}

.sv-trust-bar__inner span { display: inline-flex; align-items: center; gap: 0.5em; white-space: nowrap; }

/* =========================================================
   7. HOMEPAGE HERO (injected by inc/woocommerce.php, front page only)
   ========================================================= */
.sv-hero {
	background: linear-gradient(135deg, var(--sv-navy) 0%, var(--sv-navy-dark) 100%);
	color: #fff;
	border-radius: var(--sv-radius);
	padding: 2.75em 2em;
	margin-bottom: 2em;
	text-align: center;
}

.sv-hero h1 {
	color: #fff;
	font-size: 2rem;
	margin: 0 0 0.4em;
}

.sv-hero p {
	color: #E9EEF7;
	max-width: 640px;
	margin: 0 auto 1.2em;
	font-size: 1.05rem;
}

.sv-hero .button {
	background-color: var(--sv-accent);
}

.sv-hero .button:hover { background-color: var(--sv-accent-dark); }

/* =========================================================
   8. SINGLE PRODUCT — trust badges + sticky mobile CTA
   ========================================================= */
.sv-product-trust {
	margin-top: 1.25em;
	display: flex;
	flex-wrap: wrap;
	gap: 0.9em 1.6em;
}

.sv-product-trust span {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	font-size: 0.88rem;
	font-weight: 600;
	color: var(--sv-text-muted);
}

.sv-product-trust span::before {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background-color: var(--sv-success);
	flex: 0 0 auto;
}

.woocommerce div.product p.stock.in-stock {
	color: var(--sv-success);
	font-weight: 700;
}

.woocommerce div.product p.stock.out-of-stock {
	color: var(--sv-warning);
	font-weight: 700;
}

.sv-sticky-cta {
	position: fixed;
	left: 0; right: 0; bottom: 0;
	z-index: 999;
	background: var(--sv-surface);
	border-top: 1px solid var(--sv-border);
	box-shadow: 0 -6px 18px rgba(0,0,0,0.08);
	padding: 0.7em 1em;
	display: none;
	align-items: center;
	justify-content: space-between;
	gap: 1em;
}

.sv-sticky-cta .sv-sticky-cta__title {
	font-weight: 600;
	font-size: 0.85rem;
	color: var(--sv-text);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.sv-sticky-cta .sv-sticky-cta__price {
	color: var(--sv-navy);
	font-weight: 700;
	white-space: nowrap;
}

@media (max-width: 768px) {
	.sv-sticky-cta.is-visible { display: flex; }
	body.single-product { padding-bottom: 64px; }
}

/* =========================================================
   9. FOOTER
   ========================================================= */
.site-footer {
	background-color: var(--sv-navy-dark);
	color: #D7DEE9;
}

/* High specificity + !important: Storefront's own footer CSS (.site-footer a)
   has equal specificity to a plain child-theme override and was winning the
   cascade in practice, leaving footer links dark-on-navy and unreadable. */
.site-footer a,
.site-footer .footer-widgets a,
.site-footer .site-info a,
.site-footer .storefront-handheld-footer-bar a {
	color: #fff !important;
}
.site-footer a:hover,
.site-footer .footer-widgets a:hover,
.site-footer .site-info a:hover,
.site-footer .storefront-handheld-footer-bar a:hover {
	color: var(--sv-gold) !important;
}

.site-footer .widget-title,
.site-footer .widget .widget-title,
.site-footer .footer-widgets .widget-title {
	color: #fff !important;
	font-family: var(--sv-font-heading);
}

/* =========================================================
   10. FORMS / MISC
   ========================================================= */
input:focus, textarea:focus, select:focus {
	outline: 2px solid var(--sv-accent);
	outline-offset: 1px;
}

.woocommerce-message, .woocommerce-info {
	border-top-color: var(--sv-navy);
}
.woocommerce-message::before, .woocommerce-info::before { color: var(--sv-navy); }

.woocommerce-error { border-top-color: var(--sv-accent-dark); }
.woocommerce-error::before { color: var(--sv-accent-dark); }

/* =========================================================
   11. FAQ / CART TRUST / DELIVERY NOTE / BADGES / WHATSAPP
   ========================================================= */
.sv-product-faq {
	margin-top: 32px;
	padding-top: 24px;
	border-top: 1px solid var(--sv-border);
}
.sv-product-faq h2 {
	font-family: var(--sv-font-heading);
	color: var(--sv-navy);
	margin-bottom: 16px;
}
.sv-product-faq__item {
	margin-bottom: 16px;
}
.sv-product-faq__item h3 {
	font-family: var(--sv-font-heading);
	font-size: 1rem;
	margin-bottom: 4px;
	color: var(--sv-text);
}
.sv-product-faq__item p {
	color: var(--sv-text-muted);
	margin: 0;
}

.sv-cart-trust {
	margin-bottom: 24px;
}

.sv-delivery-note {
	font-size: 0.9rem;
	color: var(--sv-success);
	background-color: var(--sv-success-bg);
	border-radius: var(--sv-radius-sm);
	padding: 8px 12px;
	display: inline-block;
	margin: 8px 0;
}

.sv-badge-row {
	position: absolute;
	top: 8px;
	left: 8px;
	z-index: 2;
	display: flex;
	gap: 6px;
}
.sv-badge {
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	padding: 3px 8px;
	border-radius: var(--sv-radius-sm);
	color: #fff;
}
.sv-badge--new { background-color: var(--sv-success); }
.sv-badge--low-stock { background-color: var(--sv-warning); }
ul.products li.product {
	position: relative;
}

.sv-whatsapp-button {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 999;
	background-color: #25D366;
	color: #fff;
	border-radius: 999px;
	padding: 12px 20px;
	font-weight: 600;
	text-decoration: none;
	box-shadow: var(--sv-shadow-lift);
	transition: transform var(--sv-transition);
}
.sv-whatsapp-button:hover {
	transform: translateY(-2px);
	color: #fff;
}
@media (max-width: 600px) {
	.sv-whatsapp-button {
		padding: 12px;
		font-size: 0;
	}
	.sv-whatsapp-button::before {
		content: "💬";
		font-size: 1.2rem;
	}
}

/* =========================================================
   12. GROWTH: ORDER BUMP / GIFT WRAP / BACK-IN-STOCK / REVIEWS /
       404 SUGGESTIONS / POPULAR SEARCHES / TRACKING
   ========================================================= */
.sv-order-bump, .sv-gift-wrap {
	background-color: var(--sv-surface);
	border: 1px dashed var(--sv-navy);
	border-radius: var(--sv-radius);
	padding: 16px;
	margin: 16px 0;
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
}
.sv-order-bump p, .sv-gift-wrap label {
	margin: 0;
}
.sv-order-bump__price {
	color: var(--sv-success);
	font-weight: 700;
	margin-left: 6px;
}

.sv-back-in-stock {
	background-color: var(--sv-surface);
	border: 1px solid var(--sv-border);
	border-radius: var(--sv-radius);
	padding: 16px;
	margin: 16px 0;
}
.sv-back-in-stock form {
	display: flex;
	gap: 8px;
	margin-top: 10px;
	flex-wrap: wrap;
}
.sv-back-in-stock input[type="email"] {
	flex: 1;
	min-width: 200px;
	padding: 10px;
}
#sv-back-in-stock-result {
	display: block;
	width: 100%;
	margin-top: 8px;
	color: var(--sv-success);
	font-weight: 600;
}

.sv-homepage-reviews {
	margin: 40px 0;
}
.sv-homepage-reviews h2 {
	font-family: var(--sv-font-heading);
	color: var(--sv-navy);
	text-align: center;
	margin-bottom: 20px;
}
.sv-homepage-reviews__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 16px;
}
.sv-review-card {
	background-color: var(--sv-surface);
	border: 1px solid var(--sv-border);
	border-radius: var(--sv-radius);
	padding: 20px;
	box-shadow: var(--sv-shadow);
}
.sv-review-card__stars {
	color: var(--sv-gold);
	font-size: 1.1rem;
	margin-bottom: 8px;
}
.sv-review-card__author {
	display: block;
	margin-top: 10px;
	font-size: 0.85rem;
	color: var(--sv-text-muted);
}

.sv-404-suggestions {
	background-color: var(--sv-surface);
	padding: 40px 0;
	margin-top: 40px;
}
.sv-404-suggestions h2 {
	font-family: var(--sv-font-heading);
	color: var(--sv-navy);
	margin-bottom: 20px;
}
.sv-404-suggestions__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: 16px;
}
.sv-404-suggestions__item {
	text-align: center;
	color: var(--sv-text);
	text-decoration: none;
}
.sv-404-suggestions__item span {
	display: block;
	margin-top: 8px;
	font-weight: 600;
}

.sv-popular-searches {
	text-align: center;
	margin: 24px 0;
}
.sv-popular-searches ul {
	list-style: none;
	display: flex;
	gap: 10px;
	justify-content: center;
	flex-wrap: wrap;
	padding: 0;
}
.sv-popular-searches a {
	background-color: var(--sv-surface-2, #f3eee6);
	padding: 6px 14px;
	border-radius: 999px;
	color: var(--sv-navy);
	text-decoration: none;
	font-size: 0.9rem;
}

.sv-tracking-number {
	background-color: var(--sv-success-bg);
	border-radius: var(--sv-radius-sm);
	padding: 10px 14px;
	margin: 16px 0;
}

/* =========================================================
   13. COOKIE BANNER
   ========================================================= */
.sv-cookie-banner {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 9999;
	background-color: var(--sv-navy-dark);
	color: #fff;
	box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
}
.sv-cookie-banner__inner {
	max-width: 900px;
	margin: 0 auto;
	padding: 20px 24px;
}
.sv-cookie-banner p {
	margin: 0 0 12px;
}
.sv-cookie-banner__details {
	margin-bottom: 14px;
}
.sv-cookie-banner__details summary {
	text-decoration: underline;
	cursor: pointer;
	color: var(--sv-gold);
	font-weight: 600;
	margin-bottom: 10px;
}
.sv-cookie-table-scroll {
	max-height: 42vh;
	overflow-y: auto;
	overflow-x: auto;
	border-radius: var(--sv-radius-sm);
}
.sv-cookie-table {
	width: 100%;
	min-width: 640px;
	border-collapse: collapse;
	background-color: rgba(255, 255, 255, 0.05);
	font-size: 0.85rem;
}
.sv-cookie-table th, .sv-cookie-table td {
	color: #fff;
	padding: 8px 12px;
	text-align: left;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	vertical-align: top;
}
.sv-cookie-table th {
	color: var(--sv-gold);
	font-weight: 600;
	white-space: nowrap;
}
.sv-cookie-required {
	color: #8fd6a8;
	font-weight: 600;
	white-space: nowrap;
}
.sv-cookie-optional {
	color: var(--sv-gold);
	font-weight: 600;
	white-space: nowrap;
}
.sv-cookie-banner__actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}
.sv-cookie-banner .button {
	background-color: transparent;
	border: 1px solid #fff;
	color: #fff;
}
.sv-cookie-banner__choice {
	background-color: var(--sv-navy) !important;
	border-color: var(--sv-navy) !important;
	color: #fff !important;
	flex: 1 1 auto;
}
.sv-cookie-banner__legal { margin: 10px 0 0; font-size: 13px; }
.sv-cookie-settings { margin: 8px 0 0; font-size: 13px; }

/* Cookie names read as names, not prose. */
.sv-cookie-table td:first-child {
	font-family: Consolas, Menlo, monospace;
	font-size: 0.8rem;
	color: #fff;
	white-space: nowrap;
}
.sv-cookie-banner__details[open] summary {
	margin-bottom: 12px;
}

/* The cookie table is rendered as an explicit light card on the dark banner.
   Storefront styles tables with its own light background, which made white
   text invisible; every colour here is set outright so no parent rule wins. */
.sv-cookie-table,
.sv-cookie-table tbody,
.sv-cookie-table thead,
.sv-cookie-table tr {
	background-color: #ffffff !important;
}
.sv-cookie-table th {
	background-color: #f1ede6 !important;
	color: #1B3A6B !important;
	border-bottom: 2px solid #1B3A6B !important;
}
.sv-cookie-table td {
	color: #16202F !important;
	border-bottom: 1px solid #e2dcd3 !important;
}
.sv-cookie-table td:first-child {
	color: #1B3A6B !important;
	font-weight: 600;
}
.sv-cookie-required {
	color: #0F7A6B !important;
}
.sv-cookie-optional {
	color: #B4530A !important;
}
.sv-cookie-banner__legal a,
.sv-cookie-settings a {
	color: #F2A93B !important;
	text-decoration: underline;
}

/* Fit all four columns instead of clipping the retention column off the edge. */
.sv-cookie-table {
	table-layout: fixed;
	min-width: 0 !important;
}
.sv-cookie-table th:nth-child(1), .sv-cookie-table td:nth-child(1) { width: 26%; }
.sv-cookie-table th:nth-child(2), .sv-cookie-table td:nth-child(2) { width: 20%; }
.sv-cookie-table th:nth-child(3), .sv-cookie-table td:nth-child(3) { width: 39%; }
.sv-cookie-table th:nth-child(4), .sv-cookie-table td:nth-child(4) { width: 15%; }
.sv-cookie-table td:first-child,
.sv-cookie-required,
.sv-cookie-optional,
.sv-cookie-table th {
	white-space: normal !important;
	overflow-wrap: anywhere;
}
