/* ========== ONITANI Shopify Shop Styles ========== */

/* Produkt-Karten Anpassung */
.shopify-product .music-card-body {
    padding: 12px 16px 16px;
    text-align: center;
}

.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.75rem;
}

/* 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);
}

/* ========== WARENKORB ICON (Header) ========== */
.shopify-cart-toggle {
    position: fixed;
    top: 15px;
    right: 20px;
    z-index: 1001;
    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: 9998;
    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: 9999;
    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 {
    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;
    overflow-y: auto;
    padding: 1rem 1.5rem;
}

.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;
}

.shopify-cart-item-info p {
    color: var(--gold-dark);
    font-weight: 600;
    font-size: 0.9rem;
    margin: 0.3rem 0;
}

/* 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 {
    text-align: center;
    padding: 3rem 1rem;
    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 {
    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;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

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

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

.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: 1001;
    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: 10000;
    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 {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

#productDetailModal.open {
    display: flex;
}

.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: 92vw;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 1;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: pdSlideIn 0.35s ease;
}

@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;
}

.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-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;
    }

    .pd-content {
        grid-template-columns: 1fr;
    }

    .pd-image-col {
        border-radius: 16px 16px 0 0;
        padding: 1.5rem 1rem;
    }

    .pd-info-col {
        padding: 1.5rem 1.25rem;
    }

    .pd-title {
        font-size: 1.3rem;
    }

    .pd-price {
        font-size: 1.3rem;
    }

    .pd-container {
        width: 100vw;
        max-width: 100vw;
        max-height: 100vh;
        border-radius: 0;
    }

    .pd-close {
        top: 10px;
        right: 10px;
    }
}

/* ========== MOBILE WARENKORB: Bottom-Sheet + über Bottom-Nav (nur schmal, Web unverändert) ========== */
@media (max-width: 1100px) {
    #shopifyCartOverlay {
        z-index: 10060;
    }

    #shopifyCartPanel {
        z-index: 10061;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0 !important;
        width: 100%;
        max-width: 100%;
        height: auto;
        max-height: min(90dvh, 100%);
        min-height: 34dvh;
        border-radius: 22px 22px 0 0;
        transform: translateY(calc(100% + 24px));
        transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
        box-shadow: 0 -14px 44px rgba(0, 0, 0, 0.18);
        padding-bottom: env(safe-area-inset-bottom, 0px);
        overflow: hidden;
    }

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

    /* Griff wie native Sheets */
    #shopifyCartPanel::before {
        content: "";
        display: block;
        width: 40px;
        height: 5px;
        margin: 10px auto 2px;
        border-radius: 999px;
        background: rgba(58, 50, 38, 0.14);
        flex-shrink: 0;
    }

    .shopify-cart-header {
        padding-top: 0.35rem;
        border-radius: 0;
    }

    .shopify-cart-items {
        max-height: min(48dvh, 420px);
    }

    .shopify-cart-footer {
        padding-bottom: max(1.1rem, calc(0.5rem + env(safe-area-inset-bottom, 0px)));
        box-shadow: 0 -8px 24px rgba(250, 248, 244, 0.95);
    }

    .shopify-checkout-btn {
        padding: 16px 24px;
        font-size: 1.02rem;
        border-radius: 14px;
    }
}
