/* ============================================================
   Pocket Pantry — WooCommerce My Account Custom Design
   ============================================================ */

/* ── Global Layout ───────────────────────────────────────────── */


.pp-myaccount-wrap {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 30px;
    align-items: start;
}

/* ── Page Title ──────────────────────────────────────────────── */
.woocommerce-account .entry-title,
.woocommerce-account h1.page-title {
    font-family: var(--global-heading-font, serif);
    font-size: 32px;
    font-weight: 800;
    color: #1A1A1A;
    margin-bottom: 28px;
}
.woocommerce-account .entry-title span,
.woocommerce-account h1.page-title span {
    color: var(--orange, #FF5733);
}

/* ── Sidebar Nav ─────────────────────────────────────────────── */
.pp-mya-sidebar {
    position: sticky;
    top: 20px;
}

.pp-mya-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    background: #fff;
    border-radius: 16px;
    border: 1px solid #F0EEE9;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,.05);
}

.pp-mya-nav-item { border-bottom: 1px solid #F5F3EF; }
.pp-mya-nav-item:last-child { border-bottom: none; }

.pp-mya-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 500;
    color: #444;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.pp-mya-nav-link:hover {
    background: #FFF4F1;
    color: var(--orange, #FF5733);
}

.pp-mya-nav-item.is-active .pp-mya-nav-link {
    background: var(--orange, #FF5733);
    color: #fff;
    font-weight: 700;
}

.pp-mya-nav-icon {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

/* ── Help Card ───────────────────────────────────────────────── */
.pp-mya-help-card {
    margin-top: 20px;
    background: #FFF8F4;
    border: 1px solid rgba(255,87,51,.12);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
}

.pp-mya-help-img img {
    width: 80px;
    height: auto;
    margin-bottom: 10px;
}

.pp-mya-help-body h5 {
    font-size: 16px;
    font-weight: 700;
    color: #1A1A1A;
    margin-bottom: 6px;
}

.pp-mya-help-body p {
    font-size: 13px;
    color: #888;
    margin-bottom: 14px;
    line-height: 1.5;
}

.pp-mya-help-btn {
    display: inline-block;
    border: 1.5px solid var(--orange, #FF5733);
    color: var(--orange, #FF5733);
    font-size: 13px;
    font-weight: 600;
    padding: 8px 20px;
    border-radius: 30px;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}
.pp-mya-help-btn:hover {
    background: var(--orange, #FF5733);
    color: #fff;
}

/* ── Dashboard ───────────────────────────────────────────────── */
.pp-dash-wrap { display: flex; flex-direction: column; gap: 28px; }

/* Greeting */
.pp-dash-greeting {
    display: flex;
    align-items: center;
    gap: 24px;
    background: #fff;
    border-radius: 16px;
    border: 1px solid #F0EEE9;
    padding: 24px 28px;
    box-shadow: 0 2px 12px rgba(0,0,0,.04);
}

.pp-dash-greeting-img img {
    width: 90px;
    height: auto;
}

.pp-dash-greeting-text h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1A1A1A !important;
    margin-bottom: 8px;
}

.pp-dash-greeting-text p {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin: 0;
}

.pp-dash-greeting-text a {
    color: var(--orange, #FF5733);
    text-decoration: underline;
}

/* Stats row */
.pp-dash-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.pp-dash-stat {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #F0EEE9;
    padding: 20px 18px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    box-shadow: 0 2px 10px rgba(0,0,0,.04);
}

.pp-dash-stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pp-dash-stat-icon--orange  { background: #FFF0EC; color: var(--orange, #FF5733); }
.pp-dash-stat-icon--green   { background: #ECFDF5; color: #10B981; }
.pp-dash-stat-icon--yellow  { background: #FFFBEB; color: #F59E0B; }
.pp-dash-stat-icon--purple  { background: #F5F3FF; color: #8B5CF6; }

.pp-dash-stat-num {
    display: block;
    font-size: 28px;
    font-weight: 800;
    color: #1A1A1A;
    line-height: 1;
}

.pp-dash-stat-icon--orange  ~ .pp-dash-stat-body .pp-dash-stat-num { color: var(--orange, #FF5733); }
.pp-dash-stat-icon--green   ~ .pp-dash-stat-body .pp-dash-stat-num { color: #10B981; }
.pp-dash-stat-icon--yellow  ~ .pp-dash-stat-body .pp-dash-stat-num { color: #F59E0B; }
.pp-dash-stat-icon--purple  ~ .pp-dash-stat-body .pp-dash-stat-num { color: #8B5CF6; }

.pp-dash-stat-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin: 4px 0 6px;
}

.pp-dash-stat-link,
.pp-dash-stat-sub {
    font-size: 12px;
    color: #999;
    text-decoration: none;
}

.pp-dash-stat-link:hover { color: var(--orange, #FF5733); }

/* Bottom grid */
.pp-dash-bottom {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 20px;
}

.pp-dash-section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.pp-dash-section-head h4 {
    font-size: 17px;
    font-weight: 700;
    color: #1A1A1A !important;
    margin: 0;
}

.pp-dash-view-all {
    font-size: 13px;
    color: var(--orange, #FF5733);
    text-decoration: none;
    font-weight: 600;
}

/* Recent Orders mini-list */
.pp-dash-recent-orders,
.pp-dash-account-overview {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #F0EEE9;
    padding: 22px 24px;
    box-shadow: 0 2px 10px rgba(0,0,0,.04);
}

.pp-dash-order-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #F5F3EF;
    font-size: 14px;
}

.pp-dash-order-row:last-child { border-bottom: none; }

.pp-dash-order-num  { font-weight: 700; flex: 1; color: #1A1A1A; }
.pp-dash-order-date { color: #888; white-space: nowrap; }
.pp-dash-order-total { font-weight: 600; color: #1A1A1A; white-space: nowrap; }
.pp-dash-order-arrow { color: var(--orange,#FF5733); font-size: 18px; text-decoration: none; font-weight: 700; }

/* Account overview */
.pp-dash-overview-table { width: 100%; border-collapse: collapse; margin-bottom: 18px; }
.pp-dash-overview-table tr { border-bottom: 1px solid #F5F3EF; }
.pp-dash-overview-table tr:last-child { border-bottom: none; }
.pp-dao-key { font-size: 13px; color: #888; padding: 10px 0; width: 40%; }
.pp-dao-val { font-size: 13px; color: #1A1A1A; font-weight: 500; }

.pp-btn-outline-orange {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px;
    border: 1.5px solid var(--orange, #FF5733);
    color: var(--orange, #FF5733);
    font-size: 14px;
    font-weight: 600;
    border-radius: 10px;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}
.pp-btn-outline-orange:hover { background: var(--orange, #FF5733); color: #fff; }

/* ── Orders Page ─────────────────────────────────────────────── */
.pp-orders-wrap { display: flex; flex-direction: column; gap: 20px; }

.pp-orders-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pp-orders-desc { font-size: 14px; color: #666; margin: 0; }

.pp-orders-sort select {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 14px;
    cursor: pointer;
    outline: none;
}

/* Filter Tabs */
.pp-orders-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.pp-orders-tab {
    padding: 8px 18px;
    border: 1.5px solid #ddd;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 500;
    color: #666;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
}

.pp-orders-tab:hover { border-color: var(--orange,#FF5733); color: var(--orange,#FF5733); }

.pp-orders-tab.is-active {
    background: var(--orange, #FF5733);
    border-color: var(--orange, #FF5733);
    color: #fff;
    font-weight: 700;
}

/* Order Row */
.pp-orders-list { display: flex; flex-direction: column; gap: 0; }

.pp-order-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 24px;
    background: #fff;
    border: 1px solid #F0EEE9;
    border-bottom: none;
    transition: background 0.15s;
}

.pp-order-row:first-child { border-radius: 16px 16px 0 0; }
.pp-order-row:last-child  { border-radius: 0 0 16px 16px; border-bottom: 1px solid #F0EEE9; }
.pp-order-row:only-child  { border-radius: 16px; border-bottom: 1px solid #F0EEE9; }
.pp-order-row:hover { background: #FFFAF8; }

.pp-order-row-info { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.pp-order-num  { font-size: 15px; font-weight: 700; color: #1A1A1A; }
.pp-order-meta { font-size: 12px; color: #888; }
.pp-order-items { font-size: 12px; color: #999; }

.pp-order-row-total { text-align: right; min-width: 80px; }
.pp-order-row-total strong { display: block; font-size: 16px; color: #1A1A1A; }
.pp-order-total-label { font-size: 11px; color: #aaa; }

.pp-order-done-date { font-size: 12px; color: #888; min-width: 80px; }

.pp-btn-order-action {
    padding: 8px 16px;
    border: 1.5px solid var(--orange, #FF5733);
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    color: var(--orange, #FF5733);
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s;
}
.pp-btn-order-action:hover { background: var(--orange, #FF5733); color: #fff; }

.pp-orders-empty {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 16px;
    border: 1px solid #F0EEE9;
}

/* ── Status Badges ───────────────────────────────────────────── */
.pp-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}
.pp-badge-pending     { background: #FFF3CD; color: #856404; }
.pp-badge-processing  { background: #DBEAFE; color: #1D4ED8; }
.pp-badge-hold        { background: #F3F4F6; color: #374151; }
.pp-badge-delivered   { background: #D1FAE5; color: #065F46; }
.pp-badge-cancelled   { background: #FEE2E2; color: #B91C1C; }
.pp-badge-refunded    { background: #F3F4F6; color: #374151; }
.pp-badge-failed      { background: #FEE2E2; color: #B91C1C; }
.pp-badge-shipped     { background: #FEF3C7; color: #92400E; }
.pp-badge-default     { background: #F3F4F6; color: #374151; }

/* ── View Order ──────────────────────────────────────────────── */
.pp-view-order-wrap { display: flex; flex-direction: column; gap: 24px; }

.pp-vo-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 16px;
}

.pp-vo-title {
    font-family: var(--global-heading-font, serif);
    font-size: 26px;
    font-weight: 800;
    color: var(--orange, #FF5733) !important;
    margin: 0 0 8px;
}

.pp-vo-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: #666;
    flex-wrap: wrap;
}

.pp-vo-sep { color: #ddd; }

.pp-vo-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.pp-vo-back-btn {
    padding: 9px 18px;
    border: 1.5px solid #ddd;
    border-radius: 30px;
    font-size: 13px;
    color: #555;
    text-decoration: none;
    font-weight: 500;
    transition: border-color 0.2s, color 0.2s;
    white-space: nowrap;
}
.pp-vo-back-btn:hover { border-color: var(--orange,#FF5733); color: var(--orange,#FF5733); }

/* Order Detail Card */
.pp-vo-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #F0EEE9;
    padding: 24px 28px;
    box-shadow: 0 2px 12px rgba(0,0,0,.04);
}

.pp-vo-card-title {
    font-size: 16px;
    font-weight: 700;
    color: #1A1A1A !important;
    margin: 0 0 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid #F0EEE9;
}

.pp-vo-table { width: 100%; border-collapse: collapse; }
.pp-vo-table th {
    font-size: 13px;
    font-weight: 600;
    color: #888;
    padding: 0 0 12px;
    border-bottom: 1px solid #F0EEE9;
    text-align: left;
}
.pp-vo-th-right { text-align: right; }

.pp-vo-table tbody tr { border-bottom: 1px solid #F5F3EF; }
.pp-vo-table tbody tr:last-child { border-bottom: 2px solid #F0EEE9; }
.pp-vo-table td { padding: 14px 0; vertical-align: middle; }

.pp-vo-product-cell {
    display: flex;
    align-items: center;
    gap: 14px;
}

.pp-vo-product-img {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid #eee;
    flex-shrink: 0;
}

.pp-vo-qty { font-size: 13px; color: #888; margin-left: 4px; }

.pp-vo-td-right { text-align: right; font-weight: 600; color: #1A1A1A; }

.pp-vo-tfoot-row td { padding: 12px 0; font-size: 14px; color: #555; border-bottom: 1px solid #F5F3EF; }
.pp-vo-tfoot-total td { padding: 14px 0; font-size: 15px; font-weight: 700; color: #1A1A1A; }
.pp-vo-grand-total { color: var(--orange, #FF5733) !important; font-size: 18px !important; }
.pp-vo-shipping-method { font-size: 12px; color: #aaa; margin-left: 6px; }

/* Address Cards */
.pp-vo-addresses {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.pp-vo-address-card {
    background: #FFF8F4;
    border: 1px solid rgba(255,87,51,.1);
    border-radius: 16px;
    padding: 22px 24px;
}

.pp-vo-address-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 700;
    color: var(--orange, #FF5733) !important;
    margin: 0 0 14px;
}

.pp-vo-addr-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pp-vo-addr-icon--orange { background: rgba(255,87,51,.12); color: var(--orange,#FF5733); }

.pp-vo-address-body {
    font-size: 14px;
    color: #555;
    line-height: 1.8;
    font-style: normal;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .pp-myaccount-wrap       { grid-template-columns: 220px 1fr; }
    .pp-dash-stats           { grid-template-columns: repeat(2, 1fr); }
    .pp-dash-bottom          { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .pp-myaccount-wrap       { grid-template-columns: 1fr; }
    .pp-mya-sidebar          { position: static; }
    .pp-dash-stats           { grid-template-columns: repeat(2, 1fr); }
    .pp-vo-addresses         { grid-template-columns: 1fr; }
    .pp-dash-bottom          { grid-template-columns: 1fr; }
    .pp-order-row            { flex-wrap: wrap; gap: 10px; }
}

@media (max-width: 480px) {
    .pp-dash-stats           { grid-template-columns: 1fr; }
}
