/* frontendshop2 — fixed shop page layout.
   Colours are CSS custom properties set per shop (views/site/_styletag.php):
   --shop-headerBackground/-headerText, --shop-mainBackground/-mainText,
   --shop-buttonBackground/-buttonText, --shop-footerBackground/-footerText,
   --shop-sublineBackground/-sublineText, --shop-fontFamily. */

/* Hausschriften, lokal ausgeliefert (keine externen CDNs, DSGVO).
   Die Dateien liegen in @frontendshop2/assets/fonts und werden über
   ShopAsset::$publishOptions mitpubliziert — der 'only'-Filter dort muss
   'fonts/*' enthalten, sonst laufen die relativen URLs unten ins Leere.

   Aktiv genutzt wird derzeit nur Matter (Default in --shop-fontFamily).
   Concrette, Ginto und Playpen sind vorbereitet: Datei + @font-face liegen
   bereit, auswählbar per Backend-Feld "Schriftart" (shopStyle.fontFamily
   in common/config/_base/_shopcontent.php). Kundeneigene Schriften kommen
   nicht hierher, sondern ins Storage — siehe das customCss-Feld.

   Die Einzelschnitt-Familien deklarieren font-weight als Range 400 700,
   damit der Browser fette Auszeichnungen aus derselben Datei bedient statt
   sie synthetisch zu verzerren. */

/* Matter — Fließtext- und UI-Schrift, drei echte Schnitte */
@font-face {
    font-family: 'Matter';
    src: url('../fonts/MatterRegular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Matter';
    src: url('../fonts/MatterMedium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Matter';
    src: url('../fonts/Matter-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* Concrette — vorbereitet, nicht aktiv */
@font-face {
    font-family: 'Concrette';
    src: url('../fonts/ConcretteS-Regular.woff2') format('woff2');
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
}

/* Ginto (ABC Ginto Nord Condensed) — vorbereitet, nicht aktiv; Display-Schrift */
@font-face {
    font-family: 'Ginto';
    src: url('../fonts/ABCGintoNordCondensed-Bold.woff2') format('woff2');
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
}

/* Playpen Sans — vorbereitet, nicht aktiv */
@font-face {
    font-family: 'Playpen';
    src: url('../fonts/PlaypenSans-Regular.woff2') format('woff2');
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --shop-fontFamily: 'Matter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --shop-headerBackground: #002a43;
    --shop-headerText: #ffffff;
    --shop-sublineBackground: #ffffff;
    --shop-sublineText: #e75700;
    --shop-mainBackground: #ffffff;
    --shop-mainText: #1a1a1a;
    --shop-buttonBackground: #1f2937;
    --shop-buttonText: #ffffff;
    --shop-footerBackground: #1f2937;
    --shop-footerText: #ffffff;
    --shop-max-width: 1080px;
}

* { box-sizing: border-box; }

/* no rounded corners anywhere on the shop page */
*,
*::before,
*::after { border-radius: 0 !important; }

body {
    margin: 0;
    font-family: var(--shop-fontFamily, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
    line-height: 1.55;
    background: var(--shop-mainBackground);
    color: var(--shop-mainText);
}

a { color: inherit; }
img { max-width: 100%; height: auto; }

.shop-slot { display: block; }

/* header */
.shop-header { background: var(--shop-headerBackground); color: var(--shop-headerText); }
.shop-header__inner {
    max-width: var(--shop-max-width);
    margin: 0 auto;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}
.shop-header__logo img { max-height: 55px; width: auto; display: block; }
.shop-header__actions { margin-left: auto; display: flex; align-items: center; gap: 1.25rem; }
.shop-header__lang { display: flex; gap: 0.75rem; }
.shop-header__lang a { text-decoration: none; opacity: 0.7; }
.shop-header__lang a.is-active { opacity: 1; font-weight: 700; text-decoration: underline; }
.shop-header__cart {
    position: relative;
    display: inline-flex;
    align-items: center;
    color: inherit;
    text-decoration: none;
}
.shop-header__cart-icon { display: block; }
.shop-header__cart-count {
    position: absolute;
    top: -0.5rem;
    right: -0.6rem;
    min-width: 1.15rem;
    height: 1.15rem;
    padding: 0 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--shop-sublineText);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1;
    /* bewusste Ausnahme vom globalen "no rounded corners"-Reset oben */
    border-radius: 999px !important;
}

/* main — desktop 2 columns, mobile 1 */
.shop-main {
    max-width: var(--shop-max-width);
    margin: 0 auto;
    padding: 3rem 1.25rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    /* Bild- und Textspalte beginnen beide oben, statt zur Mitte der hoeheren Spalte
       ausgerichtet zu werden. Einspaltig (mobil) macht das keinen Unterschied. */
    align-items: start;
}
@media (max-width: 820px) {
    .shop-main { grid-template-columns: 1fr; padding: 2rem 1.25rem; }
}
.shop-headline { margin: 0 0 0.5rem; font-size: 2rem; }
.shop-subline { margin: 0 0 1.25rem; font-size: 1.05rem; opacity: 0.8; }
.shop-belowbutton { margin: 0.75rem 0 0; font-size: 0.95rem; opacity: 0.75; }

/* order confirmation / thank-you page */
.shop-confirmation { max-width: var(--shop-max-width); margin: 0 auto; padding: 4rem 1.25rem; }
.shop-confirmation__inner { max-width: 620px; }
.shop-confirmation__headline { margin: 0 0 1rem; font-size: 1.9rem; }
.shop-confirmation__text { margin: 0 0 0.75rem; font-size: 1.05rem; }
.shop-confirmation__text--muted { opacity: 0.75; font-size: 0.95rem; }
.shop-confirmation__download { margin: 1rem 0 0.5rem; }
.shop-confirmation__pending { margin-top: 1rem; opacity: 0.85; font-style: italic; }
.shop-confirmation__back { margin-top: 2rem; font-size: 0.95rem; }
@media (max-width: 820px) { .shop-confirmation { padding: 2.5rem 1.25rem; } }

/* product images */
.shop-productimages { position: relative; overflow: hidden; }
.shop-productimages__track {
    display: flex;
    transition: transform 0.3s ease;
}
/* pan-y laesst vertikales Scrollen der Seite zu und behaelt die horizontale Geste
   fuer den Bildwechsel — ohne das wuerde ein Wisch auf dem Bild die Seite scrollen. */
.shop-productimages--multi .shop-productimages__track {
    touch-action: pan-y;
    cursor: grab;
    user-select: none;
}
.shop-productimages--multi.is-dragging .shop-productimages__track { cursor: grabbing; }
/* waehrend des Ziehens folgt das Bild dem Finger, da darf keine Transition dazwischen */
.shop-productimages--multi.is-dragging .shop-productimages__track { transition: none; }
.shop-productimages__img { flex: 0 0 100%; width: 100%; display: block; }
@media (prefers-reduced-motion: reduce) {
    .shop-productimages__track { transition: none; }
}
.shop-productimages__dots { display: flex; gap: 0.4rem; justify-content: center; align-items: center; margin-top: 0.7rem; }
.shop-productimages__dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: none;
    background: rgba(0, 0, 0, 0.22);
    cursor: pointer;
    position: relative;
    /* bewusste Ausnahme vom globalen "no rounded corners"-Reset oben */
    border-radius: 999px !important;
    transition: width 0.25s ease, background-color 0.25s ease;
}
/* unsichtbar groessere Klickflaeche — 8px trifft man mit dem Finger sonst kaum.
   Horizontal nur bis zur Haelfte der gap, damit sich benachbarte Dots nicht ueberlappen. */
.shop-productimages__dot::after { content: ''; position: absolute; inset: -9px -3px; }
.shop-productimages__dot:hover { background: rgba(0, 0, 0, 0.4); }
.shop-productimages__dot.is-active { width: 26px; background: var(--shop-buttonBackground); }
@media (prefers-reduced-motion: reduce) {
    .shop-productimages__dot { transition: none; }
}

/* buy form */
.shop-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 3rem;
    padding: 0.7rem 1.5rem;
    background: var(--shop-buttonBackground);
    color: var(--shop-buttonText);
    text-decoration: none;
    border: 1px solid var(--shop-buttonBackground);
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
}
.shop-btn:hover { opacity: 0.9; }
/* pointer-events also keeps the :hover opacity from firing while the button is locked */
.shop-btn:disabled, .shop-btn.is-loading { opacity: 0.6; cursor: default; pointer-events: none; }
.shop-buy { width: 340px; max-width: 100%; }
.shop-buy__amount-row { margin-bottom: 0.6rem; }
.shop-buy__action-row { display: flex; gap: 0.6rem; align-items: stretch; }

.shop-buy__value, .shop-buy__custom, .shop-buy__qty {
    min-height: 3rem;
    padding: 0.7rem 0.9rem;
    border: 1px solid rgba(0, 0, 0, 0.25);
    background: #ffffff;
    color: #1a1a1a;
    font: inherit;
    line-height: 1.2;
}
.shop-buy__value, .shop-buy__custom { width: 100%; display: block; }
.shop-buy__value {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
    padding-right: 2.4rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath fill='%231a1a1a' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.9rem center;
}
.shop-buy__value:focus, .shop-buy__custom:focus, .shop-buy__qty:focus {
    outline: none;
    border-color: var(--shop-buttonBackground);
}
.shop-buy__custom { margin-top: 0.4rem; }
.shop-buy__qty { width: 4.5rem; text-align: center; flex: 0 0 auto; }
.shop-buy__action-row .shop-btn { flex: 1 1 auto; }
.shop-buy__soldout { opacity: 0.7; font-style: italic; }
/* FontAwesome icon inside the button label; --loading is the spinner that replaces it on click */
.shop-buy__icon { flex: 0 0 auto; }
@media (prefers-reduced-motion: reduce) {
    .shop-buy__icon--loading.fa-spin { animation-duration: 3s; }
}

/* inline "button" links inside editor texts: <a class="button" href="…">…</a> */
.shop-main a.button,
.shop-belowmain a.button,
.shop-footer a.button {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.55rem 1.1rem;
    border: 1px solid currentColor;
    font-weight: 600;
    text-decoration: none;
}
.shop-main a.button:hover,
.shop-belowmain a.button:hover,
.shop-footer a.button:hover { opacity: 0.8; }

/* belowmain free text — full width */
.shop-belowmain { background: rgba(0,0,0,0.03); }
.shop-belowmain__inner { max-width: 820px; margin: 0 auto; padding: 2.5rem 1.25rem; }
.shop-belowmain__inner img { display: block; }

/* footer */
.shop-footer { background: var(--shop-footerBackground); color: var(--shop-footerText); }
.shop-footer__inner {
    max-width: var(--shop-max-width);
    margin: 0 auto;
    padding: 2.5rem 1.25rem 1rem;
    display: grid;
    grid-template-columns: 5fr 3fr 4fr;
    gap: 1.5rem;
    align-items: start;
}
@media (max-width: 720px) { .shop-footer__inner { grid-template-columns: 1fr; } }
.shop-footer__logo { max-height: 48px; width: auto; display: block; margin-bottom: 0.9rem; }
.shop-footer__about { margin: 0; opacity: 0.9; }
.shop-footer__contact-headline { font-weight: 700; margin-bottom: 0.35rem; }
.shop-footer__address { font-style: normal; opacity: 0.9; }
.shop-footer__pay-headline { font-weight: 700; margin: 0.9rem 0 0.4rem; }
.shop-footer__pay { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; font-size: 1.6rem; opacity: 0.9; }
.shop-footer__pay-text { font-size: 0.8rem; border: 1px solid currentColor; padding: 0.1rem 0.4rem; }

.shop-footer__bottom {
    max-width: var(--shop-max-width);
    margin: 0 auto;
    padding: 0.75rem 1.25rem 1.5rem;
    font-size: 0.85rem;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.4rem 1.5rem;
}
.shop-footer__powered { opacity: 0.8; }
.shop-footer__legal { display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; opacity: 0.8; }
.shop-footer__legal a { text-decoration: none; }
.shop-footer__legal a:hover { text-decoration: underline; }
@media (max-width: 720px) {
    .shop-footer__bottom { flex-direction: column; align-items: flex-start; }
    .shop-footer__powered,
    .shop-footer__legal { font-size: 0.9em; }
}

/* "powered by" brand links — inherit the footer text colour */
.shop-footer__pb-link { color: inherit; text-decoration: underline; }
.shop-footer__pb-logo {
    display: inline-flex;
    align-items: center;
    color: inherit;
    text-decoration: none;
    vertical-align: -0.12em;
}
.shop-footer__pb-logo-svg { 
    height: 1.35em;
    width: auto;
    display: block;
    transform: translateY(2px);
}
