/* --- 1. Success Message Styling --- */
.woocommerce-order {
    max-width: 850px;
    margin: 0 auto;
}

.woocommerce-notice--success {
    background: var(--mint-bg) !important;
    color: var(--primary-green) !important;
    border: 1px dashed var(--primary-green) !important;
    padding: 20px 30px !important;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 18px;
    text-align: center;
    margin-bottom: 40px !important;
}

/* --- 2. Order Overview (The Top Row) --- */
.woocommerce-order-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    list-style: none;
    padding: 0;
    margin: 0 0 50px 0;
}

.woocommerce-order-overview li {
    background: #fff;
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: 12px;
    font-size: 13px;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    line-height: 1.6;
}

.woocommerce-order-overview li strong {
    display: block;
    font-size: 16px;
    color: var(--text-dark);
    margin-top: 5px;
    text-transform: none;
}

/* --- 3. Order Details Table (Receipt Style) --- */
.woocommerce-order-details__title,
.woocommerce-column__title {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.shop_table.order_details {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 40px;
}

.shop_table.order_details thead th {
    background: #f9fafb;
    padding: 15px 20px;
    font-weight: 700;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.shop_table.order_details tbody td {
    padding: 20px;
    border-bottom: 1px solid #f3f4f6;
}

.shop_table.order_details tbody tr:last-child td {
    border-bottom: none;
}

/* Product link & Quantity */
.product-name a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 600;
}

.product-name a:hover {
    color: var(--primary-green);
}

.product-quantity {
    background: var(--mint-bg);
    color: var(--primary-green);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    margin-left: 5px;
}

/* Table Footer (Totals) */
.shop_table.order_details tfoot th {
    text-align: left;
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    background: #fdfdfd;
    font-weight: 600;
    color: var(--text-gray);
}

.shop_table.order_details tfoot td {
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    text-align: right;
    font-weight: 700;
    color: var(--text-dark);
}

.shop_table.order_details tfoot tr:last-child th,
.shop_table.order_details tfoot tr:last-child td {
    background: var(--mint-bg);
    color: var(--primary-green);
    font-size: 18px;
}

/* --- 4. Customer & Address Details --- */
.woocommerce-customer-details {
    margin-top: 50px;
}

.col2-set.addresses {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 20px;
}

.woocommerce-column--billing-address,
.woocommerce-column--shipping-address {
    background: #fff;
    border: 1px solid var(--border-color);
    padding: 30px;
    border-radius: var(--radius);
}

address {
    font-style: normal;
    color: #4b5563;
    line-height: 1.8;
    font-size: 15px;
}

.woocommerce-customer-details--phone,
.woocommerce-customer-details--email {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #f3f4f6;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--text-dark);
}

/* --- 5. Responsive Fixes --- */
@media (max-width: 768px) {
    .col2-set.addresses {
        grid-template-columns: 1fr;
    }

    .woocommerce-order-overview {
        grid-template-columns: 1fr 1fr;
    }

    .shop_table.order_details thead {
        display: none;
        /* Hide header on mobile for vertical look */
    }
}