/* Container voor attributen */
.ms-attributes-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

/* Attribuut container */
.ms-attribute {
    width: 100%;
}

/* Opties container */
.ms-attribute-options {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* Default center alignment - can be overridden by widget controls */
    gap: 5px;
    width: 100%;
}

/* Individuele attribuut optie (rond) */
.ms-attribute-option {
    /* width: 40px;
    height: 40px; */
    display: flex;
    align-items: center; /* Default vertical alignment - can be overridden by widget controls */
    justify-content: center;
    border: 1px solid #ddd;
    border-radius: 50%; /* Volledig rond maken */
    background-color: #f5f5f5; /* Grijze achtergrond */
    color: #333;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s, box-shadow 0.3s;
    text-transform: uppercase; /* Tekst in hoofdletters */
    position: relative;
    overflow: hidden;
}

/* Hover stijl */
.ms-attribute-option:hover {
    border-color: #333;
    background-color: #e0e0e0; /* Iets donkerder grijs bij hover */
}

/* Geselecteerde optie stijl */
.ms-attribute-option.selected {
    border-color: #333;
    background-color: #333; /* Donkergrijs wanneer actief */
    color: #fff;
}

/* Out of stock optie */
.ms-attribute-option.out-of-stock {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Button wrapper */
.ms-button-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Add to Cart knop stijl */
.ms-add-to-cart-btn {
    display: inline-block;
    width: 100%;
    max-width: 100%;
    padding: 12px 20px;
    background-color: #1a1a1a;
    color: #fff !important; /* Witte tekst met !important */
    text-align: center;
    text-decoration: none;
    font-family: 'montserrat', sans-serif;
    font-size: 14px;
    font-weight: 500;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s, box-shadow 0.3s;
    position: relative;
    text-transform: uppercase; /* Tekst in hoofdletters */
    border: none;
    outline: none;
}

/* Button icon styling */
.ms-add-to-cart-btn .elementor-button-icon {
    display: inline-flex;
    align-items: center; /* Default - can be overridden by widget controls */
    transition: all 0.3s ease;
}

.ms-add-to-cart-btn .elementor-button-icon.elementor-align-icon-left {
    margin-right: 8px;
}

.ms-add-to-cart-btn .elementor-button-icon.elementor-align-icon-right {
    margin-left: 8px;
}

.ms-add-to-cart-btn .elementor-button-content-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Pijl in de knop */
.ms-btn-arrow {
    margin-left: 5px;
    font-size: 18px;
}

/* Hover stijl voor de knop */
.ms-add-to-cart-btn:not(.disabled):hover {
    background-color: #333;
}

/* Disabled knop stijl */
.ms-add-to-cart-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Button icons container */
.ms-button-icons {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}

/* Success en error iconen */
.ms-success-icon,
.ms-error-icon {
    position: absolute;
    font-size: 20px;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ms-success-icon {
    color: #fff; /* Wit vinkje */
}

.ms-success-icon i,
.ms-success-icon svg {
    font-size: 20px;
    width: 1em;
    height: 1em;
}

.ms-error-icon i,
.ms-error-icon svg {
    font-size: 20px;
    width: 1em;
    height: 1em;
}

/* Cart button styling */
/* Loading state */
.ms-add-to-cart-btn.loading .elementor-button-content-wrapper {
    opacity: 0;
}

.ms-add-to-cart-btn.loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin-top: -10px;
    margin-left: -10px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: #fff;
    animation: ms-spinner 0.6s linear infinite;
}

@keyframes ms-spinner {
    to {
        transform: rotate(360deg);
    }
}

.cart-button {
    position: relative;
    display: inline-flex;
    align-items: center;
}

/* Voor mobiele schermen */
@media (max-width: 767px) {
    .cart-button {
        font-size: 0 !important;
    }
    
    .cart-button::before {
        content: attr(data-mobile-text);
        font-size: 14px; /* Pas aan naar gewenste grootte */
    }
}

/* Gemeenschappelijke stijlen voor loading, success en error states */
.ms-loading .ms-add-to-cart-btn,
.ms-success .ms-add-to-cart-btn,
.ms-error .ms-add-to-cart-btn {
    color: transparent !important;
}

.ms-loading .ms-add-to-cart-btn .elementor-button-content-wrapper,
.ms-success .ms-add-to-cart-btn .elementor-button-content-wrapper,
.ms-error .ms-add-to-cart-btn .elementor-button-content-wrapper {
    opacity: 0;
    visibility: hidden;
}

/* Hide button icons specifically */
.ms-loading .ms-add-to-cart-btn .elementor-button-icon,
.ms-success .ms-add-to-cart-btn .elementor-button-icon,
.ms-error .ms-add-to-cart-btn .elementor-button-icon {
    opacity: 0;
    visibility: hidden;
}

.ms-loading .ms-add-to-cart-btn .cart-button::after,
.ms-success .ms-add-to-cart-btn .cart-button::after,
.ms-error .ms-add-to-cart-btn .cart-button::after,
.ms-loading .ms-add-to-cart-btn .cart-button::before,
.ms-success .ms-add-to-cart-btn .cart-button::before,
.ms-error .ms-add-to-cart-btn .cart-button::before {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, background-color 0.3s ease, color 0.3s ease;
}

/* Loading animatie */
.ms-loading .ms-add-to-cart-btn:after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    animation: ms-spin 0.8s infinite linear;
}

@keyframes ms-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success en error states */
.ms-success .ms-success-icon,
.ms-error .ms-error-icon {
    opacity: 1;
    transform: scale(1);
}

/* Verberg de "View cart" link */
.added_to_cart.wc-forward {
    display: none !important;
}