/* FAIR5 Order Form Styles */
.fair5-order-form-wrapper {
    max-width: 600px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.fair5-order-form {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 30px;
}

/* Product Info */
.fair5-product-info {
    text-align: center;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.fair5-product-info h3 {
    margin: 0 0 10px 0;
    font-size: 24px;
    color: #333;
}

.fair5-price {
    font-size: 28px;
    font-weight: bold;
    color: #333;
    margin: 0;
}

.fair5-price small {
    font-size: 14px;
    font-weight: normal;
    color: #666;
}

/* Losse prijs-shortcode: erft de opmaak van de plek waar hij staat */
.fair5-product-prijs {
    white-space: nowrap;
}

.fair5-product-prijs .fair5-prijs-suffix {
    font-size: 0.7em;
    font-weight: normal;
    color: #666;
}

/* Form Sections */
.fair5-form-section {
    margin-bottom: 30px;
}

.fair5-form-section h4 {
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #333;
    font-size: 16px;
    color: #333;
}

/* Form Rows */
.fair5-form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.fair5-form-field {
    flex: 1;
}

.fair5-field-full {
    flex: 1 1 100%;
}

.fair5-field-large {
    flex: 2;
}

.fair5-field-small {
    flex: 1;
    max-width: 150px;
}

/* Labels */
.fair5-form-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

/* Inputs */
.fair5-form-field input,
.fair5-form-field select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.fair5-form-field input:focus,
.fair5-form-field select:focus {
    outline: none;
    border-color: #333;
    box-shadow: 0 0 0 3px rgba(51, 51, 51, 0.1);
}

.fair5-form-field input.error,
.fair5-form-field select.error {
    border-color: #dc3545;
}

.fair5-form-field input[type="number"] {
    -moz-appearance: textfield;
}

.fair5-form-field input[type="number"]::-webkit-outer-spin-button,
.fair5-form-field input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Error Messages */
.fair5-error {
    display: block;
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    min-height: 18px;
}

/* Discount Code */
.fair5-discount-toggle {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin-bottom: 10px;
}

.fair5-discount-toggle input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
    cursor: pointer;
}

.fair5-discount-toggle-text {
    color: #333;
    font-size: 14px;
    font-weight: normal;
}

.fair5-discount-wrapper {
    display: flex;
    gap: 10px;
}

.fair5-discount-wrapper input {
    flex: 1;
}

.fair5-discount-message {
    display: block;
    font-size: 13px;
    margin-top: 5px;
    min-height: 20px;
}

.fair5-discount-message.success {
    color: #28a745;
}

.fair5-discount-message.error {
    color: #dc3545;
}

/* Order Summary */
.fair5-order-summary {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.fair5-order-summary h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #333;
}

.fair5-order-summary table {
    width: 100%;
    border-collapse: collapse;
}

.fair5-order-summary td {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.fair5-order-summary .fair5-amount {
    text-align: right;
    white-space: nowrap;
}

.fair5-order-summary .fair5-discount-amount {
    color: #28a745;
}

.fair5-order-summary .fair5-total-row td {
    border-bottom: none;
    padding-top: 15px;
    font-size: 18px;
}

.fair5-quantity {
    color: #666;
    font-size: 14px;
}

.fair5-free-shipping-message {
    margin: 15px 0 0 0;
    padding: 10px 15px;
    background: #fff3cd;
    color: #856404;
    border-radius: 4px;
    font-size: 13px;
    text-align: center;
}

/* Buttons */
.fair5-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.fair5-btn-primary {
    background: #333;
    color: #fff;
}

.fair5-btn-primary:hover {
    background: #555;
}

.fair5-btn-primary:disabled {
    background: #999;
    cursor: not-allowed;
}

.fair5-btn-secondary {
    background: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
}

.fair5-btn-secondary:hover {
    background: #eee;
}

.fair5-btn-large {
    width: 100%;
    padding: 16px 24px;
    font-size: 18px;
}

/* Loading Spinner */
.fair5-spinner {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    animation: fair5-spin 1s linear infinite;
}

@keyframes fair5-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Form Message */
.fair5-form-message {
    padding: 15px;
    border-radius: 6px;
    margin-top: 20px;
    text-align: center;
}

.fair5-form-message.success {
    background: #d4edda;
    color: #155724;
}

.fair5-form-message.error {
    background: #f8d7da;
    color: #721c24;
}

/* Responsive */
@media (max-width: 600px) {
    .fair5-order-form {
        padding: 20px;
    }

    .fair5-form-row {
        flex-direction: column;
        gap: 0;
    }

    .fair5-field-small,
    .fair5-field-large {
        max-width: none;
        flex: 1 1 100%;
    }

    .fair5-discount-wrapper {
        flex-direction: column;
    }

    .fair5-discount-wrapper .fair5-btn {
        width: 100%;
    }
}

/* ---------------------------------------------
   Productkeuze ([fair5_producten])
--------------------------------------------- */
.fair5-products {
    display: grid;
    gap: 24px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.fair5-products-cols-1 { grid-template-columns: 1fr; }
.fair5-products-cols-2 { grid-template-columns: repeat(2, 1fr); }
.fair5-products-cols-3 { grid-template-columns: repeat(3, 1fr); }
.fair5-products-cols-4 { grid-template-columns: repeat(4, 1fr); }

.fair5-product-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.fair5-product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.fair5-product-card-image {
    background: #f7f7f7;
    text-align: center;
}

.fair5-product-card-image img {
    display: block;
    width: 100%;
    object-fit: contain;
    aspect-ratio: 4/3;
    padding: 16px;
    box-sizing: border-box;
}

.fair5-product-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 20px;
    background-color: #FFF;
}

.fair5-product-card-title {
    margin: 0 0 10px 0;
    font-size: 20px;
    color: #333;
}

.fair5-product-card-title a {
    color: inherit;
    text-decoration: none;
}

.fair5-product-card-text {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 16px;
}

.fair5-product-card-text p {
    margin: 0 0 8px 0;
}

.fair5-product-card-price {
    font-size: 22px;
    font-weight: bold;
    color: #333;
    margin: 0 0 16px 0;
}

.fair5-product-card-price small {
    font-size: 13px;
    font-weight: normal;
    color: #666;
}

.fair5-product-card-btn {
    margin-top: auto;
    text-align: center;
    text-decoration: none;
    color: #fff;
}

.fair5-product-card-btn:hover {
    color: #fff;
}

.fair5-product-card-warning {
    margin-top: auto;
    padding: 10px 12px;
    background: #fff3cd;
    color: #856404;
    border-radius: 4px;
    font-size: 13px;
}

.fair5-products-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: #666;
}

/* Productafbeelding in het bestelformulier */
.fair5-product-image {
    margin-bottom: 12px;
}

.fair5-product-image img {
    max-width: 160px;
    height: auto;
    margin: 0 auto;
    display: block;
    max-width: 150px !important;
}

/* Melding als er geen product gekoppeld is */
.fair5-notice {
    padding: 16px 20px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.6;
}

.fair5-notice-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.fair5-notice p {
    margin: 0 0 8px 0;
}

.fair5-notice p:last-child {
    margin-bottom: 0;
}

@media (max-width: 900px) {
    .fair5-products-cols-3,
    .fair5-products-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .fair5-products-cols-2,
    .fair5-products-cols-3,
    .fair5-products-cols-4 {
        grid-template-columns: 1fr;
    }
}
