.yoli-stofp-order-form {
    max-width: 900px;
    margin: 0 auto;
    padding: 16px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.07);
    font-family: inherit;
}
.yoli-stofp-order-form h2 {
    text-align: center;
    margin-bottom: 1.5em;
}
.yoli-stofp-order-form fieldset {
    border: 1px solid #eee;
    border-radius: 6px;
    margin-bottom: 1.5em;
    padding: 1em;
}
.yoli-stofp-order-form label {
    display: block;
    margin-bottom: 0.75em;
    font-weight: 500;
}
.yoli-stofp-order-form input[type="text"],
.yoli-stofp-order-form input[type="email"],
.yoli-stofp-order-form select,
.yoli-stofp-order-form textarea {
    width: 100%;
    padding: 8px;
    margin-top: 2px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 1em;
}
.yoli-stofp-order-form textarea {
    min-height: 40px;
    resize: vertical;
}
#yoli-stofp-products-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1em;
}
#yoli-stofp-products-table th,
#yoli-stofp-products-table td {
    border: 1px solid #eaeaea;
    padding: 8px;
    text-align: left;
    vertical-align: middle;
}
#yoli-stofp-products-table img.yoli-stofp-product-image {
    max-width: 40px;
    max-height: 40px;
    display: block;
    margin: 0 auto;
}
#yoli-stofp-add-row,
.yoli-stofp-remove-team-order-row {
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    padding: 0;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}

.yoli-stofp-remove-team-order-row:hover {
    background-color: #c82333;
}

.yoli-stofp-remove-row {
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    margin: 6px 0;
    cursor: pointer;
    font-size: 1em;
    transition: background 0.2s;
}

#yoli-stofp-submit {
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    margin: 6px 0;
    cursor: pointer;
    font-size: 1em;
    transition: background 0.2s;
}
#yoli-stofp-submit {
    background: #7a3e00;
}

#yoli-stofp-add-row:hover {
    background: #005177;
}

#yoli-stofp-submit:hover {
        background: #5c2f00;
}
#yoli-stofp-form-message {
    margin-top: 1em;
    font-weight: bold;
}
@media (max-width: 768px) {
    #yoli-stofp-products-table, #yoli-stofp-products-table thead, #yoli-stofp-products-table tbody, #yoli-stofp-products-table tr, #yoli-stofp-products-table th, #yoli-stofp-products-table td {
        display: block;
        width: 100%;
    }
    #yoli-stofp-products-table tr {
        margin-bottom: 1em;
        border-bottom: 2px solid #f0f0f0;
    }
    #yoli-stofp-products-table th {
        background: #f9f9f9;
        font-weight: bold;
    }
    #yoli-stofp-products-table td {
        border: none;
        padding: 8px 0;
    }
    #yoli-stofp-add-row,
    #yoli-stofp-submit {
        width: 100%;
    }
}

.personal-details-fieldset .form-group {
    margin-bottom: 1em;
}

.personal-details-fieldset .form-group label {
    display: block;
    margin-bottom: 0.5em;
    font-weight: 500;
}

.personal-details-fieldset .form-group input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.personal-details-fieldset .name-fields,
.personal-details-fieldset .address-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1em;
}

.personal-details-fieldset .side-by-side-fields .form-group {
    flex: 1;
}

.personal-details-fieldset .form-group input[name^="shipping_address"] {
    margin-bottom: 1em;
}

.choose-product-fieldset .product-selection-flex-container {
    display: flex;
    gap: 2em;
    align-items: flex-start;
}

.choose-product-fieldset .product-selection-controls {
    flex: 1;
    position: relative;
}

.choose-product-fieldset .product-image-display {
    flex: 1;
    min-width: 250px;
    min-height: 250px;
    border: 1px solid #ccc;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f9f9f9;
    overflow: hidden;
    position: relative;
}

.choose-product-fieldset .product-image-display img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: none; /* Hidden by default */
}

.choose-product-fieldset .form-group {
    margin-bottom: 1em;
}

.choose-product-fieldset .form-group label {
    display: block;
    margin-bottom: 0.5em;
}

.choose-product-fieldset .form-group input,
.choose-product-fieldset .form-group select,
.choose-product-fieldset .form-group textarea {
    width: 100%;
    margin-bottom: 0.5em;
}

@media (max-width: 1200px) {
    .choose-product-fieldset .product-selection-flex-container {
        flex-direction: column;
    }

    .choose-product-fieldset .product-image-display {
        flex-basis: auto;
        width: 100%;
        height: 400px; /* Adjust height for smaller screens */
    }
}

@media (max-width: 600px) {
    .personal-details-fieldset .name-fields,
    .personal-details-fieldset .address-fields {
        grid-template-columns: 1fr;
    }

    .yoli-stofp-order-form {
        padding: 10px;
    }

    #yoli-stofp-products-table th,
    #yoli-stofp-products-table td {
        padding: 6px;
    }

    #yoli-stofp-team-order-table th,
    #yoli-stofp-team-order-table td {
        padding: 6px;
    }

    #yoli-stofp-add-row,
    .yoli-stofp-remove-row,
    #yoli-stofp-submit {
        padding: 10px 12px;
        font-size: 0.9em;
    }
}

#yoli-stofp-product-suggestions {
    border: 1px solid #ccc;
    border-top: none;
    max-height: 200px;
    overflow-y: auto;
    background-color: #fff;
    position: absolute;
    width: 100%;
    z-index: 1000;
    box-sizing: border-box;
}

.suggestion-item {
    padding: 10px;
    cursor: pointer;
}

.suggestion-item:hover {
    background-color: #f0f0f0;
}

.selected-product-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 8px;
    text-align: center;
    font-size: 0.9em;
    opacity: 0;
    transition: opacity 0.3s;
}

.product-image-display:hover .selected-product-name {
    opacity: 1;
}
