/* ==========================================================
   PRODUCT PAGE – Animated Detail View & Shop Offers
   ========================================================== */

/* ─── Wrapper ─── */
.product-wrapper {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 1.5rem;
    display: flex;
    gap: 3.5rem;
    animation: fadeInUp 0.6s ease both;
}

/* ─── Left Column (Image) ─── */
.product-left {
    flex: 1;
    animation: fadeInUp 0.5s ease 0.1s both;
}

.product-image-box {
    background: #ffffff;
    padding: 40px;
    border-radius: 14px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    text-align: center;
    transition: all var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

/* Animated gradient border on hover */
.product-image-box::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: var(--radius-xl);
    padding: 1px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.3), rgba(74, 222, 128, 0.2), transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity var(--transition-smooth);
}

.product-image-box:hover {
    box-shadow: var(--shadow-lg), var(--shadow-glow-blue);
    transform: translateY(-4px);
}

.product-image-box:hover::before {
    opacity: 1;
}

.product-image-box img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    transition: transform var(--transition-smooth);
}

.product-image-box:hover img {
    transform: scale(1.03);
}

/* ─── Right Column (Details) ─── */
.product-right {
    flex: 1.2;
    animation: fadeInUp 0.5s ease 0.2s both;
}

.product-title {
    font-size: 32px;
    color: white;
    font-weight: 600;
    margin-bottom: 30px;
    border-bottom: 2px solid #eaeaea;
    padding-bottom: 15px;
}

.product-desc {
    font-size: 23px;
    line-height: 1.7;
    color: #ffffff;
    margin-bottom: 15px;
}

.product-specs {
    display: flex;
    color: #ffffff;
    flex-direction: column;
    gap: 12px;
}

.product-specs p {
    padding: 0.7rem 1rem;
    background: rgba(27, 34, 48, 0.65);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    transition: all var(--transition-normal);
}

.product-specs p:hover {
    background: rgba(27, 34, 48, 0.9);
    border-color: var(--border-default);
    transform: translateX(4px);
}

.product-specs p strong {
    color: var(--text-muted);
    font-weight: 500;
    margin-right: 0.5rem;
}

/* ─── Spec Rows ─── */
.spec-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
}

.spec-row:hover {
    background: rgba(27, 34, 48, 0.9);
    transform: translateX(4px);
}

.spec-name {
    font-weight: 500;
    color: var(--text-secondary);
}

.spec-value {
    font-weight: 600;
    color: var(--text-primary);
}

/* ─── Responsive Product Page ─── */
@media (max-width: 900px) {
    .product-wrapper {
        flex-direction: column;
        gap: 2rem;
        margin: 1.5rem auto;
        padding: 0 1rem;
    }

    .product-image-box {
        padding: 1.5rem;
    }

    .product-title {
        font-size: 1.4rem;
        margin-bottom: 1rem;
        padding-bottom: 0.75rem;
    }

    .product-desc {
        font-size: 0.92rem;
    }
}

@media (max-width: 600px) {
    .product-wrapper {
        gap: 1.25rem;
        margin: 1rem auto;
        padding: 0 0.75rem;
    }

    .product-image-box {
        padding: 1rem;
        border-radius: var(--radius-lg);
    }

    .product-title {
        font-size: 1.2rem;
    }

    .product-desc {
        font-size: 0.88rem;
        line-height: 1.6;
        margin-bottom: 1rem;
    }

    .product-specs p {
        padding: 0.6rem 0.8rem;
        font-size: 0.85rem;
    }

    .product-specs p:hover {
        transform: none;
    }

    /* Wishlist button under image on mobile */
    .product-left .auth__actions {
        margin-top: 0.75rem;
    }

    .product-left .auth__submit {
        font-size: 0.88rem;
        min-height: 46px;
    }
}

/* ==========================================================
   SHOP OFFERS – Animated List
   ========================================================== */
.shop-offers {
    max-width: 1200px;
    margin: 0 auto 4rem;
    padding: 0 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    animation: fadeInUp 0.6s ease 0.3s both;
}

.shop-line {
    display: grid;
    grid-template-columns: 250px 1fr auto;
    align-items: center;
    gap: 1.5rem;
    background: #1f2a3a;
    border: 1px solid #2f3c52;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    transition: all var(--transition-smooth);
    animation: fadeInUp 0.4s ease both;
    position: relative;
    overflow: hidden;
}

/* Gradient accent line on left */
.shop-line::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--color-primary), var(--color-accent));
    border-radius: var(--radius-full);
    opacity: 0;
    transition: opacity var(--transition-smooth);
}

.shop-line:hover {
    background: #243248;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}

.shop-line:hover::before {
    opacity: 1;
}

/* Stagger shop lines */
.shop-line:nth-child(1) { animation-delay: 0.35s; }
.shop-line:nth-child(2) { animation-delay: 0.42s; }
.shop-line:nth-child(3) { animation-delay: 0.49s; }
.shop-line:nth-child(4) { animation-delay: 0.56s; }
.shop-line:nth-child(5) { animation-delay: 0.63s; }

.shop-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.shop-logo {
    display: flex;
    align-items: center;
    height: 40px;
    flex-shrink: 0;
}

.shop-logo img {
    max-height: 36px;
    max-width: 90px;
    object-fit: contain;
    border-radius: var(--radius-sm);
    transition: transform var(--transition-normal);
}

.shop-line:hover .shop-logo img {
    transform: scale(1.08);
}

.shop-name {
    color: white;
    font-weight: 600;
    font-size: 16px;
}

.shop-name a {
    color: white;
    text-decoration: none;
}

.shop-name a:hover {
    text-decoration: underline;
}

.shop-middle {
    display: flex;
    align-items: center;
    gap: 2rem;
    font-size: 14px;
    color: #cbd5e1;
}

.shop-shipping {
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.4;
}

.shop-stock {
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.shop-stock.in-stock::before {
    content: "✔";
    color: #22c55e;
}

.shop-stock.out-stock::before {
    content: "✖";
    color: #ef4444;
}

.shop-price {
    margin-left: auto;
    font-size: 18px;
    font-weight: 700;
    color: #4ade80;
}

.shop-line:hover .shop-price {
    transform: scale(1.05);
}

.no-shop {
    background: #1f2a3a;
    padding: 20px;
    border-radius: 12px;
    color: #cbd5e1;
    text-align: center;
}

/* ─── Responsive Shop Offers ─── */
@media (max-width: 900px) {
    .shop-line {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        padding: 1rem;
    }

    .shop-middle {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .shop-price {
        font-size: 1.2rem;
    }

    .shop-offers {
        padding: 0 1rem;
        margin-bottom: 3rem;
    }
}

@media (max-width: 600px) {
    .shop-line {
        gap: 0.5rem;
        padding: 0.85rem;
        border-radius: var(--radius-md);
    }

    .shop-line:hover {
        padding-left: 0.85rem;
        transform: none;
    }

    .shop-left {
        gap: 0.75rem;
    }

    .shop-logo img {
        max-height: 28px;
        max-width: 70px;
    }

    .shop-name {
        font-size: 0.88rem;
    }

    .shop-middle {
        gap: 0.5rem;
        font-size: 0.8rem;
    }

    .shop-stock {
        font-size: 0.72rem;
        padding: 0.2rem 0.6rem;
    }

    .shop-price {
        font-size: 1.1rem;
    }

    .shop-offers {
        padding: 0 0.75rem;
        gap: 0.5rem;
    }

    .no-shop {
        padding: 1.5rem;
        font-size: 0.88rem;
    }
}


/* ==========================================================
   PRODUCT REVIEWS
   ========================================================== */

.reviews {
    max-width: 1200px;
    margin: 3rem auto 5rem;
    padding: 0 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    animation: fadeInUp 0.6s ease 0.4s both;
}

.reviews-title {
    color: white;
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Review Card */
.review-card {
    background: #1c2533; /* leicht dunkler als shop */
    border: 1px solid #2a374a;
    border-radius: 14px;
    padding: 1.2rem 1.5rem;
    transition: all var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

/* leichter Akzent rechts statt links */
.review-card::after {
    content: "";
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--color-accent), var(--color-primary));
    opacity: 0;
    transition: opacity var(--transition-smooth);
}

.review-card:hover {
    background: #223047;
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(0,0,0,0.25);
}

.review-card:hover::after {
    opacity: 1;
}

/* Header */
.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.6rem;
}

/* User-Info (Avatar + Name/Datum) */
.review-user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0; /* erlaubt Text-Ellipsis/Umbruch in flex */
}

/* Profilbild in Reviews: immer gleich groß und angenehm klein */
.review-avatar {
    width: clamp(28px, 3.2vw, 34px);
    height: clamp(28px, 3.2vw, 34px);
    flex: 0 0 auto;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    display: block;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: #0f172a; /* falls Bild transparent/fehlend */
}

/* Optional: verhindert, dass lange Namen Layout sprengen */
.review-user {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.review-user {
    font-weight: 600;
    color: white;
    font-size: 15px;
}

/* Sterne */
.review-rating {
    display: flex;
    gap: 4px;
}

.star {
    font-size: 16px;
    color: #475569;
    transition: transform 0.2s ease;
}

.star.filled {
    color: #fbbf24;
}

.review-card:hover .star.filled {
    transform: scale(1.15);
}

/* Kommentar */
.review-comment {
    color: #cbd5e1;
    font-size: 14px;
    line-height: 1.6;
}

/* Keine Reviews */
.no-review {
    background: #1f2a3a;
    border: 1px solid #2f3c52;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    color: #94a3b8;
}


/* ==========================================================
   REVIEW OVERVIEW BOX (Linke Spalte) - Kompakte Version
   ========================================================== */

.review-overview-box {
    background: #1c2533;
    border: 1px solid #2a374a;
    border-radius: var(--radius-lg);
    /* Padding von 1.5rem auf 1rem reduziert für eine kleinere Box */
    padding: 1rem;
    margin-top: 1.5rem;
    color: #cbd5e1;
    animation: fadeInUp 0.5s ease 0.3s both;
}

.overview-header {
    text-align: center;
    /* Abstände verringert */
    margin-bottom: 0.8rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid #2a374a;
}

.overview-avg {
    /* Schriftgröße der Durchschnittsnote von 2.5rem auf 2rem verkleinert */
    font-size: 2rem;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.overview-avg .star {
    /* Stern etwas verkleinert */
    font-size: 1.5rem;
}

.overview-count {
    /* Textgröße leicht verkleinert */
    font-size: 0.8rem;
    color: #94a3b8;
    margin-top: 0.2rem;
}

.overview-breakdown {
    display: flex;
    flex-direction: column;
    /* Abstand zwischen den Balken verringert */
    gap: 0.4rem;
}

.breakdown-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    /* Text bei den Balken etwas kleiner */
    font-size: 0.8rem;
}

.breakdown-stars {
    width: 50px;
    white-space: nowrap;
    text-align: right;
    color: #cbd5e1;
}

.breakdown-bar-bg {
    flex: 1;
    /* Höhe der Balken von 8px auf 6px reduziert */
    height: 6px;
    background: #2a374a;
    border-radius: 3px;
    overflow: hidden;
}

.breakdown-bar-fill {
    height: 100%;
    background: #fbbf24;
    border-radius: 3px;
    transition: width 0.8s ease-out;
}

.breakdown-num {
    width: 20px;
    text-align: right;
    color: #94a3b8;
}

.overview-empty {
    text-align: center;
    color: #94a3b8;
    padding: 0.5rem 0;
    font-size: 0.85rem;
}

/* ==========================================================
   REVIEW HINZUFÜGEN (Formular)
   ========================================================== */

.review-add {
    max-width: 1200px;
    margin: 0 auto 2rem;
    padding: 0 1.5rem;
    animation: fadeInUp 0.5s ease 0.4s both;
}

.review-input-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

/* --- Sterne-Auswahl (Radio-Button Trick) --- */
.rating-input {
    display: flex;
    /* Dreht die Reihenfolge um für den Hover-Effekt */
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 0.3rem;
}

/* Versteckt die eigentlichen runden Radio-Buttons */
.rating-input input[type="radio"] {
    display: none;
}

/* Stylt die Labels (die Sterne) */
.rating-input label {
    font-size: 2.2rem;
    color: #475569; /* Dunkelgrau für leere Sterne */
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
}

/* Hover-Logik: Färbt den gehoverten/geklickten Stern und alle "folgenden" (durch row-reverse sind das die linken) */
.rating-input label:hover,
.rating-input label:hover ~ label,
.rating-input input[type="radio"]:checked ~ label {
    color: #fbbf24; /* Das gleiche Gelb wie bei deinen bestehenden Sternen */
}

/* Kleiner Pop-Effekt beim drüberfahren */
.rating-input label:hover {
    transform: scale(1.15);
}

/* --- Textarea --- */
.review-comment-input {
    width: 100%;
    background: #1f2a3a;
    border: 1px solid #2f3c52;
    border-radius: 8px;
    padding: 1rem;
    color: #cbd5e1;
    font-family: inherit;
    font-size: 1rem;
    resize: vertical; /* Nuter kann das Feld nach unten größer ziehen */
    transition: all var(--transition-smooth);
}

.review-comment-input:focus {
    outline: none;
    border-color: #4ade80; /* Passt zu deinem grünen Button-Stil */
    background: #243248;
    box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.1);
}

/* --- Button Positionierung --- */
.review-input-form .auth__submit {
    align-self: flex-start; /* Button bleibt linksbündig und wird nicht über die ganze Breite gestreckt */
    padding: 0.8rem 2.5rem;
}

/* Container für alle fertigen Bewertungen */
.reviews-all {
    display: flex;
    flex-direction: column;
    gap: 1.8rem; /* Hier kannst du den Abstand zwischen den Karten anpassen */
    margin-bottom: 3rem; /* Etwas Luft nach unten zum "Hinzufügen"-Formular */
}

/* Kommentar-Text */
.review-comment {
    color: #cbd5e1;
    font-size: 14px;
    line-height: 1.6;

    /* NEU: Zwingt zu lange Wörter in die nächste Zeile */
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto; /* Setzt automatisch Bindestriche, wenn möglich */
}

