/* ==========================================================================
   Produktdetailseite (SilverShop/Page/Layout/Product.ss)
   Alle Regeln sind auf #Product / .pd__* begrenzt.
   ========================================================================== */

#Product.pd {
    --pd-blue: #002E52;
    --pd-blue-hover: #003e6e;
    --pd-yellow: #EDBE00;
    --pd-cream: #FAF6EF;
    --pd-line: rgba(0, 46, 82, .14);
    --pd-muted: rgba(0, 46, 82, .72);
    color: var(--pd-blue);
}

/* ---------- Zurück-Link ---------- */
#Product .pd__back {
    margin-bottom: 1.25rem;
}

#Product .pd__back-link {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: 15px;
    text-decoration: none;
    color: var(--pd-blue);
}

#Product .pd__back-link:hover span {
    text-decoration: underline;
}

/* ---------- Bildbühne ---------- */
#Product .pd__stage {
    position: relative;
    border-radius: 0;
    background: var(--pd-cream);
    overflow: hidden;
}

#Product .pd__stage-inner {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    aspect-ratio: 4 / 5;
    padding: 8% 10% 7%;
}

/* Farbkreis der Kategorie (Hintergrundbild wie bisher) */
#Product .pd__stage .pd__circle {
    position: absolute;
    top: 54%;
    left: 50%;
    width: 72%;
    height: auto;
    aspect-ratio: 1 / 1;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 0;
    background-color: #ae1065;
    background-image: url('/resources/themes/franzxaver/images/dots_pink.png');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
}

#Product .pd__image {
    position: relative;
    z-index: 1;
    display: block;
    width: auto;
    height: 100%;
    max-width: 100%;
    min-height: 0;
    object-fit: contain;
    object-position: center bottom;
    filter: drop-shadow(0 18px 18px rgba(0, 0, 0, .18));
}

#Product .pd__image--fit {
    height: auto;
    max-height: 100%;
    filter: none;
}

#Product .pd__placeholder {
    position: relative;
    z-index: 1;
    align-self: center;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46%;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    background: #fff;
}

#Product .pd__placeholder-logo {
    width: 70%;
    height: auto;
    min-height: 0;
    opacity: .5;
}

#Product .pd__stage--noimage .pd__circle {
    display: none;
}

#Product .pd__badge {
    position: absolute;
    top: 1.25rem;
    left: 1.25rem;
    z-index: 2;
    padding: .35rem .85rem;
    border-radius: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: .02em;
    text-transform: uppercase;
}

#Product .pd__badge--sale {
    background: #8e060a;
    color: #fff;
}

#Product .pd__badge--new {
    background: var(--pd-yellow);
    color: var(--pd-blue);
}

/* ---------- Titel / Meta ---------- */
#Product .pd__header {
    margin: 1.75rem 0 1.25rem;
}

#Product .pd__title {
    margin: 0 0 .5rem;
    font-size: clamp(30px, 5.4vw, 44px);
    line-height: 1.12;
    font-weight: 500;
    letter-spacing: -.01em;
    hyphens: auto;
    overflow-wrap: break-word;
}

#Product .pd__meta {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem .6rem;
    margin: 0;
    font-size: 16px;
    line-height: 1.5;
    color: var(--pd-muted);
}

#Product .pd__teaser {
    margin: .9rem 0 0;
    max-width: 36em;
    font-size: 18px;
    line-height: 1.55;
}

/* ---------- Kaufbereich ---------- */
#Product .pd__buy {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--pd-line);
}

#Product .pd__price {
    margin-bottom: 1.5rem;
}

#Product .pd__price-value {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: .25rem .9rem;
    margin: 0 0 .35rem;
    font-size: 34px;
    line-height: 1.1;
    font-weight: 600;
    color: var(--pd-blue);
}

#Product .pd__price-prefix {
    font-size: .55em;
    font-weight: 400;
}

#Product .pd__price-value--sale {
    color: #8e060a;
}

#Product .pd__price-old {
    font-size: 20px;
    font-weight: 400;
    color: var(--pd-muted);
}

#Product .pd__price-notes {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--pd-muted);
}

#Product .pd__price-notes .price__tax,
#Product .pd__price-notes span,
#Product .pd__price-notes a,
#Product .pd__trust span,
#Product .pd__trust a {
    font-size: 14px;
    line-height: 1.6;
}

#Product .pd__baseprice {
    color: var(--pd-blue);
}

#Product .pd__price-notes a,
#Product .pd__trust a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

#Product .pd__cart {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: .75rem;
    margin: 0 0 1.5rem;
}

/* Menge */
#Product .pd__qty {
    display: inline-flex;
    align-items: stretch;
    height: 56px;
    border: 1.5px solid var(--pd-blue);
    border-radius: 999px;
    overflow: hidden;
    background: #fff;
}

#Product .pd__qty[hidden] {
    display: none;
}

#Product .pd__qty-btn {
    width: 46px;
    border: 0;
    background: transparent;
    color: var(--pd-blue);
    font-size: 14px;
    cursor: pointer;
}

#Product .pd__qty-btn:hover {
    background: var(--pd-cream);
}

#Product .pd__qty-input {
    width: 44px;
    border: 0;
    padding: 0;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: var(--pd-blue);
    background: transparent;
    -moz-appearance: textfield;
    appearance: textfield;
}

#Product .pd__qty-input::-webkit-outer-spin-button,
#Product .pd__qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Warenkorb-Button */
#Product .pd__cart-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .65rem;
    flex: 1 1 220px;
    max-width: 340px;
    min-height: 56px;
    padding: 0 2rem;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
}

#Product .pd__cart-btn,
#Product .pd__cart-btn:focus,
#Product .floating-cart-btn,
#Product .floating-cart-btn:focus {
    background-color: var(--pd-blue);
    color: #fff;
}

#Product .pd__cart-btn span,
#Product .pd__cart-btn i,
#Product .floating-cart-btn i {
    color: #fff !important;
    font-size: inherit;
}

#Product .pd__cart-btn:hover,
#Product .floating-cart-btn:hover {
    background-color: var(--pd-blue-hover);
    color: #fff;
}

/* Fokus-Zustände (globales .btn-primary:focus macht den Button transparent) */
#Product .pd__cart-btn:focus-visible,
#Product .floating-cart-btn:focus-visible,
#Product .pd__qty-btn:focus-visible,
#Product .pd__back-link:focus-visible,
#Product .pd__trust a:focus-visible,
#Product .pd__price-notes a:focus-visible {
    outline: 3px solid var(--pd-yellow);
    outline-offset: 3px;
    box-shadow: 0 0 0 6px rgba(0, 46, 82, .25);
}

#Product .pd__qty:focus-within {
    box-shadow: 0 0 0 3px var(--pd-yellow);
}

#Product .pd__qty-input:focus {
    outline: none;
}

#Product .pd__unavailable {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin: 0 0 1.5rem;
    padding: .7rem 1.2rem;
    border-radius: 0;
    background: #f6ecec;
    color: #8e060a;
    font-size: 16px;
    font-weight: 500;
}

#Product .pd__unavailable i {
    font-size: 10px;
    color: #8e060a !important;
}

/* Vertrauen */
#Product .pd__trust {
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 14px;
    line-height: 1.5;
    color: var(--pd-muted);
}

#Product .pd__trust li {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .35rem .6rem;
    margin: 0 0 .5rem;
    padding: 0;
}

#Product .pd__trust li:before {
    display: none;
}

#Product .pd__trust li:not(.pd__trust-pay) {
    flex-wrap: nowrap;
    align-items: flex-start;
}

#Product .pd__trust li:not(.pd__trust-pay) i {
    margin-top: .2rem;
}

#Product .pd__trust i {
    flex: none;
    width: 18px;
    text-align: center;
    color: var(--pd-blue);
}

#Product .pd__paylogos {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
}

#Product .pd__paylogo {
    height: 30px;
    width: auto;
    min-height: 0;
}

/* ---------- Beschreibung & Infoabschnitte ---------- */
#Product .pd__desc {
    max-width: 40rem;
}

#Product .pd__section {
    margin: 0 0 2.25rem;
}

#Product .pd__section + .pd__section {
    padding-top: 2.25rem;
    border-top: 1px solid var(--pd-line);
}

#Product .pd__section p {
    margin-bottom: .9em;
}

#Product .pd__section > :last-child {
    margin-bottom: 0;
}

#Product .pd__section-title {
    margin: 0 0 1rem;
    font-size: 15px;
    line-height: 1.3;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--pd-blue);
}

/* Steckbrief */
#Product .pd__facts {
    padding: 1.5rem 1.5rem 1.25rem;
    border-radius: 0;
    background: var(--pd-cream);
}

#Product .pd__section + .pd__facts,
#Product .pd__facts + .pd__section {
    border-top: 0;
}

#Product .pd__facts + .pd__section {
    padding-top: 0;
}

#Product .pd__facts-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 1.5rem;
    margin: 0;
}

#Product .pd__fact {
    padding: .6rem 0;
    border-bottom: 1px solid var(--pd-line);
}

#Product .pd__fact dt {
    margin: 0 0 .1rem;
    font-size: 13px;
    font-weight: 400;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--pd-muted);
}

#Product .pd__fact dd {
    margin: 0;
    font-size: 17px;
    line-height: 1.35;
    font-weight: 500;
    color: var(--pd-blue);
}

/* ---------- Related ---------- */
#Product .pd__related {
    margin-top: 3.5rem;
    padding-top: 3rem;
    border-top: 1px solid var(--pd-line);
}

#Product .pd__related-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 0 0 1.75rem;
}

#Product .pd__related-nav {
    display: flex;
    flex: none;
    gap: .5rem;
}

#Product .pd__related-arrow {
    /* globales .slick-arrow (generic.css) positioniert absolut -> hier zurücksetzen */
    position: static !important;
    top: auto !important;
    z-index: auto;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1.5px solid var(--pd-blue);
    border-radius: 50%;
    background: #fff;
    color: var(--pd-blue);
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease, opacity .2s ease;
}

#Product .pd__related-arrow:hover {
    background: var(--pd-blue);
    color: #fff;
}

#Product .pd__related-arrow:focus-visible {
    outline: 3px solid var(--pd-yellow);
    outline-offset: 3px;
}

#Product .pd__related-arrow.slick-disabled {
    opacity: .3;
    cursor: default;
    background: #fff;
    color: var(--pd-blue);
}

#Product .pd__related-arrow.slick-hidden {
    display: none;
}

#Product .pd__related-title {
    margin: 0;
    font-size: clamp(24px, 3.2vw, 32px);
    line-height: 1.2;
    font-weight: 500;
}

#Product #relatedProducts .slick-track {
    display: flex;
}

#Product #relatedProducts .slick-slide {
    height: auto;
    padding: 0 .75rem;
}

#Product #relatedProducts .slick-list {
    margin: 0 -.75rem;
}

#Product #relatedProducts .slick-dots {
    position: static;
    margin-top: 1.25rem;
}

#Product #relatedProducts .slick-dots li:before {
    display: none;
}

/* ---------- Floating-Button (mobil) ---------- */
#Product .floating-cart-btn {
    padding: 0;
    transition: opacity .2s ease, transform .2s ease;
}

/* ausgeblendet, solange der große Warenkorb-Button sichtbar ist (per JS) */
#Product.pd--cta-visible .floating-cart-btn {
    opacity: 0;
    transform: scale(.8);
    pointer-events: none;
}

/* ---------- Desktop ---------- */
@media (min-width: 992px) {
    #Product .pd__back {
        margin-bottom: 1.75rem;
    }

    #Product .pd__media {
        align-self: flex-start;
        position: sticky;
        top: 110px;
    }

    #Product .pd__stage-inner {
        aspect-ratio: auto;
        height: min(76vh, 720px);
        min-height: 520px;
    }

    #Product .pd__info {
        padding-right: 3rem;
    }

    #Product .pd__header {
        margin-top: 0;
    }

    #Product .pd__price-value {
        font-size: 38px;
    }
}

@media (min-width: 1400px) {
    #Product .pd__info {
        padding-right: 5rem;
    }
}

/* ---------- Mobil ---------- */
@media (max-width: 991.98px) {
    #Product .pd__stage-inner {
        aspect-ratio: auto;
        height: min(62vh, 460px);
        padding: 1.5rem 1rem 1.25rem;
    }

    #Product .pd__stage .pd__circle {
        width: auto;
        height: 74%;
    }

    #Product .pd__cart-btn {
        max-width: none;
    }

    /* Platz für den Floating-Button, damit er keinen Text verdeckt */
    #Product .pd__related {
        padding-bottom: 3rem;
    }
}

@media (max-width: 575.98px) {
    #Product .pd__stage-inner {
        height: 300px;
        padding: 1.25rem 1rem 1rem;
    }

    #Product .pd__header {
        margin: 1.25rem 0 1rem;
    }

    #Product .pd__title {
        font-size: 28px;
    }

    #Product .pd__price {
        margin-bottom: 1.1rem;
    }

    #Product .pd__cart-btn {
        flex: 1 1 160px;
        padding: 0 1rem;
        gap: .5rem;
        font-size: 17px;
    }

    #Product .pd__qty-btn {
        width: 40px;
    }

    #Product .pd__price-value {
        font-size: 30px;
    }

    #Product .pd__facts {
        padding: 1.1rem 1.1rem 1rem;
    }

    #Product .pd__facts-list {
        gap: 0 1rem;
    }

    #Product .pd__fact dd {
        font-size: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    #Product .pd__cart-btn {
        transition: none;
    }
}
