/* === Unit 7: "Forgotten" pages (search, 404, My Account, Cart, Checkout) === */
/* Scoped with body classes so nothing here touches the homepage, inner pages
   or shop pages owned by other units: .search / .search-no-results
   (search results), .error404 (404 page hero built in the "blocks" post
   wired to the 404_block theme mod, which already inherits the shared
   .page-hero system from 30-pages.css), .woocommerce-account,
   .woocommerce-cart, .woocommerce-checkout. */

/* --- Header search (dropdown/lightbox trigger in the main nav, every page) ---
   Not body-scoped since the header is shared site-wide; kept to two narrow,
   additive selectors so it cannot collide with any other unit's header
   work. Flatsome's header search uses get_product_search_form(), so it is
   product-only by design (confirmed via the hidden post_type=product field);
   the general site search used elsewhere on this page and on /404/ is a
   separate, unscoped get_search_form(). Visual check of the dropdown box
   itself (light surface, rounded input, green icon button) found it already
   on-brand via Flatsome's own dropdown_radius/nav-dropdown theme styling;
   the only gap was a missing focus ring on the input. */
.header-search-form input.search-field:focus,
.searchform-wrapper input.search-field:focus{
	outline:none;border-color:var(--color-secondary);box-shadow:0 0 0 3px rgba(5,127,92,.35);
}

/* --- Search results header (blog/page-type search, ?s=...) --- */
body.search .archive-page-header{
	background:linear-gradient(120deg,#051F30 0%,#072F47 55%,#0B4A6F 100%);
	padding:56px 0;margin-bottom:40px;
}
body.search .archive-page-header .page-title{color:#fff;margin-bottom:0;text-transform:none;letter-spacing:0}
body.search .archive-page-header .page-title span{color:#5FE0B0}
body.search .betogrow-search-count{color:var(--color-text-muted);font-size:15px;margin:16px 0 0}
body.search.search-no-results .archive-page-header{margin-bottom:0}

/* --- Result cards (pages + products mixed in the general search loop) --- */
body.search #post-list{display:grid;grid-template-columns:repeat(2,1fr);gap:24px;margin-top:8px;align-items:start}
body.search #post-list article{
	border:1px solid var(--color-border);border-radius:8px;background:#fff;overflow:hidden;
	box-shadow:0 2px 10px rgba(7,47,71,.06);transition:box-shadow .2s ease,transform .2s ease;
}
body.search #post-list article:hover{box-shadow:0 14px 30px rgba(7,47,71,.14);transform:translateY(-3px)}
body.search #post-list .article-inner{height:100%;display:flex;flex-direction:column}
body.search #post-list .entry-header-text{padding:24px 24px 0}
body.search #post-list .entry-category{color:var(--color-secondary);font-weight:700;letter-spacing:.06em}
body.search #post-list .entry-title{font-size:19px;margin-bottom:0}
body.search #post-list .entry-title a{color:var(--color-primary-dark)}
body.search #post-list .entry-divider{display:none}
body.search #post-list .entry-image{margin:16px 24px 0;border-radius:6px;overflow:hidden}
body.search #post-list .entry-image img{aspect-ratio:4/3;object-fit:cover;width:100%}
body.search #post-list .badge.post-date{display:none}
body.search #post-list .entry-content{padding:16px 24px 24px;flex:1;display:flex;flex-direction:column;justify-content:flex-end}
body.search #post-list .entry-summary p{color:var(--color-text-muted);font-size:14.5px}
body.search #post-list .more-link{margin:0}
@media (max-width:849px){
	body.search #post-list{grid-template-columns:1fr}
}

/* --- Empty search state (content-none.php: single H1 "No results for …") --- */
body.search-no-results .no-results{
	max-width:640px;margin:0 auto;text-align:center;padding:8px 20px 60px;
}
body.search-no-results .no-results .page-title h1,
body.search-no-results .no-results h1.page-title{
	font-size:28px;color:var(--color-primary-dark);margin-bottom:.4em;
}
body.search-no-results .no-results .page-content > p{color:var(--color-text-muted);font-size:16px;margin-bottom:1.6em}
body.search-no-results .searchform-wrapper{max-width:480px;margin:0 auto}
body.search-no-results .betogrow-search-empty-links{margin-top:36px;padding-top:32px;border-top:1px solid var(--color-border)}
body.search-no-results .betogrow-search-empty-lead{font-weight:600;color:var(--color-text);margin-bottom:1em}
body.search-no-results .betogrow-search-empty-btns{display:flex;flex-wrap:wrap;gap:14px;justify-content:center}
body.search-no-results .betogrow-search-empty-btns .button{margin:0;min-height:44px}
body.search-no-results .betogrow-btn-outline-navy{
	background:#fff;color:var(--color-primary);border:1px solid var(--color-primary);
}
body.search-no-results .betogrow-btn-outline-navy:hover{background:var(--color-surface)}

/* --- WooCommerce product search (?s=...&post_type=product), missing title added in PHP --- */
body.search.woocommerce-shop .betogrow-search-title{text-align:center;margin-bottom:.2em}
body.search.woocommerce-shop .betogrow-search-count{text-align:center;margin:0 0 24px}
/* Flatsome's own "Pages found" slider (appended after the product grid on a
   product-type search) has no fallback image for plain pages, so every card
   collapses to an empty box and the Flickity slider often doesn't get a
   chance to initialise before the screenshot/paint, leaving a large blank
   gap. The general site search (?s=... without post_type) already lists
   matching pages properly as cards, so hide this broken duplicate here. */
body.search.woocommerce-shop hr + h4.uppercase,
body.search.woocommerce-shop h4.uppercase + .row-slider{display:none}

/* === 404 page === */
/* .error404 .page-hero* reuses Unit 4's shared hero system from 30-pages.css
   (scoped body:not(.home), which matches .error404 too); only the small
   404-specific pieces (centered eyebrow, numeral badge, search box, button
   row spacing) are added here. */
body.error404 .page-hero-eyebrow{justify-content:center}
body.error404 .page-hero .text-box{max-width:640px;margin:0 auto}
body.error404 .notfound-badge{
	font-family:Montserrat,sans-serif;font-weight:700;font-size:15px;letter-spacing:.16em;
	color:#5FE0B0;opacity:.85;margin-bottom:.6em;
}
body.error404 .notfound-search{max-width:440px;margin:28px auto 22px}
body.error404 .notfound-search .searchform{margin:0}
body.error404 .notfound-search input.search-field{
	background:#fff;border-radius:6px 0 0 6px;height:48px;
}
body.error404 .notfound-search .ux-search-submit{border-radius:0 6px 6px 0;height:48px;width:48px}
body.error404 .page-hero-btn{min-height:44px;display:inline-flex;align-items:center}

/* === WooCommerce: My Account / Cart / Checkout === */
body.woocommerce-account .my-account-header,
body.woocommerce-cart .checkout-page-title,
body.woocommerce-checkout .checkout-page-title{
	background:var(--color-surface);border-bottom:1px solid var(--color-border);padding:36px 0;
}
body.woocommerce-account .my-account-header h1{
	color:var(--color-primary-dark);font-size:28px;margin-bottom:0;text-transform:none;
}
body.woocommerce-cart .checkout-breadcrumbs,
body.woocommerce-checkout .checkout-breadcrumbs{font-size:14px;text-transform:none;letter-spacing:0}
body.woocommerce-cart .checkout-breadcrumbs .current,
body.woocommerce-checkout .checkout-breadcrumbs .current{color:var(--color-primary-dark);font-weight:700}

/* Real H1s added via PHP (woocommerce_before_cart / woocommerce_cart_is_empty),
   placed above the breadcrumb title bar so the breadcrumb still reads as a
   secondary, step-indicator element rather than the page heading. */
body.woocommerce-cart .betogrow-cart-title{
	display:block;text-align:center;color:var(--color-primary-dark);font-size:28px;
	padding:28px 20px 0;margin-bottom:0;
}

/* Empty-cart nudge card */
body.woocommerce-cart .return-to-shop{display:none}
body.woocommerce-cart .wc-empty-cart-message .woocommerce-info{
	max-width:560px;margin:32px auto 0;border-radius:8px;border:1px solid var(--color-border);
	background:#fff;box-shadow:0 2px 10px rgba(7,47,71,.06);
}
body.woocommerce-cart .betogrow-cart-empty-cta{
	max-width:560px;margin:28px auto 56px;text-align:center;padding:40px 32px;
	border-radius:8px;background:var(--color-surface);border:1px solid var(--color-border);
}
body.woocommerce-cart .betogrow-cart-empty-icon{
	width:56px;height:56px;border-radius:50%;background:#E6F4EE;color:var(--color-secondary);
	display:flex;align-items:center;justify-content:center;margin:0 auto 18px;
}
body.woocommerce-cart .betogrow-cart-empty-cta h2{color:var(--color-primary-dark);font-size:22px;margin-bottom:.5em}
body.woocommerce-cart .betogrow-cart-empty-cta p{color:var(--color-text-muted);font-size:15px;margin-bottom:1.6em}
body.woocommerce-cart .betogrow-cart-empty-btns{display:flex;flex-wrap:wrap;gap:14px;justify-content:center}
body.woocommerce-cart .betogrow-cart-empty-btns .button{margin:0;min-height:44px}

/* Cart table (non-empty state, styled for whenever items exist) */
body.woocommerce-cart table.shop_table{border:1px solid var(--color-border);border-radius:8px;overflow:hidden}
body.woocommerce-cart table.shop_table th{background:var(--color-surface);color:var(--color-primary-dark);font-weight:700}
body.woocommerce-cart .coupon .input-text,
body.woocommerce-cart td.actions .input-text{
	border:1px solid var(--color-border);border-radius:8px;padding:12px 14px;height:auto;
}
body.woocommerce-cart .coupon .input-text:focus,
body.woocommerce-cart td.actions .input-text:focus{
	outline:none;border-color:var(--color-secondary);box-shadow:0 0 0 3px rgba(5,127,92,.35);
}
body.woocommerce-cart .cart_totals{border:1px solid var(--color-border);border-radius:8px;padding:24px;background:#fff}
body.woocommerce-cart .cart_totals h2{color:var(--color-primary-dark);font-size:20px}

/* Login / register forms (My Account) and address / checkout forms:
   inputs match the contact-form language used elsewhere on the site
   (8px radius, visible focus ring) via WooCommerce's own field classes. */
body.woocommerce-account .account-login-inner,
body.woocommerce-account .u-column1,
body.woocommerce-account .u-column2{
	max-width:440px;margin:0 auto;padding:32px;border:1px solid var(--color-border);
	border-radius:8px;background:#fff;box-shadow:0 2px 10px rgba(7,47,71,.06);
}
body.woocommerce-account .account-login-inner h3{
	text-align:center;color:var(--color-primary-dark);text-transform:none;margin-bottom:1em;
}
body.woocommerce-account .woocommerce-form-row,
body.woocommerce-checkout .form-row,
body.woocommerce-account .woocommerce-EditAccountForm .form-row,
body.woocommerce-account .woocommerce-Address .form-row{margin-bottom:18px}
body.woocommerce-account .woocommerce-form-row label,
body.woocommerce-checkout .form-row label,
body.woocommerce-account .woocommerce-EditAccountForm label,
body.woocommerce-account .woocommerce-Address label{
	display:block;font-weight:600;color:var(--color-text);font-size:14px;margin-bottom:6px;
}
body.woocommerce-account input.input-text,
body.woocommerce-account select,
body.woocommerce-account textarea,
body.woocommerce-checkout input.input-text,
body.woocommerce-checkout select,
body.woocommerce-checkout textarea{
	display:block;width:100%;padding:13px 16px;border:1px solid var(--color-border);
	border-radius:8px;font-size:15px;line-height:1.5;font-family:inherit;color:var(--color-text);
	background:#fff;transition:border-color .15s ease,box-shadow .15s ease;box-sizing:border-box;
}
body.woocommerce-account input.input-text:focus,
body.woocommerce-account select:focus,
body.woocommerce-account textarea:focus,
body.woocommerce-checkout input.input-text:focus,
body.woocommerce-checkout select:focus,
body.woocommerce-checkout textarea:focus{
	outline:none;border-color:var(--color-secondary);box-shadow:0 0 0 3px rgba(5,127,92,.35);
}
body.woocommerce-account .woocommerce-form-login__rememberme{
	display:flex;align-items:center;gap:8px;font-weight:400;font-size:14px;color:var(--color-text-muted);
}
body.woocommerce-account button.woocommerce-button,
body.woocommerce-account input[type="submit"].woocommerce-button,
body.woocommerce-checkout #place_order{
	display:block;width:100%;background:var(--color-secondary);color:#fff;border:none;
	border-radius:6px;padding:15px 20px;font-size:15px;font-weight:700;letter-spacing:.02em;
	cursor:pointer;transition:background-color .2s ease,transform .2s ease;min-height:44px;
}
body.woocommerce-account button.woocommerce-button:hover,
body.woocommerce-account input[type="submit"].woocommerce-button:hover,
body.woocommerce-checkout #place_order:hover{background:var(--color-secondary-hover);transform:translateY(-2px)}
body.woocommerce-account .woocommerce-LostPassword{text-align:center;margin-top:1em;font-size:14px}
body.woocommerce-account .woocommerce-LostPassword a{color:var(--color-secondary)}

/* My Account dashboard / nav tabs (only visible when logged in; styled
   defensively so a future logged-in visit is consistent with the rest of
   the site even though the checker only ever sees the logged-out state). */
body.woocommerce-account .woocommerce-MyAccount-navigation ul{
	list-style:none;margin:0 0 24px;padding:0;display:flex;flex-wrap:wrap;gap:8px;
	border-bottom:1px solid var(--color-border);
}
body.woocommerce-account .woocommerce-MyAccount-navigation li{margin:0}
body.woocommerce-account .woocommerce-MyAccount-navigation li a{
	display:inline-block;padding:10px 16px;color:var(--color-text-muted);font-weight:600;
	border-radius:6px 6px 0 0;
}
body.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a{
	color:var(--color-primary-dark);background:var(--color-surface);
}
body.woocommerce-account table.shop_table{border:1px solid var(--color-border);border-radius:8px;overflow:hidden}
body.woocommerce-account table.shop_table th{background:var(--color-surface);color:var(--color-primary-dark)}

@media (max-width:549px){
	body.search .archive-page-header{padding:40px 0}
	body.search #post-list .entry-header-text,
	body.search #post-list .entry-image,
	body.search #post-list .entry-content{margin-left:16px;margin-right:16px;padding-left:0;padding-right:0}
	body.error404 .notfound-search{margin-top:20px}
	body.woocommerce-cart .betogrow-cart-empty-cta{padding:28px 20px;margin-left:16px;margin-right:16px}
	body.woocommerce-account .account-login-inner{padding:24px 20px;margin-left:16px;margin-right:16px}
}
