.woo-product-variations-widget {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
    font-family: inherit;
}

/* Price */
.price-row {
    text-align: center;
    margin-bottom: 24px;
}

.woo-widget-price {
    font-size: 24px;
    font-weight: 700;
    color: #333;
}

.woo-widget-price .woocommerce-Price-amount { color: #0073aa; }
.woo-widget-price del { color: #999; font-weight: 400; }
.woo-widget-price ins { text-decoration: none; color: #ff6b35; }

/* Plan selection */
.plan-row {
    margin-bottom: 28px;
}

.plan-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 18px;
    text-align: center;
}

.variation-row { padding: 0; }
.variation-group { margin-bottom: 15px; }

.variation-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.variation-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.variation-radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    transition: all 0.3s ease;
    background: #fff;
    position: relative;
}

.variation-radio-label:hover { border-color: #0073aa; background: #f8f9fa; }
.variation-radio { display: none; }

.variation-radio:checked + .radio-custom + .option-text { font-weight: 600; }
.variation-radio:checked ~ * { color: #0073aa; }

.variation-radio:checked + .radio-custom { border-color: #0073aa; background: #0073aa; }
.variation-radio:checked + .radio-custom::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
}

/* :has fallback still included */
.variation-radio-label:has(.variation-radio:checked) {
    border-color: #0073aa;
    background: #e7f3ff;
    box-shadow: 0 0 0 1px #0073aa;
}

.radio-custom {
    width: 16px;
    height: 16px;
    border: 2px solid #ddd;
    border-radius: 50%;
    margin-right: 8px;
    position: relative;
    transition: all 0.3s ease;
}

.option-text { font-size: 14px; color: #666; transition: color 0.3s ease; }

/* Quantity */
.quantity-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.quantity-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 160px;
    align-items: center;
}

.quantity-label {
    font-weight: 600;
    color: #333;
}

.quantity-control {
    display: flex;
    align-items: center;
    border: 1px solid #d9d9d9;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.quantity-button {
    width: 44px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    font-size: 22px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.quantity-button:hover { background: #f0f0f0; color: #0073aa; }
.quantity-button:disabled { cursor: not-allowed; opacity: 0.4; background: #f7f7f7; }

.woo-quantity-input {
    width: 60px;
    height: 42px;
    border: none;
    border-left: 1px solid #d9d9d9;
    border-right: 1px solid #d9d9d9;
    text-align: center;
    font-size: 16px;
    outline: none;
    appearance: textfield;
    -moz-appearance: textfield;
}

.woo-quantity-input::-webkit-outer-spin-button,
.woo-quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.quantity-row .quantity-control,
.quantity-row .quantity-label {
    text-align: center;
}

.buttons-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 24px;
}

.woo-add-to-cart-btn,
.woo-buy-now-btn {
    padding: 12px 24px;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 140px;
}

.woo-add-to-cart-btn { background: #0073aa; color: white; }
.woo-add-to-cart-btn:hover { background: #005177; transform: translateY(-1px); }

.woo-buy-now-btn { background: #ff6b35; color: white; }
.woo-buy-now-btn:hover { background: #e55a2b; transform: translateY(-1px); }

/* Button Styles */
.btn-default { border-radius: 4px; }
.btn-rounded { border-radius: 25px; }
.btn-square  { border-radius: 0; }

/* Responsive */
@media (max-width: 768px) {
    .woo-product-variations-widget { padding: 15px; }
    .variation-options { flex-direction: column; }
    .variation-radio-label { justify-content: flex-start; }
    .quantity-row { flex-direction: column; align-items: stretch; }
    .quantity-block { width: 100%; align-items: flex-start; }
    .quantity-row .quantity-control { width: 100%; }
    .buttons-row { flex-direction: column; justify-content: stretch; }
    .woo-add-to-cart-btn, .woo-buy-now-btn { min-width: 100%; }
    .woo-widget-price { font-size: 20px; }
}

/* Loading and disabled states */
.woo-add-to-cart-btn:disabled,
.woo-buy-now-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.woo-add-to-cart-btn:disabled:hover,
.woo-buy-now-btn:disabled:hover {
    transform: none;
    background-color: #ccc !important;
    color: #666;
}

.woo-add-to-cart-btn.loading,
.woo-buy-now-btn.loading { position: relative; }

.woo-add-to-cart-btn.loading::after,
.woo-buy-now-btn.loading::after {
    content: "...";
    animation: loading 1s infinite;
}

@keyframes loading {
    0%, 33% { content: "."; }
    34%, 66% { content: ".."; }
    67%, 100% { content: "..."; }
}
