/* Container */
.account-orders-table {
    display: flex;
    flex-direction: column;
    font-family: 'Inter', sans-serif;
    background-color: #F9F8F6;
    border-radius: 12px;
    padding: 12px 0 4px;
}

/* Header + rows share grid baseline */
.account-orders-table__header,
.account-orders-table__row {
    display: grid;
    grid-template-columns: 180px 160px 1fr;
    gap: 32px;
    align-items: flex-start;
}

.account-orders-table__header {
    padding: 0 32px 14px;
    border: none;
}

.account-orders-table__body {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 0 24px 12px;
}

.account-orders-table__row {
    background: #FBFAF8;
    padding: 18px 24px 16px;
    border-radius: 12px;
    border: 1px solid #EEE7DC;
    position: relative;
}

.account-orders-table__row:hover {
    border-color: #DACBB8;
    background: #FDFCFB;
}

.account-orders-table__row:last-child {
    border-bottom: none;
}

.account-orders-table__header {
    color: #7F7F7F;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: .4px;
    text-transform: uppercase;
}

.account-orders-table__col-1,
.account-orders-table__col-2,
.account-orders-table__col-3 {
    display: flex;
    flex-direction: column;
}

.account-orders-table__row .account-orders-table__col-1,
.account-orders-table__row .account-orders-table__col-2,
.account-orders-table__row .account-orders-table__col-3 {
    font-size: 15px;
    color: #2D2D2D;
}

.account-orders-table__row .account-orders-table__col-1 a {
    font-weight: 500;
    color: #333;
    text-decoration: none;
}

.account-orders-table__row .account-orders-table__col-1 time {
    font-size: 14px;
    color: #7F7F7F;
    margin-top: 4px;
}

.order-total-amount { font-weight: 600; margin-bottom: 4px; }
.order-payment-method { font-size: 13px; color: #7F7F7F; line-height: 1.2; }

.account-orders-table__row .account-orders-table__col-3 { line-height: 1.4; }

/* Order status badge */
.order-status {
    display: inline-block;
    margin-top: 6px;
    padding: 2px 8px 3px;
    font-size: 11px;
    line-height: 1.2;
    border-radius: 20px;
    background: #E8ECEF;
    color: #3B4A54;
    font-weight: 500;
}
.order-status--wc-completed { background:#E0F6EA; color:#236D44; }
.order-status--wc-processing { background:#E6F0FF; color:#1D4F91; }
.order-status--wc-pending { background:#FFF4D9; color:#8A5A00; }
.order-status--wc-on-hold { background:#F4E7FF; color:#5C2785; }

/* Items */
.order-item-thumbs { display:flex; gap:6px; margin-bottom:8px; }
.order-item-thumb img { width:40px; height:40px; object-fit:cover; border-radius:6px; border:1px solid #E4E1DC; background:#fff; }
.order-item-names { font-size:13px; font-weight:500; display:flex; flex-direction:column; gap:4px; }
.order-item-line { position:relative; padding-left:0; }

/* Repeat order button */
.order-actions { margin-top:10px; }
.order-again-btn {
    display:inline-block;
    font-size:12px;
    padding:6px 14px 7px;
    background:#F0EEE9;
    border-radius:24px;
    text-decoration:none;
    color:#3A3A3A;
    border:1px solid #E1DACE;
    transition:.2s;
}
.order-again-btn:hover { background:#E8E3DA; }

/* Empty state */
.account-orders-empty {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:24px;
    background:#F5F2ED;
    border:1px solid #E2DBD1;
    border-left:4px solid #5AA4AE;
    border-radius:0 8px 8px 0;
    padding:14px 18px 14px 12px;
    font-size:14px;
    margin-top:24px;
}
.account-orders-empty__left { display:flex; align-items:center; gap:12px; }
.account-orders-empty__icon { display:inline-flex; }
.account-orders-empty__text { color:#2D2D2D; }
.account-orders-empty__button {
    background:#E4E0DB;
    color:#2E2E2E;
    font-size:13px;
    font-weight:500;
    text-decoration:none;
    padding:8px 18px 9px;
    border-radius:4px;
    line-height:1;
    border:1px solid #D5CEC5;
    transition:.2s;
}
.account-orders-empty__button:hover { background:#D8D3CD; }

@media (max-width: 640px){
    .account-orders-empty { flex-direction:column; align-items:flex-start; gap:12px; }
    .account-orders-empty__button { align-self:stretch; text-align:center; }
}

/* Breadcrumbs and Title */
.woocommerce-breadcrumb {
    font-size: 14px;
    color: #7F7F7F;
    margin-bottom: 15px;
}

.woocommerce-breadcrumb a {
    color: #7F7F7F;
    text-decoration: none;
}

.woocommerce-breadcrumb a:hover {
    text-decoration: underline;
}

.woocommerce-MyAccount-content h2 {
    font-size: 40px;
    font-weight: 500;
    margin-bottom: 30px;
}

/* Responsive */
@media (max-width: 860px) {
    .account-orders-table__header { display:none; }
    .account-orders-table { padding:8px 0 0; }
    .account-orders-table__body { padding:0 8px 8px; gap:12px; }
    .account-orders-table__row { grid-template-columns: 1fr; gap:12px; padding:16px 16px 14px; }
    .account-orders-table__col-1,
    .account-orders-table__col-2,
    .account-orders-table__col-3 { font-size:14px; }
    .order-item-thumbs { order:1; }
    .order-status { margin-top:4px; }
}
