/* ============================================================
   WORLD-CLASS CLEANUP — Unified Design System Override
   Must be loaded LAST after all other stylesheets
   ============================================================ */

/* --- 1. UNIFIED DESIGN TOKENS --- */
:root {
  /* Single teal palette */
  --teal: #08c99b;
  --teal-dark: #049574;

  /* Single card radius system */
  --card-radius: 16px;
  --card-radius-lg: 24px;
  --pill: 999px;

  /* Single shadow scale */
  --sh-1: 0 1px 3px rgba(16, 20, 23, 0.04);
  --sh-2: 0 4px 16px rgba(16, 20, 23, 0.06);
  --sh-3: 0 12px 40px rgba(16, 20, 23, 0.08);
  --sh-hover: 0 8px 30px rgba(16, 20, 23, 0.1);

  /* Typography scale */
  --text-xs: 0.75rem;
  --text-sm: 0.82rem;
  --text-base: 0.92rem;
  --text-lg: 1.05rem;
  --text-xl: 1.2rem;
}

/* --- 2. ANNOUNCEMENT BAR — Clean, premium --- */
.announcement-bar {
  min-height: 42px !important;
  padding: 0.5rem 1.2rem !important;
  font-size: 0.82rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.01em !important;
  background: var(--graphite) !important;
  border-bottom: none !important;
  color: rgba(255, 255, 255, 0.92) !important;
}

/* Remove the shimmer/glow animation */
.announcement-bar::before {
  display: none !important;
}

/* Remove the gradient text effect */
.announcement-bar span {
  color: inherit !important;
  background: none !important;
  -webkit-background-clip: unset !important;
  background-clip: unset !important;
  -webkit-text-fill-color: inherit !important;
}

/* Clean dot separator */
.announcement-bar span + span::before {
  content: "\00B7" !important;
  display: inline-block !important;
  width: auto !important;
  height: auto !important;
  margin: 0 1rem !important;
  border-radius: 0 !important;
  background: none !important;
  color: rgba(255, 255, 255, 0.35) !important;
  font-size: 1.1em !important;
  vertical-align: middle !important;
}

/* Remove the second shimmer (::after) */
.announcement-bar::after {
  display: none !important;
}

/* --- 3. BUTTONS — Unified system --- */
.button {
  min-height: 46px !important;
  border-radius: var(--pill) !important;
  font-weight: 700 !important;
  font-size: var(--text-sm) !important;
  letter-spacing: 0.01em !important;
  transition: all 0.2s ease !important;
  padding: 0.65rem 1.2rem !important;
}

.button.primary {
  background: var(--graphite) !important;
  color: #fff !important;
  border: none !important;
  box-shadow: 0 2px 8px rgba(16, 20, 23, 0.12) !important;
}

.button.primary:hover {
  background: #1a2026 !important;
  box-shadow: 0 4px 16px rgba(16, 20, 23, 0.18) !important;
  transform: translateY(-1px) !important;
}

.button.primary:active {
  transform: translateY(0) !important;
  box-shadow: 0 1px 4px rgba(16, 20, 23, 0.1) !important;
}

.button.secondary {
  background: #fff !important;
  color: var(--ink) !important;
  border: 1px solid var(--line) !important;
  box-shadow: var(--sh-1) !important;
}

.button.secondary:hover {
  border-color: var(--teal) !important;
  box-shadow: var(--sh-2) !important;
}

/* Remove pulsing glow animation on CTA buttons */
.button.primary::after {
  display: none !important;
}

/* --- 4. HERO — Full width, no card wrapper --- */
.homepage-hero.clean-home-hero {
  border-radius: var(--card-radius-lg) !important;
  margin: 0 !important;
  width: 100% !important;
  border: none !important;
  box-shadow: none !important;
}

@media (min-width: 861px) {
  .homepage-hero.clean-home-hero {
    border-radius: var(--card-radius-lg) !important;
    margin: 0 auto !important;
    width: min(1200px, 100%) !important;
  }
}

/* Hero secondary CTA — more visible */
.homepage-hero .button.secondary,
.homepage-hero .button.secondary {
  background: rgba(255, 255, 255, 0.15) !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
  color: #fff !important;
  backdrop-filter: blur(8px);
}

.homepage-hero .button.secondary:hover {
  background: rgba(255, 255, 255, 0.25) !important;
  border-color: rgba(255, 255, 255, 0.6) !important;
}

/* --- 5. CARDS — Unified radius and shadows --- */
.machine-card,
.product-card,
.home-step,
.home-warranty-chip,
.testimonial-card,
.contact-card,
.home-aff-tier,
.vp-promise-card,
.vp-checkout-how {
  border-radius: var(--card-radius) !important;
  transition: transform 0.22s ease, box-shadow 0.22s ease !important;
}

.machine-card,
.product-card,
.home-step,
.home-warranty-chip,
.vp-promise-card,
.vp-checkout-how {
  box-shadow: var(--sh-2) !important;
}

.machine-card:hover,
.product-card:hover,
.home-step:hover {
  box-shadow: var(--sh-hover) !important;
  transform: translateY(-3px) !important;
}

.testimonial-card,
.contact-card {
  box-shadow: var(--sh-1) !important;
}

.testimonial-card:hover,
.contact-card:hover {
  box-shadow: var(--sh-2) !important;
}

/* --- 6. FORM INPUTS — Cleaner, lighter --- */
input, select, textarea {
  font-weight: 500 !important;
  font-size: var(--text-base) !important;
  border-radius: 10px !important;
  border: 1.5px solid var(--line) !important;
  background: #fff !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--teal) !important;
  box-shadow: 0 0 0 3px rgba(8, 201, 155, 0.12) !important;
  outline: none !important;
}

/* Remove inner highlight shadow on inputs */
input, select, textarea {
  box-shadow: none !important;
}

/* --- 7. CART DRAWER — Premium feel --- */
.cart-panel {
  width: min(420px, 100%) !important;
  transition: transform 300ms cubic-bezier(0.32, 0.72, 0, 1) !important;
}

.cart-backdrop {
  transition: background 300ms ease !important;
}

/* Close button — use SVG icon instead of text */
.icon-button {
  width: 36px !important;
  height: 36px !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 50% !important;
  background: #f1f5f9 !important;
  border: none !important;
  color: var(--ink) !important;
  font-size: 0 !important;
  transition: background 0.15s ease !important;
}

.icon-button::before {
  content: "" !important;
  display: block !important;
  width: 16px !important;
  height: 16px !important;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23667179' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3C/svg%3E") center/contain no-repeat !important;
}

.icon-button:hover {
  background: #e2e8f0 !important;
}

/* Quantity buttons — cleaner */
.qty-btn {
  width: 32px !important;
  height: 32px !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 50% !important;
  background: #f1f5f9 !important;
  border: none !important;
  font-size: 0 !important;
  transition: background 0.15s ease !important;
  color: var(--ink) !important;
}

.qty-btn::before {
  content: "" !important;
  display: block !important;
  width: 14px !important;
  height: 14px !important;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23667179' stroke-width='2.5' stroke-linecap='round'%3E%3Cline x1='12' y1='5' x2='12' y2='19'/%3E%3Cline x1='5' y1='12' x2='19' y2='12'/%3E%3C/svg%3E") center/contain no-repeat !important;
}

.qty-btn:last-child::before {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23667179' stroke-width='2.5' stroke-linecap='round'%3E%3Cline x1='5' y1='12' x2='19' y2='12'/%3E%3C/svg%3E") center/contain no-repeat !important;
}

.qty-btn:hover {
  background: #e2e8f0 !important;
}

/* Cart total row — visual emphasis */
.cart-total {
  padding: 0.75rem 1rem !important;
  background: #f8fafb !important;
  border-radius: 10px !important;
  margin: 0.5rem 0 !important;
}

/* --- 8. FOOTER — Dark, authoritative --- */
.site-footer {
  background: var(--graphite) !important;
  color: rgba(255, 255, 255, 0.8) !important;
  border-top: none !important;
  backdrop-filter: none !important;
  margin-top: 4rem !important;
}

.site-footer .footer-brand img {
  filter: brightness(0) invert(1) !important;
  opacity: 0.9 !important;
}

.site-footer .footer-brand p {
  color: rgba(255, 255, 255, 0.55) !important;
}

.site-footer .footer-col h4 {
  color: rgba(255, 255, 255, 0.4) !important;
  font-size: var(--text-xs) !important;
  letter-spacing: 0.12em !important;
  margin-bottom: 1rem !important;
}

.site-footer .footer-col a {
  color: rgba(255, 255, 255, 0.72) !important;
  font-size: var(--text-base) !important;
  font-weight: 500 !important;
  padding: 0.3rem 0 !important;
  transition: color 0.2s ease !important;
}

.site-footer .footer-col a:hover {
  color: var(--teal) !important;
  transform: none !important;
}

.site-footer .footer-bottom {
  border-top-color: rgba(255, 255, 255, 0.1) !important;
  color: rgba(255, 255, 255, 0.4) !important;
  font-size: var(--text-xs) !important;
}

.site-footer .footer-bottom a {
  color: rgba(255, 255, 255, 0.4) !important;
}

.site-footer .footer-bottom a:hover {
  color: var(--teal) !important;
}

/* Remove footer logo hover animation */
.site-footer .footer-brand img:hover {
  transform: none !important;
}

/* --- 9. LOADING SCREEN — Premium --- */
.vp-loader {
  background: var(--graphite) !important;
}

.vp-loader-bar {
  width: 60% !important;
}

/* Add tagline under logo */
.vp-loader::after {
  content: "Smart vending machines" !important;
  display: block !important;
  margin-top: 1rem !important;
  font-family: var(--font-sans) !important;
  font-size: 0.78rem !important;
  font-weight: 500 !important;
  color: rgba(255, 255, 255, 0.45) !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
}

/* --- 10. TESTIMONIALS — Background tint + stars --- */
.home-testimonials {
  background: linear-gradient(180deg, rgba(8, 201, 155, 0.03), transparent) !important;
  padding: 5rem 0 !important;
}

.testimonial-card {
  background: #fff !important;
  border: 1px solid var(--line) !important;
}

/* Star rating before each testimonial */
.testimonial-card blockquote::before {
  content: "\2605\2605\2605\2605\2605" !important;
  display: block !important;
  font-size: 0.85rem !important;
  color: var(--amber) !important;
  letter-spacing: 0.1em !important;
  margin-bottom: 0.6rem !important;
}

/* --- 11. HEADER — Consistent height --- */
.site-header {
  min-height: 72px !important;
}

.site-nav.visual-nav a {
  border-radius: var(--pill) !important;
}

/* --- 12. SECTION HEADINGS — Consistent hierarchy --- */
.home-section-head h2,
.checkout-block h2,
section > h2 {
  font-size: clamp(1.5rem, 3vw, 2rem) !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  color: var(--ink) !important;
}

.home-section-head p,
section > p {
  font-size: var(--text-base) !important;
  color: var(--muted) !important;
  line-height: 1.65 !important;
}

/* --- 13. CHECKOUT BLOCKS — Clean --- */
.checkout-block {
  border-radius: var(--card-radius) !important;
  border: 1px solid var(--line) !important;
  background: #fff !important;
  padding: 1.5rem !important;
}

.block-heading {
  margin-bottom: 1rem !important;
}

/* --- 14. MINI CODE LABELS — Consistent --- */
.mini-code,
.eyebrow {
  font-size: var(--text-xs) !important;
  font-weight: 800 !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
  color: var(--teal-dark) !important;
}

/* --- 15. SCROLLBAR — Clean --- */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.25);
}

/* --- 16. FOCUS STATES — Accessible --- */
:focus-visible {
  outline: 2px solid var(--teal) !important;
  outline-offset: 2px !important;
}

/* --- 17. FAQ ITEMS — Clean --- */
.faq-item,
.faq-q {
  border-radius: var(--card-radius) !important;
}

/* --- 18. ASSURANCE STRIP --- */
.assurance-strip article {
  border-radius: var(--card-radius) !important;
  background: #fff !important;
  border: 1px solid var(--line) !important;
  box-shadow: var(--sh-1) !important;
}

.assurance-strip article:hover {
  box-shadow: var(--sh-2) !important;
  border-color: var(--teal) !important;
}

/* --- 19. MARQUEE — Subtle --- */
.vp-marquee {
  border-top: 1px solid var(--line) !important;
  border-bottom: 1px solid var(--line) !important;
  padding: 0.8rem 0 !important;
  opacity: 0.7;
}

/* --- 20. STORE PAGE CARDS --- */
.product-card {
  border: 1px solid var(--line) !important;
}

/* --- 21. TERMS CHECKBOX — Custom styling --- */
.terms-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  margin-top: 12px;
}

.terms-check input[type="checkbox"] {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--teal);
}

.terms-check span {
  font-size: var(--text-sm);
  line-height: 1.5;
  color: var(--ink);
}

.terms-contract-link {
  color: var(--graphite);
  font-weight: 700;
  text-decoration: underline;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  font-size: inherit;
}

.terms-contract-link:hover {
  color: var(--teal-dark);
}

/* --- 22. CONTRACT MODAL --- */
.contract-close,
#vpContractCloseX,
#purchaseContractCloseX {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
}

.contract-heading,
.vp-contract-head h2,
.purchase-contract-head h2 {
  margin: 0.3rem 0 0.5rem;
  font-size: 1.3rem;
}

.contract-subtext,
.vp-contract-head p,
.purchase-contract-head p {
  font-size: var(--text-sm);
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

/* --- 23. REDUCED MOTION --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Shop spacing: keep the banner stationary and controls aligned. */
body[data-page="store"] .store-banner {
  margin-top: 16px;
  margin-bottom: 20px;
  animation: none;
  transform: none;
}
body[data-page="store"] .store-toolbar {
  display: grid;
  grid-template-columns: auto minmax(240px, 1fr) auto;
  gap: 16px 24px;
  align-items: center;
}
body[data-page="store"] .store-search {
  width: 100%;
  max-width: 560px;
  min-width: 0;
  justify-self: center;
}
body[data-page="store"] .store-search input {
  width: 100%;
  min-width: 0;
  flex: 1;
}
@media (max-width: 720px) {
  body[data-page="store"] .store-toolbar {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
  }
  body[data-page="store"] .store-search {
    grid-column: 1 / -1;
    grid-row: 1;
    max-width: none;
  }
  body[data-page="store"] .store-sort { justify-self: end; }
  body[data-page="store"] .store-banner { margin-top: 12px; margin-bottom: 16px; }
}