/* Customer account - flat: 1px #E5E7EB borders, 8px cards, 6px controls, no shadows or gradients. */
:root {
  --primary: #E97C43;
  --primary-dark: #C45A2A;
  --primary-light: #FFF3EA;
  --success: #15803D;
  --danger: #B91C1C;
  --warning: #B45309;
  --dark: #111827;
  --gray: #6B7280;
  --light-gray: #F6F7F9;
  --border: #E5E7EB;
  --bg: #F6F7F9;
  --card-bg: #fff;
  --muted: #6B7280;
}

body { background: var(--bg); color: var(--dark); padding-bottom: 76px; }

/* Bootstrap buttons in the shop palette */
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover, .btn-primary:focus, .btn-primary:active { background: var(--primary-dark) !important; border-color: var(--primary-dark) !important; color: #fff; }
.btn-outline-primary { border-color: var(--primary); color: var(--primary-dark); background: #fff; }
.btn-outline-primary:hover, .btn-outline-primary:focus, .btn-outline-primary:active { background: var(--primary-light) !important; border-color: var(--primary) !important; color: var(--primary-dark) !important; }
.btn-light { background: #fff; border-color: #D1D5DB; color: var(--dark); }
.btn-light:hover { background: var(--light-gray); border-color: #D1D5DB; }
.btn-outline-danger { border-color: #FCA5A5; color: var(--danger); background: #fff; }
.btn-outline-danger:hover { background: #FEF2F2; border-color: var(--danger); color: var(--danger); }
.btn-outline-warning { border-color: #FCD34D; color: var(--warning); background: #fff; }
.btn-outline-warning:hover { background: #FFF7E6; color: var(--warning); border-color: #F59E0B; }
.btn-outline-success { border-color: #86EFAC; color: var(--success); background: #fff; }
.btn-outline-success:hover { background: #ECFDF3; color: var(--success); border-color: var(--success); }
.btn { min-height: 36px; border-radius: 6px; font-size: 13.5px; font-weight: 600; box-shadow: none; }
.btn-sm { min-height: 32px; font-size: 13px; }
.btn:focus-visible, .form-control:focus, .form-select:focus { outline: 2px solid color-mix(in srgb, var(--primary) 35%, transparent) !important; box-shadow: none !important; }
.form-control, .form-select { min-height: 40px; border: 1px solid #D1D5DB; border-radius: 6px; font-size: 14px; }
.form-control:focus, .form-select:focus { border-color: var(--primary); }
.input-group-text { border-color: #D1D5DB; color: var(--muted); }
.text-primary { color: var(--primary) !important; }
.bg-primary { background-color: var(--primary) !important; }
.border-primary { border-color: var(--primary) !important; }
html:root .wrap .text-warning { color: #B45309 !important; }
.badge { font-size: 12px; font-weight: 600; border-radius: 4px; }

/* Page header (replaces the old solid orange bar) */
.appbar { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--border); color: var(--dark); }
.appbar-inner { margin: 0 auto; max-width: 1280px; padding: 12px 16px; display: flex; align-items: center; gap: 12px; }
.appbar-title { font-size: 20px; font-weight: 600; line-height: 1.25; color: var(--dark); }
.appbar-sub { font-size: 12.5px; color: var(--muted); }
.iconbtn { width: 36px; height: 36px; border-radius: 6px; display: flex; align-items: center; justify-content: center; background: #fff; border: 1px solid #D1D5DB; color: var(--dark); text-decoration: none; font-size: 16px; flex: none; }
.iconbtn:hover { background: var(--light-gray); color: var(--dark); }

.wrap { max-width: 1280px; margin: 16px auto; padding: 0 16px; }

/* Cards and tiles */
.cardx { background: var(--card-bg); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.cardx-header { padding: 12px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #fff; font-size: 15px; font-weight: 600; }
.cardx-body { padding: 16px; }
.tile { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; display: flex; gap: 12px; align-items: center; text-decoration: none; color: inherit; }
.tile:hover { border-color: var(--primary); color: inherit; }
.tile-ico { width: 40px; height: 40px; border-radius: 8px; display: flex; align-items: center; justify-content: center; background: var(--primary-light); color: var(--primary-dark); font-size: 18px; flex: 0 0 40px; }
.tile-title { font-size: 14px; font-weight: 600; margin: 0; }
.tile-sub { margin: 0; color: var(--muted); font-size: 12.5px; }

/* Order rows: one flat card per order, thumbnail on the left */
.order-row { flex-wrap: wrap; background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 12px; display: flex; gap: 12px; align-items: flex-start; cursor: pointer; overflow: hidden; position: relative; margin-bottom: 8px; }
.order-row:hover { border-color: #9CA3AF; }
.order-strip { flex: 0 0 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border-top: 1px solid var(--border); background: var(--light-gray); border-radius: 6px; }
.order-strip .left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.order-strip .ico { width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center; background: #fff; border: 1px solid var(--border); color: var(--primary-dark); flex: 0 0 24px; font-size: 13px; }
.order-strip .txt { font-size: 13px; font-weight: 600; color: var(--dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.order-strip .sub { font-size: 12px; color: var(--muted); font-weight: 500; margin-left: 4px; }
.order-row:hover .order-strip { background: #F0F1F4; }

.thumbs { width: 64px; flex: 0 0 64px; }
.thumb-wrap { position: relative; width: 60px; height: 60px; border-radius: 6px; background: #F3F4F6; overflow: visible; }
.thumb-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 6px; font-size: 11px; }
.thumb-plus { position: absolute; right: -4px; bottom: -4px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; font-size: 12px; font-weight: 700; color: #fff; background: #111827; display: inline-flex; align-items: center; justify-content: center; line-height: 1; border: 2px solid #fff; }
.thumb { background: #F3F4F6; width: 60px; height: 60px; border-radius: 6px; }
.order-meta { flex: 1; min-width: 0; }
.order-id { font-weight: 600; font-size: 14px; margin: 0; }
.order-date { font-size: 12.5px; color: var(--muted); margin: 2px 0 0; }
.order-prod { font-size: 13px; color: #374151; margin: 6px 0 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.order-right { text-align: right; }

/* Status badges: tinted background, dark text, no border */
.badge-soft-primary { background: #EFF6FF; color: #1D4ED8; }
.badge-soft-warning { background: #FFF7E6; color: #92400E; }
.badge-soft-info { background: #E0F2FE; color: #075985; }
.badge-soft-success { background: #ECFDF3; color: #166534; }
.badge-soft-danger { background: #FEF2F2; color: #991B1B; }
.badge-soft-purple { background: #F5F3FF; color: #6B21A8; }
.badge-soft-secondary { background: #F3F4F6; color: #374151; }

/* Filter pills and chips */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; min-height: 28px; border-radius: 14px; border: 1px solid var(--border); background: #fff; font-size: 12.5px; color: #374151; text-decoration: none; }
.pill.active { border-color: var(--primary); background: var(--primary-light); color: var(--primary-dark); font-weight: 600; }
.pill:hover { background: var(--light-gray); }
.filter-chip { display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border); padding: 0 14px; min-height: 36px; border-radius: 18px; font-size: 13.5px; background: #fff; margin: 6px 6px 0 0; cursor: pointer; user-select: none; }
.filter-chip.active { border-color: var(--primary); background: var(--primary-light); color: var(--primary-dark); font-weight: 600; }

/* Detail pages */
.detail-top { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 14px 16px; }
.kv { display: flex; justify-content: space-between; font-size: 13.5px; margin: 8px 0; }
.kv .k { color: var(--muted); }
.kv .v { font-weight: 600; }
.item-line { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--border); }
.item-line:last-child { border-bottom: none; }
.item-img { width: 54px; height: 54px; border-radius: 6px; object-fit: contain; background: #F3F4F6; font-size: 11px; }
.item-name { font-weight: 600; font-size: 14px; margin: 0; }
.item-sub { font-size: 12.5px; color: var(--muted); margin: 2px 0 0; }
.item-price { margin-left: auto; font-weight: 700; }

/* Filter / cancel / return / address / bank / tracking panels: shared dialog look (layout/dialog.css).
   Phone = bottom sheet (Bootstrap offcanvas) above the bottom nav, desktop = centred dialog. */
.offcanvas-backdrop.offcanvas-backdrop { --bs-backdrop-bg: #0F172A; --bs-backdrop-opacity: .45; backdrop-filter: none; transition: opacity .15s linear; z-index: 10040; }
.offcanvas.offcanvas-bottom:focus, .offcanvas.offcanvas-bottom:focus-visible { outline: 0; }
.offcanvas.offcanvas-bottom { z-index: 10050; border-top-left-radius: 12px; border-top-right-radius: 12px; height: auto !important; max-height: 92vh; max-height: 92dvh; top: auto; box-shadow: var(--dlg-shadow, 0 8px 24px rgba(15, 23, 42, .14)); transition: transform .15s cubic-bezier(.2, 0, 0, 1), opacity .15s linear, visibility .15s; }
.offcanvas.offcanvas-bottom .offcanvas-header { min-height: 56px; padding: 8px 8px 8px 16px; border-bottom: 1px solid var(--k-line, #E2E8F0); }
.offcanvas.offcanvas-bottom .offcanvas-title { font-size: 16px; font-weight: 600; color: var(--k-ink, #0F172A); }
.offcanvas.offcanvas-bottom .offcanvas-header .btn-close { width: 40px; height: 40px; margin: 0 0 0 auto; padding: 0; border-radius: 6px; background-size: 14px; opacity: .65; }
.offcanvas.offcanvas-bottom .offcanvas-header .btn-close:hover { opacity: 1; background-color: var(--k-soft, #F8FAFC); }
.offcanvas.offcanvas-bottom .offcanvas-body { padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px)); overflow-y: auto; overscroll-behavior: contain; }
.offcanvas.offcanvas-bottom .btn { min-height: 44px; }
@media (min-width: 768px) {
  .offcanvas.offcanvas-bottom { top: 50%; bottom: auto; left: 50%; right: auto; width: min(520px, calc(100% - 32px)); border-radius: 8px; transform: translate(-50%, calc(-50% + 8px)); opacity: 0; }
  .offcanvas.offcanvas-bottom.showing, .offcanvas.offcanvas-bottom.show:not(.hiding) { transform: translate(-50%, -50%); opacity: 1; }
  .offcanvas.offcanvas-bottom .btn { min-height: 40px; }
}
@media (prefers-reduced-motion: reduce) { .offcanvas.offcanvas-bottom, .offcanvas-backdrop.offcanvas-backdrop { transition: none; } }

/* Rating stars */
.rating-stars { display: inline-flex; gap: 4px; font-size: 1.4rem; color: #D1D5DB; cursor: pointer; }
.rating-stars .star.selected, .rating-stars .star.hovered { color: #F59E0B; }

.fw-600 { font-weight: 600; }

/* Tracking timeline */
.track-wrap { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 12px; }
.track-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.track-title { font-weight: 600; font-size: 14px; margin: 0; }
.track-sub { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); }
.track-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 4px; font-size: 12px; font-weight: 600; background: #F3F4F6; color: #374151; white-space: nowrap; }
.track-chip.success { background: #ECFDF3; color: #166534; }
.track-chip.danger { background: #FEF2F2; color: #991B1B; }
.track-chip.info { background: #E0F2FE; color: #075985; }
.track-chip.warn { background: #FFF7E6; color: #92400E; }
.track-chip.primary { background: var(--primary-light); color: var(--primary-dark); }
.ship-card { background: #fff; border-radius: 8px; }
.ship-grid { display: grid; grid-template-columns: 1fr; gap: 6px; font-size: 13px; color: #374151; }
.ship-grid b { color: var(--dark); }
.track-timeline { margin-top: 12px !important; background: #fff; }
.tl-item { position: relative; display: flex; gap: 12px; padding: 10px 0; }
.tl-item:not(:last-child)::after { content: ""; position: absolute; left: 12px; top: 34px; bottom: -10px; width: 1px; background: #D1D5DB; }
.tl-dot { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--primary-light); border: 1px solid #F6D7C3; color: var(--primary-dark); flex: 0 0 26px; margin-top: 2px; font-size: 13px; }
.tl-dot.done { background: #ECFDF3; border-color: #BBF7D0; color: var(--success); }
.tl-dot.fail { background: #FEF2F2; border-color: #FECACA; color: var(--danger); }
.tl-body { flex: 1; min-width: 0; }
.tl-line1 { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.tl-text { font-weight: 600; font-size: 14px; margin: 0; color: var(--dark); }
.tl-time { font-size: 12px; color: var(--muted); white-space: nowrap; }
.tl-loc { margin: 4px 0 0; font-size: 13px; color: #4B5563; }
.tl-loc i { color: var(--primary); }
.tl-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 2px 8px; border-radius: 4px; background: #F3F4F6; color: #374151; margin-top: 8px; }
.tl-tag i { color: var(--primary); }
.track-empty { padding: 14px; border-radius: 8px; background: #fff; border: 1px dashed #D1D5DB; color: var(--muted); font-size: 13px; }

/* Empty / login-required state */
.empty-cart { text-align: center; padding: 32px 16px; }
.empty-icon { font-size: 44px; color: #9CA3AF; margin-bottom: 12px; line-height: 1; }
.empty-title { font-size: 18px; font-weight: 600; margin: 0 0 6px; }
.empty-subtitle { color: var(--gray); margin: 0 auto 20px; max-width: 400px; }
.shop-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 20px; background: var(--primary); color: #fff; border: 1px solid var(--primary); border-radius: 6px; text-decoration: none; font-size: 14px; font-weight: 600; cursor: pointer; }
.shop-btn:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }

@media (max-width: 767px) {
  .wrap { padding: 0 12px; margin: 12px auto; }
  .appbar-inner { padding: 10px 12px; }
  .cardx-body { padding: 14px; }
  .cardx-header { padding: 12px 14px; }
  .form-control, .form-select { font-size: 16px; }
}

/* review photos / video */
.rv-media{margin-top:8px;display:grid;gap:6px}
.rv-add{display:inline-flex;gap:8px;align-items:center;cursor:pointer;border:1px dashed var(--primary,#E97C43);border-radius:6px;padding:8px 12px;font-weight:600;font-size:.85rem;color:var(--primary-dark,#C45A2A);width:fit-content}
.rv-add small{font-weight:400;color:#6b7280}
.rv-previews{display:flex;gap:8px;flex-wrap:wrap}
.rv-thumb{position:relative;width:64px;height:64px;border-radius:10px;overflow:hidden;background:#f3f4f6}
.rv-thumb img,.rv-thumb video{width:100%;height:100%;object-fit:cover}
.rv-thumb button{position:absolute;top:2px;right:2px;width:22px;height:22px;border-radius:50%;border:0;background:rgba(0,0,0,.65);color:#fff;line-height:1}
