/*
Theme Name: Hello Fernway
Template: hello-elementor
Description: Fernway Delivery child theme. Styles WooCommerce, Fluent Forms and plain pages to match the Elementor design.
Version: 1.0.0
Text Domain: hello-fernway
*/

:root {
	--fw-spruce: #123B33; --fw-deep: #0C2924; --fw-pine: #2E6B58; --fw-frost: #EDF2EF;
	--fw-amber: #F2B33D; --fw-amber-hi: #FFC75A; --fw-holly: #B3262F; --fw-text: #3D4C48; --fw-line: #D3DED9;
	--fw-display: "Bricolage Grotesque", system-ui, sans-serif; --fw-body: "Figtree", system-ui, sans-serif;
}

/* Keyboard focus that is easy to see on dark and light bands */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible,
.elementor-button:focus-visible, [tabindex]:focus-visible {
	outline: 3px solid var(--fw-amber); outline-offset: 3px; border-radius: 2px;
}

/* Snow on the Christmas hero sits behind the words */
.fw-snow-host > .e-con-inner, .fw-snow-host > .e-con { position: relative; z-index: 2; }

/* ---------- Plain pages (privacy, terms) and WooCommerce pages ---------- */
body:not(.elementor-page) .site-main { max-width: 820px; margin: 0 auto; padding: 72px 20px 104px; }
body.woocommerce-cart .site-main, body.woocommerce-checkout .site-main, body.woocommerce-account .site-main,
body.woocommerce .site-main { max-width: 1240px; padding: 64px 24px 104px; }
body:not(.elementor-page) .page-header .entry-title, body.woocommerce .woocommerce-products-header__title,
body.woocommerce div.product .product_title {
	font-family: var(--fw-display); font-weight: 800; letter-spacing: -0.02em; color: var(--fw-spruce);
	font-size: clamp(36px, 5vw, 56px); line-height: 1.04; margin: 0 0 28px;
}
body:not(.elementor-page) .page-content h2 { font-size: 28px; margin: 48px 0 12px; }
body:not(.elementor-page) .page-content h3 { font-size: 21px; margin: 32px 0 8px; }
body:not(.elementor-page) .page-content p, body:not(.elementor-page) .page-content li { color: var(--fw-text); }

/* ---------- Buttons: classic WooCommerce + WooCommerce blocks ---------- */
.woocommerce a.button, .woocommerce button.button, .woocommerce input.button, .woocommerce #respond input#submit,
.woocommerce a.button.alt, .woocommerce button.button.alt,
.wc-block-components-button:not(.is-link), .wp-block-button__link, .wc-block-cart__submit-button,
.wc-block-components-checkout-place-order-button {
	background: var(--fw-amber) !important; color: var(--fw-spruce) !important; border: 0 !important;
	border-radius: 4px !important; font-family: var(--fw-body); font-weight: 600 !important; font-size: 17px;
	padding: 15px 26px; text-decoration: none !important; transition: background .15s ease;
}
.woocommerce a.button:hover, .woocommerce button.button:hover, .wc-block-components-button:not(.is-link):hover,
.wp-block-button__link:hover { background: var(--fw-amber-hi) !important; color: var(--fw-spruce) !important; }

/* Prices and product names in the display face */
.woocommerce div.product p.price, .woocommerce div.product span.price, .woocommerce ul.products li.product .price,
.wc-block-components-product-price, .wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
	color: var(--fw-spruce) !important; font-family: var(--fw-display); font-weight: 700;
}
.woocommerce ul.products li.product .woocommerce-loop-product__title, .wc-block-components-product-name,
.wc-block-cart-items__row .wc-block-components-product-name { font-family: var(--fw-display); font-weight: 700; color: var(--fw-spruce); }
.woocommerce ul.products li.product a img { border-radius: 4px; }
.woocommerce span.onsale { background: var(--fw-holly); }

/* Checkout and cart headings, inputs */
.wc-block-components-title, .wc-block-components-checkout-step__title, .wc-block-cart__totals-title {
	font-family: var(--fw-display) !important; color: var(--fw-spruce); font-weight: 700 !important; letter-spacing: -0.01em;
}
.wc-block-components-text-input input, .wc-block-components-combobox .wc-block-components-combobox-control input,
.wc-blocks-components-select .wc-blocks-components-select__select, .wc-block-components-textarea {
	border-color: #B9C9C2 !important; border-radius: 4px !important;
}
.wc-block-components-text-input input:focus, .wc-blocks-components-select .wc-blocks-components-select__select:focus {
	border-color: var(--fw-pine) !important; box-shadow: 0 0 0 1px var(--fw-pine) !important;
}
.woocommerce-message, .woocommerce-info, .wc-block-components-notice-banner.is-info {
	border-top-color: var(--fw-pine); background: var(--fw-frost);
}
.woocommerce-message::before, .woocommerce-info::before { color: var(--fw-pine); }

/* ---------- Fluent Forms ---------- */
.fluentform .ff-el-input--label label { color: var(--fw-spruce); font-weight: 600; font-family: var(--fw-body); }
.fluentform .ff-el-form-control {
	border: 1px solid #B9C9C2; border-radius: 4px; padding: 13px 16px; font-size: 17px; color: var(--fw-spruce); background: #fff;
}
.fluentform .ff-el-form-control:focus { border-color: var(--fw-pine); box-shadow: 0 0 0 1px var(--fw-pine); outline: none; }
.fluentform .ff-el-group { margin-bottom: 22px; }
.fluentform .ff-btn-submit {
	border-radius: 4px !important; font-weight: 600 !important; font-size: 17px !important; padding: 16px 30px !important;
	font-family: var(--fw-body);
}
.fluentform .ff-btn-submit:hover { opacity: 1 !important; background-color: var(--fw-amber-hi) !important; }
.fluentform .ff-message-success {
	border: 0; border-left: 4px solid var(--fw-pine); background: var(--fw-frost); color: var(--fw-spruce);
	box-shadow: none; padding: 20px 24px; font-size: 18px;
}
.fluentform .error.text-danger { color: var(--fw-holly); font-size: 15px; }

/* Accordion icons sit level with their question */
.elementor-accordion .elementor-tab-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.elementor-accordion .elementor-tab-title .elementor-accordion-icon { order: 2; }

/* Tables written in the text editor (e.g. "Prices at a glance") */
.elementor-widget-text-editor table { border: 0; margin: 0; }
.elementor-widget-text-editor table th, .elementor-widget-text-editor table td {
	border-left: 0 !important; border-right: 0 !important; border-top: 0 !important; background: transparent !important;
}
.elementor-widget-text-editor table tbody > tr:nth-child(odd) > td { background: transparent !important; }
.elementor-widget-text-editor table tbody tr:hover > td { background: rgba(255,255,255,.55) !important; }
@media (max-width: 767px) {
	.elementor-widget-text-editor table { font-size: 15px; }
	.elementor-widget-text-editor table th:nth-child(3), .elementor-widget-text-editor table td:nth-child(3) { display: none; }
}

/* Header: basket icon without button padding; menu toggle sizes to its icon on tablet/phone */
.hfe-cart-container.elementor-button { padding: 6px 8px !important; background: transparent !important; border: 0 !important; box-shadow: none !important; }
@media (max-width: 1024px) {
	.elementor-widget-navigation-menu { width: auto !important; flex: 1 1 auto !important; min-width: 0; }
	.elementor-widget-hfe-cart { flex: 0 0 auto !important; order: -1; }
}

/* WooCommerce block pages: keep wide blocks inside the page column */
.page-content .alignwide, .page-content .alignfull { margin-left: 0 !important; margin-right: 0 !important; max-width: 100%; width: auto; }
.wc-block-cart__totals-title, .wc-block-components-title, .wc-block-cart-items__header, .wc-block-components-product-name { text-transform: none !important; letter-spacing: 0 !important; }
.wc-block-cart__totals-title { font-size: 24px !important; }
.wp-block-woocommerce-cart-cross-sells-block h2, .wp-block-heading { font-family: var(--fw-display); color: var(--fw-spruce); }
.wc-block-grid__product-title, .wp-block-woocommerce-product-template .wp-block-post-title a,
.cross-sells-product .wc-block-components-product-name, .wc-block-components-product-name a { text-decoration: none !important; }
