.bestelling_header h2{
    width: 90vw;
    font-weight: 600;
    line-height: 1.2em;
    font-size: 42px;
    color: #232223;
    margin-top:2em;
}

.page-template-thankyou_page .products{
    width: 75% !important;
}

.page-template-thankyou_page .product-img {
    width: 15%;
    height: auto;
    margin-right: 1rem;
}

/* Aangepaste selector voor wanneer betaalgegevens wrapper ontbreekt */
.order-data > .afleveradres,
.order-data > .factuuradres {
    width: 48.5% !important;
}

/* Als betaalgegevens wrapper wel bestaat */
.betaalgegevens {
    width: 97%;
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    gap: 3%;
}

.betaalgegevens .afleveradres, 
.betaalgegevens .factuuradres {
    width: 50% !important;
}

.order-data {
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    background: #ffffff;
    margin-bottom: 5em !important;
    padding: 2em;
}

/* Style voor h4 headers */
.order-data h4 {
    color: #2c5530;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    position: relative;
    padding-left: 1rem;
}

.order-data h4::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 24px;
    background: linear-gradient(180deg, #6fb33f 0%, #5a9933 100%);
    border-radius: 2px;
}

/* Style voor th als header (voor tweede PHP structuur) */
.page-template-thankyou_page .products table th {
    color: #2c5530;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    position: relative;
    padding: 0 12px 16px 1rem;
    text-align: left;
    background-color: #ffffff !important;
    border: none !important;
    text-transform: uppercase;
    letter-spacing: normal;
}

.page-template-thankyou_page .products table th:nth-of-type(2),
.page-template-thankyou_page .products table th:nth-of-type(3) {
    display:none !important;
}

.page-template-thankyou_page .products table th::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 24px;
    background: linear-gradient(180deg, #6fb33f 0%, #5a9933 100%);
    border-radius: 2px;
}

.order-data table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: none !important;

}

.page-template-thankyou_page .products tr:nth-of-type(2) td{
    vertical-align: middle !important;
}

.order-data table td {
    padding: 16px 12px !important;
    color: #333;
    font-size: 1rem;
    background-color: #ffffff !important;
    border-left: none !important;
    border-right: none !important;
    vertical-align: none !important;
}

.order-data table tbody tr {
    background-color: #ffffff !important;
}

.order-data table tbody tr:not(:last-child) td {
    border-bottom: 1px solid rgba(230, 230, 230) !important;
}

.order-data table tbody tr:first-child td {
    border-top: none !important;
}

.page-template-thankyou_page .products table td:first-child {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 500;
}

.page-template-thankyou_page .woocommerce-Price-currencySymbol {
    font-weight: 700;
}

.page-template-thankyou_page .products,
.afleveradres,
.factuuradres {
    background: #ffffff;
    border-radius: 10px;
}

.afleveradres table td:first-child,
.factuuradres table td:first-child {
    color: #6c757d;
    font-weight: 600;
    font-size: 0.9rem;
    width: 40%;
}

.afleveradres table td:last-child,
.factuuradres table td:last-child {
    color: #333;
    font-weight: 500;
    width: 60%;
}

.page-template-thankyou_page .product-img {
    border-radius: 8px;
    border: 2px solid #f0f0f0;
    padding: 4px;
}

/* Afleveradres en factuuradres naast elkaar zonder betaalgegevens wrapper */
.order-data {
    display: flex;
    flex-wrap: wrap;
}

.order-data > .products {
    flex: 0 0 75%;
    max-width: 75%;
}

.order-data > .afleveradres,
.order-data > .factuuradres {
    flex: 0 0 48.5%;
    max-width: 48.5%;
    margin-top: 2rem;
}

.order-data > .afleveradres {
    margin-right: 3%;
}

.page-template-thankyou_page .product-img,
.page-template-thankyou_page .products table td img {
    width: 15%;
    height: auto;
    margin-right: 1rem;
    border-radius: 8px;
    border: 2px solid #f0f0f0;
    padding: 4px;
}

@media (max-width: 992px) {

    .bestelling_header h2{
        width: 80vw;
    }
    .order-data {
        padding: 1.5rem !important;
    }
    
    .betaalgegevens {
        flex-direction: column;
        gap: 1.5rem;
        width: 100%;
    }
    
    .order-data > .afleveradres,
    .order-data > .factuuradres,
    .betaalgegevens .afleveradres, 
    .betaalgegevens .factuuradres {
        width: 100% !important;
        flex: 0 0 100%;
        max-width: 100%;
        margin-right: 0;
    }
    
    .order-data > .products,
    .page-template-thankyou_page .products {
        width: 100% !important;
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .page-template-thankyou_page .product-img,
    .page-template-thankyou_page .products table td img {
        width: 60px;
        margin-right: 0.5rem;
    }
    
    .order-data table th,
    .order-data table td {
        padding: 12px 8px;
        font-size: 0.9rem;
    }
    
    .page-template-thankyou_page .products table th {
        font-size: 1.1rem;
    }
    
    .order-data h4 {
        font-size: 1.1rem;
    }
    
    .afleveradres table td:first-child,
    .factuuradres table td:first-child {
        width: 45%;
    }
    
    .afleveradres table td:last-child,
    .factuuradres table td:last-child {
        width: 55%;
    }
}