/* Form Layout */
form.cart {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
}

/* Eingabefelder */
.custom-dimensions,
.wcm2-pricing-info {
    width: 100%;
}

#wcm2-live-price {
    font-size: 24px;
    font-weight: bold;
    margin: 10px 0;
    display: block;
    color: #0073aa;
}

/* Menge + Button nebeneinander */
.cart-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
}

/* Mobile */
@media (max-width: 600px) {
    .cart-actions {
        flex-direction: column;
        align-items: stretch;
    }
    form.cart button.single_add_to_cart_button {
        width: 100%;
    }
    .single_variation_wrap {max-width:100%;}
}
/* --- Shape Auswahl hübscher darstellen --- */
.custom-shape {
    display: flex;
    gap: 20px;
    margin: 10px 0 20px;
}

.custom-shape label {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 2px solid #ccc;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    user-select: none;
}

.custom-shape input[type="radio"] {
    display: none;
}

.custom-shape input[type="radio"]:checked + .shape-icon,
.custom-shape input[type="radio"]:checked ~ span {
    color: #0073aa;
    font-weight: bold;
}

.custom-shape input[type="radio"]:checked + label,
.custom-shape label:has(input[type="radio"]:checked) {
    border-color: #0073aa;
    background: #f0f8ff;
}

/* Geometrie-Symbole */
.shape-icon {
    width: 16px;
    height: 16px;
    display: inline-block;
    background: currentColor;
}

.shape-square {
    border-radius: 2px;
}

.shape-circle {
    border-radius: 50%;
}

/* Menge + Button nebeneinander */
.cart-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
}

@media (max-width: 600px) {
    .cart-actions {
        flex-direction: column;
        align-items: stretch;
    }
    form.cart button.single_add_to_cart_button {
        width: 100%;
    }
}


/* Nur deine Bereiche beeinflussen */
.custom-dimensions,
.custom-shape,
.wcm2-pricing-info,
#wcm2-live-price {
    display: block;
    margin-bottom: 15px;
}

/* Gesamte Box für m²-Konfiguration */
.wcm2-config-box {
    display: block;
    width: 100%;
    margin-top: 20px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fafafa;
}

/* Form-Auswahl (nebeneinander wie Buttons) */
.wcm2-config-box .custom-shape {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.wcm2-config-box .custom-shape label {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 2px solid #ccc;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.wcm2-config-box .custom-shape input[type="radio"]:checked + .shape-icon,
.wcm2-config-box .custom-shape input[type="radio"]:checked + label {
    border-color: #0073aa;
    background: #f0f8ff;
    color: #0073aa;
}

/* Maße */
.wcm2-config-box .custom-dimensions {
    margin-bottom: 15px;
}

/* Preisregeln */
.wcm2-pricing-info {
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.4;
}

/* Live Preis */
#wcm2-live-price {
    margin-top: 15px;
    font-size: 18px;
    font-weight: bold;
    color: #0073aa;
}

/* Tabelle der Swatches immer als eigener Block */
form.cart table.variations {
    display: block;
    width: 100%;
    margin-bottom: 20px; /* Abstand zur Box */
}

/* Label + Value nicht mehr tabellenartig nebeneinander */
form.cart table.variations th,
form.cart table.variations td {
    display: block;
    width: 100%;
}


/* Verhindert dass Inputs und Cart-Button in der Swatch-Tabelle landen */
form.cart table.variations {
    border-collapse: collapse;
    margin-bottom: 20px;
    display: block;
}

form.cart table.variations tr {
    display: block;
}

form.cart table.variations th,
form.cart table.variations td {
    display: block;
    width: 100%;
}

/* überschreibt das Swatch-Plugin */
.woocommerce-variation-add-to-cart.variations_button {
    display: block !important;
    width: 100%;
}

/* Variations-Box (z. B. Farbe) wie Konfigurations-Box stylen */
form.cart table.variations {
    display: block; /* Tabelle als Block */
    width: 100%;
    margin: 20px 0;
    padding: 15px 20px;
    border: 1px solid #ddd !important;
    border-radius: 8px;
    background: #fafafa;
}

/* Tabellenstruktur auflösen -> untereinander */
form.cart table.variations tr,
form.cart table.variations th,
form.cart table.variations td {
    display: block;
    width: 100%;
    border: none;
    padding: 0;
}

/* Label „Farbe“ etwas stärker hervorheben */
form.cart table.variations th.label label {
    font-weight: 600;
    margin-bottom: 10px;
    display: block;
}

/* Swatches selbst mit Abstand */
.swatchly-type-wrap {
    margin-top: 10px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

table th, .wpbf-table th {background:unset;}

.wcm2-config-box .custom-shape input[type="radio"]:checked + .shape-icon, .wcm2-config-box .custom-shape input[type="radio"]:checked + label {
   
    background: #0073aa !important;
    color: #0073aa;
}



/* Swatches – max. 3 pro Reihe */
.swatchly-type-wrap {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: 10px;
}

/* einzelne Swatch-Kästchen */
.swatchly-swatch {
    flex: 1 1 auto;
    min-width: 90px;
    max-width: 120px;
    aspect-ratio: 1 / 1;
    border-radius: 6px;
    overflow: hidden;
}

/* Mobile – Swatches volle Breite (2 pro Reihe) */
@media (max-width: 600px) {
    .swatchly-type-wrap {
        grid-template-columns: repeat(2, 1fr);
    }
    /* Eingabefelder enger begrenzen */
.custom-dimensions input,
.custom-dimensions select {
    max-width: 300px;
    width: 100%;
}
}
/* Form-Auswahl Buttons */
.wcm2-config-box .custom-shape {
    display: flex;
    flex-wrap: wrap; /* erlaubt Umbruch */
    gap: 10px;
}

.wcm2-config-box .custom-shape label {
    flex: 1 1 150px; /* minimale Breite, danach Umbruch */
    text-align: center;
    justify-content: center;
}

/* Mobile: Buttons untereinander */
@media (max-width: 600px) {
    .wcm2-config-box .custom-shape {
        flex-direction: column;
    }
    .wcm2-config-box .custom-shape label {
        width: 100%;
    }
}
