/* Copyright by W-Welz | Urheber: Werner | https://welzsoft.de */
/* Styles für Produkt-Übersicht, Einzelseite und Bestellprozess */

.ws-product-card {
    display: flex;
    flex-direction: column;
}
.ws-product-card-img {
    margin: -20px -20px 16px -20px;
    overflow: hidden;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    background: #f1f5f9;
    aspect-ratio: 16 / 9;
}
.ws-product-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.ws-product-price {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
}
.ws-product-price strong {
    font-size: 1.4rem;
    color: #0f172a;
}
.ws-product-price small {
    color: #64748b;
    font-size: 0.82rem;
    margin-top: 2px;
}

/* Einzel-Produktseite */
.ws-product-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 36px;
    align-items: start;
}
@media (max-width: 920px) {
    .ws-product-grid {
        grid-template-columns: 1fr;
    }
}

.ws-product-content {
    min-width: 0;
}

.ws-product-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 12px;
}
.ws-product-gallery a {
    display: block;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}
.ws-product-gallery img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
    transition: transform 0.2s;
}
.ws-product-gallery a:hover img {
    transform: scale(1.04);
}

.ws-product-side {
    position: sticky;
    top: 80px;
}

.ws-product-price-box {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #fff;
    padding: 22px;
    border-radius: 10px;
    margin-bottom: 18px;
}
.ws-price-label {
    font-size: 0.86rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.ws-price-value {
    font-size: 2.2rem;
    font-weight: 700;
    margin-top: 4px;
}
.ws-price-hint {
    margin-top: 6px;
    font-size: 0.84rem;
    opacity: 0.92;
}

.ws-options-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 18px;
}
.ws-option-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    font-size: 0.92rem;
}
.ws-option-row:hover {
    background: #f1f5f9;
}
.ws-option-row input[type="checkbox"] {
    margin: 0;
    transform: scale(1.1);
}
.ws-option-row input[type="checkbox"]:checked + .ws-option-label {
    font-weight: 600;
    color: #0f172a;
}
.ws-option-row:has(input:checked) {
    background: #eff6ff;
    border-color: #2563eb;
}
.ws-option-label { color: #334155; }
.ws-option-price { color: #2563eb; font-weight: 600; font-size: 0.88rem; }

.ws-total-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 22px;
}
.ws-total-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.92rem;
    color: #475569;
    padding: 4px 0;
}
.ws-total-row.ws-total-final {
    border-top: 2px solid #cbd5e1;
    margin-top: 6px;
    padding-top: 10px;
    font-size: 1.1rem;
    color: #0f172a;
    font-weight: 700;
}

.ws-form-row {
    margin-bottom: 12px;
}
.ws-form-row-2 {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 10px;
    margin-bottom: 12px;
}
.ws-form-row-2 > div { display: flex; flex-direction: column; }

.ws-form-row label,
.ws-form-row-2 label {
    display: block;
    margin-bottom: 4px;
    font-size: 0.86rem;
    font-weight: 600;
    color: #334155;
}
.ws-form-row input[type="text"],
.ws-form-row input[type="email"],
.ws-form-row input[type="tel"],
.ws-form-row textarea,
.ws-form-row-2 input[type="text"] {
    width: 100%;
    padding: 9px 11px;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    font-family: inherit;
    font-size: 0.92rem;
    background: #fff;
    box-sizing: border-box;
}
.ws-form-row input:focus,
.ws-form-row textarea:focus,
.ws-form-row-2 input:focus {
    outline: 2px solid #2563eb;
    outline-offset: -1px;
    border-color: transparent;
}

.ws-product-info {
    margin-top: 20px;
    padding: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.88rem;
}
.ws-product-info h4 { margin: 0 0 6px 0; color: #0f172a; }
.ws-product-info p { margin: 0 0 10px 0; color: #475569; }

/* Bestellüberprüfung */
.ws-order-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
    border: 1px solid #e2e8f0;
}
.ws-order-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #e2e8f0;
    color: #334155;
}
.ws-order-table td.num {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.ws-order-table tr.sum td {
    background: #f8fafc;
    font-weight: 600;
}
.ws-order-table tr.total td {
    background: #eff6ff;
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
    border-top: 2px solid #2563eb;
}

.ws-order-dl {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 8px 16px;
    margin: 0;
}
.ws-order-dl dt { font-weight: 600; color: #475569; }
.ws-order-dl dd { margin: 0; color: #0f172a; }

.ws-bank-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #e2e8f0;
    margin-top: 8px;
}
.ws-bank-table th,
.ws-bank-table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}
.ws-bank-table th {
    background: #f8fafc;
    font-weight: 600;
    color: #334155;
    width: 200px;
}
.ws-bank-table code {
    background: transparent;
    padding: 0;
    font-size: 1.05em;
    color: #0f172a;
    font-weight: 600;
}

/* Alert-Komponenten (auch im Frontend nutzbar) */
.adm-alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin: 14px 0;
    border: 1px solid;
    font-size: 0.94rem;
}
.adm-alert-info    { background: #eff6ff; border-color: #93c5fd; color: #1e3a8a; }
.adm-alert-success { background: #ecfdf5; border-color: #6ee7b7; color: #065f46; }
.adm-alert-error   { background: #fef2f2; border-color: #fca5a5; color: #991b1b; }

/* ============= Pack 06: Optionen mit Hinweis-Text + Lizenz-Domain ============= */

/* Wrapper um Option + Hinweistext */
.ws-option-block {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.ws-option-hint {
    margin: 0 0 0 28px;
    padding: 8px 12px;
    background: #f8fafc;
    border-left: 3px solid #cbd5e1;
    border-radius: 0 6px 6px 0;
    color: #475569;
    font-size: 0.85rem;
    line-height: 1.5;
}
.ws-option-row:has(input:checked) ~ .ws-option-hint {
    background: #eff6ff;
    border-left-color: #2563eb;
    color: #1e3a8a;
}

/* Lizenzdomain-Pflichtfeld optisch hervorheben */
.ws-form-license {
    background: #fef9c3;
    border: 1px solid #fde047;
    border-radius: 8px;
    padding: 12px 14px;
    margin: 16px 0;
}
.ws-form-license label {
    color: #713f12;
    font-weight: 700;
}
.ws-form-license input[type="text"] {
    border-color: #ca8a04;
    background: #fffbeb;
    font-family: monospace;
    font-size: 1rem;
}
.ws-form-license input[type="text"]:focus {
    outline: 2px solid #ca8a04;
    background: #fff;
}
.ws-form-license input:invalid:not(:placeholder-shown) {
    border-color: #dc2626;
    background: #fef2f2;
}

/* Generischer Form-Hinweistext */
.ws-form-hint {
    margin-top: 6px;
    color: #475569;
    font-size: 0.82rem;
    line-height: 1.5;
}
.ws-form-license .ws-form-hint {
    color: #713f12;
}
.ws-form-hint code {
    background: rgba(0,0,0,0.06);
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 0.92em;
}

/* ============= Pack 07: Bild-Slider + Platzhalter ============= */

.ws-slider {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    background: #0f172a;
    margin: 20px 0;
    aspect-ratio: 16 / 9;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.18);
}
.ws-slider-track {
    position: relative;
    width: 100%;
    height: 100%;
}
.ws-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
    pointer-events: none;
}
.ws-slide.is-active {
    opacity: 1;
    pointer-events: auto;
}
.ws-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background: #1e293b;
}

.ws-slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(15, 23, 42, 0.55);
    color: #fff;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.6rem;
    line-height: 1;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}
.ws-slider-btn:hover {
    background: rgba(15, 23, 42, 0.85);
}
.ws-slider-prev { left: 12px; }
.ws-slider-next { right: 12px; }

.ws-slider-dots {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 2;
}
.ws-slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    border: 0;
    cursor: pointer;
    padding: 0;
    transition: background 0.15s, transform 0.15s;
}
.ws-slider-dot:hover {
    background: rgba(255, 255, 255, 0.7);
}
.ws-slider-dot.is-active {
    background: #fff;
    transform: scale(1.2);
}

@media (max-width: 600px) {
    .ws-slider-btn { width: 36px; height: 36px; font-size: 1.3rem; }
    .ws-slider-prev { left: 6px; }
    .ws-slider-next { right: 6px; }
}

/* Buttons aus Platzhaltern */
.ws-product-placeholder-btn {
    margin: 16px 0;
}

/* Bestellprozess-Erklaerung oberhalb von "Ihre Daten" */
.ws-order-intro {
    background: #eff6ff;
    border-left: 4px solid #2563eb;
    border-radius: 0 8px 8px 0;
    padding: 14px 16px;
    margin: 20px 0 18px 0;
    font-size: 0.92rem;
    color: #1e3a8a;
}
.ws-order-intro h3 { color: #1e3a8a; }
.ws-order-intro p {
    margin: 8px 0 0 0;
    line-height: 1.55;
}
.ws-order-intro em {
    font-style: normal;
    background: #dbeafe;
    padding: 1px 6px;
    border-radius: 3px;
    font-weight: 600;
}
