/*
Theme Name: Festive Christmas
Theme URI: https://festivechristmas.co.uk
Author: Indoor Living Limited
Description: Mobile-first WooCommerce theme for Festive Christmas. Built for social shopping: see it, tap it, pay.
Version: 1.0.4
Requires at least: 6.4
Requires PHP: 8.0
WC requires at least: 8.0
License: Proprietary
Text Domain: festive-christmas
*/

/* ---------------------------------------------------------------------
   Tokens
   ------------------------------------------------------------------ */
:root {
	--fc-ink: #1B1F1C;
	--fc-ink-soft: #4A504C;
	--fc-muted: #5B615D;
	--fc-bg: #FFFFFF;
	--fc-pine: #1E4D3A;
	--fc-pine-dark: #143528;
	--fc-pine-tint: #F3F7F4;
	--fc-pine-line: #DCE7E0;
	--fc-berry: #A3201B;
	--fc-berry-dark: #84190F;
	--fc-sand: #F3F1EC;
	--fc-line: #ECE8E1;
	--fc-media: #EEF3EF;
	--fc-radius: 12px;
	--fc-pill: 999px;
	--fc-gutter: 16px;
	--fc-max: 1180px;
	--fc-display: "Bricolage Grotesque", system-ui, sans-serif;
	--fc-body: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ---------------------------------------------------------------------
   Base
   ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--fc-bg);
	color: var(--fc-ink);
	font: 400 16px/1.5 var(--fc-body);
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--fc-pine); }
a:hover { color: var(--fc-pine-dark); }
h1, h2, h3 { font-family: var(--fc-display); letter-spacing: -0.01em; line-height: 1.15; margin: 0; }
:focus-visible { outline: 3px solid var(--fc-berry); outline-offset: 2px; }

.fc-skip {
	position: absolute; left: -9999px; top: 0;
	background: var(--fc-ink); color: #fff; padding: 12px 16px; z-index: 100;
}
.fc-skip:focus { left: 8px; top: 8px; }

.fc-wrap { max-width: var(--fc-max); margin: 0 auto; padding: 20px var(--fc-gutter) 40px; }
.fc-icon { flex: 0 0 auto; }

/* ---------------------------------------------------------------------
   Buttons
   ------------------------------------------------------------------ */
.fc-btn {
	display: inline-flex; align-items: center; justify-content: center;
	min-height: 44px; padding: 0 18px;
	border: 0; border-radius: var(--fc-pill);
	font: 600 15px/1.2 var(--fc-body);
	text-decoration: none; text-align: center; cursor: pointer;
	transition: background-color .15s ease, opacity .15s ease;
}
.fc-btn--buy { background: var(--fc-berry); color: #fff; width: 100%; }
.fc-btn--buy:hover, .fc-btn--buy:focus { background: var(--fc-berry-dark); color: #fff; }
.fc-btn--pine { background: var(--fc-pine); color: #fff; }
.fc-btn--pine:hover { background: var(--fc-pine-dark); color: #fff; }
.fc-btn--outline { border: 1.5px solid var(--fc-pine); color: var(--fc-pine); background: transparent; width: 100%; min-height: 48px; }
.fc-btn--outline-ink { border: 1.5px solid var(--fc-ink); color: var(--fc-ink); background: transparent; }
.fc-btn--large { min-height: 52px; font-size: 16px; }
.fc-btn--disabled { background: var(--fc-sand); color: var(--fc-muted); width: 100%; cursor: default; }

/* WooCommerce AJAX states on our buttons */
.fc-btn.loading { opacity: .7; pointer-events: none; }
.fc-btn.added::after { content: "  \2713"; }
a.added_to_cart { display: none !important; } /* the basket bar replaces "View basket" */

/* ---------------------------------------------------------------------
   Header
   ------------------------------------------------------------------ */
.fc-strip {
	background: var(--fc-pine); color: #fff;
	font-size: 13px; font-weight: 500; text-align: center;
	padding: 8px var(--fc-gutter);
}
.fc-header {
	display: flex; align-items: center; justify-content: space-between;
	padding: 10px var(--fc-gutter);
	border-bottom: 1px solid var(--fc-line);
	background: var(--fc-bg);
	position: sticky; top: 0; z-index: 50;
}
.admin-bar .fc-header { top: 46px; }
@media (min-width: 783px) { .admin-bar .fc-header { top: 32px; } }

.fc-brand { display: flex; align-items: center; gap: 8px; color: var(--fc-ink); text-decoration: none; min-height: 44px; }
.fc-brand .fc-icon { color: var(--fc-pine); }
.fc-brand__name { font-family: var(--fc-display); font-weight: 700; font-size: 20px; }
.fc-brand__logo { max-height: 40px; width: auto; }

.fc-cart {
	position: relative; display: flex; align-items: center; justify-content: center;
	width: 44px; height: 44px; color: var(--fc-ink);
}
.fc-cart-count {
	position: absolute; top: 3px; right: 0;
	min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px;
	background: var(--fc-berry); color: #fff;
	font-size: 11px; font-weight: 600; line-height: 19px; text-align: center;
}
.fc-cart-count.is-empty { display: none; }

.fc-basket-bar {
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	padding: 10px var(--fc-gutter);
	background: var(--fc-pine-tint); border-bottom: 1px solid var(--fc-pine-line);
	position: sticky; top: 65px; z-index: 40;
	font-size: 14px;
}
.fc-basket-bar[hidden] { display: none; }
.fc-basket-bar__text { display: flex; flex-direction: column; min-width: 0; }
.fc-basket-bar__text span { color: var(--fc-muted); }
.fc-basket-bar .fc-btn { flex: 0 0 auto; }

.fc-chips {
	display: flex; gap: 8px; overflow-x: auto;
	padding: 12px var(--fc-gutter);
	scrollbar-width: none;
}
.fc-chips::-webkit-scrollbar { display: none; }
.fc-chip {
	flex: 0 0 auto; display: inline-flex; align-items: center;
	min-height: 44px; padding: 0 16px; border-radius: var(--fc-pill);
	background: var(--fc-sand); color: var(--fc-ink);
	font-size: 14px; font-weight: 500; text-decoration: none;
}
.fc-chip:hover { background: #E8E4DC; color: var(--fc-ink); }
.fc-chip.is-current { background: var(--fc-pine); color: #fff; font-weight: 600; }

/* ---------------------------------------------------------------------
   Homepage
   ------------------------------------------------------------------ */
.fc-hero { margin-bottom: 24px; }
.fc-hero__media { background: var(--fc-media); aspect-ratio: 4 / 3; overflow: hidden; }
.fc-hero__media img { width: 100%; height: 100%; object-fit: cover; }
.fc-hero__body { display: flex; flex-direction: column; gap: 12px; padding: 20px var(--fc-gutter) 0; }
.fc-hero__title { font-size: clamp(32px, 9vw, 52px); font-weight: 700; line-height: 1.05; letter-spacing: -0.02em; }
.fc-hero__text { margin: 0; color: var(--fc-ink-soft); }
.fc-hero__price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.fc-hero__amount { font-family: var(--fc-display); font-size: 28px; font-weight: 700; }
.fc-hero__note { font-size: 14px; color: var(--fc-muted); }

.fc-section { max-width: var(--fc-max); margin: 0 auto; padding: 8px var(--fc-gutter) 32px; }
.fc-section--row { padding-left: 0; padding-right: 0; }
.fc-section__head { margin-bottom: 16px; }
.fc-section__head h2 { font-size: 24px; font-weight: 700; }
.fc-section__head p { margin: 4px 0 0; font-size: 14px; color: var(--fc-muted); }
.fc-section__head--inline { display: flex; align-items: baseline; justify-content: space-between; padding: 0 var(--fc-gutter); margin-bottom: 12px; }
.fc-section__head--inline a { font-size: 14px; font-weight: 600; padding: 10px 0; }

.fc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }
.fc-row {
	display: flex; gap: 12px; overflow-x: auto;
	padding: 0 var(--fc-gutter) 4px;
	scroll-snap-type: x mandatory; scrollbar-width: none;
}
.fc-row::-webkit-scrollbar { display: none; }
.fc-row .fc-card { flex: 0 0 156px; scroll-snap-align: start; }

.fc-card { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fc-card__media { position: relative; display: block; border-radius: var(--fc-radius); overflow: hidden; background: var(--fc-media); }
.fc-card__media--square { aspect-ratio: 1 / 1; }
.fc-card__media--tall { aspect-ratio: 3 / 4; }
.fc-card__media img { width: 100%; height: 100%; object-fit: cover; }
.fc-card__badge {
	position: absolute; top: 8px; left: 8px;
	background: var(--fc-berry); color: #fff;
	font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: var(--fc-pill);
}
.fc-card__title { font-family: var(--fc-body); font-size: 14px; font-weight: 600; line-height: 1.3; letter-spacing: 0; min-height: 2.6em; }
.fc-card__title a { color: var(--fc-ink); text-decoration: none; }
.fc-card__price { font-size: 17px; font-weight: 700; margin-top: auto; }
.fc-card .fc-btn { margin-top: 2px; }

/* Price markup from WooCommerce (sale prices) */
del, del .amount { color: var(--fc-muted); font-weight: 400; font-size: .75em; }
ins { text-decoration: none; }

.fc-trust {
	max-width: var(--fc-max); margin: 0 var(--fc-gutter) 32px;
	padding: 20px var(--fc-gutter); border-radius: 16px;
	background: var(--fc-pine-tint);
	display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px;
}
.fc-trust div { display: flex; flex-direction: column; gap: 4px; }
.fc-trust .fc-icon { color: var(--fc-pine); }
.fc-trust strong { font-size: 14px; }
.fc-trust span { font-size: 13px; color: var(--fc-muted); }

.fc-social h2 { font-size: 24px; margin-bottom: 8px; }
.fc-social p { margin: 0 0 12px; color: var(--fc-ink-soft); }
.fc-social__links { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; }

/* ---------------------------------------------------------------------
   Pages
   ------------------------------------------------------------------ */
.fc-page__title { font-size: 30px; margin: 4px 0 16px; }
.fc-prose { max-width: 720px; }
.fc-prose p, .fc-prose li { color: var(--fc-ink-soft); }
.fc-404 .fc-btn { max-width: 320px; margin-top: 8px; }

/* ---------------------------------------------------------------------
   WooCommerce
   ------------------------------------------------------------------ */
.woocommerce-breadcrumb { font-size: 13px; color: var(--fc-muted); margin-bottom: 12px; }
.woocommerce-products-header__title { font-size: 28px; margin-bottom: 12px; }
.woocommerce-result-count { font-size: 13px; color: var(--fc-muted); }
.woocommerce .woocommerce-ordering select { min-height: 44px; border-radius: 8px; border: 1px solid var(--fc-line); padding: 0 10px; background: #fff; }

/* Shop and category grids: always two up on a phone */
.woocommerce ul.products,
.woocommerce-page ul.products {
	display: grid !important;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px 12px; margin: 0; padding: 0;
}
.woocommerce ul.products::before, .woocommerce ul.products::after { display: none !important; }
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
	width: auto !important; margin: 0 !important; float: none !important;
	display: flex; flex-direction: column; gap: 6px;
}
.woocommerce ul.products li.product a img { border-radius: var(--fc-radius); margin: 0 0 4px; background: var(--fc-media); aspect-ratio: 1 / 1; object-fit: cover; }
.woocommerce ul.products li.product .woocommerce-loop-product__title { font-family: var(--fc-body); font-size: 14px !important; font-weight: 600; line-height: 1.3; padding: 0 !important; color: var(--fc-ink); }
.woocommerce ul.products li.product .price { color: var(--fc-ink) !important; font-size: 17px !important; font-weight: 700; margin: auto 0 0 !important; }
.woocommerce ul.products li.product .onsale { background: var(--fc-berry); border-radius: var(--fc-pill); min-height: 0; min-width: 0; line-height: 1; padding: 5px 8px; font-size: 11px; top: 8px; left: 8px; right: auto; margin: 0; }
.woocommerce ul.products li.product .fc-btn { margin-top: 2px; }

/* Single product */
.single-product div.product .product_title { font-size: 26px; margin: 12px 0 8px; }
.single-product div.product p.price,
.single-product div.product span.price { color: var(--fc-ink); font-family: var(--fc-display); font-size: 28px; font-weight: 700; }
.single-product div.product .woocommerce-product-gallery { margin-bottom: 16px; }
.single-product div.product .woocommerce-product-gallery img { border-radius: var(--fc-radius); }
.single-product div.product .woocommerce-product-details__short-description { color: var(--fc-ink-soft); }
.single-product .woocommerce-tabs ul.tabs { padding: 0 !important; }
.single-product .woocommerce-tabs ul.tabs li { border-radius: 8px 8px 0 0 !important; }
.single-product .woocommerce-tabs .panel h2:first-child { font-size: 20px; }

/* Quantity + add to basket */
.woocommerce .quantity .qty { min-height: 48px; width: 64px; border: 1px solid var(--fc-line); border-radius: 8px; font-size: 16px; }
.woocommerce div.product form.cart { display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; margin-bottom: 20px; }
.woocommerce div.product form.cart .button,
.woocommerce div.product form.cart .single_add_to_cart_button {
	flex: 1 1 200px; min-height: 52px; border-radius: var(--fc-pill) !important;
	background: var(--fc-berry) !important; color: #fff !important;
	font: 600 16px/1.2 var(--fc-body) !important;
}
.woocommerce div.product form.cart .single_add_to_cart_button:hover { background: var(--fc-berry-dark) !important; }
.woocommerce div.product form.cart .single_add_to_cart_button.disabled { opacity: .5; }
.woocommerce div.product form.variations_form { display: block; }
.woocommerce div.product form.cart table.variations select { min-height: 48px; border-radius: 8px; border: 1px solid var(--fc-line); font-size: 16px; padding: 0 10px; width: 100%; }
.woocommerce div.product form.cart .woocommerce-variation-add-to-cart { display: flex; gap: 10px; flex-wrap: wrap; }

/* On a phone the buy button stays in reach while scrolling the product page */
@media (max-width: 767px) {
	.single-product div.product form.cart:not(.variations_form),
	.single-product div.product .woocommerce-variation-add-to-cart {
		position: sticky; bottom: 0; z-index: 30;
		background: var(--fc-bg);
		padding: 10px 0 calc(10px + env(safe-area-inset-bottom));
		border-top: 1px solid var(--fc-line);
	}
}

/* Generic Woo buttons (basket, checkout, notices) */
.woocommerce a.button, .woocommerce button.button, .woocommerce input.button,
.woocommerce #respond input#submit {
	min-height: 44px; border-radius: var(--fc-pill);
	background: var(--fc-pine); color: #fff; font-weight: 600; padding: 12px 20px;
}
.woocommerce a.button:hover, .woocommerce button.button:hover { background: var(--fc-pine-dark); color: #fff; }
.woocommerce a.button.alt, .woocommerce button.button.alt,
.woocommerce .wc-proceed-to-checkout a.checkout-button,
.woocommerce #place_order {
	background: var(--fc-berry) !important; color: #fff !important; min-height: 52px; font-size: 16px;
}
.woocommerce-message, .woocommerce-info, .woocommerce-error {
	border-top-color: var(--fc-pine); background: var(--fc-pine-tint); font-size: 14px;
}
.woocommerce-message::before, .woocommerce-info::before { color: var(--fc-pine); }

/* Forms: 16px inputs stop iOS zooming in on tap */
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select,
.select2-container .select2-selection--single {
	min-height: 48px; font-size: 16px; border: 1px solid #CFCBC3; border-radius: 8px; padding: 10px 12px;
}

/* ---------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------ */
.fc-footer {
	background: var(--fc-pine); color: #fff;
	padding: 28px var(--fc-gutter) calc(32px + env(safe-area-inset-bottom));
	display: flex; flex-direction: column; gap: 20px;
	margin-top: 16px;
}
.fc-footer a { color: #fff; }
.fc-footer__brand { font-family: var(--fc-display); font-weight: 700; font-size: 20px; }
.fc-footer__links, .fc-footer__social {
	list-style: none; margin: 0; padding: 0;
	display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px;
}
.fc-footer__links a, .fc-footer__social a { display: block; padding: 10px 0; font-size: 14px; }
.fc-footer__legal { margin: 0; font-size: 12px; line-height: 1.6; color: #D5E3DA; }

/* ---------------------------------------------------------------------
   Larger screens: same page, more room
   ------------------------------------------------------------------ */
@media (min-width: 768px) {
	.fc-hero { display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: 32px; max-width: var(--fc-max); margin: 24px auto 40px; padding: 0 var(--fc-gutter); }
	.fc-hero__media { border-radius: 16px; }
	.fc-hero__body { padding: 0; }
	.fc-hero__body .fc-btn { max-width: 360px; }
	.fc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 20px; }
	.fc-section--row { padding-left: var(--fc-gutter); padding-right: var(--fc-gutter); }
	.fc-section__head--inline, .fc-row { padding-left: 0; padding-right: 0; }
	.fc-row .fc-card { flex-basis: 200px; }
	.fc-trust { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 auto 40px; }
	.woocommerce ul.products, .woocommerce-page ul.products { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 20px; }
	.fc-chips { justify-content: center; }
	.fc-footer { align-items: center; text-align: center; }
	.fc-footer__links, .fc-footer__social { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 24px; }
	.fc-footer__legal { max-width: 640px; }
}
@media (min-width: 1100px) {
	.fc-grid, .woocommerce ul.products, .woocommerce-page ul.products { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.fc-btn { transition: none; }
}

/* ---------------------------------------------------------------------
   Header v1.0.1: logo centred and larger
   ------------------------------------------------------------------ */
:root { --fc-header-h: 85px; }
.fc-header { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; }
.fc-header::before { content: ""; }
.fc-brand { justify-self: center; justify-content: center; }
.fc-brand__logo { max-height: 64px; width: auto; }
.fc-brand__name { font-size: 24px; }
.fc-basket-bar { top: var(--fc-header-h); }

/* ---------------------------------------------------------------------
   v1.0.2: bigger centred logo, screen-reader text, no sideways scroll
   ------------------------------------------------------------------ */
.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
	height: 1px; width: 1px; margin: -1px; padding: 0; overflow: hidden;
	position: absolute !important; white-space: nowrap; word-wrap: normal !important;
}
.fc-card, .woocommerce ul.products li.product { position: relative; }
:root { --fc-header-h: 113px; }
.fc-header { grid-template-columns: 48px 1fr 48px; padding-top: 8px; padding-bottom: 8px; }
.fc-brand { justify-self: center; justify-content: center; }
.fc-brand__logo { height: 96px; max-height: 96px; width: auto; }
.fc-brand__name { font-size: 28px; }
@media (min-width: 768px) {
	:root { --fc-header-h: 137px; }
	.fc-brand__logo { height: 120px; max-height: 120px; }
}

/* ---------------------------------------------------------------------
   v1.0.3: cookie banner and checkout terms pop-up
   ------------------------------------------------------------------ */
.fc-consent {
	position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 200;
	max-width: 560px; margin: 0 auto;
	background: #fff; color: var(--fc-ink);
	border: 1px solid var(--fc-line); border-radius: 16px;
	box-shadow: 0 10px 30px rgba(0,0,0,.18);
	padding: 16px; display: flex; flex-direction: column; gap: 12px;
}
.fc-consent[hidden] { display: none; }
.fc-consent__text { margin: 0; font-size: 14px; line-height: 1.5; }
.fc-consent__text strong { display: block; font-size: 16px; margin-bottom: 2px; }
.fc-consent__btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fc-consent__btns .fc-btn { width: 100%; }
.fc-footer__cookie {
	background: none; border: 0; padding: 10px 0; color: #fff; font: inherit; font-size: 14px;
	text-decoration: underline; cursor: pointer; align-self: flex-start;
}
@media (min-width: 768px) { .fc-footer__cookie { align-self: center; } }

.fc-modal {
	width: min(680px, calc(100vw - 24px)); max-height: calc(100vh - 48px);
	padding: 0; border: 0; border-radius: 16px; color: var(--fc-ink);
	display: none; flex-direction: column; overflow: hidden;
}
.fc-modal[open] { display: flex; }
.fc-modal::backdrop { background: rgba(20, 24, 21, .55); }
.fc-modal__head {
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	padding: 14px 16px; border-bottom: 1px solid var(--fc-line);
}
.fc-modal__head h2 { font-size: 20px; }
.fc-modal__close {
	width: 44px; height: 44px; border: 0; border-radius: 22px; background: var(--fc-sand);
	font-size: 26px; line-height: 1; cursor: pointer; color: var(--fc-ink);
}
.fc-modal__body { padding: 16px; overflow-y: auto; font-size: 15px; }
.fc-modal__body h2 { font-size: 18px; margin: 18px 0 6px; }
.fc-modal__foot { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--fc-line); }
.fc-modal__foot .fc-btn { width: 100%; }

/* v1.0.4: terms line without a tick box */
.wc-block-checkout__terms .wc-block-components-checkbox__input,
.wc-block-checkout__terms .wc-block-components-checkbox__mark { display: none !important; }
.wc-block-checkout__terms .wc-block-components-checkbox__label { padding-left: 0 !important; margin-left: 0 !important; }
.wc-block-checkout__terms .wc-block-components-checkbox label { cursor: default; }
