/* --- Shop: Desktop Sidebar links, Mobile kompaktes <details> --- */
.shopify-shop-toolbar {
    margin: 0 auto 2.25rem;
    max-width: none;
    width: 100%;
    padding: 0;
    --shop-sidebar-abs: clamp(196px, 22vw, 238px);
}

/* MusikShop: overflow-x:hidden auf html/body erzeugt Scroll-Containment → position:sticky greift nicht */
@supports (overflow: clip) {
    html.page-musikshop {
        overflow-x: clip;
    }

    html.page-musikshop body {
        overflow-x: clip;
    }
}

/*
 * Shop-Toolbar: .fade-in bleibt (Observer), aber immer sichtbar (opacity: 1).
 * So bleibt der Shop bei gecachtem altem main.js / ohne JS nicht leer.
 * transform: none → position:sticky am Filter funktioniert.
 */
.shopify-shop-toolbar.fade-in,
.shopify-shop-toolbar.fade-in.visible {
    transform: none !important;
    opacity: 1;
}

.shopify-shop-layout {
    display: grid;
    gap: 1.5rem 1.75rem;
    align-items: start;
    width: 100%;
}

.shopify-shop-sidebar {
    min-width: 0;
}

.shopify-shop-sidebar-sticky {
    min-width: 0;
}

.shopify-shop-toolbar-inner {
    margin: 0;
    text-align: center;
}

.shopify-shop-main {
    min-width: 0;
}

.shopify-filter-details {
    margin: 0;
    border-radius: 14px;
    background: #fff;
    border: 1px solid rgba(201, 168, 76, 0.35);
    box-shadow: 0 6px 28px rgba(42, 36, 28, 0.06);
    overflow: hidden;
}

.shopify-filter-details__summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.7rem 1rem;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 248, 244, 0.96));
    border-bottom: 1px solid rgba(201, 168, 76, 0.2);
    user-select: none;
}

.shopify-filter-details__summary::-webkit-details-marker {
    display: none;
}

.shopify-filter-details__summary-text {
    flex: 1;
    text-align: left;
}

.shopify-filter-details__chevron {
    flex-shrink: 0;
    color: var(--gold-dark);
    transition: transform 0.25s ease;
}

.shopify-filter-details:not([open]) .shopify-filter-details__chevron {
    transform: rotate(-90deg);
}

.shopify-filter-details[open] .shopify-filter-details__chevron {
    transform: rotate(0deg);
}

.shopify-shop-search-row {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.shopify-shop-search {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0.8rem 1rem 0.8rem 2.55rem;
    border: 1px solid var(--border-gold);
    border-radius: 50px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text);
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23a68b4a' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E")
        0.9rem 50% no-repeat;
    background-size: 18px 18px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.shopify-shop-search::placeholder {
    color: var(--text-light);
}

.shopify-shop-search:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.2);
}

.shopify-shop-filters-root {
    text-align: left;
    padding: 1rem 1rem 1.15rem;
}

.shopify-filter-cluster {
    margin-bottom: 1.1rem;
}

.shopify-filter-cluster:last-child {
    margin-bottom: 0;
}

.shopify-filter-cluster-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    font-family: var(--font-body);
}

.shopify-filter-cluster-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    justify-content: flex-start;
    align-items: stretch;
}

.shopify-filter-row-selects {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-top: 0.35rem;
    align-items: stretch;
}

.shopify-filter-field {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    min-width: 0;
    width: 100%;
}

.shopify-filter-field-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-light);
    text-align: left;
    font-family: var(--font-body);
}

.shopify-filter-select {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    padding: 0.55rem 0.85rem;
    border: 1px solid var(--border-gold);
    border-radius: 10px;
    font-family: var(--font-body);
    font-size: 0.86rem;
    color: var(--text);
    background: #fff;
    cursor: pointer;
    box-sizing: border-box;
}

.shopify-filter-select:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 2px rgba(201, 168, 76, 0.2);
}

.shopify-filter-btn {
    padding: 0.45rem 0.85rem;
    border: 1px solid var(--border-gold);
    border-radius: 50px;
    background: #fff;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: normal;
    text-align: center;
    line-height: 1.35;
    max-width: 100%;
}

.shopify-filter-btn:hover {
    border-color: var(--gold);
    color: var(--gold-dark);
}

.shopify-filter-btn.active {
    background: linear-gradient(135deg, var(--gold-dark), var(--gold));
    color: #fff;
    border-color: transparent;
    font-weight: 600;
}

.shopify-shop-results-meta {
    margin: 0.65rem 0 0;
    font-size: 0.84rem;
    color: var(--text-light);
    font-family: var(--font-body);
}

/* Produktraster: Spalten per CMS (--shop-cols-*), Fallback = bisheriges Verhalten */
html.page-musikshop {
    --shop-cols-desktop: 3;
    --shop-cols-mobile: 2;
}

/* Produktraster im Shop: Spaltenzahl an Hauptspaltenbreite */
#shopifyProducts.music-grid {
    contain: layout;
    margin-top: 1.25rem;
    grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
    gap: 1.35rem;
}

@media (min-width: 520px) {
    #shopifyProducts.music-grid {
        grid-template-columns: repeat(auto-fill, minmax(178px, 1fr));
        gap: 1.5rem;
    }
}

@media (min-width: 992px) {
    .shopify-shop-toolbar {
        position: relative;
    }

    .shopify-shop-layout {
        display: grid;
        grid-template-columns: var(--shop-sidebar-abs) minmax(0, 1fr);
        gap: 1.5rem 1.75rem;
        align-items: start;
    }

    .shopify-shop-sidebar {
        position: sticky;
        top: calc(var(--nav-height, 80px) + 0.75rem + env(safe-area-inset-top, 0px));
        z-index: 2;
        align-self: start;
        max-height: calc(100vh - var(--nav-height, 80px) - 1.75rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
        overflow-y: auto;
        overscroll-behavior: contain;
        min-width: 0;
    }

    .shopify-shop-sidebar-sticky {
        position: static;
        max-height: none;
        overflow: visible;
        padding-right: 0;
    }

    .shopify-shop-main {
        margin-left: 0;
        margin-right: 0;
        max-width: none;
        width: 100%;
        padding-left: 0;
    }

    .shopify-filter-details {
        border-radius: 16px;
        box-shadow: 0 8px 36px rgba(42, 36, 28, 0.07);
    }

    .shopify-filter-details__summary {
        display: none;
    }

    .shopify-filter-details {
        border-bottom: none;
    }

    .shopify-filter-details[open] {
        border-bottom: none;
    }

    .shopify-shop-filters-root {
        padding: 1.15rem 1.15rem 1.35rem;
    }

    .shopify-filter-cluster-btns {
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: stretch;
    }

    .shopify-filter-btn {
        width: 100%;
        border-radius: 12px;
        text-align: center;
    }

    #shopifyProducts.music-grid {
        grid-template-columns: repeat(var(--shop-cols-desktop, 3), minmax(0, 1fr));
        gap: 1.65rem;
    }

    .shopify-shop-toolbar-inner {
        text-align: left;
    }

    .shopify-shop-search-row {
        justify-content: flex-start;
    }

    .shopify-shop-search {
        max-width: 100%;
    }

    .shopify-shop-results-meta {
        text-align: left;
    }
}

@media (min-width: 1200px) {
    #shopifyProducts.music-grid {
        grid-template-columns: repeat(var(--shop-cols-desktop, 3), minmax(0, 1fr));
        gap: 1.85rem;
    }
}

@media (max-width: 991px) {
    .shopify-shop-toolbar {
        margin-bottom: 1.5rem;
        padding: 0;
    }

    .shopify-shop-toolbar-inner .shopify-shop-search-row {
        margin-bottom: 0.35rem;
    }

    .shopify-shop-toolbar-inner .shopify-shop-results-meta {
        margin-top: 0.35rem;
        font-size: 0.8rem;
    }

    .shopify-shop-toolbar-inner .shopify-shop-search {
        padding: 0.65rem 0.85rem 0.65rem 2.35rem;
        font-size: 0.9rem;
        background-position: 0.75rem 50%;
    }

    .shopify-filter-details[open] .shopify-filter-details__summary {
        border-bottom: 1px solid rgba(201, 168, 76, 0.18);
    }
}

@media (max-width: 768px) {
    .shopify-shop-toolbar {
        margin-bottom: 1.25rem;
    }

    #shopifyProducts.music-grid {
        grid-template-columns: repeat(var(--shop-cols-mobile, 2), minmax(0, 1fr));
        gap: 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .shopify-filter-details__chevron {
        transition: none;
    }
}

/* Produktkarten: volle Zeilenhöhe (Grid stretch), Inhalt unten bündig */
.music-card.shopify-product {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.music-card.shopify-product .music-card-image {
    flex-shrink: 0;
}

/* Produkt-Karten Anpassung */
.shopify-product .music-card-body {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 12px 16px 16px;
    text-align: center;
}

/* Musik-Shop: „In den Warenkorb“ immer auf einer Linie pro Zeile */
.music-card.shopify-product:not(.music-card-glass) .shopify-add-btn {
    margin-top: auto;
    align-self: stretch;
    justify-content: center;
}

/* Startseite (Glaskarten): Titel + Untertitel unten im freien Raum ausrichten */
.music-card-glass.shopify-product .music-card-body {
    justify-content: flex-end;
}

.shopify-product .music-card-body h4 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
    color: var(--text);
    line-height: 1.3;
}

.shopify-price {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--gold-dark) !important;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.shopify-price-vat-block {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-light);
    line-height: 1.35;
    margin: 0 0 0.65rem;
}

/* In den Warenkorb Button */
.shopify-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: linear-gradient(135deg, var(--gold-dark), var(--gold));
    color: #fff;
    border: none;
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 600;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.02em;
}

.shopify-add-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(201, 168, 76, 0.4);
}

.shopify-add-btn:disabled {
    background: #999;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Quick-Add Button auf Bild - nur kleine Ecke statt ganzes Overlay */
.shopify-product .music-card-play.shopify-quick-add {
    inset: auto;
    bottom: 10px;
    right: 10px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold-dark), var(--gold));
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.shopify-product .music-card-play.shopify-quick-add svg {
    width: 22px;
    height: 22px;
}

.shopify-product:hover .music-card-play.shopify-quick-add {
    opacity: 1;
}

.shopify-product .music-card-play.shopify-quick-add:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 18px rgba(201, 168, 76, 0.5);
}

/* ========== MOBIL: Shopify-Produkte 2 nebeneinander (Desktop unverändert) ========== */
@media (max-width: 768px) {
    .music-grid:has(.shopify-product) {
        grid-template-columns: repeat(var(--shop-cols-mobile, 2), minmax(0, 1fr));
        gap: clamp(0.7rem, 2.8vw, 1.05rem) clamp(0.55rem, 2.2vw, 0.9rem);
    }

    .music-grid:has(.shopify-product) > .music-card {
        border-radius: 8px;
    }

    .shopify-product .music-card-body {
        padding: 10px 8px 12px;
    }

    .shopify-product .music-card-body h4 {
        font-size: 0.86rem;
        line-height: 1.28;
        overflow-wrap: anywhere;
        -webkit-hyphens: auto;
        hyphens: auto;
    }

    .music-card-glass.shopify-product .music-card-body h4 {
        font-size: clamp(0.82rem, 3.4vw, 1rem);
    }

    .music-card-glass.shopify-product .music-card-body p {
        font-size: clamp(0.72rem, 2.9vw, 0.88rem);
    }

    .shopify-price {
        font-size: 0.92rem !important;
    }

    .shopify-price-vat-block {
        font-size: 0.62rem;
        margin-bottom: 0.45rem;
        line-height: 1.3;
    }

    .shopify-add-btn {
        font-size: 0.7rem;
        padding: 7px 10px;
        letter-spacing: 0.01em;
    }

    .shopify-product .music-card-play.shopify-quick-add {
        width: 36px;
        height: 36px;
        bottom: 6px;
        right: 6px;
    }

    .shopify-product .music-card-play.shopify-quick-add svg {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 360px) {
    .music-grid:has(.shopify-product) {
        gap: 0.55rem 0.45rem;
    }

    .shopify-product .music-card-body {
        padding: 8px 6px 10px;
    }

    .shopify-product .music-card-body h4 {
        font-size: 0.78rem;
    }

    .shopify-add-btn {
        font-size: 0.64rem;
        padding: 6px 8px;
    }

    .shopify-price {
        font-size: 0.85rem !important;
    }
}

/* ========== WARENKORB ICON (Header) ========== */
.shopify-cart-toggle {
    position: fixed;
    top: 15px;
    right: 20px;
    z-index: 12100;
    background: linear-gradient(135deg, var(--gold-dark), var(--gold));
    color: #fff;
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.shopify-cart-toggle:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(201, 168, 76, 0.5);
}

.shopify-cart-toggle svg {
    width: 22px;
    height: 22px;
}

#shopifyCartBadge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #e74c3c;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-family: var(--font-body);
}

/* ========== WARENKORB PANEL ========== */
#shopifyCartOverlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 12300;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

#shopifyCartOverlay.open {
    opacity: 1;
    visibility: visible;
}

#shopifyCartPanel {
    position: fixed;
    top: 0;
    right: -420px;
    width: 400px;
    max-width: 90vw;
    height: 100vh;
    height: 100dvh;
    background: #faf8f4;
    z-index: 12301;
    transition: right 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.15);
}

#shopifyCartPanel.open {
    right: 0;
}

/* Cart Header */
.shopify-cart-header {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-gold);
    background: linear-gradient(135deg, rgba(201, 168, 76, 0.05), rgba(245, 230, 200, 0.15));
}

.shopify-cart-header h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--gold-dark);
    margin: 0;
}

.shopify-cart-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-light);
    padding: 4px;
    transition: color 0.3s;
}

.shopify-cart-close:hover {
    color: var(--text);
}

/* Cart Items */
.shopify-cart-items {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 1rem 1.5rem;
}

/* Leerer Warenkorb: Zeilen-Container nicht die ganze Höhe fressen */
#shopifyCartItems:empty {
    flex: 0 0 auto;
    min-height: 0;
    padding: 0;
    overflow: hidden;
}

.shopify-cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(201, 168, 76, 0.15);
}

.shopify-cart-item:last-child {
    border-bottom: none;
}

.shopify-cart-item-img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.shopify-cart-item-info {
    flex: 1;
    min-width: 0;
}

.shopify-cart-item-info h5 {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 0.2rem;
    color: var(--text);
    line-height: 1.3;
}

.shopify-cart-item-info small {
    color: var(--text-light);
    font-size: 0.78rem;
}

/* Quantity Controls */
.shopify-cart-qty {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.4rem;
}

.shopify-cart-qty button {
    width: 28px;
    height: 28px;
    border: 1px solid var(--border-gold);
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--text);
    transition: all 0.2s;
}

.shopify-cart-qty button:hover:not(:disabled) {
    background: rgba(201, 168, 76, 0.1);
    border-color: var(--gold);
}

.shopify-cart-qty button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.shopify-cart-qty span {
    min-width: 24px;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.shopify-cart-remove {
    margin-left: auto;
    border: none !important;
    background: none !important;
    color: #cc4444 !important;
    width: auto !important;
    height: auto !important;
    padding: 4px !important;
}

.shopify-cart-remove:hover {
    color: #ee2222 !important;
    background: none !important;
}

/* Empty Cart */
.shopify-cart-empty {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem 1.25rem 2.5rem;
    color: var(--text-light);
}

.shopify-cart-empty svg {
    color: var(--gold);
    margin-bottom: 1rem;
    opacity: 0.5;
}

.shopify-cart-empty p {
    font-family: var(--font-heading);
    font-size: 1.1rem;
}

/* Cart Footer */
.shopify-cart-footer {
    flex-shrink: 0;
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--border-gold);
    background: linear-gradient(135deg, rgba(201, 168, 76, 0.05), rgba(245, 230, 200, 0.15));
}

.shopify-cart-total {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    margin-bottom: 1rem;
}

.shopify-cart-total-rows {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.shopify-cart-total-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    width: 100%;
}

.shopify-cart-total-row span:first-child {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    color: var(--text);
}

.shopify-cart-total-amount {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--gold-dark);
}

.shopify-cart-total-row:not(.shopify-cart-total-row--emph) span:last-child {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

.shopify-vat-note {
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-light);
    line-height: 1.35;
    margin: 0;
}

.shopify-cart-total-vat {
    margin-top: 0.1rem;
}

.shopify-cart-checkout-hint {
    font-family: var(--font-body);
    font-size: 0.7rem;
    color: var(--text-light);
    line-height: 1.45;
    margin: 0.15rem 0 0;
    opacity: 0.95;
}

.shopify-cart-line-pricing {
    margin: 0.35rem 0 0.15rem;
}

.shopify-cart-line-total {
    font-family: var(--font-heading);
    color: var(--gold-dark);
    font-weight: 700;
    font-size: 1rem;
    margin: 0;
}

.shopify-cart-unit {
    font-size: 0.78rem;
    color: var(--text-light);
    margin: 0.15rem 0 0;
}

.shopify-checkout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--gold-dark), var(--gold));
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 700;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.03em;
}

.shopify-checkout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(201, 168, 76, 0.5);
}

.shopify-continue-btn {
    display: block;
    text-align: center;
    margin-top: 0.75rem;
    color: var(--text-light);
    font-size: 0.85rem;
    cursor: pointer;
    background: none;
    border: none;
    width: 100%;
    font-family: var(--font-body);
    transition: color 0.3s;
}

.shopify-continue-btn:hover {
    color: var(--gold-dark);
}

/* ========== KONTO BUTTON ========== */
.shopify-account-btn {
    position: fixed;
    top: 15px;
    right: 76px;
    z-index: 12090;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--border-gold);
    color: var(--gold-dark);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.shopify-account-btn:hover {
    background: #fff;
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(201, 168, 76, 0.3);
}

.shopify-account-user {
    width: auto;
    border-radius: 50px;
    padding: 0 16px;
    gap: 6px;
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 600;
}

/* ========== KONTO MODAL ========== */
#accountModal {
    position: fixed;
    inset: 0;
    z-index: 12400;
    display: none;
    align-items: center;
    justify-content: center;
}

#accountModal.open {
    display: flex;
}

.account-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-gold);
    border-radius: 8px;
    overflow: hidden;
}

.account-tab {
    flex: 1;
    padding: 10px;
    border: none;
    background: #fff;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s;
}

.account-tab.active {
    background: linear-gradient(135deg, var(--gold-dark), var(--gold));
    color: #fff;
    font-weight: 600;
}

.account-tab:not(.active):hover {
    background: rgba(201, 168, 76, 0.05);
}

.account-field {
    margin-bottom: 1rem;
}

.account-field label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.35rem;
}

.account-field input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-gold);
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text);
    background: #fff;
    transition: border-color 0.3s;
    outline: none;
    box-sizing: border-box;
}

.account-field input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.1);
}

.account-field input::placeholder {
    color: #bbb;
}

.account-error {
    background: #fff0f0;
    border: 1px solid #ffcccc;
    color: #cc3333;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.account-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(201, 168, 76, 0.15);
}

.account-section h4 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--gold-dark);
    margin-bottom: 0.5rem;
}

.account-section p {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.6;
}

.account-orders {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.account-order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid rgba(201, 168, 76, 0.1);
    border-radius: 8px;
    font-size: 0.85rem;
}

.account-order-item strong {
    color: var(--text);
    margin-right: 0.5rem;
}

.account-order-item span {
    color: var(--text-light);
}

/* ========== PRODUKT-DETAIL MODAL ========== */
#productDetailModal {
    --pd-modal-gutter-top: clamp(5.5rem, 11vw, 9.5rem);
    position: fixed;
    inset: 0;
    z-index: 12500;
    display: none;
    padding-top: var(--pd-modal-gutter-top);
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    box-sizing: border-box;
    overflow: hidden;
}

#productDetailModal.open {
    display: block;
}

.pd-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.pd-container {
    position: relative;
    background: #faf8f4;
    border-radius: 16px;
    max-width: 960px;
    width: min(92vw, 960px);
    margin-left: auto;
    margin-right: auto;
    max-height: min(90vh, calc(100svh - var(--pd-modal-gutter-top) - 2rem));
    overflow-y: auto;
    z-index: 1;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: pdSlideIn 0.35s ease;
}

#productDetailModal .pd-container {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.pd-sheet-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.pd-scroll-hint {
    display: none;
}

@keyframes pdSlideIn {
    from { opacity: 0; transform: translateY(30px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.pd-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 2;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(201, 168, 76, 0.2);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text);
    transition: all 0.3s;
}

.pd-close:hover {
    background: #fff;
    color: var(--gold-dark);
    transform: scale(1.1);
}

.pd-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    align-items: start;
}

.pd-image-col {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #fff;
    border-radius: 16px 0 0 16px;
}

.pd-main-image {
    width: 100%;
    max-width: 400px;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.pd-gallery {
    display: flex;
    gap: 8px;
    margin-top: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.pd-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid transparent;
    opacity: 0.6;
    transition: all 0.3s;
}

.pd-thumb.active,
.pd-thumb:hover {
    border-color: var(--gold);
    opacity: 1;
}

.pd-info-col {
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
}

.pd-type {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gold-dark);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.pd-title {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.pd-price {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gold-dark);
    margin-bottom: 1.5rem;
}

.pd-price-row .pd-price {
    margin-bottom: 0.2rem;
}

.pd-vat-disclosure {
    font-family: var(--font-body);
    font-size: 0.82rem;
    line-height: 1.45;
    color: var(--text-light);
    margin: 0 0 1.25rem;
    max-width: 100%;
}

.pd-variants {
    margin-bottom: 1.5rem;
}

.pd-variants label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.pd-variant-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.pd-variant-btn {
    padding: 8px 16px;
    border: 1px solid var(--border-gold);
    background: #fff;
    border-radius: 8px;
    font-size: 0.85rem;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all 0.3s;
    color: var(--text);
}

.pd-variant-btn:hover {
    border-color: var(--gold);
    background: rgba(201, 168, 76, 0.05);
}

.pd-variant-btn.active {
    border-color: var(--gold-dark);
    background: linear-gradient(135deg, rgba(201, 168, 76, 0.1), rgba(245, 230, 200, 0.2));
    color: var(--gold-dark);
    font-weight: 600;
}

.pd-variant-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    text-decoration: line-through;
}

.pd-quantity {
    margin-bottom: 1.5rem;
}

.pd-quantity label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.pd-qty-control {
    display: inline-flex;
    align-items: center;
    gap: 0;
    border: 1px solid var(--border-gold);
    border-radius: 8px;
    overflow: hidden;
}

.pd-qty-control button {
    width: 40px;
    height: 40px;
    border: none;
    background: #fff;
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--text);
    transition: background 0.2s;
}

.pd-qty-control button:hover {
    background: rgba(201, 168, 76, 0.1);
}

.pd-qty-control span {
    min-width: 40px;
    text-align: center;
    font-weight: 700;
    font-size: 1rem;
    border-left: 1px solid var(--border-gold);
    border-right: 1px solid var(--border-gold);
    height: 40px;
    line-height: 40px;
}

.pd-add-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--gold-dark), var(--gold));
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 700;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 2rem;
}

.pd-add-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(201, 168, 76, 0.5);
}

.pd-add-btn:disabled {
    opacity: 0.7;
    cursor: wait;
    transform: none;
}

.pd-description {
    border-top: 1px solid rgba(201, 168, 76, 0.15);
    padding-top: 1.5rem;
}

.pd-description h4 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.75rem;
}

.pd-description p {
    color: var(--text-light);
    font-size: 0.92rem;
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .shopify-account-btn {
        top: auto;
        bottom: 140px;
        right: 16px;
        width: 44px;
        height: 44px;
    }

    .shopify-account-user {
        padding: 0 12px;
        font-size: 0.75rem;
        height: 44px;
    }

    .shopify-cart-toggle {
        top: auto;
        bottom: 80px;
        right: 16px;
        width: 52px;
        height: 52px;
    }

    .shopify-add-btn {
        font-size: 0.78rem;
        padding: 7px 14px;
    }
}

/* ========== MOBILE WARENKORB: Bottom-Sheet (Flex: Liste scrollt, Footer fix sichtbar) ========== */
@media (max-width: 1100px) {
    #shopifyCartOverlay {
        z-index: 13060;
    }

    #shopifyCartPanel {
        z-index: 13061;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0 !important;
        width: 100%;
        max-width: 100%;
        /* max-height + auto: wenig Inhalt = kompaktes Sheet; viel Inhalt = scroll, Footer bleibt sichtbar */
        height: auto;
        max-height: min(88dvh, calc(100dvh - env(safe-area-inset-top, 0px) - 0.75rem));
        min-height: min(38dvh, 300px);
        border-radius: 24px 24px 0 0;
        transform: translateY(calc(100% + 24px));
        transition: transform 0.42s cubic-bezier(0.32, 0.72, 0, 1);
        box-shadow:
            0 -8px 40px rgba(42, 36, 28, 0.12),
            0 -1px 0 rgba(201, 168, 76, 0.2);
        padding-bottom: 0;
        overflow: hidden;
        background: linear-gradient(180deg, #fffefb 0%, #faf8f4 38%, #f7f4ee 100%);
    }

    #shopifyCartPanel.open {
        transform: translateY(0);
        right: 0 !important;
    }

    /* Griff wie native Sheets */
    #shopifyCartPanel::before {
        content: "";
        display: block;
        width: 42px;
        height: 5px;
        margin: 12px auto 6px;
        border-radius: 999px;
        background: rgba(58, 50, 38, 0.12);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
        flex-shrink: 0;
    }

    .shopify-cart-header {
        padding: 0.5rem 1.25rem 0.85rem;
        border-bottom: 1px solid rgba(201, 168, 76, 0.18);
        background: transparent;
    }

    .shopify-cart-header h3 {
        font-size: 1.25rem;
        letter-spacing: 0.02em;
    }

    .shopify-cart-close {
        width: 44px;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.65);
        border: 1px solid rgba(201, 168, 76, 0.2);
    }

    .shopify-cart-items {
        flex: 1 1 auto;
        min-height: 0;
        max-height: none;
        padding: 0.75rem 1rem 1rem;
    }

    .shopify-cart-item {
        gap: 0.85rem;
        padding: 0.85rem;
        margin-bottom: 0.65rem;
        border-bottom: none;
        background: rgba(255, 255, 255, 0.88);
        border-radius: 16px;
        border: 1px solid rgba(201, 168, 76, 0.14);
        box-shadow: 0 2px 14px rgba(42, 36, 28, 0.05);
    }

    .shopify-cart-item:last-child {
        margin-bottom: 0.25rem;
    }

    .shopify-cart-item-img {
        width: 76px;
        height: 76px;
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    }

    .shopify-cart-item-info h5 {
        font-size: 1rem;
        line-height: 1.35;
    }

    .shopify-cart-qty {
        margin-top: 0.55rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .shopify-cart-qty button {
        width: 36px;
        height: 36px;
        border-radius: 10px;
        font-size: 1.1rem;
        border-color: rgba(201, 168, 76, 0.35);
    }

    .shopify-cart-qty span {
        min-width: 28px;
        font-size: 0.95rem;
    }

    .shopify-cart-line-total {
        font-size: 1.05rem;
    }

    .shopify-cart-empty {
        padding: 1.5rem 1.25rem 2rem;
    }

    .shopify-cart-footer {
        padding: 1rem 1.15rem max(1rem, calc(0.65rem + env(safe-area-inset-bottom, 0px)));
        margin-top: auto;
        border-top: 1px solid rgba(201, 168, 76, 0.2);
        background: rgba(255, 254, 251, 0.82);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        box-shadow: 0 -10px 32px rgba(42, 36, 28, 0.07);
    }

    .shopify-cart-total {
        margin-bottom: 0.85rem;
    }

    .shopify-cart-checkout-hint {
        font-size: 0.72rem;
        line-height: 1.4;
    }

    .shopify-checkout-btn {
        padding: 16px 22px;
        font-size: 1.03rem;
        border-radius: 16px;
        box-shadow: 0 4px 20px rgba(201, 168, 76, 0.35);
    }

    .shopify-continue-btn {
        margin-top: 0.65rem;
        padding: 0.35rem;
        font-size: 0.88rem;
    }
}

/* Produkt-Modal Desktop: Cover links bleibt beim Scrollen im Sheet sichtbar */
@media (min-width: 1101px) {
    #productDetailModal .pd-image-col {
        position: sticky;
        top: 0.75rem;
        align-self: start;
    }
}

/* ========== PRODUKT-MODAL: Bottom-Sheet (Tablet/Smartphone, eigenes ONITANI-Layout) ========== */
@keyframes pdSheetRise {
    from {
        transform: translate3d(0, 108%, 0);
        opacity: 0.96;
    }
    to {
        transform: translate3d(0, 0, 0);
        opacity: 1;
    }
}

@keyframes pdScrollChevronNudge {
    0%,
    100% {
        transform: translate3d(-50%, 0, 0) rotate(45deg);
        opacity: 0.75;
    }
    50% {
        transform: translate3d(-50%, 6px, 0) rotate(45deg);
        opacity: 1;
    }
}

@media (max-width: 1100px) {
    #productDetailModal {
        --pd-modal-gutter-top: 0;
        padding: 0;
        align-items: stretch;
        justify-content: flex-end;
        z-index: 13120;
        overflow: hidden !important;
        -webkit-overflow-scrolling: auto;
    }

    #productDetailModal.open {
        display: flex;
        flex-direction: column;
    }

    #productDetailModal .pd-overlay {
        position: absolute;
        inset: 0;
        z-index: 0;
        background: rgba(18, 14, 10, 0.45);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }

    #productDetailModal .pd-container {
        position: relative;
        z-index: 1;
        width: 100%;
        max-width: 100%;
        margin: 0;
        margin-top: auto;
        border-radius: 22px 22px 0 0;
        max-height: min(92dvh, calc(100dvh - env(safe-area-inset-top, 0px) - 0.35rem));
        min-height: min(42dvh, 340px);
        overflow: hidden;
        display: flex;
        flex-direction: column;
        box-shadow:
            0 -14px 50px rgba(42, 36, 28, 0.16),
            0 -1px 0 rgba(201, 168, 76, 0.25);
        background: linear-gradient(180deg, #fffefc 0%, #faf8f4 36%, #f4f0e8 100%);
        animation: pdSheetRise 0.44s cubic-bezier(0.32, 0.72, 0, 1) both;
    }

    /* Griff (eigenes Produkt-Sheet, nicht Warenkorb-Kopie) */
    #productDetailModal .pd-container::before {
        content: "";
        display: block;
        width: 46px;
        height: 5px;
        margin: 11px auto 4px;
        border-radius: 999px;
        background: rgba(58, 50, 38, 0.1);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
        flex-shrink: 0;
    }

    #productDetailModal .pd-close {
        top: max(10px, env(safe-area-inset-top, 0px));
        right: 12px;
        width: 44px;
        height: 44px;
        border-radius: 14px;
        background: rgba(255, 255, 255, 0.72);
        border: 1px solid rgba(201, 168, 76, 0.22);
        box-shadow: 0 2px 12px rgba(42, 36, 28, 0.06);
    }

    #productDetailModal .pd-sheet-scroll {
        touch-action: pan-y;
        scroll-padding-bottom: max(64px, env(safe-area-inset-bottom, 0px));
    }

    #productDetailModal .pd-scroll-hint {
        display: block;
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        height: 58px;
        z-index: 3;
        pointer-events: none;
        background: linear-gradient(
            to top,
            rgba(250, 248, 244, 0.98) 0%,
            rgba(250, 248, 244, 0.55) 45%,
            rgba(250, 248, 244, 0) 100%
        );
        opacity: 1;
        visibility: visible;
        transition: opacity 0.32s ease, visibility 0.32s ease;
    }

    #productDetailModal.pd-sheet--scrolled-end .pd-scroll-hint {
        opacity: 0;
        visibility: hidden;
    }

    #productDetailModal .pd-scroll-hint::after {
        content: "";
        position: absolute;
        left: 50%;
        bottom: max(14px, env(safe-area-inset-bottom, 0px));
        width: 11px;
        height: 11px;
        border-right: 2px solid rgba(72, 62, 48, 0.42);
        border-bottom: 2px solid rgba(72, 62, 48, 0.42);
        transform: translate3d(-50%, 0, 0) rotate(45deg);
        transform-origin: 50% 50%;
        animation: pdScrollChevronNudge 1.35s ease-in-out infinite;
    }

    #productDetailModal .pd-content {
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    #productDetailModal .pd-image-col {
        flex: 0 0 auto;
        padding: 0.35rem 1.15rem 0.85rem;
        border-radius: 0;
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0.92) 100%);
    }

    #productDetailModal .pd-main-image {
        max-height: min(38vh, 320px);
        width: auto;
        max-width: 100%;
        margin: 0 auto;
        aspect-ratio: 1;
        object-fit: cover;
        border-radius: 16px;
        box-shadow: 0 8px 28px rgba(42, 36, 28, 0.1);
    }

    #productDetailModal .pd-gallery {
        margin-top: 0.65rem;
        gap: 6px;
    }

    #productDetailModal .pd-thumb {
        width: 52px;
        height: 52px;
        border-radius: 10px;
    }

    #productDetailModal .pd-info-col {
        display: flex;
        flex-direction: column;
        padding: 0.35rem 1.2rem max(0.85rem, env(safe-area-inset-bottom, 0px));
    }

    #productDetailModal .pd-type {
        font-size: 0.72rem;
        margin-bottom: 0.35rem;
    }

    #productDetailModal .pd-title {
        font-size: clamp(1.2rem, 4.2vw, 1.45rem);
        margin-bottom: 0.5rem;
        line-height: 1.25;
    }

    #productDetailModal .pd-price-row {
        margin-bottom: 0.35rem;
    }

    #productDetailModal .pd-price {
        font-size: 1.35rem;
        margin-bottom: 0.15rem;
    }

    #productDetailModal .pd-vat-disclosure {
        margin-bottom: 0.85rem;
        font-size: 0.78rem;
    }

    #productDetailModal .pd-variants {
        margin-bottom: 1rem;
    }

    #productDetailModal .pd-quantity {
        margin-bottom: 1rem;
    }

    #productDetailModal .pd-description {
        padding-top: 1rem;
        margin-top: 0.25rem;
        border-top: 1px solid rgba(201, 168, 76, 0.16);
        padding-bottom: 0.5rem;
    }

    #productDetailModal .pd-add-btn {
        margin-top: 0.75rem;
        margin-bottom: 0;
        padding: 16px 22px;
        border-radius: 16px;
        font-size: 1.02rem;
        box-shadow: 0 6px 22px rgba(201, 168, 76, 0.38);
    }

    #productDetailModal .pd-add-btn:hover {
        transform: none;
    }
}

@media (max-width: 1100px) and (prefers-reduced-motion: reduce) {
    #productDetailModal .pd-container {
        animation: none;
        transform: none;
        opacity: 1;
    }

    #productDetailModal .pd-scroll-hint::after {
        animation: none;
    }
}
