/* styles.css - complete and cleaned up */

/* Base */
:root{
  --brand-blue: #0b3d91;
  --brand-grad: linear-gradient(90deg, #0b3d91, #56a0e8);
  --accent: #0077cc;
  --bg: #f0f8ff;
  --muted: #cfd8e3;
  --footer-bg: #04233b;
}
* { box-sizing: border-box; }
html,body { height: 100%; }
body {
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  background: var(--bg);
  color: #033;
  padding: 0;
  margin: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Layout helpers */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem;
}

/* Header & Nav */
.site-header {
  background: var(--brand-grad);
  color: white;
  padding: 0.6rem 0;
  box-shadow: 0 2px 6px rgba(11,61,145,0.12);
}
.site-header.small { padding: 0.4rem 0; }
.nav-wrap {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 1rem;
}
.brand {
  text-decoration: none;
  color: white;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: .2px;
}
.main-nav {
  display:flex;
  align-items:center;
  gap: 0.75rem;
}
.main-nav a {
  color: white;
  margin: 0 6px;
  text-decoration: none;
  font-weight: 500;
  padding: 0.25rem 0.4rem;
  border-radius: 6px;
}
.main-nav a:hover,
.main-nav a:focus {
  background: rgba(255,255,255,0.08);
  text-decoration: none;
}

/* Buttons */
.btn {
  padding: 0.55rem 0.9rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  display: inline-block;
  line-height: 1;
}
.btn-primary {
  background: var(--accent);
  color: white;
  border: 1px solid rgba(0,0,0,0.04);
}
.btn-ghost {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
}
.btn:active { transform: translateY(1px); }

/* Hero */
.hero {
  padding: 2.4rem 0;
  text-align: center;
  background: linear-gradient(180deg, rgba(255,255,255,0.6), rgba(255,255,255,0.8));
}
.hero-inner {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:center;
  gap: 1.5rem;
}
.hero-copy {
  max-width: 520px;
  text-align: left;
}
.hero h1 {
  color: var(--brand-blue);
  font-size: 2rem;
  margin: 0 0 .6rem;
}
.hero p {
  margin: 0 0 1rem;
  color: #234;
  line-height: 1.45;
}
.small-hero {
  width: 60%;
  max-width: 320px;
  border-radius: 12px;
  display: block;
}

/* Footer */
.site-footer {
  background: var(--footer-bg);
  color: white;
  text-align: center;
  padding: 1rem 0;
  margin-top: 2rem;
  font-size: 0.95rem;
}

/* Product Cards */
.products-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1rem;
}
.product-card {
  width: 230px;
  background: white;
  padding: 1rem;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(4,35,59,0.06);
  text-align: center;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 26px rgba(4,35,59,0.09);
}
.small-img {
  width: 80%;
  max-width: 160px;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.15s ease;
}
.small-img:hover { transform: scale(1.06); }
.product-card h3 { margin: 0.6rem 0 0.25rem; font-size: 1.05rem; color: #044; }
.product-card p { margin: 0 0 0.6rem; color: #555; font-weight: 600; }

/* Products section headers */
.products-section {
  width: 100%;
  text-align: center;
  margin-top: 2rem;
  padding-top: 0.4rem;
  border-top: 1px dashed rgba(0,0,0,0.04);
}

/* Cart Box */
#cart-box {
  position: fixed;
  top: 86px;
  right: 22px;
  background: white;
  border: 2px solid var(--accent);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
  padding: 1rem;
  width: 260px;
  z-index: 1000;
}
#cart-box h3 {
  margin-top: 0;
  color: var(--accent);
  font-size: 1.05rem;
}
#cart-items {
  font-size: 0.95rem;
  margin-bottom: 0.6rem;
  max-height: 260px;
  overflow: auto;
}
#cart-total {
  font-weight: bold;
  color: #04233b;
  margin-bottom: 0.6rem;
}

/* Checkout modal & form */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: none; /* shown via inline style or .show */
  align-items: center;
  justify-content: center;
  z-index: 2000;
}
.modal-backdrop.show { display: flex; }
.checkout-modal {
  background: white;
  width: 96%;
  max-width: 820px;
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 18px 40px rgba(0,0,0,0.25);
}
.checkout-grid {
  display:grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media(min-width:900px){
  .checkout-grid { grid-template-columns: 1fr 360px; align-items:start; }
}
.input, input, textarea, select {
  width:100%;
  padding:0.6rem;
  border-radius:8px;
  border:1px solid var(--muted);
  font-size:0.95rem;
  background: #fff;
  color: #04233b;
}
.row{display:flex;gap:0.5rem}
.small{font-size:0.9rem;color:#445}
.btn-ghost{background:transparent;border:1px solid var(--accent);color:var(--accent);padding:0.5rem 0.8rem;border-radius:8px}

/* checkout aside */
.checkout-modal aside h3 { margin-top: 0; }
#checkout-items { margin-top: .6rem; font-size: .95rem; }

/* helpers */
.hidden { display:none !important; }
.center { text-align:center; }

/* small screens tweaks */
@media(max-width:700px){
  .main-nav { display:none; } /* keep simple for mobile */
  .brand { font-size: 1.1rem; }
  #cart-box { right: 12px; top: 78px; width: 220px; }
  .hero h1 { font-size: 1.5rem; }
}

/* Accessibility focus */
a:focus, button:focus, input:focus, textarea:focus { outline: 3px solid rgba(88,144,255,0.18); outline-offset: 2px; }

/* small utility */
.kv { display:flex; justify-content:space-between; gap:.5rem; align-items:center; }

/* end of stylesheet */


/* Make checkout modal scrollable on PC and mobile */
#checkout-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: none;
  overflow-y: auto; /* allow scrolling */
  z-index: 1000;
}

.checkout-modal {
  background: #fff;
  border-radius: 12px;
  max-width: 800px;
  margin: 4rem auto;
  padding: 1.5rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  overflow-y: visible;
}

.checkout-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

/* Ensure small screens stack the form */
@media (max-width: 700px) {
  .checkout-grid {
    grid-template-columns: 1fr;
  }
}

