/* ============ SHARED APP-PAGE CHROME ============ */
.app-body {
  background: var(--bg-soft);
  min-height: 100vh;
  padding-bottom: 92px;
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 300;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.app-back {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.app-topbar h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 17px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-main {
  max-width: 900px;
  margin: 0 auto;
  padding: 22px 18px 40px;
}

.app-main.narrow {
  max-width: 620px;
}

.vd-shell { max-width: 1120px; }

/* ============ TOAST (shared) ============ */
.hm-toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 12px;
  opacity: 0;
  pointer-events: none;
  transition: all .3s ease;
  z-index: 500;
  max-width: 88%;
  text-align: center;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.hm-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ============ BOTTOM NAV (shared) ============ */
.hm-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 300;
  display: flex;
  justify-content: space-around;
  align-items: center;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
}

.hm-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--ink-soft);
  padding: 8px 14px;
  min-height: 48px;
  justify-content: center;
  border-radius: 14px;
  transition: all .2s ease;
}

.hm-nav-item.active {
  color: var(--blue);
  background: rgba(37, 99, 235, 0.08);
}

.hm-nav-ico {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hm-nav-ico svg {
  width: 100%;
  height: 100%;
  color: currentColor;
}

.hm-nav-sell {
  background: linear-gradient(135deg, var(--blue), var(--green));
  color: #fff;
  transform: translateY(-10px);
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.35);
}

.hm-nav-sell .hm-nav-ico {
  width: 24px;
  height: 24px;
}

.hm-nav-sell:hover,
.hm-nav-sell.active {
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--green));
}

@media (min-width:1025px) {
  .hm-bottom-nav {
    display: none;
  }

  .app-body {
    padding-bottom: 0;
  }
}

/* ============ FORM ELEMENTS (Sell page) ============ */
.app-form-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 26px;
  margin-bottom: 18px;
}

.app-form-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: .03em;
  margin: 16px 0 8px;
}

.app-form-label:first-child {
  margin-top: 0;
}

.app-input,
.app-select,
.app-textarea {
  width: 100%;
  padding: 13px 15px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  font-family: inherit;
  font-size: 14.5px;
  color: var(--ink);
  background: #fff;
}

.app-input:focus,
.app-select:focus,
.app-textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.app-textarea {
  resize: vertical;
  min-height: 100px;
}

.app-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='3'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

.app-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.app-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.app-toggle-row:first-of-type {
  border-top: none;
}

.app-toggle-row input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.app-toggle-track {
  width: 42px;
  height: 24px;
  border-radius: 99px;
  background: var(--line);
  position: relative;
  transition: background .2s ease;
  flex-shrink: 0;
}

.app-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
  transition: transform .2s ease;
}

.app-toggle-row input:checked~.app-toggle-track {
  background: var(--blue);
}

.app-toggle-row input:checked~.app-toggle-track .app-toggle-thumb {
  transform: translateX(18px);
}

/* Condition tier picker */
.app-condition-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.app-condition-card {
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 13px 14px;
  text-align: left;
  background: #fff;
  transition: all .2s ease;
}

.app-condition-card:hover {
  border-color: var(--blue);
}

.app-condition-card.selected {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.app-cond-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
}

.app-cond-name {
  font-weight: 800;
  font-size: 13.5px;
}

.app-cond-desc {
  font-size: 11px;
  color: var(--ink-soft);
  margin-top: 3px;
  line-height: 1.4;
}

/* Photo upload */
.app-photo-upload {
  width: 100%;
  min-height: 150px;
  border-radius: 16px;
  border: 2px dashed var(--line);
  background: var(--bg-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  overflow: hidden;
  position: relative;
  transition: all .2s ease;
}

.app-photo-upload.dragging {
  border-color: var(--blue);
  background: rgba(37, 99, 235, 0.06);
}

.app-photo-upload img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.app-photo-hint {
  font-size: 12px;
  color: var(--ink-soft);
  font-weight: 600;
}

.app-submit-row {
  position: sticky;
  bottom: 82px;
  padding-top: 6px;
}

@media (min-width:1025px) {
  .app-submit-row {
    position: static;
  }
}

.app-submit-btn {
  width: 100%;
  min-height: 52px;
  font-size: 15.5px;
}

/* ============ PROFILE PAGE ============ */
.app-profile-hero {
  background: linear-gradient(160deg, rgba(37, 99, 235, 0.08), rgba(16, 185, 129, 0.10));
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 28px 24px;
  text-align: center;
  margin-bottom: 20px;
}

.app-profile-avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  margin: 0 auto 14px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--blue), var(--green));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 32px;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.3);
}

.app-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Guests get a plain grey placeholder, not the blue/green gradient used
   for a real signed-in person's initials. */
.app-profile-avatar.is-guest {
  background: #E5E7EB;
  color: #8A8F98;
  box-shadow: none;
}

.app-profile-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 21px;
}

.app-profile-meta {
  font-size: 13.5px;
  color: var(--ink-soft);
  margin-top: 4px;
}

.app-profile-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 14px;
}

.app-badge-pill {
  font-size: 11.5px;
  font-weight: 700;
  background: rgba(37, 99, 235, 0.08);
  color: var(--blue);
  padding: 6px 12px;
  border-radius: 99px;
}

.app-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 22px;
}

.app-stat-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 8px;
  text-align: center;
}

.app-stat-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  color: var(--blue);
}

.app-stat-label {
  font-size: 11px;
  color: var(--ink-soft);
  font-weight: 600;
  margin-top: 2px;
}

.app-section-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16.5px;
  margin: 24px 0 12px;
}

.app-listing-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  margin-bottom: 10px;
}

.app-listing-cover {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.app-listing-info {
  flex: 1;
  min-width: 0;
}

.app-listing-title {
  font-weight: 700;
  font-size: 13.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-listing-meta {
  font-size: 11.5px;
  color: var(--ink-soft);
  margin-top: 2px;
}

.app-listing-price {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--green);
  font-size: 14px;
  flex-shrink: 0;
}

.app-signout-btn {
  width: 100%;
  margin-top: 8px;
  color: #DC2626;
  border-color: #FECACA;
  background: #FEF2F2;
}

/* ============ PROFILE: My Orders quick link ============ */
.app-orders-link {
  display: flex; align-items: center; gap: 12px;
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  padding: 14px 16px; margin-bottom: 22px; text-decoration: none;
  transition: border-color .15s ease;
}
.app-orders-link:hover { border-color: var(--blue); }
.app-orders-link-icon {
  width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
  background: rgba(37,99,235,.08); display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.app-orders-link-text { flex: 1; min-width: 0; }
.app-orders-link-title { display: block; font-weight: 700; font-size: 14px; color: var(--ink); }
.app-orders-link-sub { display: block; font-size: 11.5px; color: var(--ink-soft); margin-top: 1px; }
.app-orders-link-badge {
  background: var(--green); color: #fff; font-size: 11px; font-weight: 800;
  min-width: 20px; height: 20px; border-radius: 99px; align-items: center; justify-content: center;
  padding: 0 6px; flex-shrink: 0;
}
.app-orders-link-arrow { font-size: 20px; color: var(--ink-soft); flex-shrink: 0; }

/* ============ ORDERS PAGE ============ */
.ord-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  margin-bottom: 14px;
}

.ord-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ord-card-cover {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  overflow: hidden;
}

.ord-card-cover img { width: 100%; height: 100%; object-fit: cover; }

.ord-card-info { flex: 1; min-width: 0; }

.ord-card-title {
  font-weight: 700;
  font-size: 14.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ord-card-meta {
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 2px;
}

.ord-card-price {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--green);
  font-size: 15px;
  margin-top: 4px;
}

.ord-status {
  font-size: 11px;
  font-weight: 800;
  padding: 6px 11px;
  border-radius: 99px;
  white-space: nowrap;
  flex-shrink: 0;
}

.ord-pending { background: rgba(245, 158, 11, 0.12); color: #92400E; }
.ord-confirmed { background: rgba(37, 99, 235, 0.1); color: var(--blue); }
.ord-done { background: rgba(16, 185, 129, 0.1); color: var(--green); }
.ord-cancelled { background: rgba(220, 38, 38, 0.1); color: #DC2626; }

.ord-card-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.ord-btn { flex: 1; min-height: 40px; font-size: 13px; }
.ord-cancel { color: #DC2626; }

/* ============ PROFILE: read-only detail rows ============ */
.app-detail-rows { display: flex; flex-direction: column; }
.app-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
}
.app-detail-row:last-child { border-bottom: none; }
.app-detail-label { color: var(--ink-soft); }
.app-detail-value { font-weight: 700; text-align: right; }

/* ============ PROFILE EDIT: education-type pills ============ */
.app-pill-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.app-pill {
  padding: 9px 16px;
  border-radius: 99px;
  border: 1.5px solid var(--line);
  background: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.15s ease;
}
.app-pill:hover { border-color: var(--blue); }
.app-pill.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

/* ============ PROFILE EDIT: institution search dropdown ============ */
.app-inst-list {
  max-height: 220px;
  overflow-y: auto;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  margin: 8px 0 14px;
}
.app-inst-option {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border: none;
  border-bottom: 1px solid var(--line);
  background: #fff;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}
.app-inst-option:last-child { border-bottom: none; }
.app-inst-option:hover { background: #F7F8FA; }
.app-inst-option.selected { background: rgba(37, 99, 235, 0.08); }
.app-inst-option-name { font-size: 13px; font-weight: 600; }
.app-inst-option-city { font-size: 11.5px; color: var(--ink-soft); flex-shrink: 0; }
.app-inst-empty { padding: 14px; font-size: 12.5px; color: var(--ink-soft); text-align: center; }

/* ============ EMPTY STATE (shared across Cart, Orders, Profile, Book Details) ============ */
.empty-state {
  text-align: center;
  padding: 70px 20px;
}

.empty-state-emoji {
  font-size: 44px;
  margin-bottom: 10px;
}

/* ============ CUSTOM LOADING SPINNER ============
   Shown above the skeleton while a listing is fetched. If the request
   times out or the network drops, init() swaps this whole view for the
   error state below instead of leaving it spinning forever. */
.vd-loading-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 46px 20px 6px;
}
.vd-spinner {
  position: relative;
  width: 40px;
  height: 40px;
}
.vd-spinner div {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: var(--blue);
  animation: vdSpin 1.1s cubic-bezier(.5,0,.5,1) infinite;
}
.vd-spinner div:nth-child(2) { border-top-color: var(--green); animation-delay: -.15s; inset: 5px; }
.vd-spinner div:nth-child(3) { border-top-color: #F59E0B; animation-delay: -.3s; inset: 10px; }
.vd-spinner div:nth-child(4) { border-top-color: #DC2626; animation-delay: -.45s; inset: 15px; }
@keyframes vdSpin { to { transform: rotate(360deg); } }
.vd-loading-text {
  font-size: 13px;
  color: var(--ink-soft);
  font-weight: 600;
}
.vd-error-icon {
  color: #DC2626;
  display: inline-flex;
}

/* ============ VIEW DETAILS — SKELETON LOADER ============
   Mirrors the real layout below (cover / title / meta / price / tags /
   description / seller card / actions) so the page doesn't jump around
   once the real content swaps in. */
@keyframes vdShimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.vd-skel-block {
  border-radius: 12px;
  background: linear-gradient(90deg, #EEF0F4 25%, #F7F8FA 37%, #EEF0F4 63%);
  background-size: 800px 100%;
  animation: vdShimmer 1.4s ease-in-out infinite;
}
.vd-skel-cover {
  aspect-ratio: 1 / 1;
  height: auto;
  border-radius: 20px;
  margin-bottom: 0;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* A simple "structure" glyph (a little building) drawn in the middle of the
   cover skeleton, so the loading state reads as "a listing is being built"
   rather than a blank shimmering box. */
.vd-skel-cover svg { width: 56px; height: 56px; opacity: .35; position: relative; z-index: 1; }
.vd-skel-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}
@media (min-width: 900px) {
  .vd-skel-grid { grid-template-columns: minmax(280px, 440px) 1fr; align-items: start; }
}
.vd-skel-title { height: 22px; width: 78%; margin-bottom: 10px; }
.vd-skel-meta { height: 14px; width: 55%; margin-bottom: 18px; }
.vd-skel-price { height: 30px; width: 40%; margin-bottom: 20px; }
.vd-skel-tags { display: flex; gap: 8px; margin-bottom: 22px; }
.vd-skel-tag { height: 26px; width: 92px; border-radius: 99px; }
.vd-skel-desc-line { height: 13px; width: 100%; margin-bottom: 9px; }
.vd-skel-desc-line:nth-child(2) { width: 90%; }
.vd-skel-desc-line:nth-child(3) { width: 65%; margin-bottom: 24px; }
.vd-skel-seller {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  margin-bottom: 22px;
}
.vd-skel-avatar { width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0; }
.vd-skel-seller-lines { flex: 1; }
.vd-skel-seller-lines .vd-skel-block:first-child { height: 14px; width: 55%; margin-bottom: 8px; }
.vd-skel-seller-lines .vd-skel-block:last-child { height: 12px; width: 75%; }
.vd-skel-actions { display: flex; gap: 12px; }
.vd-skel-btn { height: 52px; flex: 1; border-radius: 14px; }

/* ============ VIEW DETAILS PAGE — e-commerce PDP layout ============ */
.vd-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

@media (min-width: 900px) {
  .vd-grid {
    grid-template-columns: minmax(280px, 440px) 1fr;
    align-items: start;
  }
}

/* ---- Gallery (left column) ---- */
.vd-gallery { position: relative; }

.vd-gallery-main {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 20px;
  background: #F3F4F7;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* object-fit:contain (not cover) is the fix for "stretched" product photos —
   the whole image is shown, un-cropped and un-distorted, on a neutral
   background, the way Amazon/Flipkart-style listings render photos. */
.vd-gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.vd-cover-emoji {
  font-size: 84px;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, .15));
}

.vd-wish-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  z-index: 2;
}

.vd-badges {
  position: absolute;
  top: 14px;
  left: 14px;
  display: flex;
  gap: 8px;
  z-index: 2;
}

.vd-badges span {
  background: rgba(255, 255, 255, 0.92);
  font-size: 11px;
  font-weight: 800;
  padding: 5px 10px;
  border-radius: 8px;
}

.vd-thumb-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-top: 10px;
}

.vd-thumb {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid transparent;
  opacity: 0.65;
  background: #F3F4F7;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .15s ease, border-color .15s ease;
}

.vd-thumb.active {
  border-color: var(--blue);
  opacity: 1;
}

.vd-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---- Info (right column) ---- */
.vd-info { min-width: 0; }

.vd-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 23px;
  line-height: 1.3;
  margin-bottom: 6px;
}

.vd-meta {
  font-size: 13.5px;
  color: var(--ink-soft);
  margin-bottom: 14px;
}

.vd-rating-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.vd-rating-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(16, 185, 129, 0.1);
  color: var(--green);
  font-weight: 800;
  font-size: 12.5px;
  padding: 3px 8px;
  border-radius: 6px;
}

.vd-price-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.vd-price-now {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 32px;
  color: var(--ink);
}

.vd-price-old {
  font-size: 16px;
  color: #B0B5BE;
  text-decoration: line-through;
}

.vd-price-off {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--green);
  background: rgba(16, 185, 129, 0.1);
  padding: 4px 10px;
  border-radius: 8px;
}

.vd-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.vd-tag {
  font-size: 11.5px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 99px;
}

.vd-tag.cond {
  background: rgba(37, 99, 235, 0.08);
  color: var(--blue);
}

.vd-tag.neg {
  background: rgba(16, 185, 129, 0.1);
  color: var(--green);
}

.vd-tag.bundle {
  background: rgba(124, 58, 237, 0.1);
  color: #7C3AED;
}

/* Buy box — actions grouped in their own bordered panel like a standard
   PDP "buy box", sitting above the seller card. */
.vd-buybox {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 22px;
  background: #fff;
}

.vd-actions {
  display: flex;
  gap: 12px;
  position: sticky;
  bottom: 82px;
}

@media (min-width: 1025px) {
  .vd-actions { position: static; }
}

.vd-actions .btn {
  flex: 1;
  min-height: 52px;
  font-size: 15px;
}

.vd-buy-now {
  background: var(--green);
  border-color: var(--green);
}

.vd-buy-now:hover { filter: brightness(0.96); }

.vd-actions-note {
  font-size: 11.5px;
  color: var(--ink-soft);
  text-align: center;
  margin-top: 10px;
}

.vd-bundle-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 22px;
}

.vd-bundle-item {
  text-align: center;
}

.vd-bundle-cover {
  aspect-ratio: 1;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-size: 24px;
  margin-bottom: 6px;
  background: #F3F4F7;
}

.vd-bundle-cover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.vd-bundle-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vd-seller-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  margin-bottom: 22px;
}

.vd-seller-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--green));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-family: var(--font-display);
  flex-shrink: 0;
}

.vd-seller-info {
  flex: 1;
  min-width: 0;
}

.vd-seller-name {
  font-weight: 700;
  font-size: 14.5px;
}

.vd-seller-sub {
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 2px;
}

.vd-desc-head {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
}

.vd-desc {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--ink);
  margin-bottom: 24px;
}

.vd-similar-row {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 6px;
}