/* ==========================================================================
   Wholesale Offers - 5-Second Deal Drop Mobile Stylesheet
   wholesaleoffers.com (Pure Mobile First Split-Decision Architecture)
   ========================================================================== */

:root {
  --bg-dark: #04060a;
  --bg-surface: #0a0f1d;
  --bg-card: #0f172a;
  --bg-modal: #111827;

  --brand-red: #ef4444;
  --brand-red-light: #f87171;
  --brand-crimson: #dc2626;
  --brand-gradient: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);

  --accent-emerald: #10b981;
  --accent-emerald-light: #34d399;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.16);

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  height: 100dvh;
  width: 100vw;
  overflow: hidden;
  position: fixed;
}

.mobile-app-shell {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  max-width: 440px;
  margin: 0 auto;
  position: relative;
  background: var(--bg-surface);
  padding-bottom: max(16px, env(safe-area-inset-bottom));
}

/* Slim Topbar */
.mobile-app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px;
  background: rgba(4, 6, 10, 0.98);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 10;
  flex-shrink: 0;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.app-logo {
  height: 32px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 6px rgba(239, 68, 68, 0.5));
}

.brand-title {
  font-family: 'Outfit', sans-serif;
  font-size: 0.88rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  display: block;
  line-height: 1.1;
}

.batch-ticker {
  font-size: 0.62rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
}

.pulse-red {
  width: 5px;
  height: 5px;
  background: var(--brand-red);
  border-radius: 50%;
  box-shadow: 0 0 5px var(--brand-red);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-header-pill {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 99px;
  cursor: pointer;
}

.btn-cart-bubble {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fff;
  padding: 4px 8px;
  border-radius: 99px;
  font-size: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 3px;
}

.bubble-badge {
  background: var(--brand-red);
  font-size: 0.6rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 99px;
}

.btn-header-icon {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: #fff;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  cursor: pointer;
}

/* 5-Second Card Viewport */
.single-card-viewport {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 8px 12px 6px 12px;
  overflow: hidden;
  justify-content: center;
}

.offer-decision-card {
  height: 100%;
  max-height: calc(100dvh - 85px);
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  padding: 10px 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.7);
  transition: transform 0.22s ease, opacity 0.22s ease;
  position: relative;
  justify-content: space-between;
}

.offer-decision-card.anim-left {
  transform: translateX(-120%) rotate(-12deg);
  opacity: 0;
}

.offer-decision-card.anim-right {
  transform: translateX(120%) rotate(12deg);
  opacity: 0;
}

/* 1. Title Above Image */
.card-header-top {
  margin-bottom: 6px;
  flex-shrink: 0;
}

.category-discount-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3px;
}

.badge-discount {
  font-size: 0.62rem;
  font-weight: 800;
  background: var(--brand-red);
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.badge-category {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.card-counter-tag {
  font-size: 0.62rem;
  color: var(--text-muted);
  font-weight: 700;
}

.card-title-top {
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.2;
  color: #fff;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 2. Big Hero Product Image (Constrained to 165px for soft nav safety) */
.card-hero-image-container {
  position: relative;
  width: 100%;
  height: 165px;
  max-height: 23vh;
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.card-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stock-pill-overlay {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--accent-emerald-light);
  padding: 2px 6px;
  border-radius: 4px;
}

/* 3. Details Pop-up Link */
.details-link-row {
  text-align: center;
  margin: 4px 0;
  flex-shrink: 0;
}

.btn-link-details {
  background: none;
  border: none;
  color: #38bdf8;
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
}

/* 4. Pricing Strip */
.pricing-strip-box {
  display: grid;
  grid-template-columns: 1fr 1.3fr 1fr;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 6px 4px;
  text-align: center;
  margin-bottom: 6px;
  flex-shrink: 0;
}

.price-block .price-lbl {
  display: block;
  font-size: 0.55rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 1px;
}

.price-val-strike {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

.price-val-hero {
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--brand-red-light);
  line-height: 1;
}

.price-val-offer {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-emerald-light);
}

/* 5. Action Control Bar (Thumbs Down Left, Buy Center Stepper, Thumbs Up Right) */
.decision-action-bar {
  display: grid;
  grid-template-columns: 52px 1fr 52px;
  gap: 8px;
  align-items: center;
  padding-top: 2px;
  flex-shrink: 0;
}

.btn-thumb {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid var(--border-medium);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.12s ease;
}

.btn-thumb:active {
  transform: scale(0.92);
}

.btn-thumb.pass {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.4);
}

.btn-thumb.save {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.4);
}

.thumb-icon {
  font-size: 1.15rem;
  line-height: 1;
}

.thumb-label {
  font-size: 0.55rem;
  font-weight: 800;
  text-transform: uppercase;
  margin-top: 2px;
  color: var(--text-secondary);
}

.stepper-buy-combo {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.quantity-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 2px 6px;
}

.btn-step {
  width: 26px;
  height: 22px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  border-radius: 3px;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stepper-count {
  font-size: 0.68rem;
  font-weight: 800;
  color: #fff;
}

.btn-buy-instant {
  background: var(--brand-gradient);
  color: #fff;
  border: none;
  padding: 9px 6px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: center;
  box-shadow: 0 3px 12px rgba(239, 68, 68, 0.45);
}

.buy-label {
  display: block;
  font-family: 'Outfit', sans-serif;
  font-size: 0.88rem;
  font-weight: 900;
}

/* Skip Action Row */
.skip-action-row {
  text-align: center;
  margin-top: 4px;
  flex-shrink: 0;
}

.btn-skip-text {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.65rem;
  font-weight: 700;
  cursor: pointer;
}

.btn-skip-text:hover {
  color: #fff;
}

/* Zero State View */
.zero-offers-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  padding: 28px 20px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.7);
}

.zero-icon {
  font-size: 2.8rem;
  margin-bottom: 12px;
}

.zero-offers-card h2 {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.zero-sub {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 20px;
}

.zero-action-buttons {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.btn-zero-primary {
  background: var(--brand-gradient);
  color: #fff;
  border: none;
  padding: 12px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
}

.btn-zero-secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-medium);
  color: #fff;
  padding: 10px;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.zero-footer-note {
  font-size: 0.65rem;
  color: var(--text-muted);
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-backdrop.active {
  display: flex;
}

.modal-card {
  width: 100%;
  max-width: 380px;
  background: var(--bg-modal);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 18px;
  max-height: 85vh;
  overflow-y: auto;
  animation: zoomIn 0.18s ease-out;
}

@keyframes zoomIn {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.btn-close-modal {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
}

.modal-desc-text {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.35;
  margin-bottom: 12px;
}

.modal-specs-table {
  background: rgba(0, 0, 0, 0.35);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  margin-bottom: 12px;
}

.spec-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  padding: 3px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.spec-row:last-child {
  border-bottom: none;
}

.manifest-list-box {
  background: rgba(0, 0, 0, 0.35);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-size: 0.7rem;
}

.manifest-item-line {
  display: flex;
  justify-content: space-between;
}

.modal-list-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 250px;
  overflow-y: auto;
  margin-bottom: 10px;
}

.modal-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
}

.modal-list-item strong {
  display: block;
  font-size: 0.78rem;
}

.modal-list-item small {
  font-size: 0.65rem;
  color: var(--text-secondary);
}

.btn-item-action {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-medium);
  color: #fff;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.65rem;
  font-weight: 700;
  cursor: pointer;
}

.sheet-cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.8rem;
}

.cart-total-summary {
  margin-top: 12px;
  background: rgba(0, 0, 0, 0.35);
  padding: 10px;
  border-radius: var(--radius-sm);
}

.summary-line {
  display: flex;
  justify-content: space-between;
  font-size: 0.74rem;
  margin-bottom: 3px;
  color: var(--text-secondary);
}

.summary-line.grand {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.85rem;
  font-weight: 800;
  color: #fff;
}

.text-green { color: var(--accent-emerald-light); }
.text-red { color: var(--brand-red-light); }
.text-muted { color: var(--text-muted); }
