/*
Theme Name: Weinonaut Deutschland
Description: Eigenständiges Magazin- und Katalogtheme für Weinonaut.de.
Version: 1.1.1
Requires at least: 6.6
Requires PHP: 8.0
Author: Weinonaut
License: GNU General Public License v2 or later
Text Domain: weinonaut-de
*/
:root {
  --wine: #750c1f; --dark: #4b0715; --ink: #251e1b; --muted: #645850;
  --paper: #fffdfb; --sand: #f5efe6; --line: #d6cabe; --white: #fff;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.6 var(--sans); overflow-wrap: break-word; }
.wrap { width: min(92%, 78rem); margin-inline: auto; }
h1, h2, h3, .identity, .signature, .story-link strong, .lead-story strong { font-family: var(--serif); line-height: 1.12; }
h1, h2, h3, h4 { text-wrap: pretty; overflow-wrap: anywhere; }
h1 { font-size: clamp(2.1rem, 5vw, 4.2rem); margin: .35em 0; letter-spacing: -.035em; }
h2 { font-size: clamp(1.65rem, 3vw, 2.65rem); margin: 1em 0 .6em; letter-spacing: -.02em; }
h3 { font-size: 1.45rem; }
a { color: var(--wine); text-underline-offset: .18em; }
a:hover { color: var(--dark); text-decoration: underline; }
:focus-visible { outline: 3px solid #095fa0 !important; outline-offset: 3px; box-shadow: 0 0 0 3px white; }
img, video { max-width: 100%; height: auto; }
iframe { max-width: 100%; }
button, input, select, textarea { font: inherit; max-width: 100%; }
button, .actions a, .woocommerce a.wnd-offer, a.wnd-offer { background: var(--wine); color: white; border: 1px solid var(--wine); border-radius: .55rem; min-height: 46px; padding: .58rem 1rem; font-weight: 650; text-decoration: none; cursor: pointer; }
button:hover, .actions a:hover, .woocommerce a.wnd-offer:hover, a.wnd-offer:hover { background: var(--dark); color: white; }
input[type=search], select, textarea, input[type=text], input[type=email], input[type=url] { padding: .55rem .7rem; min-height: 44px; border: 1px solid #84766f; background: white; border-radius: .45rem; }
.screen-reader-text, .skip:not(:focus) { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: absolute; z-index: 999; background: white; padding: .7rem; top: .4rem; left: .4rem; }
.mast { border-top: 4px solid var(--wine); border-bottom: 1px solid var(--line); background: var(--paper); }
.mast-inner, .foot .wrap { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .6rem 1.5rem; padding-block: 1rem; }
.identity, .signature { font-weight: 700; font-size: clamp(1.75rem, 3vw, 2.4rem); letter-spacing: -.04em; }
.identity a, .signature { text-decoration: none; color: var(--wine); }
.custom-logo { display: block; width: auto; max-width: min(230px, 65vw); height: auto; max-height: 3.8rem; object-fit: contain; }
.nav-list, .nav-list ul, .bottles, .story-grid, .story-list, .directory { padding: 0; margin: 0; list-style: none; }
.nav-list { display: flex; flex-wrap: wrap; gap: .1rem 1.05rem; }
.nav-list ul { padding-left: .7rem; border-left: 1px solid var(--line); }
.nav-list a { display: inline-flex; align-items: center; min-height: 44px; padding: .2rem; text-decoration: none; color: var(--ink); }
.nav-list a:hover, .nav-list .current-menu-item > a { text-decoration: underline; }
.searchbox, .directory-search, .actions { display: flex; flex-wrap: wrap; align-items: end; gap: .45rem; }
.searchbox { flex-wrap: nowrap; align-items: stretch; max-width: 100%; }
.searchbox label { min-width: 0; }
.searchbox input { width: 11rem; height: 100%; min-width: 0; }
.searchbox button { padding-inline: .8rem; }
.hero { display: grid; grid-template-columns: 1.05fr 1fr; align-items: stretch; margin: clamp(1rem,3vw,2.5rem) 0; border-radius: 1.3rem; background: var(--sand); border: 1px solid var(--line); }
.hero-copy { align-self: center; padding: clamp(1.3rem,4vw,3.8rem); }
.hero-copy p:not(.kicker) { max-width: 38ch; color: var(--muted); }
.kicker, .lead-story small { color: var(--wine); font-weight: 700; font-size: .86rem; }
.kicker { margin: 0; }
.actions { margin-top: 1.4rem; }
.actions a + a { color: var(--wine); background: transparent; }
.lead-story { min-width: 0; display: flex; flex-direction: column; justify-content: center; background: #ebe0d2; color: var(--ink); border-radius: 0 1.3rem 1.3rem 0; text-decoration: none; }
.lead-story img { width: 100%; aspect-ratio: 3/2; object-fit: contain; border-radius: 0 1.3rem 0 0; }
.lead-story span { display: grid; gap: .35rem; padding: .8rem 1.3rem 1.2rem; }
.lead-story strong { font-size: clamp(1.35rem,2.3vw,2rem); }
.bottles, .story-grid, .directory, .story-list { display: grid; gap: clamp(.7rem,1.8vw,1.5rem); grid-template-columns: repeat(4, minmax(0,1fr)); }
.bottle, .story-grid li, .woocommerce ul.products li.product { border: 1px solid var(--line); border-radius: .85rem; padding: .9rem; background: var(--white); }
.bottle { display: flex; flex-direction: column; align-items: flex-start; gap: .65rem; }
.bottle-detail, .story-link { display: block; color: var(--ink); text-decoration: none; }
.bottle-detail { width: 100%; }
.bottle-detail img, .woocommerce ul.products li.product a img { width: 100%; aspect-ratio: 1; object-fit: contain; display: block; margin: 0 0 .65rem; }
.bottle .wnd-offer { margin-top: auto; }
.wnd-offer { display: inline-flex !important; align-items: center; justify-content: center; gap: .4rem; text-align: center; }
.story-grid .story-thumb { width: 100%; aspect-ratio: 3/2; object-fit: contain; background: var(--sand); border-radius: .45rem; }
.story-link time, .story-link small, .byline, figcaption { display: block; font-size: .9rem; color: var(--muted); }
.story-link strong { display: block; color: var(--ink); font-size: 1.3rem; margin-top: .2rem; }
.story-list { grid-template-columns: 1fr 1fr; }
.story-list .story-link { display: flex; align-items: center; gap: .85rem; border-top: 1px solid var(--line); min-height: 4.7rem; padding-block: .5rem; }
.story-list .story-thumb { width: 5rem; height: 4rem; flex: 0 0 auto; object-fit: contain; }
.story-list strong { font-size: 1.08rem; }
.reading { max-width: 52.5rem; }
.section-title, .listing, .shop, .reading { padding-top: clamp(1rem,3vw,2rem); }
.prose, .term-description { line-height: 1.75; max-width: 76ch; }
.article-cover { margin: 1.2rem 0; }
.article-cover img { display: block; width: 100%; height: auto; }
.prose pre, .wp-block-table { max-width: 100%; overflow-x: auto; }
.prose table { display: block; overflow-x: auto; max-width: 100%; border-collapse: collapse; }
.prose th, .prose td { padding: .5rem; border: 1px solid var(--line); }
.prose figure { max-width: 100%; margin-inline: 0; }
.directory { margin-block: 1.5rem; gap: .25rem 1rem; }
.directory a, .paging a, .paging span, .nav-links a, .nav-links span { display: inline-flex; min-height: 44px; padding: .4rem; align-items: center; }
.directory-search input { display: block; }
.foot { border-top: 1px solid var(--line); margin-top: clamp(2rem,6vw,5rem); background: var(--sand); }
.woocommerce div.product .product_title { font-size: clamp(1.9rem,4vw,3.4rem); }
.woocommerce div.product .price, .woocommerce ul.products li.product .price, .price { color: var(--ink); font-weight: 650; }
.woocommerce div.product div.images img { width: 100%; max-height: 31rem; object-fit: contain; }
.woocommerce div.product div.images .woocommerce-product-gallery__wrapper { margin: 0; }
.shop .woocommerce-breadcrumb { color: var(--muted); font-size: .9rem; margin-bottom: 1rem; }
.shop .woocommerce-breadcrumb a { color: var(--wine); }
.brand-bottom, .stories { clear: both; padding-top: 1rem; }
.shop .woocommerce-result-count, .shop .woocommerce-ordering { margin-block: .6rem; }
.woocommerce ul.products li.product .woocommerce-loop-product__title { color: var(--ink); font: 650 1.05rem/1.3 var(--sans); }
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; }
  .lead-story, .lead-story img { border-radius: 0 0 1rem 1rem; }
  .bottles, .story-grid, .directory { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 600px) {
  .mast-inner { gap: .35rem; }
  .mast nav { order: 3; width: 100%; }
  .nav-list { gap: .1rem .65rem; }
  .mast .searchbox { flex: 1 1 11rem; }
  .mast .searchbox label { flex: 1; }
  .mast .searchbox input { width: 100%; }
  .story-list { grid-template-columns: 1fr; }
  .woocommerce div.product div.images img { max-height: 15rem; }
  .offer-line .wnd-offer { width: 100%; }
}
@media (max-width: 390px) {
  .bottles, .story-grid, .directory { grid-template-columns: 1fr; }
  .woocommerce ul.products[class*=columns-] li.product { width: 100%; float: none; margin-inline: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html:focus-within { scroll-behavior: auto; }
}
/* WooCommerce hides its gallery until its script initializes. Preserve the image without JS. */
.woocommerce .product .woocommerce-product-gallery { opacity: 1 !important; }
.wnd-toc { background: var(--sand); padding: .7rem 1rem; border: 1px solid var(--line); border-radius: .6rem; margin-block: 1rem; }
.wnd-toc summary { cursor: pointer; min-height: 44px; align-content: center; font-weight: 650; }
.wnd-toc a { display: inline-block; padding-block: .3rem; }
body.woocommerce div.product .summary p.price, body.woocommerce div.product .summary .price bdi { color: var(--ink); }
body.woocommerce .product a.wnd-offer.button.alt, body.woocommerce ul.products a.wnd-offer.button { background: var(--wine); color: #fff; }
body.woocommerce .product a.wnd-offer.button:hover { background: var(--dark); color: #fff; }
.woocommerce div.product.product-type-external div.summary {
  width: 100%; float: none; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0,1fr);
  column-gap: clamp(1rem,4vw,3.5rem); align-items: start;
}
.product-type-external .summary > * { grid-column: 2; min-width: 0; }
.woocommerce .product-type-external .summary div.images {
  grid-area: 1 / 1 / span 8 / 2; float: none; width: 100%; margin: 0;
}
.product-type-external .summary .offer-line { margin: .35rem 0 1rem; }
@media (max-width: 768px) {
  .woocommerce div.product.product-type-external div.summary { display: block; }
  .woocommerce .product-type-external .summary div.images { margin: 1rem 0; }
  .woocommerce .product-type-external .summary .offer-line .wnd-offer { width: 100%; }
}
.affiliate-note { flex-basis: 100%; margin: .3rem 0; font-size: .9rem; color: var(--muted); }
.focus-bottle { align-self: center; display: grid; grid-template-columns: minmax(5rem, .8fr) minmax(0, 1fr); gap: 1rem; align-items: center; padding: clamp(1rem,3vw,2rem); }
.focus-bottle h2 { font-size: clamp(1.3rem,2vw,2rem); margin: .4rem 0; }
.focus-bottle h2 a { color: var(--ink); }
.focus-image img { display: block; width: 100%; aspect-ratio: 3/4; object-fit: contain; }
body.woocommerce .product span.onsale { background: var(--wine); color: #fff; }
