/**
 * Produkt Scrollbar Styles
 */

/* Scrollbar Container */
.psb-scrollbar {
    position: fixed;
    left: 0;
    width: 100%;
    z-index: 99999;
    background: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    padding: 10px 20px;
    transition: all 0.3s ease;
}

.psb-scrollbar.psb-top {
    top: 0;
    transform: translateY(-100%);
}

.psb-scrollbar.psb-top.psb-show {
    transform: translateY(0);
}

.psb-scrollbar.psb-bottom {
    bottom: 0;
    transform: translateY(100%);
}

.psb-scrollbar.psb-bottom.psb-show {
    transform: translateY(0);
}

/* Innerer Container */
.psb-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
}

/* Produktbild */
.psb-product-image {
    flex: 0 0 60px;
    margin-right: 15px;
}

.psb-product-image img {
    max-width: 100%;
    height: auto;
    max-height: 60px;
    display: block;
}

/* Produktinformationen */
.psb-product-info {
    flex: 1;
    margin-right: 15px;
}

.psb-product-title {
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: 600;
}

.psb-product-price {
    font-weight: 600;
    color: #333;
}

.psb-product-price del {
    font-weight: normal;
    opacity: 0.5;
    margin-right: 5px;
}

.psb-product-price ins {
    text-decoration: none;
}

/* Produktaktionen */
.psb-product-actions {
    display: flex;
    align-items: center;
}

/* Menge */
.psb-quantity {
    position: relative;
    width: 80px;
    margin-right: 15px;
}

.psb-quantity-input {
    width: 100%;
    height: 38px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0 20px;
}

.psb-quantity-minus,
.psb-quantity-plus {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    user-select: none;
}

.psb-quantity-minus {
    left: 5px;
}

.psb-quantity-plus {
    right: 5px;
}

/* Buttons */
.psb-buttons {
    display: flex;
}

.psb-add-to-cart,
.psb-buy-now {
    margin-right: 10px;
    padding: 10px 15px !important;
    text-decoration: none;
    font-weight: 600;
    border-radius: 4px;
    display: inline-block;
    text-align: center;
    transition: all 0.3s ease;
}

.psb-add-to-cart:last-child,
.psb-buy-now:last-child {
    margin-right: 0;
}

/* Icon im Button - ausblenden */
.psb-button-icon {
    display: none !important;
}

/* Produktkurzname */
.psb-product-short-name {
    display: none;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100px;
    color: #333;
}

/* Optimierte Erfolgsmeldung */
.woocommerce-success {
    background-color: #f8f9fa !important;
    border-left: 4px solid #4caf50 !important;
    padding: 15px 20px !important;
    margin: 15px 0 !important;
    font-size: 16px !important;
    border-radius: 4px !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08) !important;
    animation: psb-fade-in 0.5s ease-in-out;
}

.woocommerce-success.highlighted {
    animation: psb-highlight 1s ease;
}

@keyframes psb-fade-in {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes psb-highlight {
    0% { background-color: #f8f9fa; }
    30% { background-color: #e8f5e9; }
    100% { background-color: #f8f9fa; }
}

/* Grüner Warenkorb-Button */
.psb-view-cart-button {
    display: inline-block !important;
    background-color: #4caf50 !important;
    color: white !important;
    padding: 8px 15px !important;
    border-radius: 4px !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    margin-left: 10px !important;
    transition: all 0.3s ease !important;
}

.psb-view-cart-button:hover {
    background-color: #3d9140 !important;
    text-decoration: none !important;
}

/* Gemeinsame Button-Animation */
.animation-wrapper {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
}

.animation-wrapper::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: rotateBorder 4s linear infinite;
}

@keyframes rotateBorder {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Globaler animierter WooCommerce-Kaufbutton */
.psb-global-button-style .single_buy_now_button,
.psb-global-button-style button.single_buy_now_button {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 10px 15px 10px 15px !important;
    height: auto !important;
    font-family: 'Helvetica Neue', Arial, sans-serif !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    color: #fff !important;
    background: linear-gradient(145deg, #4CAF50 0%, #45a049 100%) !important;
    border: none !important;
    border-radius: 0 !important; /* Eckiger Button */
    box-shadow: 0 2px 4px rgba(0,0,0,0.15) !important;
    cursor: pointer !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
    overflow: hidden !important;
    text-decoration: none !important;
    z-index: 1;
    width: calc(100% + 4px) !important; /* 4px breiter als der Warenkorb-Button */
    min-width: 100% !important;
    max-width: none !important;
    margin: 0 auto !important;
    line-height: 1.3 !important;
    white-space: nowrap !important;
    text-align: center !important;
}

/* Fügt das Icon vor "JETZT KAUFEN" direkt im Text ein */
.psb-global-button-style .single_buy_now_button::before,
.psb-global-button-style button.single_buy_now_button::before {
    content: "" !important;
    display: inline-block !important;
    position: static !important;
    vertical-align: middle !important;
    width: 20px !important;
    height: 20px !important;
    margin-right: 10px !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm0 10.99h7c-.53 4.12-3.28 7.79-7 8.94V12H5V6.3l7-3.11v8.8z' fill='%23ffffff'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-size: contain !important;
    transform: none !important;
}

/* Container für den Button */
.single_buy_now_button_wrapper {
    text-align: center !important;
    margin: 5px 0 !important;
    display: block !important;
    width: 100% !important;
}

/* Hover-Effekt */
.psb-global-button-style .single_buy_now_button:hover,
.psb-global-button-style button.single_buy_now_button:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 6px 12px rgba(0,0,0,0.2) !important;
}

/* Active-Effekt */
.psb-global-button-style .single_buy_now_button:active,
.psb-global-button-style button.single_buy_now_button:active {
    transform: translateY(1px) !important;
    box-shadow: 0 3px 8px rgba(0,0,0,0.15) !important;
}

/* Verbesserter "Jetzt kaufen" Button für Desktop */
@media screen and (min-width: 768px) {
    .psb-buy-now {
        position: relative;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 1em 2em 1em 3.5em !important;
        font-family: 'Helvetica Neue', Arial, sans-serif !important;
        font-size: 14px !important;
        font-weight: 700 !important;
        text-transform: uppercase !important;
        color: #fff !important;
        background: linear-gradient(145deg, #4CAF50 0%, #45a049 100%) !important;
        border: none !important;
        border-radius: 0 !important; /* Eckiger Button */
        box-shadow: 0 4px 8px rgba(0,0,0,0.15) !important;
        cursor: pointer !important;
        transition: transform 0.2s ease, box-shadow 0.2s ease !important;
        overflow: hidden !important;
        text-decoration: none !important;
        z-index: 1;
    }
    
    /* Sicherheitsicon vor dem Text */
    .psb-buy-now::before {
        content: "";
        position: absolute;
        left: 1.5em;
        top: 50%;
        transform: translateY(-50%);
        width: 1.2em;
        height: 1.2em;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm0 10.99h7c-.53 4.12-3.28 7.79-7 8.94V12H5V6.3l7-3.11v8.8z' fill='%23ffffff'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-size: contain;
        z-index: 2;
    }
    
    /* Entfernen der alten Animation, da wir jetzt animation-wrapper verwenden */
    .psb-buy-now::after {
        content: none;
    }
    
    /* Hover-Effekt */
    .psb-buy-now:hover {
        transform: translateY(-3px) !important;
        box-shadow: 0 6px 12px rgba(0,0,0,0.2) !important;
    }
    
    /* Active-Effekt */
    .psb-buy-now:active {
        transform: translateY(1px) !important;
        box-shadow: 0 3px 8px rgba(0,0,0,0.15) !important;
    }
}

/* Mobile Styles */
@media screen and (max-width: 767px) {
    .psb-scrollbar {
        padding: 5px 10px;
    }
    
    .psb-container {
        justify-content: flex-start;
        gap: 8px;
        width: 100%;
        align-items: center;
    }
    
    .psb-product-image {
        flex: 0 0 50px;
        margin-right: 0;
    }
    
    .psb-product-image img {
        max-height: 50px;
    }
    
    .psb-product-info {
        display: none;
    }
    
    .psb-product-short-name {
        display: block;
        margin-right: auto;
    }
    
    .psb-product-actions {
        flex: 0 1 auto;
        display: flex;
        align-items: center;
        justify-content: flex-end;
    }
    
    .psb-quantity {
        width: 60px;
        margin-right: 10px;
    }
    
    .psb-quantity-input {
        height: 34px;
        padding: 0 15px;
    }
    
    /* "Jetzt kaufen"-Button verstecken */
    .psb-buy-now {
        display: none !important;
    }
    
    /* Animierter Warenkorb-Button in mobiler Ansicht */
    .psb-add-to-cart {
        position: relative;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0.8em 1.6em 0.8em 3em !important;
        font-family: 'Helvetica Neue', Arial, sans-serif !important;
        font-size: 14px !important;
        font-weight: 700 !important;
        text-transform: uppercase;
        color: #fff !important;
        background: linear-gradient(145deg, #4CAF50 0%, #45a049 100%) !important;
        border: none !important;
        border-radius: 0 !important; /* Eckiger Button */
        box-shadow: 0 4px 8px rgba(0,0,0,0.15) !important;
        cursor: pointer !important;
        transition: transform 0.2s ease, box-shadow 0.2s ease !important;
        overflow: hidden !important;
        z-index: 1;
        min-width: 160px;
    }
    
    /* Sicherheitsicon vor dem Text */
    .psb-add-to-cart::before {
        content: "";
        position: absolute;
        left: 1.2em;
        top: 50%;
        transform: translateY(-50%);
        width: 1.2em;
        height: 1.2em;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm0 10.99h7c-.53 4.12-3.28 7.79-7 8.94V12H5V6.3l7-3.11v8.8z' fill='%23ffffff'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-size: contain;
        z-index: 2;
    }
    
    /* Entfernen der alten Animation, da wir jetzt animation-wrapper verwenden */
    .psb-add-to-cart::after {
        content: none;
    }
    
    /* Hover-Effekt */
    .psb-add-to-cart:hover {
        transform: translateY(-3px) !important;
        box-shadow: 0 6px 12px rgba(0,0,0,0.2) !important;
    }
    
    /* Active-Effekt */
    .psb-add-to-cart:active {
        transform: translateY(1px) !important;
        box-shadow: 0 3px 8px rgba(0,0,0,0.15) !important;
    }
    
    /* Mobile Erfolgsmeldung */
    .woocommerce-success {
        margin: 10px 0 !important;
        padding: 12px 15px !important;
        font-size: 14px !important;
    }
    
    .psb-view-cart-button {
        margin-top: 8px !important;
        margin-left: 0 !important;
        display: block !important;
        text-align: center !important;
    }
}

/* Extra kleine Geräte */
@media screen and (max-width: 480px) {
    .psb-scrollbar {
        padding: 4px 8px;
    }
    
    .psb-container {
        gap: 5px;
    }
    
    .psb-product-image {
        flex: 0 0 40px;
        margin-right: 0;
    }
    
    .psb-product-image img {
        max-height: 40px;
    }
    
    .psb-product-short-name {
        font-size: 11px;
        max-width: 70px;
    }
    
    .psb-quantity {
        width: 50px;
        margin-right: 8px;
    }
    
    .psb-quantity-input {
        height: 30px;
        padding: 0 12px;
        font-size: 11px;
    }
    
    .psb-quantity-minus,
    .psb-quantity-plus {
        width: 14px;
        height: 14px;
        font-size: 12px;
    }
    
    /* Angepasster Warenkorb-Button für sehr kleine Geräte */
    .psb-add-to-cart {
        padding: 0.7em 1.2em 0.7em 2.5em !important;
        font-size: 12px !important;
        min-width: 130px;
    }
    
    .psb-add-to-cart::before {
        left: 0.8em;
        width: 1em;
        height: 1em;
    }
    
    /* Sicherstellen, dass der Kaufen-Button auch auf sehr kleinen Geräten ausgeblendet wird */
    .psb-buy-now {
        display: none !important;
    }
} 