/* Custom UI Polish & Mobile Drawer Animations for IT PLAZA */

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Custom subtle scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #f8f9ff;
}

::-webkit-scrollbar-thumb {
  background: #c3c6d7;
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: #737686;
}

/* Mobile Drawer Transitions */
#mobile-menu-drawer {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

#mobile-menu-backdrop {
  transition: opacity 0.3s ease;
}

#mobile-menu-drawer.drawer-closed {
  transform: translateX(100%);
  pointer-events: none;
}

#mobile-menu-drawer.drawer-open {
  transform: translateX(0);
  pointer-events: auto;
}

#mobile-menu-backdrop.backdrop-hidden {
  opacity: 0;
  pointer-events: none;
}

#mobile-menu-backdrop.backdrop-visible {
  opacity: 1;
  pointer-events: auto;
}

/* Card hover elevations */
.product-card-hover {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-card-hover:hover {
  transform: translateY(-4px);
}

/* Heart Icon Animations */
.heart-icon {
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

button:hover .heart-icon {
  transform: scale(1.15);
}

/* Diagnostic Modal Keyframe Animations */
@keyframes modalZoomIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.animate-in {
  animation: modalZoomIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Toast Notification Polish */
#it-plaza-toast {
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.2);
}

/* Modern Tech Startup Visual Utilities */
.hero-radial-glow {
  background: radial-gradient(1200px circle at 50% -10%, rgba(37, 99, 235, 0.07), transparent 70%),
              radial-gradient(800px circle at 85% 20%, rgba(13, 148, 136, 0.05), transparent 60%);
}

.tech-dot-grid {
  background-image: radial-gradient(rgba(100, 116, 139, 0.12) 1px, transparent 1px);
  background-size: 24px 24px;
}

.glass-dock {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.beacon-pulse {
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: beaconPulse 2s infinite cubic-bezier(0.66, 0, 0, 1);
}

@keyframes beaconPulse {
  to {
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
  }
}

/* Hero Workbench Tabs */
.wb-tab {
  transition: all 0.2s ease;
}
.wb-tab.active {
  background: #0052cc;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 82, 204, 0.25);
}

/* FAQ Accordion Transitions */
.faq-item details summary::-webkit-details-marker {
  display: none;
}
.faq-item details[open] .faq-icon {
  transform: rotate(180deg);
}
.faq-icon {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Sticky Action Dock */
#sticky-quick-dock {
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}
#sticky-quick-dock.dock-hidden {
  transform: translate(-50%, 100px);
  opacity: 0;
  pointer-events: none;
}
#sticky-quick-dock.dock-visible {
  transform: translate(-50%, 0);
  opacity: 1;
  pointer-events: auto;
}


/* ============================================================
   HERO SECTION — Premium Light Mode
   ============================================================ */

.hero-light-gradient {
  background: linear-gradient(135deg, #f8f9ff 0%, #eef3ff 55%, #f0fbf6 100%);
  position: relative;
}
.hero-light-gradient::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(0, 74, 198, 0.06) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  z-index: 0;
}
.hero-light-gradient::after {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(0, 98, 67, 0.07) 0%, rgba(0, 74, 198, 0.05) 50%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.gradient-text-accent {
  background: linear-gradient(135deg, #004ac6 0%, #0066ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-glass-card {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(0,74,198,0.12);
  border-top: 3px solid #004ac6;
  border-radius: 0.875rem;
  padding: 0.875rem 1rem;
  box-shadow: 0 4px 16px -4px rgba(0,74,198,0.06);
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.stat-glass-card:hover {
  box-shadow: 0 10px 28px -6px rgba(0,74,198,0.12);
  transform: translateY(-2px);
  border-color: rgba(0,74,198,0.25);
}

.workbench-widget {
  box-shadow: 0 0 0 1px rgba(0,74,198,0.15), 0 20px 60px -12px rgba(0,74,198,0.12), 0 8px 24px -8px rgba(0,0,0,0.08);
  border-radius: 1rem;
  overflow: hidden;
}
@keyframes scanLine {
  0%   { transform: translateY(-100%); opacity: 0.7; }
  100% { transform: translateY(300%);  opacity: 0; }
}
.scan-line-anim {
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(0,74,198,0.4), transparent);
  animation: scanLine 3.5s linear infinite;
  pointer-events: none;
}

/* ============================================================
   BRAND SECTION — Premium Cards
   ============================================================ */

.brand-card-lift {
  position: relative;
  border: 1px solid rgba(195,198,215,0.35);
  transition: transform 0.25s cubic-bezier(0.16,1,0.3,1), box-shadow 0.25s ease, border-color 0.2s ease;
}
.brand-card-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px -8px rgba(0,74,198,0.12);
  border-color: rgba(0,74,198,0.3);
}

/* Brand badges on cards */
.brand-badge-chip {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 10px;
  border-radius: 9999px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  white-space: nowrap;
}

/* Brand icon containers */
.brand-icon-apple   { background: #f5f5f7; }
.brand-icon-lenovo  { background: #eff4ff; border: 1px solid rgba(0,74,198,0.15); }
.brand-icon-dell    { background: #eff4ff; }
.brand-icon-hp      { background: #eff4ff; }
.brand-icon-asus    { background: #eff4ff; }

/* ============================================================
   SCROLLING PRICE MARQUEE STRIP
   ============================================================ */

.marquee-wrapper {
  overflow: hidden; white-space: nowrap;
  mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}
@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.marquee-track {
  display: inline-flex;
  animation: marqueeScroll 28s linear infinite;
}
.marquee-track:hover { animation-play-state: paused; }

/* ============================================================
   HERO CTA BUTTONS
   ============================================================ */

.cta-primary {
  background: #004ac6; color: #ffffff;
  box-shadow: 0 4px 16px rgba(0,74,198,0.3);
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}
.cta-primary:hover { background: #003aa0; box-shadow: 0 8px 24px rgba(0,74,198,0.4); transform: translateY(-1px); }
.cta-whatsapp {
  background: #ffffff; color: #25D366;
  border: 2px solid #25D366;
  box-shadow: 0 2px 8px rgba(37,211,102,0.15);
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease, color 0.2s ease;
}
.cta-whatsapp:hover {
  background: #25D366;
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(37,211,102,0.3);
  transform: translateY(-1px);
}
.cta-whatsapp:hover svg { fill: #ffffff; }

/* ============================================================
   SUPER DEALS SECTION ENHANCEMENTS
   ============================================================ */

/* Section top accent strip */
.deals-section-accent {
  position: relative;
}
.deals-section-accent::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #004ac6 0%, #25D366 50%, #004ac6 100%);
  z-index: 1;
}

/* Deal card hover: lift + ring glow */
.deal-card-hover {
  transition: transform 0.25s cubic-bezier(0.16,1,0.3,1), box-shadow 0.25s ease, outline 0.2s ease;
}
.deal-card-hover:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 48px -8px rgba(0,0,0,0.14);
  outline: 2px solid rgba(0,74,198,0.22);
  outline-offset: 0px;
}

/* Grade badge standardized */
.grade-mint {
  background: rgba(37,211,102,0.1);
  color: #0b1c30;
  border: 1px solid rgba(37,211,102,0.3);
  font-weight: 700;
}
.grade-pristine {
  background: #dbeafe;
  color: #1d4ed8;
  border: 1px solid rgba(29,78,216,0.25);
  font-weight: 700;
}

/* OFF badge strong */
.off-badge {
  background: #004ac6;
  color: #ffffff;
  font-weight: 800;
  letter-spacing: 0.02em;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,74,198,0.25);
}

/* WhatsApp reserve button */
.btn-whatsapp-reserve {
  background: #25D366;
  color: #ffffff;
  font-weight: 700;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  box-shadow: 0 3px 12px rgba(37,211,102,0.25);
}
.btn-whatsapp-reserve:hover {
  background: #1ebe5d;
  box-shadow: 0 6px 18px rgba(37,211,102,0.35);
  transform: translateY(-1px);
}

/* Savings amount display */
.savings-display {
  color: #0d8a43;
  font-weight: 800;
  font-size: 13px;
}

/* Pulse urgency dot */
@keyframes urgencyPulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(1.4); }
}
.urgency-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #004ac6;
  animation: urgencyPulse 1.4s ease-in-out infinite;
  display: inline-block;
  flex-shrink: 0;
}

/* ============================================================
   FRESH STOCK SECTION ENHANCEMENTS
   ============================================================ */

/* Fresh product card hover */
.fresh-card-hover {
  transition: transform 0.25s cubic-bezier(0.16,1,0.3,1), box-shadow 0.25s ease, outline 0.2s ease;
}
.fresh-card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px -8px rgba(0,0,0,0.12);
  outline: 1px solid rgba(0,74,198,0.18);
  outline-offset: 0px;
}
.fresh-card-hover:hover img {
  transform: scale(1.04);
}

/* Hub location pill */
.hub-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(0,74,198,0.06);
  color: #004ac6;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 9999px;
  border: 1px solid rgba(0,74,198,0.18);
}

/* Spec pill badges */
.spec-pill {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  color: #334155;
  font-weight: 600;
}

/* Micro-spec box inside cards */
.spec-box-micro {
  background: #f8fafc;
  border: 1px solid rgba(195,198,215,0.35);
  border-radius: 8px;
  padding: 6px 4px;
  text-align: center;
  transition: border-color 0.2s ease;
}
.fresh-card-hover:hover .spec-box-micro {
  border-color: rgba(0,74,198,0.25);
}

/* Savings % chip */
.savings-pct-chip {
  display: inline-flex;
  align-items: center;
  background: rgba(37,211,102,0.12);
  color: #0d8a43;
  border: 1px solid rgba(37,211,102,0.25);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 9999px;
}

/* Filter tab active style */
.filter-tab-active {
  background: #004ac6 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(0,74,198,0.25);
}

/* Primary action button (View Specs) */
.btn-view-specs {
  background: #eef3ff;
  color: #004ac6;
  border: 1px solid rgba(0,74,198,0.2);
  font-weight: 700;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}
.btn-view-specs:hover {
  background: #dbeafe;
  box-shadow: 0 2px 8px rgba(0,74,198,0.15);
}

/* WhatsApp icon button on fresh cards */
.btn-wa-icon {
  background: rgba(37,211,102,0.1);
  color: #25D366;
  border: 1px solid rgba(37,211,102,0.25);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-wa-icon:hover {
  background: #25D366;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(37,211,102,0.3);
}
.btn-wa-icon:hover svg {
  fill: #ffffff;
}

/* Interactive Finder Choice Card */
.finder-card {
  border: 1.5px solid rgba(195,198,215,0.45);
  border-radius: 16px;
  background: #ffffff;
  padding: 16px 18px;
  transition: all 0.2s cubic-bezier(0.16,1,0.3,1);
  cursor: pointer;
  text-align: left;
}
.finder-card:hover {
  border-color: #004ac6;
  background: rgba(0,74,198,0.02);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -4px rgba(0,74,198,0.09);
}

/* Interactive Grade Selector Pill */
.grade-select-pill {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1.5px solid rgba(195,198,215,0.45);
  background: #ffffff;
  transition: all 0.2s ease;
}
.grade-select-pill:has(input:checked) {
  border-color: #004ac6;
  background: rgba(0,74,198,0.06);
  box-shadow: 0 2px 8px rgba(0,74,198,0.1);
}

/* ============================================================
   SECTIONS POLISH — 4-Pillar, Wizard, Calculator, Trust, FAQ, Form
   ============================================================ */

/* Pillar card hover */
.pillar-card {
  transition: transform 0.22s cubic-bezier(0.16,1,0.3,1), box-shadow 0.22s ease;
}
.pillar-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px -6px rgba(0,0,0,0.10);
}

/* Wizard option button */
.wizard-option {
  border: 1.5px solid #e2e8f0;
  background: #fff;
  border-radius: 14px;
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
}
.wizard-option:hover {
  border-color: #004ac6;
  background: #f0f5ff;
  box-shadow: 0 2px 12px rgba(0,74,198,0.10);
  transform: translateY(-1px);
}
.wizard-option.selected {
  border-color: #004ac6;
  background: #eef3ff;
  box-shadow: 0 2px 12px rgba(0,74,198,0.15);
}

/* Stat bordered card */
.stat-card {
  background: #ffffff;
  border: 1px solid rgba(0,74,198,0.12);
  border-top: 3px solid #004ac6;
  border-radius: 16px;
  padding: 20px 16px;
  text-align: center;
  box-shadow: 0 2px 12px -4px rgba(0,74,198,0.06);
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.stat-card:hover {
  box-shadow: 0 8px 24px -4px rgba(0,74,198,0.14);
  transform: translateY(-2px);
  border-color: rgba(0,74,198,0.3);
}

/* Review card with left accent */
.review-card {
  position: relative;
  border-left: 4px solid rgba(0,74,198,0.25);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.review-card:hover {
  border-left-color: rgba(0,74,198,0.55);
  box-shadow: 0 8px 24px -4px rgba(0,0,0,0.09);
}
.review-quote-icon {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 48px;
  line-height: 1;
  color: rgba(0,74,198,0.06);
  font-family: Georgia, serif;
  font-weight: 900;
  pointer-events: none;
  user-select: none;
}

/* FAQ open state */
.faq-item.open {
  border-left: 4px solid rgba(0,74,198,0.5) !important;
  background: rgba(0,74,198,0.015);
}
.faq-item {
  border-left: 4px solid transparent;
  transition: border-color 0.2s ease, background 0.2s ease;
}

/* FAQ category icon */
.faq-cat-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(0,74,198,0.08);
  color: #004ac6;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Premium form input */
.form-input-premium {
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
  padding: 10px 14px;
  width: 100%;
  font-family: inherit;
  font-size: 14px;
  color: #1e293b;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  outline: none;
}
.form-input-premium:focus {
  border-color: #004ac6;
  box-shadow: 0 0 0 3px rgba(0,74,198,0.12);
}
.form-input-premium::placeholder {
  color: #94a3b8;
}
select.form-input-premium {
  cursor: pointer;
}

/* ============================================================
   HEADER & FOOTER POLISH
   ============================================================ */

/* Header scroll shadow */
header { transition: box-shadow 0.25s ease, background 0.25s ease; }
header.scrolled { box-shadow: 0 2px 24px -4px rgba(0,0,0,0.10); }

/* Nav active underline */
.nav-link-active {
  color: #004ac6;
  font-weight: 700;
  border-bottom: 2px solid #004ac6;
  padding-bottom: 2px;
}

/* Footer Light */
.footer-light {
  background: #ffffff;
}
.footer-col-heading {
  color: #0b1c30;
  font-weight: 700;
  padding-bottom: 8px;
  border-bottom: 1.5px solid rgba(0,74,198,0.2);
  margin-bottom: 12px;
  display: block;
}
.footer-location-card {
  background: #f8fafc;
  border: 1px solid rgba(195,198,215,0.4);
  border-radius: 12px;
  padding: 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.footer-location-card:hover {
  border-color: rgba(0,74,198,0.3);
  box-shadow: 0 2px 10px rgba(0,74,198,0.05);
}

/* ============================================================
   AUTHENTIC IT PLAZA REAL STORE & COMPARISON STYLES
   ============================================================ */

/* Brand Seal Badge */
.brand-seal-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e11d48 0%, #be123c 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(225,29,72,0.3);
  border: 2px solid #ffffff;
  flex-shrink: 0;
}

/* Comparison Table */
.comparison-table-wrapper {
  overflow-x: auto;
  border-radius: 1.25rem;
  box-shadow: 0 4px 24px -6px rgba(0,74,198,0.08);
}
.comparison-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
.comparison-table th, .comparison-table td {
  padding: 1rem 1.25rem;
}
.comparison-table tr:not(:last-child) td {
  border-bottom: 1px solid #eef3ff;
}
.comparison-badge-pro {
  background: rgba(37,211,102,0.12);
  color: #0b1c30;
  font-weight: 700;
  border: 1px solid rgba(37,211,102,0.35);
  border-radius: 9999px;
  padding: 4px 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}
.comparison-badge-risk {
  background: #fee2e2;
  color: #991b1b;
  font-weight: 600;
  border: 1px solid #fca5a5;
  border-radius: 9999px;
  padding: 4px 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

/* E-Mall Store Badge & Cards */
.store-feature-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  padding: 6px 14px;
  border-radius: 9999px;
  border: 1px solid rgba(0,74,198,0.15);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  font-size: 12px;
  font-weight: 600;
  color: #0b1c30;
}
.metro-badge {
  background: #2563eb;
  color: #ffffff;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* WhatsApp Pulse Live Status */
.whatsapp-online-beacon {
  width: 9px;
  height: 9px;
  background: #25D366;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(37,211,102,0.7);
  animation: waPulse 1.8s infinite cubic-bezier(0.66, 0, 0, 1);
}
@keyframes waPulse {
  to {
    box-shadow: 0 0 0 7px rgba(37,211,102,0);
  }
}

/* Purpose & Budget Filter Chips */
.budget-chip {
  padding: 8px 16px;
  border-radius: 9999px;
  border: 1.5px solid #e2e8f0;
  background: #ffffff;
  font-size: 13px;
  font-weight: 600;
  color: #434655;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.budget-chip:hover {
  border-color: #004ac6;
  color: #004ac6;
  background: #f8faff;
}
.budget-chip.active {
  background: #004ac6;
  color: #ffffff;
  border-color: #004ac6;
  box-shadow: 0 2px 10px rgba(0,74,198,0.25);
}

/* ============================================================
   MOBILE RESPONSIVENESS & TYPOGRAPHY SYSTEM (UNIFIED)
   ============================================================ */

:root {
  --header-offset: 112px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

@media (min-width: 640px) {
  :root {
    --header-offset: 104px;
  }
}

@media (min-width: 1024px) {
  :root {
    --header-offset: 96px;
  }
}

/* Dynamic Main Offset to guarantee fixed header never clips content */
.main-offset-top {
  padding-top: var(--header-offset) !important;
}

/* Mobile Typography & Layout Standardizations */
@media (max-width: 768px) {
  /* Prevent iOS Safari auto-zoom on form elements */
  input, select, textarea, .form-input-premium {
    font-size: 16px !important;
  }

  /* Consistent Section Vertical Padding on Mobile */
  .py-mobile-section {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }

  /* Consistent Mobile Typography Hierarchy */
  h1, .text-display-hero, .text-display-hero-mobile {
    font-size: 1.65rem !important;
    line-height: 1.25 !important;
    letter-spacing: -0.025em !important;
  }

  h2, .text-headline-xl {
    font-size: 1.35rem !important;
    line-height: 1.3 !important;
    letter-spacing: -0.02em !important;
  }

  h3, .text-headline-lg {
    font-size: 1.15rem !important;
    line-height: 1.35 !important;
  }

  h4, .text-headline-md {
    font-size: 1rem !important;
    line-height: 1.4 !important;
  }

  p, .text-body-lg, .text-body-md {
    font-size: 0.9rem !important;
    line-height: 1.5 !important;
  }

  .text-body-sm {
    font-size: 0.8125rem !important;
    line-height: 1.4 !important;
  }

  .text-pricing-display {
    font-size: 1.5rem !important;
    line-height: 1.2 !important;
  }

  /* Responsive Gutter Padding */
  .px-mobile-gutter {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  /* Floating Dock Mobile Optimization */
  #sticky-dock {
    bottom: 1rem !important;
    right: 1rem !important;
  }
  #sticky-dock-btn {
    width: 48px !important;
    height: 48px !important;
    box-shadow: 0 4px 16px rgba(0, 74, 198, 0.35) !important;
  }
  #sticky-dock-expanded {
    max-width: calc(100vw - 2rem) !important;
    right: 0 !important;
  }
}

/* Multi-line Title Clamp & Unified Card Structure */
.clamp-title-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.5rem;
  line-height: 1.25rem;
}

.clamp-title-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
}

/* Safe Word Breaking */
.break-safe {
  overflow-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
}

/* Bottom Safe Area Padding for Pages with Sticky Action Bars */
.has-sticky-bar {
  padding-bottom: calc(5.5rem + var(--safe-bottom)) !important;
}

/* Mobile Comparison Card Component */
.mobile-comparison-card {
  background: #ffffff;
  border-radius: 1rem;
  border: 1px solid rgba(195, 198, 215, 0.4);
  padding: 1rem;
  box-shadow: 0 4px 16px -4px rgba(0, 74, 198, 0.06);
  margin-bottom: 0.875rem;
}

.mobile-comparison-card .card-factor-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #0b1c30;
  margin-bottom: 0.25rem;
}

.mobile-comparison-card .card-factor-subtitle {
  font-size: 0.75rem;
  color: #434655;
  margin-bottom: 0.75rem;
}

.mobile-comparison-card .itplaza-pill-box {
  background: rgba(37, 211, 102, 0.08);
  border: 1px solid rgba(37, 211, 102, 0.3);
  border-radius: 0.75rem;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
}

.mobile-comparison-card .market-pill-box {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 0.75rem;
  padding: 0.75rem;
}

/* Quick Filter Horizontal Scroll on Mobile */
.mobile-scroll-pills {
  display: flex;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  gap: 0.5rem;
  padding: 0.25rem 0;
}
.mobile-scroll-pills::-webkit-scrollbar {
  display: none;
}

/* Responsive Metric Card in Product Details */
.responsive-metric-card {
  background: #eff4ff;
  border: 1px solid rgba(0, 74, 198, 0.12);
  border-radius: 0.75rem;
  padding: 0.625rem 0.5rem;
  text-align: center;
  transition: all 0.2s ease;
}

/* Touch-friendly Tap Targets */
.touch-target-44 {
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ══════════════════════════════════════════════════════════════
   TOPBAR RESPONSIVE BUTTONS (Ultra-clean on 320px & Mobile)
   ══════════════════════════════════════════════════════════════ */
.topbar-btn {
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

@media (max-width: 374px) {
  .topbar-review-full {
    display: none !important;
  }
  .topbar-review-short {
    display: inline !important;
  }
  .topbar-wa-prefix {
    display: none !important;
  }
  .topbar-actions-row {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 6px !important;
  }
}

@media (min-width: 375px) {
  .topbar-review-full {
    display: inline !important;
  }
  .topbar-review-short {
    display: none !important;
  }
  .topbar-wa-prefix {
    display: inline !important;
  }
}

/* ══════════════════════════════════════════════════════════════
   320PX / ULTRA-COMPACT MOBILE RESPONSIVE POLISH
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 374px) {
  #mobile-menu-drawer, #shortlist-drawer {
    width: 88vw !important;
    max-width: 292px !important;
    padding: 0.875rem !important;
  }
  .stat-glass-card {
    padding: 0.625rem 0.5rem !important;
  }
  .grade-select-pill {
    padding: 6px 4px !important;
    gap: 4px !important;
    font-size: 11px !important;
    justify-content: center !important;
  }
  .grade-select-pill span {
    font-size: 11px !important;
  }
}
