/* WooZone Variation Swatches
 * Override in your theme: copy to wp-content/themes/YOUR-THEME/woocommerce/
 * or enqueue a child-theme stylesheet after this one.
 */

/* ── Container ──────────────────────────────────────────────────── */
.wzvs-wrap {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 8px;
    margin: 8px 0 14px;
    width: 100%;
    box-sizing: border-box;
}

/* ── Single swatch box ───────────────────────────────────────────── */
.wzvs-item {
    display: inline-flex !important;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    cursor: pointer;
    border: 1px solid #888888 !important;
    border-radius: 6px !important;
    padding: 8px 10px !important;
    min-width: 85px !important;
    max-width: 170px;
    width: auto !important;
    background: #ffffff !important;
    box-sizing: border-box !important;
    line-height: 1.4 !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
    transition: border-color .15s, box-shadow .15s;
}
.wzvs-item:hover {
    border-color: #333333 !important;
    background: #fafafa !important;
}

/* ── Active state ─────────────────────────────────────────────────── */
.wzvs-item.wzvs-active {
    border: 2px solid #0073aa !important;
    box-shadow: 0 0 0 2px rgba(0,115,170,.18) !important;
    padding: 7px 9px !important;
}

/* ── Label ────────────────────────────────────────────────────────── */
.wzvs-label {
    display: block !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #111111 !important;
    margin: 0 !important;
    word-break: break-word !important;
    white-space: normal !important;
    padding-bottom: 6px !important;
}

/* ── Divider ──────────────────────────────────────────────────────── */
.wzvs-divider {
    display: block !important;
    height: 1px !important;
    background: #e0e0e0 !important;
    margin: 0 0 6px !important;
    width: 100% !important;
}

/* ── Price (normal) ───────────────────────────────────────────────── */
.wzvs-price {
    display: inline-block !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #111111 !important;
    margin: 0 !important;
    white-space: nowrap !important;
    border-radius: 4px !important;
    padding: 2px 0 !important;
    transition: background .15s, color .15s, padding .15s;
}
.wzvs-price .woocommerce-Price-amount {
    font-size: 13px !important;
    font-weight: 700 !important;
    color: inherit !important;
}

/* ── Price (active = blue pill) ───────────────────────────────────── */
.wzvs-item.wzvs-active .wzvs-price {
    background: #0073aa !important;
    color: #ffffff !important;
    padding: 3px 8px !important;
}
.wzvs-item.wzvs-active .wzvs-price .woocommerce-Price-amount {
    color: #ffffff !important;
}

/* ── Prime badge ──────────────────────────────────────────────────── */
.wzvs-prime {
    display: flex !important;
    align-items: center !important;
    gap: 3px !important;
    font-size: 11px !important;
    color: #00A8E0 !important;
    font-weight: 600 !important;
    margin-top: 4px !important;
}
.wzvs-prime svg { flex-shrink: 0 !important; }

/* ── Hide native WC elements replaced by swatches ─────────────────── */
.reset_variations             { display: none !important; }
.woocommerce-variation-price  { display: none !important; }

/* Native select hidden but still in DOM for WC event handling */
.wzvs-select-hidden {
    position: absolute !important;
    opacity: 0 !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    pointer-events: none !important;
}

/* ═══════════════════════════════════════════════════════════════════
   MODUS: onsite_cart = no  (vollständige Eigenausgabe)
   ═══════════════════════════════════════════════════════════════════ */

/* Wrapper */
.wzvs-standalone {
    margin: 0 0 1.5em;
}

/* Swatch-Gruppen im Standalone-Modus */
.wzvs-standalone .wzvs-group,
.wzvs-before-form .wzvs-group {
    margin-bottom: 14px;
}
.wzvs-standalone .wzvs-group-label,
.wzvs-before-form .wzvs-group-label {
    font-size: 12px;
    color: #555;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

/* Preis-Block */
.wzvs-price-wrap {
    margin: 0 0 12px;
    transition: opacity .25s;
}
.wzvs-price-wrap.wzvs-price-updated {
    opacity: .6;
}
.wzvs-price-wrap .woocommerce-Price-amount {
    font-size: 1.5em;
    font-weight: 700;
}

/* Amazon-Button */
.wzvs-action-wrap {
    margin-top: 14px;
}
.wzvs-amazon-btn {
    display: inline-block;
    min-width: 160px;
    text-align: center;
}
.wzvs-amazon-btn.disabled {
    opacity: .45;
    pointer-events: none;
    cursor: default;
}

/* Verfügbarkeit */
.wzvs-availability {
    margin: 6px 0 0;
    font-size: 13px;
    color: #3a7a3a;
    min-height: 1.2em;
}
.wzvs-availability:empty {
    display: none;
}
.wzvs-availability.wzvs-no-stock {
    color: #c0392b;
}

/* ── Kein Lagerbestand: roter Rahmen ─────────────────────────────────── */
.wzvs-item.wzvs-out-of-stock {
    border-color: #c0392b !important;
}
.wzvs-item.wzvs-out-of-stock.wzvs-active {
    border-color: #c0392b !important;
    box-shadow: 0 0 0 2px rgba(192,57,43,.22) !important;
}
