/* Eagle Shalimar – globala stilar ovanpå theme.json */

:root {
	--es-green: #284B3D;
	--es-green-dark: #1C382D;
	--es-sand: #E8DDCC;
	--es-sand-light: #F2EDE4;
	--es-base: #FAF9F6;
	--es-ink: #282828;
	--es-muted: #5E6B63;
	--es-radius: 14px;
	--es-shadow: 0 1px 2px rgba(40, 40, 40, .05), 0 8px 24px rgba(40, 40, 40, .06);
}

/* Fokus – tydligt och tillgängligt */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 3px solid #8A9A5B;
	outline-offset: 2px;
	border-radius: 4px;
}

.screen-reader-text:not(:focus) { position: absolute !important; clip: rect(1px, 1px, 1px, 1px); width: 1px; height: 1px; overflow: hidden; }

/* ---------- Sidhuvud ---------- */
.es-announce p { margin: 0; letter-spacing: .01em; }
.es-announce a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.es-header { position: sticky; top: 0; z-index: 50; }
.admin-bar .es-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .es-header { top: 0; } .es-header { position: relative; } }
.es-header-top { gap: 1.25rem; }
.es-logo img { width: 210px; height: auto; }
.es-search { flex: 1 1 auto; max-width: 520px; }
.es-search .wp-block-search__inside-wrapper { border: 1px solid var(--es-sand) !important; border-radius: 999px; background: #fff; padding: 2px 4px 2px 14px; }
.es-search .wp-block-search__input { border: 0; background: transparent; font-size: .95rem; padding: .55rem .25rem; }
.es-search .wp-block-search__button { border-radius: 999px; background: var(--es-green); color: var(--es-base); padding: .45rem .7rem; margin: 0; }
.es-search .wp-block-search__button svg { fill: currentColor; }
.es-header-icons { gap: .75rem; }
.es-header-icons .wc-block-mini-cart__button, .es-header-icons .wc-block-customer-account a { color: var(--es-green); }
.es-header-nav { margin-top: .6rem; }
.es-mainnav .wp-block-navigation-item__content { padding: .35rem 0; }
.es-mainnav .wp-block-navigation__submenu-container {
	border: 1px solid var(--es-sand) !important; border-radius: 12px; box-shadow: var(--es-shadow);
	padding: .5rem !important; min-width: 260px !important; background: #fff !important;
}
.es-mainnav .wp-block-navigation__submenu-container .wp-block-navigation-item__content { padding: .45rem .7rem; border-radius: 8px; font-weight: 500; }
.es-mainnav .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover { background: var(--es-sand-light); text-decoration: none; }
.es-mainnav .wp-block-navigation__submenu-container li:last-child .wp-block-navigation-item__content { font-weight: 700; color: var(--es-green); }
@media (max-width: 781px) {
	.es-header-top { flex-wrap: wrap !important; }
	.es-logo img { width: 170px; }
	.es-search { order: 3; flex-basis: 100%; max-width: none; }
	.es-header-nav { margin-top: .4rem; }
}

/* ---------- Sidfot ---------- */
.es-footer-list { list-style: none; padding-left: 0; }
.es-footer-list li { margin: .35rem 0; }
.es-footer a { text-decoration: none; }
.es-footer a:hover { text-decoration: underline; }
.es-footer .es-legal-line { margin: 0; opacity: .9; }
.es-footer mark.es-missing { background: #F3E6C8; color: var(--es-ink); }

/* ---------- Startsida ---------- */
.es-hero { overflow: hidden; }
.es-hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.9rem); }
.es-hero .wp-block-image img { border-radius: 24px; }
.es-eyebrow { text-transform: uppercase; letter-spacing: .14em; font-weight: 700; font-size: .78rem; color: var(--es-muted); }

.es-catcards { gap: 1.25rem; }
.es-card {
	background: #fff; border-radius: var(--es-radius); overflow: hidden; box-shadow: var(--es-shadow);
	transition: transform .2s ease, box-shadow .2s ease; position: relative; height: 100%;
}
.es-card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(40,40,40,.06), 0 16px 32px rgba(40,40,40,.09); }
.es-card .wp-block-image { margin: 0; }
.es-card .wp-block-image img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; display: block; }
.es-card h3 { margin: 0; }
.es-card h3 a { text-decoration: none; }
.es-card h3 a::after { content: ""; position: absolute; inset: 0; }
.es-card-body { padding: 1rem 1.25rem 1.25rem; }
.es-card-body p { margin: .35rem 0 0; color: var(--es-muted); font-size: .95rem; }

.es-benefit { background: #fff; border-radius: var(--es-radius); padding: 1.5rem; height: 100%; border: 1px solid var(--es-sand); }
.es-benefit h3 { font-size: 1.15rem; margin-top: .5rem; }
.es-benefit svg { width: 36px; height: 36px; color: var(--es-green); }

.es-season { border-radius: 24px; }
.es-pill-list { display: flex; flex-wrap: wrap; gap: .6rem; list-style: none; padding: 0; }
.es-pill-list a { display: inline-block; padding: .55rem 1rem; border-radius: 999px; background: #fff; border: 1px solid var(--es-sand); text-decoration: none; font-weight: 600; font-size: .95rem; }
.es-pill-list a:hover { background: var(--es-green); color: var(--es-base); border-color: var(--es-green); }

.es-link-arrow { font-weight: 700; text-decoration: none; }
.es-link-arrow::after { content: " →"; }

/* FAQ */
.es-faq details { border-bottom: 1px solid var(--es-sand); padding: 1rem 0; }
.es-faq summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.es-faq summary::-webkit-details-marker { display: none; }
.es-faq summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--es-green); }
.es-faq details[open] summary::after { content: "–"; }
.es-faq details p { margin: .75rem 0 0; }

/* ---------- Formulär ---------- */
.es-form label { display: block; font-weight: 600; margin-bottom: .3rem; }
.es-form input[type=text], .es-form input[type=email], .es-form textarea {
	width: 100%; padding: .75rem .9rem; border: 1px solid #CFC4B2; border-radius: 10px; background: #fff; font: inherit; color: var(--es-ink);
}
.es-form .es-hp { position: absolute; left: -9999px; }
.es-form-note, .es-consent { font-size: .875rem; color: var(--es-muted); }
.es-consent { display: grid; grid-template-columns: 20px 1fr; gap: .25rem .6rem; align-items: start; }
.es-consent label { font-weight: 400; display: inline; margin: 0; }
.es-consent span { grid-column: 2; }
.es-consent input { margin-top: .3rem; width: 18px; height: 18px; }
.es-newsletter-row { display: flex; gap: .5rem; flex-wrap: wrap; }
.es-newsletter-row input { flex: 1 1 240px; }
.es-alert { padding: .9rem 1rem; border-radius: 10px; margin-bottom: 1rem; font-weight: 600; }
.es-alert--ok { background: #E3EBDD; color: #1C382D; }
.es-alert--err { background: #F6E1D9; color: #6E2B12; }

/* Mörk sektion (t.ex. nyhetsbrev) */
.es-dark .es-consent, .es-dark .es-form-note { color: #E8DDCC; }
.es-dark .es-consent a { color: #fff; }

mark.es-missing { background: #FDF0C4; color: #5A4300; padding: 0 .25rem; border-radius: 4px; font-weight: 600; }

/* Företagsuppgifter */
.es-company { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1.25rem; }
.es-company dt { font-weight: 700; }
.es-company dd { margin: 0; }

/* ---------- Produkter ---------- */
.wc-block-components-product-name, .woocommerce-loop-product__title { font-family: Manrope, sans-serif !important; font-weight: 600; }
ul.products li.product, .wc-block-product { text-align: left; }
ul.products li.product img, .wc-block-components-product-image img { border-radius: 12px; background: var(--es-sand-light); }
ul.products li.product .button, .wc-block-components-product-button .wp-block-button__link { border-radius: 999px; }
.woocommerce span.onsale, .wc-block-components-product-sale-badge { background: #C47F5A; color: #fff; border-radius: 999px; border: 0; }
.es-buybox .wp-block-post-title { margin-top: 0; }
.es-trust { list-style: none; padding: 0; margin: 1.25rem 0; display: grid; gap: .4rem; font-size: .925rem; color: var(--es-muted); }
.es-trust li::before { content: "✓"; color: var(--es-green); font-weight: 800; margin-right: .5rem; }
.es-sample-note { background: #FDF0C4; border-radius: 10px; padding: .75rem 1rem; font-size: .9rem; }
.es-delivery-list li { margin-bottom: .4rem; }
.woocommerce div.product .woocommerce-tabs ul.tabs li { border-radius: 10px 10px 0 0; }
.related.products > h2, .es-recent h2, .es-products h2, .es-offers h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); }

.es-recent-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1.25rem; }
.es-recent-list a { display: grid; gap: .35rem; text-decoration: none; color: var(--es-ink); }
.es-recent-list img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 12px; background: var(--es-sand-light); }
.es-recent-name { font-weight: 600; }

/* Kategoribeskrivning */
.term-description { max-width: 760px; color: var(--es-muted); }

/* Rörelsekänslighet */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* Mörka sektioner */
.es-dark h1, .es-dark h2, .es-dark h3 { color: var(--es-base); }
.es-dark .wp-element-button, .es-dark button[type=submit] { background: var(--es-sand); color: var(--es-green); }
.es-dark .wp-element-button:hover, .es-dark button[type=submit]:hover { background: #fff; color: var(--es-green); }

/* Dölj tomma produktsektioner (t.ex. innan produkter publicerats) */
.es-productrows:not(:has(.es-products)), .es-offers-wrap:not(:has(.es-offers)) { display: none; }

/* Navigering: rymligare men utan radbrytning på mindre skärmar */
.es-mainnav { --navigation-layout-gap: 1.6rem; gap: 1.6rem !important; }
@media (max-width: 1100px) { .es-mainnav { gap: 1.1rem !important; } .es-mainnav .wp-block-navigation-item__content { font-size: .9rem; } }
.es-footer { overflow-wrap: normal; word-break: normal; hyphens: manual; }
.es-footer .wp-block-columns { flex-wrap: wrap !important; }
@media (min-width: 782px) and (max-width: 1100px) { .es-footer .wp-block-column { flex-basis: 45% !important; } }
.es-hero { padding-top: var(--wp--preset--spacing--60) !important; padding-bottom: var(--wp--preset--spacing--60) !important; }

/* Juridiska och informationssidor */
.wp-block-table table { border-collapse: collapse; width: 100%; font-size: .95rem; }
.wp-block-table th { background: var(--es-sand-light); text-align: left; }
.wp-block-table td, .wp-block-table th { border: 1px solid var(--es-sand); padding: .6rem .75rem; vertical-align: top; }
@media (max-width: 600px) { .wp-block-table { overflow-x: auto; } .wp-block-table table { min-width: 560px; } }
