.elementor-shortcode.cpb-product-form {
    font-family: Assistant, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 16px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.elementor-shortcode .cpb-blocks-container {
    margin-bottom: 30px;
}

.elementor-shortcode .block {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 25px;
    padding: 25px;
    position: relative;
    transition: box-shadow 0.3s ease;
}

.elementor-shortcode .block:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.elementor-shortcode .block.has-errors {
    background: #fff5f5;
    border-color: #dc3545;
}

.elementor-shortcode .remove-block {
    background: #dc3545;
    border: 0;
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    left: 15px;
    padding: 8px 15px;
    position: absolute;
    top: 15px;
    transition: background 0.3s ease;
    z-index: 10;
}

.elementor-shortcode .remove-block:hover {
    background: #c82333;
}

.elementor-shortcode fieldset {
    background: #f9f9f9;
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    margin-bottom: 25px;
    padding: 20px;
    position: relative;
    transition: border-color 0.3s ease;
}

.elementor-shortcode fieldset:hover {
    border-color: #0073aa;
}

.elementor-shortcode legend {
    background: #fff;
    border-radius: 6px;
    color: #333;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 15px;
    padding: 0 15px;
}

.elementor-shortcode .cpb-required {
    color: #dc3545;
}

.elementor-shortcode .group-description {
    background: #fff;
    border-radius: 6px;
    border-right: 4px solid #0073aa;
    color: #666;
    font-style: italic;
    margin-bottom: 20px;
    padding: 10px;
    width: 100%;
}

.elementor-shortcode fieldset > label {
    align-items: center;
    background: #fff;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 15px;
    position: relative;
    text-align: center;
    transition: all 0.3s ease;
}

.elementor-shortcode fieldset > label:hover {
    border-color: #0073aa;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.elementor-shortcode fieldset > label.selected {
    background: #f0f7ff;
    border-color: #0073aa;
    font-weight: 600;
}

.elementor-shortcode fieldset > label img,
.elementor-shortcode .cpb-component-image {
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    height: 120px;
    max-width: 120px;
    object-fit: cover;
    transition: border-color 0.3s ease;
    width: 100%;
}

.elementor-shortcode fieldset > label.selected img,
.elementor-shortcode fieldset > label.selected .cpb-component-image {
    border-color: #0073aa;
}

.elementor-shortcode fieldset > label.cpb-option-disabled {
    cursor: not-allowed;
    filter: grayscale(0.3);
    opacity: 0.55;
}

.elementor-shortcode fieldset > label.cpb-option-disabled input {
    cursor: not-allowed;
}

.elementor-shortcode .cpb-sold-out-badge {
    background: #f0f0f1;
    border-radius: 999px;
    color: #646970;
    display: inline-block;
    font-size: 12px;
    font-style: normal;
    font-weight: 700;
    margin-inline-start: 6px;
    padding: 2px 7px;
}

.elementor-shortcode .option-footer {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    width: 100%;
}

.elementor-shortcode input[type="checkbox"],
.elementor-shortcode input[type="radio"] {
    accent-color: #0073aa;
    cursor: pointer;
    height: 20px;
    width: 20px;
}

.elementor-shortcode .option-footer span {
    color: #333;
    flex: 1;
    font-size: 15px;
    min-width: 0;
}

.elementor-shortcode p {
    margin: 20px 0;
}

.elementor-shortcode .cpb-total-price {
    color: #0073aa;
    font-size: 24px;
    font-weight: 700;
}

.elementor-shortcode button[type="submit"] {
    background: #28a745;
    border: 0;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    color: #fff;
    cursor: pointer;
    font-size: 18px;
    font-weight: 700;
    max-width: 300px;
    padding: 15px 40px;
    transition: all 0.3s ease;
    width: 100%;
}

.elementor-shortcode button[type="submit"]:hover {
    background: #218838;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.elementor-shortcode fieldset.cpb-error {
    animation: cpb-shake 0.5s ease;
    background: #fff5f5;
    border-color: #dc3545 !important;
}

.elementor-shortcode fieldset.cpb-error legend {
    color: #dc3545;
}

.elementor-shortcode .cpb-error-message,
.elementor-shortcode .cpb-success-message {
    background: #fff;
    border-radius: 6px;
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-top: 10px;
    padding: 10px;
}

.elementor-shortcode .cpb-error-message {
    animation: cpb-slide-in 0.3s ease;
    border-right: 4px solid #dc3545;
    color: #dc3545;
}

.elementor-shortcode .cpb-success-message {
    border-right: 4px solid #28a745;
    color: #28a745;
}

.elementor-shortcode .cpb-validation-summary {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 8px;
    display: none;
    margin-bottom: 20px;
    padding: 15px 20px;
}

.elementor-shortcode .cpb-validation-summary.show {
    animation: cpb-slide-in 0.3s ease;
    display: block;
}

.elementor-shortcode .cpb-validation-summary h3 {
    color: #856404;
    font-size: 18px;
    margin: 0 0 10px;
}

.elementor-shortcode .cpb-validation-summary ul {
    color: #856404;
    margin: 0;
    padding-right: 20px;
}

.elementor-shortcode .cpb-validation-summary li {
    margin-bottom: 5px;
}

.elementor-shortcode .cpb-selection-count {
    color: #666;
    font-size: 13px;
    font-weight: normal;
    margin-top: 5px;
}

.elementor-shortcode .cpb-selection-count.warning {
    color: #ff9800;
    font-weight: 600;
}

.elementor-shortcode .cpb-selection-count.error {
    color: #dc3545;
    font-weight: 700;
}

.elementor-shortcode button[type="submit"]:disabled {
    background: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

.elementor-shortcode button[type="submit"].cpb-loading {
    color: transparent;
    position: relative;
}

.elementor-shortcode button[type="submit"].cpb-loading::after {
    animation: cpb-spin 0.8s linear infinite;
    border: 3px solid #fff;
    border-radius: 50%;
    border-top-color: transparent;
    content: "";
    height: 20px;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    position: absolute;
    top: 50%;
    width: 20px;
}

@keyframes cpb-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

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

@keyframes cpb-spin {
    to { transform: rotate(360deg); }
}

@media (min-width: 768px) {
    .elementor-shortcode fieldset {
        display: flex;
        flex-wrap: wrap;
        gap: 20px;
    }

    .elementor-shortcode fieldset > label {
        flex: 0 0 calc((100% - 60px) / 4);
        min-width: 150px;
    }

    .elementor-shortcode .block {
        padding: 30px;
    }
}

@media (min-width: 481px) and (max-width: 767px) {
    .elementor-shortcode fieldset {
        display: grid;
        gap: 15px;
        grid-template-columns: repeat(2, 1fr);
    }

    .elementor-shortcode fieldset > label {
        min-width: 0;
    }
}

@media (max-width: 480px) {
    .elementor-shortcode.cpb-product-form {
        padding: 15px;
    }

    .elementor-shortcode .block {
        margin-bottom: 20px;
        padding: 20px 15px;
    }

    .elementor-shortcode .remove-block {
        left: 0;
        margin-bottom: 15px;
        position: relative;
        text-align: center;
        top: 0;
        width: 100%;
    }

    .elementor-shortcode fieldset {
        display: flex;
        flex-direction: column;
        gap: 12px;
        padding: 15px;
    }

    .elementor-shortcode fieldset > label {
        padding: 12px;
        width: 100%;
    }

    .elementor-shortcode fieldset > label img {
        height: 100px;
        max-width: 100px;
    }

    .elementor-shortcode legend {
        font-size: 16px;
    }

    .elementor-shortcode .cpb-dup-empty,
    .elementor-shortcode .cpb-dup-filled {
        margin: 5px 0;
        width: 100%;
    }

    .elementor-shortcode button[type="submit"] {
        max-width: 100%;
        width: 100%;
    }
}

.custom-edit-button {
    background: #c36;
    border-radius: 0.5em;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    color: #fff !important;
    display: inline-block;
    font-weight: 700;
    padding: 0.5em 1em;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cpb-cart-edit-actions {
    margin: 1em 0;
}

.custom-edit-button:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
    color: #fff !important;
    transform: translateY(-2px);
}

@media (max-width: 480px) {
    .custom-edit-button {
        padding: 1em;
        text-align: center;
        width: 100%;
    }
}
