/* ===== EasyVend Customer App Styles ===== */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700;900&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --cream-bg:    #f5efe6;
  --header-bg:   #ddd3c0;
  --card-bg:     #ffffff;
  --tan:         #b3a079;
  --tan-dark:    #968764;
  --teal:        #1f4e4a; ;
  --teal-dark:    #163936;
  --purple:      #6b4226;
  --purple-dark: #4a2c18;
  --text-dark:   #1a1a1a;
  --text-muted:  #8a7d6a;
  --green-ok:    #3a8a52;
  --shadow:      0 4px 20px rgba(0,0,0,0.08);
  --radius:      16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--cream-bg);
  color: var(--text-dark);
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  padding-bottom: 90px;
}

a { text-decoration: none; color: inherit; }

/* ===== AUTH SCREENS ===== */
.auth-screen {
  min-height: 100vh;
  background: var(--cream-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 50px 24px 24px;
  position: relative;
  overflow: hidden;
  max-width: 480px;
  margin: 0 auto;
}

.auth-logo-circle {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4.5rem;
  margin-bottom: 20px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.auth-title {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: 2.1rem;
  text-align: center;
  margin-bottom: 8px;
}

.auth-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  text-align: center;
  margin-bottom: 30px;
}

.auth-panel {
  background: var(--card-bg);
  border-radius: 24px 24px 0 0;
  width: 100%;
  padding: 32px 24px 40px;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.05);
  margin-top: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.field-input {
  width: 100%;
  padding: 16px 18px;
  border: 1.5px solid #d8cfc0;
  border-radius: 14px;
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  color: var(--text-dark);
  background: var(--card-bg);
  margin-bottom: 16px;
  outline: none;
  transition: border-color 0.2s;
}
.field-input:focus { border-color: var(--tan); }
.field-input::placeholder { color: #b3a99a; }

.btn-tan {
  width: 100%;
  padding: 17px;
  background: var(--tan);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
  transition: background 0.2s;
}
.btn-tan:hover { background: var(--tan-dark); }

.auth-footer-link {
  text-align: center;
  margin-top: 18px;
  color: var(--text-muted);
  font-size: 0.92rem;
}
.auth-footer-link a { color: var(--tan-dark); font-weight: 600; }

.forgot-link-right {
  display: block;
  text-align: right;
  color: var(--text-muted);
  font-size: 0.88rem;
  margin: -6px 0 16px;
}

/* ===== ALERTS ===== */
.alert {
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.88rem;
  margin-bottom: 16px;
}
.alert-error   { background: #fde2e2; color: #c0392b; }
.alert-success { background: #dff0e1; color: #2e7d32; }
.alert-info    { background: #fff3cd; color: #8a6d00; }

/* ===== PAGE HEADER ===== */
.page-header {
  background: var(--header-bg);
  padding: 22px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.page-header h1 {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: 1.7rem;
}
.page-header .back-arrow {
  font-size: 1.5rem;
  font-weight: 700;
  cursor: pointer;
}
.page-header .header-icon { font-size: 1.4rem; }

/* welcome header (home) */
.welcome-header {
  background: var(--header-bg);
  padding: 24px 20px 16px;
}
.welcome-header h1 {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: 1.6rem;
  text-decoration: underline;
}

/* ===== SEARCH BAR ===== */
.search-bar {
  background: var(--teal);
  padding: 16px 20px 22px;
}
.search-bar input {
  width: 100%;
  padding: 13px 18px;
  border: none;
  border-radius: 50px;
  font-size: 0.95rem;
  background: #fff;
  outline: none;
}

/* ===== HOME CONTENT ===== */
.home-content {
  background: var(--cream-bg);
  padding: 20px 20px 10px;
  margin-top: -10px;
  border-radius: 18px 18px 0 0;
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.2rem;
  margin: 18px 0 14px;
}

.section-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 18px 0 14px;
}
.section-row a { color: var(--text-muted); font-size: 0.9rem; text-decoration: underline; }

/* category icons row */
.cat-row {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.cat-item {
  flex: 0 0 auto;
  text-align: center;
  width: 68px;
}
.cat-icon-box {
  width: 64px;
  height: 64px;
  background: #fff;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin-bottom: 6px;
  box-shadow: var(--shadow);
}
.cat-item span { font-size: 0.8rem; color: var(--text-muted); }

/* featured items grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.feature-card {
  background: #fff;
  border-radius: 14px;
  padding: 10px;
  text-align: center;
  box-shadow: var(--shadow);
}
.feature-card .emoji-box {
  font-size: 2.2rem;
  margin-bottom: 6px;
}
.feature-card .fname { font-size: 0.82rem; font-weight: 600; line-height: 1.2; }
.feature-card .fprice { color: var(--green-ok); font-weight: 700; font-size: 0.85rem; margin-top: 4px; }
.feature-card .fstock { color: var(--text-muted); font-size: 0.72rem; }

/* top selling grid */
.seller-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 24px;
}
.seller-card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
  text-align: center;
}
.seller-card .emoji-box {
  font-size: 4.5rem;
  padding: 24px 0;
  background: #fafafa;
}

/* news grid (2x2 products) */
.news-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 20px;
}
.news-card { text-align: center; }
.news-card .emoji-box {
  font-size: 4.2rem;
  background: #fff;
  border-radius: 14px;
  padding: 28px 0;
  box-shadow: var(--shadow);
  margin-bottom: 10px;
}
.news-card .nname { font-size: 1.05rem; font-weight: 500; }

/* ===== CATEGORY TABS ===== */
.tabs-row {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 10px;
  overflow-x: auto;
  padding: 16px 20px;
  background: #fff;
  border-bottom: 1px solid #eee;
}
.tab-link {
  flex: 0 0 76px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
}
.tab-link .tab-icon {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  background: #f3f3f3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  margin-bottom: 6px;
}
.tab-link.active .tab-icon { background: #c9e8d8; }
.tab-link span { font-size: 0.75rem; color: var(--text-muted); }
.tab-link.active span { color: var(--teal); font-weight: 600; }

/* product list (category page) */
.product-list-title {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.3rem;
  padding: 18px 20px 10px;
}
.product-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 0 20px 20px;
}
.product-card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.product-card .img-box {
  position: relative;
  background: #f3f0e8;
  padding: 24px 0;
  text-align: center;
  font-size: 3.4rem;
}
.product-card .new-badge {
  position: absolute;
  top: 8px; right: 8px;
  background: #2196f3;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
}
.product-card .pinfo { padding: 10px 12px 14px; }
.product-card .pname { font-weight: 600; font-size: 0.9rem; margin-bottom: 4px; }
.product-card .pprice { color: var(--green-ok); font-weight: 700; font-size: 0.92rem; }

/* sticky checkout bar */
.checkout-bar {
  position: fixed;
  bottom: 78px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 40px);
  max-width: 440px;
  background: var(--teal);
  color: #fff;
  padding: 16px 22px;
  border-radius: 50px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
  z-index: 50;
  cursor: pointer;
}

/* ===== PRODUCT DETAIL ===== */
.detail-image {
  background: #f3f0e8;
  margin: 16px 20px 0;
  border-radius: 16px;
  text-align: center;
  font-size: 7rem;
  padding: 50px 0;
  border: 1px solid #e8e0cf;
}
.detail-info { padding: 18px 20px; }
.detail-info h2 { font-size: 1.2rem; font-weight: 700; margin-bottom: 4px; }
.detail-info .from-price { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 12px; }
.detail-info .desc { color: #555; font-size: 0.9rem; line-height: 1.5; }

.option-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-top: 1px solid #eee;
}
.option-row .opt-label { font-weight: 700; }
.required-badge {
  background: var(--teal);
  color: #fff;
  font-size: 0.75rem;
  padding: 4px 14px;
  border-radius: 20px;
}
.option-pill {
  display: inline-block;
  background: #d4ede0;
  color: var(--teal-dark);
  padding: 8px 22px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.88rem;
  margin: 0 20px 16px;
}

.btn-add-bag {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: var(--teal);
  color: #fff;
  padding: 20px;
  text-align: center;
  font-weight: 700;
  font-size: 1.05rem;
  border: none;
  cursor: pointer;
}

/* ===== CART / PAYMENT ===== */
.section-label {
  padding: 16px 20px 10px;
  color: var(--text-muted);
  font-size: 0.95rem;
}
.payment-option {
  background: var(--purple);
  color: #fff;
  margin: 0 20px 14px;
  padding: 18px 22px;
  border-radius: 50px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  cursor: pointer;
}
.payment-option .radio-circle {
  width: 22px;
  height: 22px;
  border: 2px solid #fff;
  border-radius: 50%;
}
.payment-option.selected .radio-circle { background: #fff; }

.payment-details-card {
  background: #faf0e0;
  border: 1px dashed #d8c8a8;
  border-radius: 16px;
  margin: 10px 20px;
  padding: 22px;
}
.payment-details-card h3 {
  color: var(--purple-dark);
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  margin-bottom: 14px;
}
.pd-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.92rem;
  padding: 6px 0;
  color: #4a4a4a;
}
.pd-row.bold { font-weight: 700; color: #222; }
.pd-divider { border-top: 1px solid #e0d4ba; margin: 8px 0; }
.pd-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
}
.toggle-switch {
  width: 42px; height: 24px;
  background: var(--purple);
  border-radius: 14px;
  position: relative;
  cursor: pointer;
}
.toggle-switch::after {
  content: '';
  position: absolute;
  top: 3px; right: 3px;
  width: 18px; height: 18px;
  background: #fff;
  border-radius: 50%;
}
.grand-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  padding-top: 12px;
  border-top: 2px dashed #d8c8a8;
}
.grand-total-row .gt-label { color: var(--purple-dark); font-weight: 700; font-size: 1.1rem; }
.grand-total-row .gt-amount { color: var(--purple-dark); font-weight: 800; font-size: 1.2rem; text-decoration: underline; }

.order-now-bar {
  position: fixed;
  bottom: 78px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 40px);
  max-width: 440px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 50;
}
.order-now-bar .total-pill {
  background: #fff;
  border: 1px solid #ddd;
  padding: 12px 20px;
  border-radius: 50px;
  font-weight: 700;
  color: var(--purple-dark);
}
.btn-order-now {
  background: var(--purple-dark);
  color: #fff;
  padding: 14px 32px;
  border-radius: 50px;
  border: none;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
}

/* ===== MY ORDERS TABS ===== */
.order-tabs {
  display: flex;
  gap: 24px;
  padding: 16px 20px 0;
  background: var(--cream-bg);
}
.order-tab {
  padding-bottom: 12px;
  color: var(--text-muted);
  font-size: 1rem;
  border-bottom: 2px solid transparent;
  cursor: pointer;
}
.order-tab.active {
  color: var(--text-dark);
  font-weight: 600;
  border-bottom-color: var(--tan-dark);
}
.tabs-divider { border-bottom: 1px solid #ddd3c0; margin-bottom: 6px; }

.order-list { padding: 16px 20px; }

.order-item-card {
  background: #ecdfc4;
  border-radius: 16px;
  padding: 16px;
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
}
.order-item-card .item-emoji {
  width: 60px; height: 60px;
  background: #fff;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  flex-shrink: 0;
}
.order-item-card .item-info { flex: 1; }
.order-item-card .item-name { font-weight: 700; font-size: 1rem; }
.order-item-card .item-price { color: #555; font-size: 0.88rem; margin-bottom: 8px; }

.btn-pay-now {
  background: var(--teal);
  color: #fff;
  padding: 10px 0;
  border-radius: 50px;
  text-align: center;
  font-weight: 700;
  font-size: 0.88rem;
  border: none;
  width: 100%;
  cursor: pointer;
}

/* ready to take card */
.ready-card {
  background: #ecdfc4;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 16px;
}
.ready-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: #e0d2b4;
  font-weight: 700;
}
.ready-card-header .order-no-pill {
  background: #d4c4a0;
  padding: 4px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
}
.ready-card-header .active-status { color: var(--green-ok); }
.ready-card-body { padding: 16px 18px; }
.ready-item-row {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 12px;
}
.ready-item-row .item-emoji {
  width: 56px; height: 56px;
  background: #fff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
}
.ready-status-row {
  display: flex;
  justify-content: space-between;
  margin: 10px 0;
  font-size: 0.92rem;
}
.ready-status-row .status-ready { color: var(--green-ok); font-weight: 700; }
.btn-dispense-qr {
  background: var(--teal);
  color: #fff;
  border: 2px solid #fff;
  width: 100%;
  padding: 14px;
  border-radius: 50px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
}

/* history card */
.history-card {
  background: #ecdfc4;
  border-radius: 16px;
  padding: 16px 18px;
  margin-bottom: 14px;
}
.history-card h4 { font-weight: 700; margin-bottom: 10px; }
.history-item-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 10px;
}
.history-item-row .item-emoji {
  width: 48px; height: 48px;
  background: #fff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}
.history-item-row .hi-details { flex: 1; font-size: 0.88rem; }
.history-item-row .hi-price { font-weight: 700; font-size: 0.88rem; }
.history-meta { font-size: 0.82rem; color: #555; margin: 8px 0; }
.btn-details-receipt {
  background: var(--teal);
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}
.history-footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ===== QR DISPENSE ===== */
.qr-header {
  background: var(--header-bg);
  padding: 20px;
  text-align: center;
}
.qr-header h1 {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: 1.6rem;
  margin-bottom: 6px;
}
.qr-header .order-tag { font-weight: 700; font-size: 1rem; }

.qr-box {
  background: #fff;
  margin: 20px auto;
  width: 240px;
  height: 240px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: var(--shadow);
}
.qr-box img { width: 100%; height: 100%; object-fit: contain; }

.countdown-text {
  text-align: center;
  font-weight: 700;
  margin-bottom: 4px;
}
.countdown-sub {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 20px;
}
.scan-instruction {
  text-align: center;
  color: #444;
  font-size: 0.95rem;
  padding: 0 30px;
  margin-bottom: 24px;
  line-height: 1.5;
}

.order-summary-box {
  border: 1.5px solid #d8c8a8;
  border-radius: 16px;
  margin: 0 20px;
  padding: 18px 20px;
}
.order-summary-box h4 {
  color: var(--tan-dark);
  font-weight: 700;
  margin-bottom: 12px;
}
.summary-line {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 0.95rem;
}

/* ===== PROFILE ===== */
.profile-header {
  background: var(--header-bg);
  padding: 24px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.profile-header h1 {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: 1.7rem;
}
.profile-avatar-wrap {
  background: var(--header-bg);
  text-align: center;
  padding: 0 0 30px;
}
.profile-avatar {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: linear-gradient(to bottom, #a8d4ec 50%, #7cb87a 50%);
  border: 5px solid #c3b394;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}
.profile-avatar-wrap .pname { font-size: 1.4rem; font-weight: 700; }

.profile-menu-card {
  background: #fff;
  border-radius: 16px;
  margin: 0 20px 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
  z-index: 2;
}
.profile-avatar-wrap + .profile-menu-card {
  margin-top: -16px;
}

.profile-menu-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid #eee;
  cursor: pointer;
}
.profile-menu-item:last-child { border-bottom: none; }
.profile-menu-item .pmi-icon { font-size: 1.2rem; width: 24px; }
.profile-menu-item .pmi-label { flex: 1; font-weight: 500; }
.profile-menu-item .pmi-value { color: var(--text-muted); font-size: 0.9rem; }
.profile-menu-item .pmi-arrow { color: #ccc; }

.profile-section-label {
  padding: 18px 24px 8px;
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* edit profile form */
.user-info-label { padding: 14px 20px 0; font-size: 1.05rem; font-weight: 500; }
.edit-form-card {
  background: #fff;
  border-radius: 16px;
  margin: 14px 20px;
  padding: 18px 20px;
  box-shadow: var(--shadow);
}
.edit-form-card label { display: block; color: var(--text-muted); font-size: 0.9rem; margin: 12px 0 6px; }
.edit-form-card label:first-child { margin-top: 0; }
.edit-form-card input {
  width: 100%;
  padding: 13px 14px;
  border: 1.5px solid #d8cfc0;
  border-radius: 12px;
  font-size: 0.95rem;
  outline: none;
}

/* ===== BOTTOM NAV ===== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: #fff;
  display: flex;
  justify-content: space-around;
  padding: 10px 0 16px;
  border-top: 1px solid #eee;
  z-index: 40;
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  font-size: 0.72rem;
}
.nav-item .nav-icon { font-size: 1.3rem; }
.nav-item.active { color: var(--tan-dark); }
.nav-item.active .nav-label { text-decoration: underline; font-weight: 600; }

/* generic */
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.mt-16 { margin-top: 16px; }
.px-20 { padding-left: 20px; padding-right: 20px; }
.empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: 60px 20px;
  font-size: 0.95rem;
}

/* ===== CART ITEMS ===== */
.cart-item {
  background: #fff;
  margin: 0 20px 12px;
  padding: 14px 18px;
  border-radius: 14px;
  box-shadow: var(--shadow);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.cart-item-name  { font-weight: 600; font-size: 0.95rem; }
.cart-item-price { color: var(--green-ok); font-weight: 700; font-size: 0.88rem; margin-top: 4px; }
.btn-cancel-item {
  background: #fde2e2;
  color: #c0392b;
  border: none;
  padding: 8px 16px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
}

.cart-actions { display: flex; align-items: center; gap: 8px; }
.cart-actions form { margin: 0; }
.qty-btn {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1.5px solid var(--tan);
  background: #fff;
  color: var(--tan-dark);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
}
.qty-num { min-width: 18px; text-align: center; font-weight: 700; }

/* ===== STOCK STATUS ===== */
.pstock {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 4px;
}
.product-card.sold-out .pstock {
  color: #c0392b;
  font-weight: 600;
}
.product-card.sold-out {
  opacity: 0.6;
  pointer-events: none; /* elak pengguna tekan produk yang habis */
}
.out-of-stock-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.5px;
  text-align: center;
}

.welcome-header.with-avatar { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.home-avatar { width:42px; height:42px; border-radius:50%; overflow:hidden; background:#fff;
  display:flex; align-items:center; justify-content:center; font-size:1.4rem; flex-shrink:0;
  border:2px solid #c3b394; }
.avatar-img { width:100%; height:100%; border-radius:50%; object-fit:cover; display:block; }

.media-emoji { line-height: 1; }
.media-img   { display: block; width: 100%; height: 100%; object-fit: cover; }

.product-card .img-box {
  height: 150px; padding: 0; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}

/* Home: Featured Items & Top Selling */
.feature-card .emoji-box { height: 84px; overflow: hidden; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; }
.seller-card .emoji-box  { height: 150px; padding: 0; overflow: hidden;
  display: flex; align-items: center; justify-content: center; }

/* News */
.news-card .emoji-box { height: 150px; padding: 0; overflow: hidden;
  display: flex; align-items: center; justify-content: center; }

/* Product Detail */
.detail-image { height: 240px; padding: 0; overflow: hidden;
  display: flex; align-items: center; justify-content: center; }

/* My Orders (Unpaid, Ready, History) */
.order-item-card .item-emoji,
.ready-item-row .item-emoji,
.history-item-row .item-emoji { overflow: hidden; }

/* Profile photo */
.profile-avatar { overflow: hidden; }