/**
 * Habesha Market - Header and navigation, shared components, home gateway, Vores historie page, spacing system
 * Part of the site CSS moved from Customizer > Additional CSS on 2026-11-15 (original lines 422-611).
 * Files 01-08 load in number order; the order matters (later rules win), so keep it.
 */

/* === HM CATEGORY ARCHITECTURE (added 2026-09-19): category landing pages, breadcrumb, empty-state, mobile menu === */
.hm-cat-hero-img img { border-radius: 10px; width: 100%; height: auto; aspect-ratio: 1.5; object-fit: cover; display: block; }
.hm-cat-nav { font-size: 14px; color: var(--global-palette4); }
.hm-cat-nav a { color: var(--global-palette2); text-decoration: underline; text-underline-offset: 2px; }
.hm-cat-grid .hm-empty-note { color: var(--global-palette1); padding: 24px; border: 1px solid var(--hm-border); border-radius: 10px; background: var(--global-palette8); }
.hm-cat-grid:has(ul.products) .hm-empty-note { display: none; }
.hm-cat-grid .hm-empty-note a { color: var(--global-palette2); }
.hm-cat-hero-img + * { margin-top: 0; }
.hm-cat-grid ul.products li.product .button { width: 100%; text-align: center; }
/* Header nav: six categories must fit; keep items on one line without wrapping */
.main-navigation .primary-menu-container > ul > li.menu-item > a { white-space: nowrap; }
/* Mobile drawer: comfortable tap targets + separator */
.mobile-navigation ul li > a, #mobile-drawer .drawer-nav li > a { min-height: 48px; display: flex; align-items: center; }
#mobile-drawer .drawer-nav li.hm-menu-sep { border-top: 1px solid var(--hm-border); margin-top: 8px; padding-top: 8px; }
/* Visible focus for keyboard users */
/* === /HM CATEGORY ARCHITECTURE === */
/* === HM HOME GATEWAY + HERO COLLAGE (added 2026-09-19) === */
.hm-hero-collage { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hm-hero-collage img { width: 100%; height: auto; aspect-ratio: 1.3; object-fit: cover; border-radius: 10px; display: block; }
/* === /HM HOME GATEWAY === */
/* HM footer link lists (2026-09-19) */
.hm-footer-links { list-style: none; margin: 0; padding: 0; }
.hm-footer-links li { margin: 0 0 8px; }
.hm-footer-links a { display: inline-block; padding: 4px 0; }

/* HM header: fit six category links on one line (2026-09-19) */
@media (min-width: 1025px) {
	#main-header .primary-menu-container > ul > li.menu-item > a { font-size: 15px; padding-left: 10px; padding-right: 10px; }
}
@media (min-width: 1025px) and (max-width: 1200px) {
	#main-header .primary-menu-container > ul > li.menu-item > a { font-size: 14px; padding-left: 7px; padding-right: 7px; }
}

/* HM mobile header tap targets 44px (2026-09-19) */
@media (max-width: 1024px) {
	#mobile-header .menu-toggle-open, #mobile-header .search-toggle-open, #mobile-header .header-cart-button { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
}

/* HM draft placeholders in policy pages (2026-09-19): remove once pages are finalised */
.hm-placeholder { background: var(--hm-highlight); padding: 0 3px; }
.hm-draft-note { border: 1px dashed var(--global-palette2); padding: 12px 16px; border-radius: 8px; background: var(--global-palette8); }

/* === HM COMPONENTS (2026-09-19): shared classes used by category, policy and home sections === */
:root { --hm-border: #e3dfd5; --hm-highlight: #fff3c4; }
.entry-content div.hm-section.hm-section--crumb.hm-cat-crumb { padding-top: 0; padding-bottom: 0; }
.hm-section--end { padding-bottom: 0; }
.hm-prose { max-width: 760px; }
.hm-heading { color: var(--global-palette3); }
.hm-lead { color: var(--global-palette1); font-size: 1.0625rem; }
.hm-button .wp-block-button__link { background-color: var(--global-palette1); color: var(--global-palette9); border-radius: 6px; }
.hm-button .wp-block-button__link:hover, .hm-button .wp-block-button__link:focus-visible { background-color: var(--global-palette3); }
.hm-eyebrow { font-size: 0.75rem; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; line-height: 1.4; }
/* === /HM COMPONENTS === */

/* HM hero collage: hidden on phones so the approved mobile hero (text column over photo) is unchanged (2026-09-19) */
@media (max-width: 767px) {
	.site-hero-banner .hm-hero-collage { display: none; }
}

/* HM hero phone layout (2026-09-19): the wide hero panorama is shown as a full-width strip under the text on phones, so the text stays on plain cream and the whole scene remains visible. Overrides the 2026-09-13 side-by-side rules above. */
@media (max-width: 767px) {
	.site-hero-banner { background-image: url('https://habeshamarket.dk/wp-content/uploads/2026/09/hero-background-ethiopia-collection.webp'); background-size: 100% auto; background-position: center bottom; padding-bottom: calc(34vw + 24px) !important; }
	.site-hero-banner .wp-block-columns.hm-align .wp-block-column { flex-basis: 100% !important; max-width: 100% !important; }
	.site-hero-banner .wp-block-columns.hm-align { padding-left: 24px !important; padding-right: 24px !important; }
}

/* HM 'Se alle produkter' link (2026-09-19) */
.hm-link-all { margin: 0; }
.hm-link-all a { color: var(--global-palette2); font-weight: 600; text-decoration: none; }
.hm-link-all a:hover, .hm-link-all a:focus-visible { text-decoration: underline; text-underline-offset: 3px; }

/* HM account icon in header (2026-09-19): icon drawn with CSS mask so the header HTML item needs no SVG markup */
.hm-account-link { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; color: var(--global-palette3); }
.hm-account-link::before { content: ''; width: 22px; height: 22px; background-color: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c0-4.4 3.6-8 8-8s8 3.6 8 8'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c0-4.4 3.6-8 8-8s8 3.6 8 8'/%3E%3C/svg%3E") center / contain no-repeat; }
.hm-account-link:hover, .hm-account-link:focus-visible { color: var(--global-palette2); }
.hm-account-link:focus-visible { outline: 2px solid var(--global-palette1); outline-offset: 2px; }

/* HM global focus (2026-09-19): one visible keyboard focus style for all links and buttons */
a:focus-visible, button:focus-visible, .wp-block-button__link:focus-visible, .button:focus-visible { outline: 2px solid var(--global-palette1); outline-offset: 3px; }


/* HM homepage story portrait */
.hm-story-photo { margin: 0; }
.hm-story-photo img { width: 100%; height: 500px; object-fit: cover; object-position: 50% 80%; border-radius: 6px; display: block; }

/* === HM STORY PAGE (2026-09-19): Our Story page sections === */
.hm-sp-inner { max-width: 1280px; margin-left: auto; margin-right: auto; padding-left: 24px; padding-right: 24px; box-sizing: border-box; }
.hm-sp-hero, .hm-sp-future { position: relative; overflow: hidden; background-color: var(--global-palette3); }
.hm-sp-media img { display: block; }
.hm-sp-hero .hm-sp-media, .hm-sp-future .hm-sp-media { position: absolute; top: 0; right: 0; bottom: 0; left: 0; }
.hm-sp-hero .hm-sp-media img, .hm-sp-future .hm-sp-media img { width: 100%; height: 100%; object-fit: cover; }
.hm-sp-hero .hm-sp-media img { object-position: 50% 60%; }
.hm-sp-hero .hm-sp-media::after { content: ''; position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: linear-gradient(90deg, rgba(46,51,32,0.8) 0%, rgba(46,51,32,0.45) 40%, rgba(46,51,32,0) 68%); }
.hm-sp-hero-content { position: relative; z-index: 1; padding-top: calc(var(--hm-section-y) * 1.75); padding-bottom: calc(var(--hm-section-y) * 1.75); }
.hm-sp-hero-content > * { max-width: 34rem; }
.hm-sp-hero h1, .hm-sp-hero .hm-eyebrow, .hm-sp-lead { color: var(--global-palette9); }
.hm-sp-lead { margin: 16px 0 0; font-size: 1.0625rem; }
.hm-sp-hero .hm-eyebrow { margin: 0 0 12px; }
.hm-sp-hero h1 { margin: 0; }
.hm-sp-script { position: absolute; z-index: 2; margin: 0; font-family: var(--global-heading-font-family, serif); font-style: italic; font-weight: 600; font-size: clamp(20px, 2.2vw, 28px); line-height: 1.15; color: var(--global-palette9); text-shadow: 0 1px 10px rgba(0,0,0,0.4); pointer-events: none; }
.hm-sp-script--tr { top: 32px; right: 40px; text-align: right; }
.hm-sp-script--tl { top: 32px; left: 40px; }
.hm-sp-founder { background-color: var(--global-palette8); }
.hm-sp-founder { padding: var(--hm-section-y) 0; }
.hm-sp-founder-grid { display: grid; grid-template-columns: 4fr 5fr 3fr; gap: clamp(24px, 4vw, 56px); align-items: center; }
.hm-sp-portrait img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; object-position: 50% 85%; border-radius: 4px; }
.hm-sp-text .hm-eyebrow { margin: 0 0 12px; }
.hm-sp-text h2 { margin: 0 0 20px; }
.hm-sp-text p:not(.hm-eyebrow) { margin: 0 0 16px; }
.hm-sp-quote { margin: 0; padding: 40px 32px; background-color: var(--global-palette1); color: var(--global-palette9); }
.hm-sp-quote p { margin: 0; font-family: var(--global-heading-font-family, serif); font-style: italic; font-weight: 600; font-size: 1.625rem; line-height: 1.25; color: inherit; }
.hm-sp-quote p::after { content: ''; display: block; width: 32px; height: 1px; margin-top: 20px; background-color: currentColor; }
.hm-sp-split { display: grid; grid-template-columns: 1fr 1fr; background-color: var(--global-palette8); }
.hm-sp-split > .wp-block-group__inner-container { display: contents; }
.hm-sp-split .hm-sp-text { padding: var(--hm-section-y) clamp(24px, 6vw, 96px); align-self: center; }
.hm-sp-split .hm-sp-media { position: relative; min-height: 420px; }
.hm-sp-split .hm-sp-media img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
.hm-sp-split .hm-sp-media::after { content: ''; position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: linear-gradient(180deg, rgba(0,0,0,0.28) 0%, rgba(0,0,0,0) 45%); }
.hm-sp-future { min-height: 380px; }
.hm-sp-future .hm-sp-media::after { content: ''; position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: linear-gradient(90deg, rgba(251,249,247,0.92) 0%, rgba(251,249,247,0.7) 38%, rgba(251,249,247,0) 62%); }
.hm-sp-future-content { position: relative; z-index: 1; padding-top: calc(var(--hm-section-y) * 1.5); padding-bottom: calc(var(--hm-section-y) * 1.5); }
.hm-sp-future-content > * { max-width: 30rem; }
.hm-sp-future .hm-eyebrow { margin: 0 0 12px; }
.hm-sp-future h2 { margin: 0 0 16px; }
.hm-sp-future p:not(.hm-eyebrow):not(.hm-sp-script) { margin: 0 0 12px; }
.hm-sp-future .wp-block-buttons { margin-top: 28px; }
@media (max-width: 900px) { .hm-sp-founder-grid { grid-template-columns: 1fr 1fr; } .hm-sp-quote { grid-column: 1 / -1; } }
@media (max-width: 767px) {
	.hm-sp-hero-content { padding-top: var(--hm-section-y); padding-bottom: 210px; }
	.hm-sp-hero .hm-sp-media img { object-position: 50% 78%; }
	.hm-sp-hero .hm-sp-media::after { background: linear-gradient(180deg, rgba(46,51,32,0.88) 0%, rgba(46,51,32,0.6) 45%, rgba(46,51,32,0) 78%); }
	.hm-sp-hero .hm-sp-script { display: none; }
	.hm-sp-script--tr { top: auto; bottom: 16px; right: 20px; }
	.hm-sp-script--tl { left: 20px; top: 20px; }
	.hm-sp-founder-grid { grid-template-columns: 1fr; }
	.hm-sp-split { grid-template-columns: 1fr; }
	.hm-sp-split .hm-sp-text { padding: var(--hm-section-y) var(--hm-space-3); }
	.hm-sp-split .hm-sp-media { min-height: 280px; }
	.hm-sp-split--reverse .hm-sp-text { order: -1; }
	.hm-sp-future .hm-sp-media::after { background: linear-gradient(180deg, rgba(251,249,247,0.92) 0%, rgba(251,249,247,0.75) 100%); }
}
.hm-sp-future .hm-sp-script--tr { top: auto; bottom: 28px; }
/* === /HM STORY PAGE === */

/* === HM HOME GATEWAY (circles, 2026-09-19) === */
/* 2026-11-16: image box gets its own fixed square (aspect-ratio + overflow on the span, img fills it) and every card is top-aligned,
   so all circles and titles line up in each row on iPhone Safari (before, 'Alle produkter' sat ~10px lower with its title ~8px higher
   than 'Mad & krydderier'). Backup: hm-backups/02-header-components-story-2026-11-16-before-gateway-align.css */
.hm-gateway-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 40px 24px; margin-top: 32px; align-items: start; }
.hm-gateway-card { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 16px; min-width: 0; text-decoration: none; color: var(--global-palette3); }
.hm-gateway-img { display: block; flex: 0 0 auto; width: min(100%, 176px); aspect-ratio: 1 / 1; border-radius: 50%; overflow: hidden; }
.hm-gateway-img img { display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; border-radius: 50%; transition: transform .2s ease; }
.hm-gateway-card:hover .hm-gateway-img img { transform: scale(1.03); }
.hm-gateway-title { display: block; font-size: 1rem; font-weight: 500; line-height: 1.3; text-align: center; }
.hm-gateway-arrow { display: inline-block; margin-left: 6px; color: var(--global-palette2); transition: transform .2s ease; }
.hm-gateway-card:hover .hm-gateway-arrow { transform: translateX(3px); }
.hm-gateway-card:focus-visible { outline: 2px solid var(--global-palette1); outline-offset: 6px; border-radius: 8px; }
.hm-cat-grid { scroll-margin-top: 96px; }
@media (max-width: 560px) { .hm-gateway-grid { grid-template-columns: repeat(2, 1fr); gap: 32px 16px; }
	/* 2026-11-17: 5 cards (Hår & skønhed added) - the odd last card is centred on its own row on phones */
	.hm-gateway-grid > .hm-gateway-card:last-child:nth-child(odd) { grid-column: 1 / -1; justify-self: center; width: calc(50% - 8px); } .hm-gateway-img { width: min(100%, 148px); } }
@media (prefers-reduced-motion: reduce) { .hm-gateway-img img, .hm-gateway-arrow { transition: none; } .hm-gateway-card:hover .hm-gateway-img img, .hm-gateway-card:hover .hm-gateway-arrow { transform: none; } }
/* HM gateway one row (2026-09-19): all six categories in one line on wide screens */
@media (min-width: 1101px) { .hm-gateway-grid { grid-template-columns: repeat(5, 1fr); gap: 32px 16px; max-width: 1100px; margin-left: auto; margin-right: auto; } .hm-gateway-img { width: min(100%, 150px); } .hm-gateway-title { font-size: 0.9375rem; } }
/* === /HM HOME GATEWAY === */

/* === HM CONSISTENCY (2026-09-19): one button, form and checkout style across the site === */
.wpforms-container { --wpforms-button-background-color: var(--global-palette1); --wpforms-button-background-color-alt: var(--global-palette3); --wpforms-button-text-color: var(--global-palette9); --wpforms-button-border-radius: 6px; --wpforms-field-border-radius: 6px; }
div.wpforms-container-full .wpforms-form .wpforms-submit-container button[type=submit].wpforms-submit { background-color: var(--global-palette1); color: var(--global-palette9); border-radius: 6px; font-family: inherit; font-size: 1rem; font-weight: 600; line-height: 1.2; height: auto; padding: 12px 22px; }
div.wpforms-container-full .wpforms-form .wpforms-submit-container button[type=submit].wpforms-submit:hover, div.wpforms-container-full .wpforms-form .wpforms-submit-container button[type=submit].wpforms-submit:focus-visible { background-color: var(--global-palette3); }
div.wpforms-container-full .wpforms-form input[type=text], div.wpforms-container-full .wpforms-form input[type=email], div.wpforms-container-full .wpforms-form textarea, div.wpforms-container-full .wpforms-form select { font-family: inherit; font-size: 1rem; border-radius: 6px; }
.wc-block-components-button:not(.is-link) { background-color: var(--global-palette1); color: var(--global-palette9); border-radius: 6px; font-family: inherit; font-size: 1rem; font-weight: 600; }
.wc-block-components-button:not(.is-link):hover, .wc-block-components-button:not(.is-link):focus-visible { background-color: var(--global-palette3); color: var(--global-palette9); }
.wc-block-checkout .wc-block-components-form .wc-block-components-text-input input[type], .wc-block-checkout .wc-block-components-form .wc-blocks-components-select__container, .wc-block-checkout .wc-block-components-form .wc-blocks-components-select__select { border-radius: 6px; }
/* === /HM CONSISTENCY === */

/* === HM SPACING SYSTEM (2026-09-19) ===
   ONE rule for vertical rhythm on every page built from sections:
   1. --hm-gap separates every section from the previous element (or from the header).
   2. A section with a background (a band) gets --hm-gap of padding inside, so text-to-edge equals the gap to the next section.
   3. The last section is followed by --hm-gap before the footer.
   Scale: 8 / 16 / 24 / 32 / 48 / 64. Side gutter: 24px. */
:root { --hm-space-1: 8px; --hm-space-2: 16px; --hm-space-3: 24px; --hm-space-4: 32px; --hm-space-5: 48px; --hm-space-6: 64px; --hm-gap: clamp(32px, 3.4vw, 48px); --hm-gap-sm: 32px; --hm-section-y: var(--hm-gap); }
.entry-content > .wp-block-group:not([class*='hm-sp-']), .entry-content > .wp-block-kadence-rowlayout, .entry-content > .kb-row-layout-wrap { margin-top: var(--hm-gap); margin-bottom: 0; }
.entry-content > div[class*='hm-sp-'] { margin-top: 0; margin-bottom: 0; }
.entry-content > div.hm-sp-hero { margin-top: var(--hm-gap); }
.entry-content > div.wp-block-group.hm-sp-future:last-child { margin-bottom: var(--hm-gap); }
.entry-content > .wp-block-group:not([class*='hm-sp-']):last-child, .entry-content > .wp-block-kadence-rowlayout:last-child, .entry-content > .kb-row-layout-wrap:last-child, .entry-content > div:last-child { margin-bottom: var(--hm-gap); }
.entry-content div.hm-section.hm-section { padding: 0 var(--hm-space-3); }
.entry-content div.has-background.hm-section.hm-section, .entry-content > div.site-hero-banner { padding-top: var(--hm-gap); padding-bottom: var(--hm-gap); }
.content-area:has(.hm-section, .hm-sp-hero, .site-hero-banner) { margin-top: 0; margin-bottom: 0; }
.content-area:not(:has(.hm-section, .hm-sp-hero, .site-hero-banner)) { margin-top: var(--hm-gap); margin-bottom: var(--hm-gap); }
.entry-content .hm-prose > .wp-block-group__inner-container > :last-child { margin-bottom: 0; }
/* === /HM SPACING SYSTEM === */

