/*
  Aqua Revive Plus — Site Styles
  - Modern, responsive, accessible
  - Works offline from file manager (no external deps)
*/

:root {
  --bg: #0b1320;
  --bg-alt: #0f1e33;
  --surface: #0d1b2a;
  --text: #e6edf3;
  --muted: #9fb1c3;
  --primary: #2ec4b6;
  --primary-600: #22a699;
  --outline: #2a3b52;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --radius: 14px;
  --radius-sm: 10px;
  --container: 1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background: linear-gradient(180deg, var(--bg) 0%, #0a1627 100%);
  line-height: 1.6;
}

/* Language selector — 3D pill with globe icon, responsive */
#language-selector { display:inline-flex; align-items:center; margin-left: .75rem; }
.lang-combo select, .goog-te-combo { background: rgba(0,0,0,.2); color: var(--text); border:1px solid rgba(255,255,255,.2); border-radius: 999px; padding:.35rem .6rem; font: inherit; max-width: 50vw; }
.goog-te-gadget { font-family: inherit !important; color: var(--text) !important; }
.goog-te-gadget .goog-te-combo { margin: 0 !important; }
@media (max-width: 680px) {
  #language-selector { margin-left: .25rem; }
  .lang-3d { font-size: 1rem; }
}

/* Hide Google Translate banner/feedback popups while keeping dropdown working */
#goog-gt-tt { display: none !important; }
.goog-te-banner-frame { display: none !important; }
.goog-te-balloon-frame { display: none !important; }
.goog-tooltip { display: none !important; }
body { top: 0 !important; }
/* Some variants use obfuscated classes; hide if they appear */
.VIpgJd-ZVi9od-ORHb, .VIpgJd-ZVi9od-xl07Ob { display: none !important; }

img { max-width: 100%; height: auto; display: block; }

.container { width: min(100% - 2rem, var(--container)); margin-inline: auto; }
.section { padding: clamp(3rem, 6vw, 5rem) 0; }
.section.alt { background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.03)); }
.section-lead { color: var(--muted); margin-top: .5rem; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 1rem; }
h1 { font-size: clamp(1.8rem, 2.8vw + 1rem, 2.6rem); }
h2 { font-size: clamp(1.5rem, 2vw + .8rem, 2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1rem; color: #d7e3ee; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(13, 27, 42, 0.7);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--outline);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: .75rem 0; }
.brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 700; color: var(--text); text-decoration: none; }
.brand img { border-radius: 8px; box-shadow: var(--shadow); }

.nav { display: flex; gap: .75rem; align-items: center; }
.nav a { color: var(--text); text-decoration: none; padding: .5rem .75rem; border-radius: 999px; transition: background .2s ease, color .2s ease; }
.nav a:hover { background: rgba(255,255,255,.06); }
/* Sliding indicator for active nav (desktop only) */
.nav { position: relative; }
.nav .nav-indicator { position: absolute; left: 0; bottom: 6px; height: 3px; width: 0; background: var(--primary); border-radius: 999px; box-shadow: 0 4px 10px rgba(46,196,182,.45); transform: translateX(0); transition: transform .22s ease, width .22s ease, opacity .22s ease; opacity: .95; pointer-events: none; }

.nav-toggle { display: none; background: transparent; border: 0; cursor: pointer; padding: .4rem; border-radius: 8px; }
.nav-toggle span { display: block; width: 26px; height: 2px; background: var(--text); margin: 6px 0; transition: transform .2s ease, opacity .2s ease; }

/* Hero */
.hero { position: relative; padding: 0; overflow: hidden; z-index: 1; }
.hero-slider { position: relative; height: min(70vh, 600px); background: radial-gradient(800px 400px at 10% 10%, rgba(46,196,182,.20), transparent 60%), radial-gradient(900px 500px at 90% 0%, rgba(64,156,255,.18), transparent 60%); }
.hero-slider { background: radial-gradient(800px 400px at 10% 10%, rgba(46,196,182,.20), transparent 60%), radial-gradient(900px 500px at 90% 0%, rgba(64,156,255,.18), transparent 60%); }
.hero-overlay { position: absolute; inset: 0; display: grid; align-items: center; padding: clamp(2rem, 6vw, 4rem) 0; background: linear-gradient(180deg, rgba(25,69,112,.48), rgba(20,60,98,.32) 40%, rgba(12,38,72,.48)); z-index: 2; }
.hero-copy { max-width: 900px; }
.hero-copy h1 { text-shadow: 0 8px 30px rgba(0,0,0,.5); }
.hero-copy p { color: #e2eefb; text-shadow: 0 8px 30px rgba(0,0,0,.4); }
.hero-ctas { display: flex; gap: .8rem; margin-top: 1rem; flex-wrap: wrap; }

/* Feature tiles — 3D and color variants */
.features .feature {
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 10px 20px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.06);
  transform: translateZ(0);
  transition: transform .2s ease, box-shadow .2s ease;
}
.features .feature:hover { transform: translateY(-3px); box-shadow: 0 16px 32px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.08); }
.features .feature:nth-child(1) { background: linear-gradient(180deg, #10314d, #0b243b); color: #e7f4ff; }
.features .feature:nth-child(2) { background: linear-gradient(180deg, #0f3b32, #0c2c25); color: #e6fff8; }
.features .feature:nth-child(3) { background: linear-gradient(180deg, #3a214f, #2a183a); color: #ffecff; }
.features .feature h3 { color: currentColor; }
.features .feature p { color: rgba(255,255,255,.9); }

/* Steps tiles — 3D and alternating colors */
.steps li {
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 8px 18px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.05);
  transition: transform .2s ease, box-shadow .2s ease;
}
.steps li:hover { transform: translateY(-2px); box-shadow: 0 14px 28px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.08); }
.steps li:nth-child(odd) { background: linear-gradient(180deg, #1d2f4a, #14263c); color: #e9f3ff; }
.steps li:nth-child(even) { background: linear-gradient(180deg, #27422a, #1b3220); color: #ecffef; }
.steps li strong { color: currentColor; }
.steps li { color: rgba(255,255,255,.92); }

/* Features */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 1.25rem; }
.feature { background: rgba(255,255,255,.03); border: 1px solid var(--outline); padding: 1rem; border-radius: var(--radius-sm); box-shadow: var(--shadow); }
.feature .icon { font-size: 1.4rem; margin-bottom: .5rem; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 1.25rem; }
.card { background: rgba(255,255,255,.03); border: 1px solid var(--outline); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.card img { aspect-ratio: 4/3; object-fit: contain; background: rgba(0,0,0,.08); }
.card video { aspect-ratio: 4/3; width: 100%; height: auto; object-fit: cover; display: block; }
.card-body { padding: 1rem; }

/* Tile media slider */
.tile-slider { position: relative; overflow: hidden; background: rgba(255,255,255,.02); }
.tile-track { display: flex; transition: transform .35s ease; }
.tile-slide { flex: 0 0 100%; }
.tile-slide img, .tile-slide video { display: block; width: 100%; height: auto; object-fit: contain; background: rgba(0,0,0,.08); }
.tile-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,.35); color: #fff; border: 1px solid var(--outline); width: 34px; height: 34px; border-radius: 999px; display: grid; place-items: center; cursor: pointer; }
.tile-nav.prev { left: 8px; }
.tile-nav.next { right: 8px; }
.tile-nav:hover { background: rgba(0,0,0,.5); }

/* Steps */
.steps { counter-reset: step; list-style: none; padding-left: 0; display: grid; gap: .6rem; }
.steps li { background: rgba(255,255,255,.03); border: 1px solid var(--outline); padding: .8rem 1rem; border-radius: var(--radius-sm); }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }
.chip { background: rgba(46,196,182,.12); color: #b9fff6; border: 1px solid rgba(46,196,182,.35); padding: .4rem .8rem; border-radius: 999px; font-size: .95rem; }

/* Contact */
.contact { align-items: start; }
.contact-list { list-style: none; padding: 0; margin: .75rem 0 0; }
.contact-list a { color: var(--text); }
.contact-form { background: rgba(255,255,255,.03); border: 1px solid var(--outline); padding: 1rem; border-radius: var(--radius); box-shadow: var(--shadow); }
.field { display: grid; gap: .35rem; margin-bottom: .8rem; }
input, textarea { width: 100%; padding: .75rem .85rem; background: #0b1a2e; color: var(--text); border: 1px solid var(--outline); border-radius: 10px; font-size: 16px; }
input:focus, textarea:focus { outline: 2px solid rgba(46,196,182,.6); outline-offset: 0; }
.form-note { color: var(--muted); font-size: .9rem; margin-top: .5rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--outline); background: rgba(13,27,42,.7); backdrop-filter: saturate(140%) blur(10px); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; padding: 1rem 0; }
.back-to-top { text-decoration: none; color: var(--text); background: rgba(255,255,255,.06); padding: .35rem .6rem; border-radius: 10px; border: 1px solid var(--outline); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .65rem 1rem; border-radius: 999px; text-decoration: none; cursor: pointer; border: 1px solid transparent; font-weight: 600; }
.btn-primary { background: var(--primary); color: #03251f; }
.btn-primary:hover { background: var(--primary-600); }
.btn-outline { background: transparent; color: var(--text); border-color: rgba(255,255,255,.25); }
.btn-outline:hover { background: rgba(255,255,255,.06); }

/* Skip link */
.skip-link { position: absolute; left: -999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.skip-link:focus { position: static; width: auto; height: auto; padding: .5rem; background: #fff; color: #000; }

/* Utilities */
.grid-2 { grid-template-columns: 1.1fr 1fr; }

/* Checkout Modal */
.checkout-modal { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: grid; place-items: center; z-index: 1000; padding: 1rem; }
.checkout-dialog { width: min(560px, 100%); background: linear-gradient(180deg, rgba(11,26,46,.96), rgba(11,26,46,.92)); border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem; }
.checkout-dialog h3 { margin: 0 0 .25rem; }
.checkout-dialog input, .checkout-dialog select { width: 100%; padding: .65rem .75rem; background: #0b1a2e; color: var(--text); border: 1px solid var(--outline); border-radius: 10px; }
.checkout-dialog input, .checkout-dialog select { font-size: 16px; }
.notice { padding: .6rem .75rem; border-radius: 10px; border: 1px solid rgba(255,255,255,.12); background: rgba(11,26,46,.9); color: #d6e8f8; }
.notice.success { background: linear-gradient(180deg, rgba(16,55,47,.92), rgba(11,26,46,.9)); color: #ccfff3; border-color: rgba(46,196,182,.45); }
.notice.error { background: linear-gradient(180deg, rgba(78,24,17,.9), rgba(11,26,46,.9)); color: #ffe1dd; border-color: rgba(255,99,71,.5); }
.checkout-dialog .btn { min-width: 120px; }

/* Toasts */
.toast-container { position: fixed; inset: auto 0 16px 0; display: grid; justify-content: center; gap: .5rem; z-index: 2000; pointer-events: none; padding: 0 1rem; }
.toast { pointer-events: auto; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .75rem; max-width: min(520px, 92vw); background: rgba(11,26,46,.98); border: 1px solid rgba(255,255,255,.14); color: #d6e8f8; padding: .95rem 1.1rem; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.45); transform: translateY(10px); opacity: 0; animation: toast-in .2s ease forwards; }
.toast.success { background: linear-gradient(180deg, rgba(16,55,47,.98), rgba(11,26,46,.96)); border-color: rgba(46,196,182,.5); color: #ccfff3; }
.toast.error { background: linear-gradient(180deg, rgba(78,24,17,.98), rgba(11,26,46,.96)); border-color: rgba(255,99,71,.55); color: #ffe1dd; }
.toast .toast-close { appearance: none; background: transparent; border: 0; color: currentColor; opacity: .8; cursor: pointer; font-size: 1.1rem; line-height: 1; padding: .25rem; border-radius: 8px; }
.toast .toast-close:hover { opacity: 1; }
/* Quantity stepper */
.qty-wrap { display: inline-grid; grid-template-columns: auto 64px auto; gap: .35rem; align-items: center; }
.qty-btn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 10px; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.06); color: #e6f2ff; font-weight: 700; cursor: pointer; }
.qty-btn:active { transform: translateY(1px); }
.qty-input { width: 64px; text-align: center; }
@media (max-width: 680px) {
  .qty-wrap { grid-template-columns: auto 56px auto; }
  .qty-input { width: 56px; }
}
.toast .toast-close { appearance: none; background: transparent; border: 0; color: currentColor; opacity: .8; cursor: pointer; font-size: 1.1rem; line-height: 1; padding: .25rem; border-radius: 8px; }
.toast .toast-close:hover { opacity: 1; }
@keyframes toast-in { from { transform: translateY(10px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes toast-out { to { transform: translateY(10px); opacity: 0; } }

/* Responsive */
@media (max-width: 1024px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .features { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .nav { position: fixed; inset: 64px 0 auto 0; background: rgba(13,27,42,.95); padding: 1rem; border-top: 1px solid var(--outline); display: grid; gap: .5rem; transform: translateY(-120%); transition: transform .2s ease; }
  .nav a { padding: .75rem 1rem; border: 1px solid var(--outline); border-radius: 10px; }
  .nav[aria-expanded="true"] { transform: translateY(0); }
  .nav-toggle { display: inline-block; }
  /* Hide desktop indicator in mobile menu */
  .nav .nav-indicator { display: none; }
  .cards { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr; }
  /* Ensure hero CTAs are fully visible and fit nicely */
  .hero { overflow: visible; }
  .hero-slider { display: none; }
  .hero-overlay { position: relative; align-items: start; padding: 2rem 0; }
  .hero-copy { padding: 0 .5rem; }
  .hero-ctas { flex-direction: column; gap: .6rem; padding-right: .5rem; }
  .hero-ctas .btn { width: 100%; white-space: nowrap; }
}

/* Ensure Leaflet map never overlaps sticky header or mobile nav */
.leaflet-container { z-index: 1; }
@media (max-width: 680px) {
  .nav[aria-expanded="true"] ~ #map,
  .site-header + #map,
  .site-header + main #map { position: relative; z-index: 0; }
}

/* Reviews Section */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.review-card {
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.review-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--primary);
}

.review-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.review-name {
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.review-rating {
  display: flex;
  gap: 0.25rem;
}

.star {
  color: #ffd700;
  font-size: 1.1rem;
}

.star.empty {
  color: var(--outline);
}

.review-description {
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

.review-date {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 1rem;
}

/* Review Form */
.review-form {
  max-width: 600px;
  margin: 0 auto;
}

.rating-input {
  display: flex;
  gap: 0.5rem;
  margin: 0.5rem 0;
  flex-direction: row-reverse;
  justify-content: flex-end;
}

.rating-input input[type="radio"] {
  display: none;
}

.rating-input .star {
  font-size: 2rem;
  color: var(--outline);
  cursor: pointer;
  transition: color 0.2s ease;
  user-select: none;
}

.rating-input .star:hover,
.rating-input .star:hover ~ .star {
  color: #ffd700;
}

.rating-input input[type="radio"]:checked ~ .star {
  color: #ffd700;
}

.rating-input input[type="radio"]:checked + .star {
  color: #ffd700;
}

.otp-verification {
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: var(--radius);
  padding: 2rem;
  margin-top: 2rem;
  text-align: center;
}

.otp-verification h3 {
  color: var(--primary);
  margin-bottom: 1rem;
}

.otp-verification .field {
  max-width: 300px;
  margin: 0 auto 1rem;
}

.otp-verification input {
  text-align: center;
  font-size: 1.2rem;
  letter-spacing: 0.2em;
  font-weight: 600;
}

.otp-verification .actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* No Reviews Message */
.no-reviews {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
}

.no-reviews h3 {
  color: var(--text);
  margin-bottom: 1rem;
}

/* Loading State */
.reviews-loading {
  text-align: center;
  padding: 2rem;
  color: var(--muted);
}

.reviews-loading::after {
  content: '';
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--outline);
  border-top: 2px solid var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-left: 0.5rem;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsive Design for Reviews */
@media (max-width: 768px) {
  .reviews-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .review-card {
    padding: 1rem;
  }
  
  .rating-input {
    flex-direction: row-reverse !important;
    justify-content: flex-end !important;
  }
  
  .rating-input .star {
    font-size: 1.5rem;
  }
  
  .otp-verification {
    padding: 1.5rem;
  }
  
  .otp-verification .actions {
    flex-direction: column;
    align-items: center;
  }
}
