/* ==========================================================================
   Shop – Styles im Look von sagenhaftezeiten.com (Bootstrap 5.3 Basis)
   ========================================================================== */

@font-face {
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: 300 400;
    font-display: swap;
    src: url('fonts/OpenSans-Light.woff2') format('woff2');
}
@font-face {
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: 500 700;
    font-display: swap;
    src: url('fonts/OpenSans-Medium.woff2') format('woff2');
}

:root {
    --sz-link: #274a7d;
    --sz-accent: #b81839;
    --sz-slate: #3a4047;
    --sz-gold: #d8a23a;
    --sz-gold-dark: #b8862a;
    --sz-gold-light: #f0c66b;
    --sz-dark: #212529;
    --sz-footer-bg: #caced1;
    --sz-card-bg: linear-gradient(145deg, #fff, #e6e6e6);
    --sz-card-shadow: 5px 5px 10px #e3e3e3, -5px -5px 10px #fff;
    --sz-card-shadow-hover: 5px 5px 10px #666, -5px -5px 10px #fff;

    --bs-body-font-family: 'Open Sans', system-ui, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
    --bs-body-font-weight: 300;
    --bs-link-color: var(--sz-link);
    --bs-link-color-rgb: 39, 74, 125;
    --bs-link-hover-color: #1b3457;
    --bs-link-hover-color-rgb: 27, 52, 87;
}

body { display: flex; flex-direction: column; min-height: 100vh; }
.site-main { flex: 1 0 auto; }

h1, h2, h3, h4, h5, h6, strong, b, th, dt { font-weight: 500; }
h1 { font-size: 1.75rem; margin-bottom: 1rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }

.skip-link {
    position: absolute; top: .5rem; left: .5rem; z-index: 2000;
    padding: .5rem 1rem; background: #fff; color: var(--sz-dark); border-radius: .25rem;
}

/* ---------- Navigation ---------- */
.navbar-brand { max-width: calc(100% - 7.5rem); margin-right: 0; }
.navbar-brand img { display: block; height: auto; max-height: 50px; width: 100%; max-width: 271px; }
@media (min-width: 992px) { .navbar-brand { max-width: none; margin-right: 3rem; } }

.navbar .nav-link, .navbar .dropdown-item { font-weight: 300; }
.navbar .nav-link { font-size: 1.2rem; }
.navbar .navbar-nav > .nav-item > .nav-link { position: relative; }
.navbar .navbar-nav > .nav-item > .nav-link.active { color: #fff; }
.navbar .navbar-nav > .nav-item > .nav-link::before {
    content: ""; position: absolute;
    left: var(--bs-navbar-nav-link-padding-x, .5rem); right: var(--bs-navbar-nav-link-padding-x, .5rem);
    bottom: .25rem; height: 2px; background: var(--sz-gold);
    transform: scaleX(0); transform-origin: left; transition: transform .25s ease;
}
.navbar .navbar-nav > .nav-item > .nav-link:hover::before,
.navbar .navbar-nav > .nav-item > .nav-link:focus-visible::before,
.navbar .navbar-nav > .nav-item > .nav-link.active::before { transform: scaleX(1); }
@media (max-width: 991.98px) {
    .navbar .navbar-nav > .nav-item > .nav-link::before {
        left: 0; right: auto; top: .35rem; bottom: .35rem; width: 3px; height: auto;
        transform: scaleY(0); transform-origin: top;
    }
    .navbar .navbar-nav > .nav-item > .nav-link { padding-left: .75rem; }
    .navbar .navbar-nav > .nav-item > .nav-link:hover::before,
    .navbar .navbar-nav > .nav-item > .nav-link.active::before { transform: scaleY(1); }
    .navbar-collapse .nav-search { margin: .5rem 0 1rem; }
    .navbar-collapse .nav-search__input, .navbar-collapse .nav-search__input:focus { width: 100%; }
}
.navbar .dropdown-item.active, .navbar .dropdown-item:active {
    color: var(--sz-gold-light); background-color: rgba(255, 255, 255, .08);
}
@media (min-width: 992px) and (hover: hover) {
    .navbar-nav .dropdown:hover > .dropdown-menu { display: block; margin-top: 0; }
}

.nav-search { position: relative; align-items: center; }
.nav-search__input {
    width: 12rem; padding: .35rem 2.4rem .35rem .75rem; font-weight: 300; color: #fff;
    background-color: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 2rem; transition: width .2s ease, background-color .2s ease;
}
.nav-search__input::placeholder { color: rgba(255, 255, 255, .6); }
.nav-search__input:focus {
    width: 16rem; color: #fff; outline: 0; background-color: rgba(255, 255, 255, .15);
    border-color: var(--sz-gold); box-shadow: 0 0 0 .2rem rgba(216, 162, 58, .3);
}
.nav-search__btn {
    position: absolute; right: .35rem; display: inline-flex; align-items: center; justify-content: center;
    padding: .25rem; color: rgba(255, 255, 255, .75); background: none; border: 0;
}
.nav-search__btn:hover, .nav-search__btn:focus-visible { color: var(--sz-gold-light); }
@media (min-width: 992px) { .navbar-collapse .nav-search { margin: 0 1rem; } }

/* Warenkorb-Symbol in der Navigation */
.navbar-cart {
    position: relative; display: inline-flex; align-items: center;
    padding: .4rem .6rem; margin-right: .5rem; color: rgba(255, 255, 255, .8);
    text-decoration: none; border: 1px solid rgba(255, 255, 255, .15); border-radius: .375rem;
}
.navbar-cart:hover, .navbar-cart:focus-visible { color: var(--sz-gold-light); }
@media (min-width: 992px) { .navbar-cart { margin-right: 0; } }
.cart-badge {
    position: absolute; top: -.45rem; right: -.45rem; min-width: 1.3rem; height: 1.3rem;
    padding: 0 .3rem; font-size: .75rem; font-weight: 500; line-height: 1.3rem; text-align: center;
    color: var(--sz-dark); background: var(--sz-gold); border-radius: 1rem;
}

/* ---------- Inhalt ---------- */
.site-main > .container { padding-block: 1.5rem 3rem; }
img { max-width: 100%; height: auto; }

.breadcrumb { font-size: .9rem; }
.breadcrumb a { text-decoration: none; }

.lead-text { font-size: 1.1rem; color: #3d4248; }

/* Karten im Stil der "frame-layout-1"-Boxen der Website */
.sz-card {
    padding: 10px; border-radius: 10px;
    background: var(--sz-card-bg); box-shadow: var(--sz-card-shadow);
    transition: box-shadow .2s ease;
}
.sz-card:hover, .sz-card:focus-within { box-shadow: var(--sz-card-shadow-hover); }

/* Kategorie-Kacheln */
.category-tile { height: 100%; position: relative; display: flex; flex-direction: column; padding: 1.25rem; }
.category-tile h2 { font-size: 1.3rem; margin-bottom: .5rem; }
.category-tile a { color: var(--sz-dark); text-decoration: none; }
.category-tile a::after { content: ""; position: absolute; inset: 0; }
.category-tile:hover a { color: var(--sz-link); text-decoration: underline; text-decoration-color: var(--sz-gold); text-underline-offset: .2em; }
.category-tile p { margin: 0; color: #3d4248; }
.category-tile.has-image { padding: 10px 10px 1.25rem; }
.category-tile.has-image h2, .category-tile.has-image p, .category-tile.has-image .count { margin-inline: .75rem; }
.category-tile__img { aspect-ratio: 3 / 2; margin-bottom: 1rem; overflow: hidden; border-radius: 6px; background: #fff; }
.category-tile__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.category-tile:hover .category-tile__img img { transform: scale(1.04); }
.category-tile--small { padding: .9rem; }
.category-tile--small.has-image { padding: 8px 8px .9rem; }
.category-tile--small h2 { font-size: 1.05rem; margin-bottom: .25rem; }
.category-tile--small.has-image h2, .category-tile--small.has-image .count { margin-inline: .4rem; }
.category-tile--small .category-tile__img { margin-bottom: .6rem; }
.category-tile--small p { font-size: .85rem; line-height: 1.35; }
.category-tile--small.has-image p { margin-inline: .4rem; }
.category-description { max-width: 52rem; font-size: 1.05rem; color: #3d4248; }
.rich-text h3 { margin-top: 1.25rem; font-size: 1.15rem; }
.rich-text ul { padding-left: 1.25rem; }
.rich-text a { text-decoration-color: var(--sz-gold); text-underline-offset: .2em; }
.category-tile--small .count { padding-top: .25rem; font-size: .85rem; }
.category-tile__img--empty { display: flex; align-items: center; justify-content: center;
    background: radial-gradient(circle at 50% 40%, #343b44, #16191c); }
.category-tile__img--empty span { font-size: 3rem; font-weight: 300; color: var(--sz-gold); }
.category-head__img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 10px; box-shadow: var(--sz-card-shadow); }
.category-tile .count { margin-top: auto; padding-top: .75rem; font-size: .9rem; color: #6c757d; }

/* Artikel-Karten */
.product-card { height: 100%; position: relative; display: flex; flex-direction: column; }
.product-card__img {
    aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center;
    overflow: hidden; background: #fff; border-radius: 6px;
}
.product-card__img img { width: 100%; height: 100%; object-fit: contain; transition: filter .2s ease; }
.product-card:hover .product-card__img img { filter: drop-shadow(0 6px 12px rgba(0, 0, 0, .35)); }
.product-card__body { display: flex; flex-direction: column; flex: 1; padding: .75rem .25rem .25rem; }
.product-card__title { font-size: 1.1rem; margin: 0 0 .35rem; }
.product-card__title a { color: var(--sz-dark); text-decoration: none; }
.product-card__title a::after { content: ""; position: absolute; inset: 0; }
.product-card:hover .product-card__title a { color: var(--sz-link); text-decoration: underline; text-decoration-color: var(--sz-gold); text-underline-offset: .2em; }
.product-card__text { font-size: .95rem; color: #3d4248; margin-bottom: .75rem; }
.product-card__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.product-card__foot form { position: relative; z-index: 1; }

.price { font-weight: 500; color: var(--sz-dark); white-space: nowrap; }
.price--big { font-size: 1.75rem; }
.price-note { font-size: .85rem; color: #6c757d; }

.no-image {
    width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
    color: #adb5bd; background: #f1f3f5;
}

/* Artikel-Detail: Galerie */
.gallery-main {
    position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 1 / 1;
    background: #fff; border-radius: 10px; box-shadow: var(--sz-card-shadow); overflow: hidden;
}
.gallery-zoom { width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.gallery-nav {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
    width: 2.75rem; height: 2.75rem; padding: 0 0 .2rem; font-size: 2rem; line-height: 1;
    color: #fff; background: rgba(33, 37, 41, .55); border: 0; border-radius: 50%;
    transition: background-color .15s ease, opacity .15s ease;
}
.gallery-nav:hover, .gallery-nav:focus-visible { background: var(--sz-gold); color: var(--sz-dark); }
.gallery-nav--prev { left: .75rem; }
.gallery-nav--next { right: .75rem; }
@media (hover: hover) {
    .gallery-main .gallery-nav { opacity: 0; }
    .gallery-main:hover .gallery-nav, .gallery-main .gallery-nav:focus-visible { opacity: 1; }
}
.gallery-counter {
    position: absolute; right: .75rem; bottom: .75rem; z-index: 2; padding: .1rem .55rem;
    font-size: .8rem; color: #fff; background: rgba(33, 37, 41, .6); border-radius: 1rem;
}
.gallery-thumbs { display: flex; gap: .5rem; margin-top: .75rem; overflow-x: auto; padding-bottom: .25rem; }
.gallery-thumbs button {
    flex: 0 0 72px; width: 72px; height: 72px; padding: 2px; background: #fff;
    border: 2px solid #dee2e6; border-radius: 6px; cursor: pointer; opacity: .7; transition: opacity .15s ease;
}
.gallery-thumbs button[aria-current="true"], .gallery-thumbs button:hover { border-color: var(--sz-gold); opacity: 1; }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: contain; }

/* Vollbildansicht */
.gallery-modal .modal-content { position: relative; display: flex; align-items: center; justify-content: center; background: #121417; border: 0; border-radius: 0; }
.gallery-modal__img { max-width: 92vw; max-height: 88vh; object-fit: contain; }
.gallery-modal__close { position: absolute; top: 1rem; right: 1rem; z-index: 3; }
.gallery-modal .gallery-nav { width: 3.25rem; height: 3.25rem; font-size: 2.4rem; background: rgba(255, 255, 255, .12); }
.gallery-modal .gallery-nav--prev { left: 1.25rem; }
.gallery-modal .gallery-nav--next { right: 1.25rem; }
.gallery-modal .gallery-counter { right: 50%; transform: translateX(50%); bottom: 1.25rem; }

.buy-box { padding: 1.25rem; }
.qty-input { max-width: 6rem; }

.product-description { margin-top: 2rem; }

/* Tabellen (Warenkorb, Kasse) – wie auf der Website */
.site-main table { width: 100%; margin-bottom: 1rem; border-collapse: collapse; }
.site-main th, .site-main td { padding: .5rem .75rem; vertical-align: middle; border-bottom: 1px solid #dee2e6; }
.site-main thead th { background-color: var(--sz-slate); color: #fff; font-weight: 500; border-bottom: 3px solid var(--sz-gold); }
.site-main tbody tr:nth-child(even) { background-color: #f6f7f8; }
.site-main tfoot td, .site-main tfoot th { border-bottom: 0; }
.site-main tfoot .total td, .site-main tfoot .total th { font-size: 1.15rem; border-top: 2px solid var(--sz-slate); }
.cart-thumb { width: 64px; height: 64px; object-fit: contain; background: #fff; border-radius: 4px; }

@media (max-width: 767.98px) {
    .cart-table thead { display: none; }
    .cart-table tr { display: grid; grid-template-columns: 64px 1fr; gap: .25rem .75rem; padding: .75rem 0; border-bottom: 1px solid #dee2e6; }
    .cart-table td { border: 0; padding: 0; }
    .cart-table td.c-img { grid-row: span 4; }
    .cart-table td[data-label]::before { content: attr(data-label) ": "; color: #6c757d; }
    .cart-table tfoot tr { grid-template-columns: 1fr auto; }
}

.summary-box { padding: 1.25rem; }

/* ---------- Buttons: Gold = Hauptaktion, Dunkelgrau = Nebenaktion ---------- */
.btn-primary {
    --bs-btn-color: var(--sz-dark); --bs-btn-bg: var(--sz-gold); --bs-btn-border-color: var(--sz-gold);
    --bs-btn-hover-color: var(--sz-dark); --bs-btn-hover-bg: var(--sz-gold-light); --bs-btn-hover-border-color: var(--sz-gold-light);
    --bs-btn-active-color: var(--sz-dark); --bs-btn-active-bg: var(--sz-gold-dark); --bs-btn-active-border-color: var(--sz-gold-dark);
    --bs-btn-disabled-color: var(--sz-dark); --bs-btn-disabled-bg: var(--sz-gold); --bs-btn-disabled-border-color: var(--sz-gold);
    --bs-btn-focus-shadow-rgb: 216, 162, 58;
    font-weight: 500;
}
.btn-outline-primary, .btn-secondary {
    --bs-btn-color: var(--sz-slate); --bs-btn-bg: transparent; --bs-btn-border-color: var(--sz-slate);
    --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--sz-slate); --bs-btn-hover-border-color: var(--sz-slate);
    --bs-btn-active-color: #fff; --bs-btn-active-bg: var(--sz-dark); --bs-btn-active-border-color: var(--sz-dark);
    --bs-btn-focus-shadow-rgb: 58, 64, 71;
}
.btn-link { --bs-btn-color: var(--sz-link); }

.form-control:focus, .form-select:focus, .form-check-input:focus {
    border-color: var(--sz-gold); box-shadow: 0 0 0 .25rem rgba(216, 162, 58, .25);
}
.form-check-input:checked { background-color: var(--sz-gold); border-color: var(--sz-gold); }
.form-label { font-weight: 400; }

.alert { border-left: 4px solid currentColor; }

.empty-state { padding: 3rem 1rem; text-align: center; }

.pay-badges { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .75rem; }
.pay-badges span { padding: .15rem .5rem; font-size: .8rem; color: var(--sz-slate); background: #eef0f2; border-radius: 1rem; }

/* ---------- Footer ---------- */
.site-footer { flex-shrink: 0; background-color: var(--sz-footer-bg); color: #000; padding-block: 1.5rem 1rem; }
.site-footer p { font-size: .8rem; }
.site-footer h2 { font-size: calc(1rem + .5vw); }
.site-footer a { color: #000; }
.copyright { padding: .6rem; }
.copyright p { margin: 0; font-size: .85rem; }
@media (max-width: 767.98px) { .site-footer p { font-size: 1rem; } }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
