/**
 * WooCommerce Breite x Höhe Plugin - CSS Styles
 * Version: 1.0.2
 * Author: Markus Bauer | Dekologi
 */

/**
 * WooCommerce Breite x Höhe Plugin - Frontend Styles
 * Version: 1.7.1
 */

/* Produktkonfigurator */
.woocommerce-product-details__short-description {
    margin-bottom: 2em;
}

.variant-selection {
    margin: -15px 0;
}

/* Variant boxes container */
.variant-boxes {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* Variant box */
.variant-box {
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 120px;
    background: #fff;
}

.variant-box:hover {
    border-color: #0073aa;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.variant-box.selected {
    border-color: #0073aa;
    background: #f7f7f7;
}

/* Variant image container */
.variant-image {
    position: relative;
    margin-bottom: 8px;
    width: 100px;
    height: 100px;
    overflow: hidden;
    border-radius: 4px;
}

.variant-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* WooCommerce gallery trigger */
.woocommerce-product-gallery__trigger {
    position: absolute !important;
    top: .5em !important;
    right: .5em !important;
    z-index: 9 !important;
    width: 2em !important;
    height: 2em !important;
    background: #fff !important;
    border-radius: 50% !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
}

.woocommerce-product-gallery__trigger .zoom-icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
}

.woocommerce-product-gallery__trigger .zoom-icon svg {
    width: 1em !important;
    height: 1em !important;
    stroke: #333 !important;
}

.woocommerce-product-gallery__trigger:hover {
    background: #f7f7f7 !important;
}

.woocommerce-product-gallery__trigger:hover .zoom-icon svg {
    stroke: #000 !important;
}

.woocommerce-product-gallery__image {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Zoom functionality */
.variant-image .woocommerce-product-gallery__trigger {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.variant-image:hover .woocommerce-product-gallery__trigger {
    opacity: 1;
}

.zoom-icon {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.zoom-icon svg {
    width: 14px;
    height: 14px;
    stroke: #333;
}

/* Fancybox customization */
.fancybox-container {
    z-index: 999999;
}

.fancybox-bg {
    background: rgba(0, 0, 0, 0.9);
}

.fancybox-caption {
    text-align: center;
    font-size: 14px;
    padding: 12px;
    color: #fff;
    background: rgba(0, 0, 0, 0.7);
}

/* Variant name */
.variant-name {
    font-size: 13px;
    line-height: 1.2;
    text-align: center;
    word-wrap: break-word;
    padding: 0 4px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .variant-boxes {
        justify-content: center;
    }
    
    .variant-box {
        margin-bottom: 10px;
    }
}

/* Preisanzeige - WooCommerce Style */
#breite_hoehe_price_placeholder {
    margin: 1em 0;
}

.price-container {
    margin-bottom: 0.5em;
}

.price {
    font-size: 1.41575em;
    margin: 0;
}

.price del {
    opacity: 0.5;
    font-weight: 400;
    margin-right: 0.5em;
}

.price del .amount {
    font-size: 0.9em;
}

.price ins {
    font-weight: 700;
    margin-left: 0;
    background: transparent;
    text-decoration: none;
}

.woocommerce-price-suffix {
    display: block;
    color: #767676;
    font-size: 0.875em;
    line-height: 1.5;
    margin-top: 0.5em;
}

.tax-info {
    color: #767676;
    font-size: 0.875em;
    line-height: 1.5;
    margin: 0.5em 0;
}

.shipping-info {
    color: #767676;
    font-size: 0.875em;
    line-height: 1.5;
    margin: 0.5em 0;
}

.shipping-info a {
    color: #767676;
    text-decoration: underline;
}

.delivery-time {
    color: #767676;
    font-size: 0.875em;
    line-height: 1.5;
    margin: 0.5em 0;
}

.amount {
    white-space: nowrap;
}

/* Initialpreis Stil */
.initial-price {
    color: #767676;
    font-size: 1em;
    margin-bottom: 1em;
}

/* Maßeingabe */
.input-text {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.input-text:focus {
    border-color: #0073aa;
    box-shadow: 0 0 5px rgba(0,115,170,0.2);
    outline: none;
}

/* Responsive */
@media (max-width: 768px) {
    .variant-boxes {
        justify-content: center;
    }
    
    .variant-box {
        margin-bottom: 10px;
    }
}

@media (max-width: 480px) {
    .variant-box {
        width: 100%;
    }
}
