/* ==========================================================================
   MyNextRing Custom Product Page v2
   Prefix: mnr- (verhindert Kollision mit Breakdance)
   Design: erbt Breakdance Styles – canada-type-gibson, Brand-Farben
   ========================================================================== */

/* --- Reset & Base --- */

.mnr-product-page *,
.mnr-product-page *::before,
.mnr-product-page *::after {
    box-sizing: border-box;
}

.mnr-product-page {
    max-width: var(--bde-section-width, 1150px);
    margin: 0 auto;
    padding: 48px var(--bde-section-horizontal-padding, 20px) 80px;
    font-family: var(--bde-body-font-family, 'canada-type-gibson', sans-serif);
    font-size: var(--bde-body-font-size, 18px);
    font-weight: 200;
    color: var(--bde-body-text-color, #1f2937);
    -webkit-font-smoothing: antialiased;
}

.mnr-product-container {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* --- Hero: Produkt-Info mit Bild --- */

.mnr-product-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
    margin-bottom: 48px;
}

.mnr-product-image {
    position: relative;
    border-radius: var(--bde-woo-product-images__border-radius, 4px);
    overflow: hidden;
    background: var(--grey-100, #f3f4f6);
    aspect-ratio: 1 / 1;
}

/* --- Slideshow Fade (alle Produktbilder durchblenden) --- */

.mnr-slide {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0;
    transition: opacity 1s ease-in-out, transform 0.4s ease;
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
}

/* Erstes Bild ist relativ → gibt dem Container die Hoehe/Aspect-Ratio */
.mnr-slide:first-child {
    position: relative;
}

.mnr-slide--active {
    opacity: 1;
    pointer-events: auto;
}

/* Hover-Zoom nur auf aktives Bild */
.mnr-product-image:hover .mnr-slide--active {
    transform: scale(1.03);
}

.mnr-product-details {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-top: 8px;
}

/* --- Brand Logo --- */

.mnr-brand-logo {
    margin-bottom: 2px;
}

.mnr-product-page .mnr-brand-logo img {
    height: 20px !important;
    max-height: 20px !important;
    width: auto !important;
    display: block;
    opacity: 0.75;
}

.mnr-product-title {
    font-family: var(--bde-heading-font-family, 'canada-type-gibson', sans-serif);
    font-size: var(--bde-h1-font-size, 48px);
    font-weight: 300;
    margin: 0;
    line-height: 1.15;
    color: var(--bde-headings-color, #111827);
    letter-spacing: -0.5px;
}

.mnr-product-price {
    font-family: var(--bde-heading-font-family, 'canada-type-gibson', sans-serif);
    font-size: var(--bde-h2-font-size, 30px);
    font-weight: 300;
    color: var(--bde-headings-color, #111827);
    margin: 0;
}

.mnr-product-price .woocommerce-Price-currencySymbol {
    font-size: 0.72em;
    font-weight: 200;
    margin-right: 1px;
}

.mnr-product-price del {
    color: var(--grey-400, #9ca3af);
    font-weight: 200;
    margin-right: 10px;
    font-size: 0.8em;
}

.mnr-product-price ins {
    text-decoration: none;
}

/* --- Preis-Block (Preis + Versand-Badge) --- */

.mnr-price-block {
    display: flex;
    align-items: baseline;
    justify-content: flex-end;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.mnr-shipping-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border: 1px solid var(--grey-300, #d1d5db);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 400;
    color: var(--grey-700, #374151);
    background: var(--grey-50, #f9fafb);
    white-space: nowrap;
    letter-spacing: 0.3px;
}

.mnr-shipping-badge svg {
    flex-shrink: 0;
    opacity: 0.7;
}

.mnr-product-description {
    font-size: var(--bde-body-font-size, 18px);
    font-weight: 300;
    line-height: 1.7;
    color: var(--bde-body-text-color, #1f2937);
    letter-spacing: 0.1px;
}

.mnr-product-description strong,
.mnr-product-description b {
    font-weight: 600;
    color: var(--bde-headings-color, #111827);
}

.mnr-product-description p {
    margin: 0 0 8px;
}

.mnr-product-description p:last-child {
    margin-bottom: 0;
}

/* --- Section Labels --- */

.mnr-section-label {
    font-family: var(--bde-heading-font-family, 'canada-type-gibson', sans-serif);
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 0 0 20px;
    color: var(--grey-500, #6b7280);
    text-align: center;
}

/* --- Nachrichten --- */

.mnr-messages {
    margin-top: 16px;
}

.mnr-message {
    padding: 14px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
}

.mnr-message--success {
    background: var(--emerald-100, #d1fae5);
    color: var(--emerald-700, #047857);
    border: 1px solid #a5d6a7;
}

.mnr-message--error {
    background: var(--red-50, #fef2f2);
    color: var(--red-500, #ef4444);
    border: 1px solid #ef9a9a;
}

/* --- Toggle-Schalter (Ringgröße ja/nein) --- */

.mnr-size-decision {
    margin-bottom: 40px;
}

.mnr-toggle {
    display: flex;
    align-items: stretch;
    max-width: 640px;
    margin: 0 auto;
    position: relative;
}

/* Horizontale Linie unten (oberer Balken des umgekehrten T) */
.mnr-toggle::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--grey-300, #d1d5db);
}

.mnr-toggle__option {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px 20px 20px;
    background: none;
    border: none;
    cursor: pointer;
    text-align: center;
    font-family: inherit;
    outline: none;
    transition: all 0.3s ease;
    position: relative;
}

/* Unterstrich-Akzent fuer aktive Seite */
.mnr-toggle__option.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 20%;
    right: 20%;
    height: 2px;
    background: var(--bde-palette-color-1-78782fb4-f92b-4291-bed2-ee32321a27a0, #141a20);
    z-index: 1;
}

/* Inaktive Seite: nur ausgegraut wenn ein anderer Tab aktiv ist */
.mnr-toggle:has(.mnr-toggle__option.active) .mnr-toggle__option:not(.active) {
    opacity: 0.32;
}

.mnr-toggle:has(.mnr-toggle__option.active) .mnr-toggle__option:not(.active):hover {
    opacity: 0.55;
}

/* Vertikaler Divider (stoppt an der Querlinie) */
.mnr-toggle__divider {
    width: 1px;
    background: var(--grey-300, #d1d5db);
    align-self: stretch;
    flex-shrink: 0;
}

.mnr-toggle__title {
    font-family: var(--bde-heading-font-family, 'canada-type-gibson', sans-serif);
    font-size: 24px;
    font-weight: 500;
    color: var(--bde-headings-color, #111827);
    line-height: 1.3;
    letter-spacing: -0.3px;
}

.mnr-toggle__desc {
    font-size: 15px;
    font-weight: 300;
    color: var(--grey-600, #4b5563);
    line-height: 1.4;
    margin-top: 2px;
}

/* --- Farb-Auswahl --- */

.mnr-color-picker {
    margin-bottom: 36px;
    text-align: center;
}

.mnr-color-options {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

.mnr-color-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border: none;
    border-radius: 12px;
    background: none;
    cursor: pointer;
    transition: all var(--bde-transition-duration, 300ms) ease;
    font-family: inherit;
    outline: none;
    opacity: 1;
}

.mnr-color-option:hover {
    opacity: 1;
}

.mnr-color-option.active {
    opacity: 1;
}

.mnr-color-option__image {
    width: 170px;
    height: 170px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--grey-100, #f3f4f6);
    border: 2px solid transparent;
    transition: all var(--bde-transition-duration, 300ms);
}

.mnr-color-option.active .mnr-color-option__image {
    border-color: var(--bde-palette-color-1-78782fb4-f92b-4291-bed2-ee32321a27a0, #141a20);
    border-width: 3px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.mnr-color-option__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mnr-color-option__name {
    font-size: 13px;
    font-weight: 400;
    color: var(--grey-500, #6b7280);
    letter-spacing: 0.3px;
}

.mnr-color-option.active .mnr-color-option__name {
    color: var(--bde-headings-color, #111827);
    font-weight: 500;
}

/* --- Groessen-Auswahl (Ring-Kreise) --- */

.mnr-size-picker {
    margin-bottom: 36px;
    text-align: center;
}

.mnr-size-options {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-end;
}

.mnr-size-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 8px 8px;
    border: none;
    border-radius: 10px;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.25s ease;
    outline: none;
    opacity: 0.55;
}

.mnr-size-option:hover {
    opacity: 0.8;
    background: rgba(0, 0, 0, 0.02);
}

.mnr-size-option.active {
    opacity: 1;
    background: rgba(0, 0, 0, 0.03);
}

.mnr-size-option__ring {
    border: 2px solid var(--grey-400, #9ca3af);
    border-radius: 50%;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.mnr-size-option:hover .mnr-size-option__ring {
    border-color: var(--grey-500, #6b7280);
}

.mnr-size-option.active .mnr-size-option__ring {
    border-color: var(--bde-palette-color-1-78782fb4-f92b-4291-bed2-ee32321a27a0, #141a20);
    border-width: 2.5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.mnr-size-option__label {
    font-family: var(--bde-heading-font-family, 'canada-type-gibson', sans-serif);
    font-size: 15px;
    font-weight: 500;
    color: var(--grey-700, #374151);
    line-height: 1;
}

.mnr-size-option.active .mnr-size-option__label {
    color: var(--bde-headings-color, #111827);
    font-weight: 600;
}

.mnr-size-option:disabled {
    opacity: 0.12;
    cursor: not-allowed;
}

.mnr-size-option:disabled .mnr-size-option__ring {
    border-style: dashed;
}

/* --- Add to Cart – Breakdance Primary Button Style --- */

.mnr-add-to-cart-wrapper {
    margin-top: 16px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.mnr-add-to-cart {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: var(--bde-button-padding-base, 14px 24px);
    background: var(--bde-palette-color-1-78782fb4-f92b-4291-bed2-ee32321a27a0, #141a20);
    color: var(--bde-palette-color-1-f545e254-cc81-43d3-bf3e-c50ae959fe21, #DEC7B1);
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: var(--bde-body-font-size, 18px);
    font-weight: var(--bde-button-font-weight, 500);
    line-height: var(--bde-button-line-height, 1);
    cursor: pointer;
    text-transform: none;
    letter-spacing: 0.5px;
    transition: all var(--bde-transition-duration, 300ms) ease;
    outline: none;
}

.mnr-add-to-cart:hover:not(:disabled) {
    background: var(--bde-palette-color-1-78782fb4-f92b-4291-bed2-ee32321a27a0, #141a20);
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.mnr-add-to-cart:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.mnr-add-to-cart:disabled {
    filter: grayscale(100%);
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* --- Flow B: SizeKit Info + Stepper --- */

.mnr-sizekit-info {
    text-align: center;
    margin: 0 auto 32px;
    padding: 32px 20px 24px;
    background: none;
    border: none;
    border-radius: 0;
}

.mnr-sizekit-info__text {
    margin: 0 0 28px;
    font-size: 18px;
    font-weight: 300;
    line-height: 1.7;
    color: var(--grey-700, #374151);
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.mnr-sizekit-info__text strong {
    color: var(--bde-headings-color, #111827);
    font-weight: 500;
}

/* --- Stepper: horizontal 4 Schritte mit durchgehender Linie --- */

.mnr-stepper {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    position: relative;
    max-width: 640px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Durchgehende goldene Linie hinter den Kreisen */
.mnr-stepper::before {
    content: '';
    position: absolute;
    top: 28px;
    left: calc(12.5% + 10px);
    right: calc(12.5% + 10px);
    height: 2px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        var(--bde-palette-color-1-35ff2b08-41fe-4135-bd31-e8d8ac2a89b7, #A67C4F) 8%,
        var(--bde-palette-color-1-35ff2b08-41fe-4135-bd31-e8d8ac2a89b7, #A67C4F) 92%,
        transparent 100%
    );
    opacity: 0.3;
    z-index: 0;
}

.mnr-stepper__step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
    flex: 1;
    position: relative;
    z-index: 1;
}

.mnr-stepper__bubble {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid var(--bde-palette-color-1-35ff2b08-41fe-4135-bd31-e8d8ac2a89b7, #A67C4F);
    background: #fff;
    color: var(--bde-palette-color-1-35ff2b08-41fe-4135-bd31-e8d8ac2a89b7, #A67C4F);
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(166, 124, 79, 0.12);
    transition: all 0.3s ease;
}

.mnr-stepper__bubble svg {
    display: block;
    width: 24px;
    height: 24px;
}

.mnr-stepper__connector {
    display: none;
}

.mnr-stepper__label {
    font-family: var(--bde-heading-font-family, 'canada-type-gibson', sans-serif);
    font-size: 14px;
    font-weight: 500;
    color: var(--bde-headings-color, #111827);
    line-height: 1.4;
    max-width: 110px;
}

.mnr-stepper__label small {
    font-weight: 300;
    color: var(--grey-600, #4b5563);
    font-size: 12px;
    display: block;
    margin-top: 2px;
}

/* --- Animationen --- */

.mnr-flow-a {
    animation: mnr-fadeIn 0.3s ease;
}

@keyframes mnr-fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* --- Responsive --- */

@media (max-width: 768px) {
    .mnr-product-page {
        padding: 24px 16px 60px;
    }

    .mnr-product-hero {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .mnr-product-image {
        max-width: 400px;
        margin: 0 auto;
    }

    .mnr-product-details {
        text-align: center;
        padding-top: 0;
    }

    .mnr-brand-logo {
        display: flex;
        justify-content: center;
    }

    .mnr-product-title {
        font-size: 32px;
    }

    .mnr-product-price {
        font-size: 24px;
    }

    .mnr-price-block {
        justify-content: center;
    }

    .mnr-toggle__option {
        padding: 14px 12px 18px;
    }

    .mnr-toggle__title {
        font-size: 20px;
    }

    .mnr-toggle__desc {
        font-size: 13px;
    }

    .mnr-color-option__image {
        width: 130px;
        height: 130px;
    }

    .mnr-size-option {
        padding: 8px 5px 6px;
        gap: 4px;
    }

    .mnr-size-option__label {
        font-size: 13px;
    }

    .mnr-add-to-cart {
        padding: 14px 24px;
        font-size: 16px;
    }

    /* Stepper: kompakter auf Tablet */
    .mnr-stepper {
        padding: 0 12px;
    }

    .mnr-stepper__bubble {
        width: 48px;
        height: 48px;
    }

    .mnr-stepper__bubble svg {
        width: 22px;
        height: 22px;
    }

    .mnr-stepper::before {
        top: 24px;
    }

    .mnr-stepper__label {
        font-size: 13px;
    }

    .mnr-sizekit-info {
        padding: 24px 8px 20px;
    }
}

@media (max-width: 480px) {
    .mnr-product-title {
        font-size: 28px;
    }

    .mnr-product-price {
        font-size: 20px;
    }

    .mnr-price-block {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .mnr-color-options {
        gap: 10px;
    }

    .mnr-color-option__image {
        width: 110px;
        height: 110px;
    }

    .mnr-size-options {
        gap: 2px;
    }

    .mnr-size-option {
        padding: 6px 4px 5px;
        gap: 3px;
        border-radius: 8px;
    }

    .mnr-size-option__label {
        font-size: 12px;
    }

    .mnr-toggle__title {
        font-size: 17px;
    }

    /* Stepper: kleiner auf Mobile */
    .mnr-stepper {
        padding: 0 8px;
    }

    .mnr-stepper__bubble {
        width: 42px;
        height: 42px;
    }

    .mnr-stepper__bubble svg {
        width: 18px;
        height: 18px;
    }

    .mnr-stepper::before {
        top: 21px;
    }

    .mnr-stepper__label {
        font-size: 11px;
    }

    .mnr-stepper__label small {
        font-size: 10px;
    }

    .mnr-stepper__step {
        gap: 6px;
    }
}
