@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@500;600;700&family=Nunito+Sans:wght@400;600;700;800;900&display=swap');

:root {
  --navy: #06214a;
  --blue: #0b2e66;
  --blue-light: #123b7a;
  --aqua: #12b7e2;
  --aqua-dark: #008db8;
  --aqua-soft: #eaf8fd;
  --coral: #ff5a5f;
  --coral-dark: #df3f45;
  --sun: #ffc53d;
  --ink: #16233b;
  --muted: #5a6b85;
  --line: #e4eaf2;
  --ice: #f5f9fc;
  --white: #fff;
  --radius-lg: 26px;
  --radius-md: 17px;
  --shadow-sm: 0 4px 14px rgba(11, 46, 102, .08);
  --shadow-md: 0 14px 34px rgba(11, 46, 102, .14);
  --display: 'Fredoka', 'Nunito Sans', sans-serif;
  --body: 'Nunito Sans', Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--white);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body.body-lock { overflow: hidden; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid rgba(18, 183, 226, .55); outline-offset: 3px; }
.wrap { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }

/* Header */
.top {
  padding: 9px 18px;
  background: var(--blue);
  color: var(--white);
  text-align: center;
  font-size: 13px;
  font-weight: 900;
}
.head {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .97);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}
.headin {
  min-height: 78px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.logo {
  flex: none;
  color: var(--navy);
  font: 700 29px/1 var(--display);
  letter-spacing: -.02em;
}
.logo b { color: var(--coral); }
.logo em { color: var(--aqua-dark); font-style: normal; }
.nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 22px;
}
.nav a {
  color: var(--blue);
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
  transition: color .18s ease;
}
.nav a:hover, .nav a.active { color: var(--aqua-dark); }
.nav-cart { position: relative; display: inline-flex !important; align-items: center; gap: 7px; }
.nav-cart-count {
  min-width: 22px;
  height: 22px;
  padding-inline: 6px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--coral);
  color: var(--white);
  font-size: 11px;
  font-weight: 900;
}
.nav-cart-count.bump, .cart-count.bump { animation: cart-bump .42s ease; }
@keyframes cart-bump { 50% { transform: scale(1.55); } }

/* Type and controls */
h1, h2, h3 { color: var(--navy); font-family: var(--display); line-height: 1.08; text-wrap: balance; }
h1 { margin: 16px 0; font-size: clamp(40px, 5vw, 62px); }
h2 { margin: 0 0 18px; font-size: clamp(29px, 3.2vw, 40px); }
h3 { margin: 0 0 7px; font-size: 20px; }
p { margin-top: 0; }
.lead { max-width: 58ch; color: var(--muted); font-size: 18px; }
.meta { color: var(--muted); font-size: 13px; font-weight: 700; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 7px 13px;
  border-radius: 999px;
  background: var(--aqua-soft);
  color: var(--aqua-dark);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.eyebrow.coral { background: #fff0f0; color: var(--coral-dark); }
.pill {
  min-height: 46px;
  padding: 12px 23px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 2px solid transparent;
  border-radius: 999px;
  background: var(--aqua);
  color: var(--navy);
  font-weight: 900;
  line-height: 1.2;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.pill:hover { transform: translateY(-2px); box-shadow: 0 9px 20px rgba(18, 183, 226, .28); }
.pill.dark { background: var(--blue); color: var(--white); }
.pill.dark:hover { background: var(--blue-light); box-shadow: 0 9px 20px rgba(11, 46, 102, .25); }
.pill.outline { border-color: var(--blue); background: var(--white); color: var(--blue); }
.pill:disabled { cursor: wait; opacity: .8; }

/* Hero and sections */
.hero { padding-block: 68px; background: linear-gradient(180deg, #f8fcfe, #edf8fc); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(340px, .95fr); gap: 52px; align-items: center; }
.hero-grid > * { min-width: 0; }
.hero img {
  width: 100%;
  height: clamp(310px, 35vw, 440px);
  object-fit: cover;
  border: 6px solid var(--white);
  border-radius: 32px;
  box-shadow: 0 20px 44px rgba(11, 46, 102, .16);
}
.section { padding-block: 62px; }
.section.alt { background: var(--ice); }
.section-head { margin-bottom: 28px; display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.section-head h2 { margin-bottom: 0; }

/* Catalog cards */
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card > img, .card > a:first-child { width: 100%; display: block; overflow: hidden; }
.card > img, .card > a:first-child img {
  width: 100%;
  height: 210px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform .35s ease;
}
.card:hover > img, .card:hover > a:first-child img { transform: scale(1.035); }
.card-body { padding: 17px 18px 19px; display: flex; flex: 1; flex-direction: column; align-items: flex-start; }
.card-body h3 { width: 100%; min-height: 43px; margin-top: 10px; }
.card-body .meta { min-height: 40px; margin-bottom: 8px; }
.card-body .price { margin-top: auto; }
.card-body .pill { width: 100%; margin-top: 5px; }
.badge {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--coral);
  color: var(--white);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.price { margin: 10px 0; color: var(--navy); font: 600 21px/1.2 var(--display); }
.notice {
  min-height: 92px;
  padding: 18px 20px;
  border: 1px solid #c9edf7;
  border-radius: var(--radius-md);
  background: var(--aqua-soft);
  color: var(--blue);
  font-size: 17px;
  font-weight: 900;
}
.notice small { display: block; margin-top: 3px; color: var(--muted); font-size: 13px; font-weight: 700; }

/* Forms */
.form-card {
  width: min(680px, 100%);
  margin-inline: auto;
  padding: clamp(24px, 4vw, 38px);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow-md);
}
.form-card h1, .form-card h2 { margin-top: 14px; }
.form-card .notice { min-height: 0; margin-bottom: 24px; }
.field { margin-bottom: 17px; display: grid; gap: 7px; }
.field label { color: var(--navy); font-size: 14px; font-weight: 900; }
input, textarea, select {
  width: 100%;
  min-height: 50px;
  padding: 12px 15px;
  border: 2px solid var(--line);
  border-radius: 14px;
  outline: none;
  background: var(--white);
  color: var(--ink);
  transition: border-color .18s ease, box-shadow .18s ease;
}
textarea { min-height: 115px; resize: vertical; }
select { appearance: auto; }
input:focus, textarea:focus, select:focus { border-color: var(--aqua); box-shadow: 0 0 0 4px rgba(18, 183, 226, .16); }
.success { display: none; padding: 26px; border: 1px solid #b8eed2; border-radius: 18px; background: #edfff5; color: #126b43; text-align: center; font-weight: 900; }

/* FAQ */
.faq { margin-bottom: 12px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--white); }
.faq summary { padding: 18px 20px; color: var(--navy); font-weight: 900; cursor: pointer; }
.faq p { margin: 0; padding: 0 20px 20px; color: var(--muted); }

/* Product page */
.product-shell { display: grid; grid-template-columns: minmax(0, 1.04fr) minmax(360px, .96fr); gap: 54px; align-items: start; }
.product-shell > * { min-width: 0; }
.product-main-image {
  width: 100%;
  height: min(560px, 48vw);
  min-height: 430px;
  object-fit: cover;
  border-radius: 30px;
  box-shadow: 0 18px 42px rgba(11, 46, 102, .14);
}
.product-info { position: sticky; top: 112px; }
.product-info h1 { margin-bottom: 10px; font-size: clamp(38px, 4vw, 54px); }
.rating { color: #d99a00; font-weight: 900; }
.feature-list { margin: 20px 0; padding: 0; display: grid; gap: 10px; list-style: none; }
.feature-list li { padding: 12px 15px; border-radius: 14px; background: var(--aqua-soft); color: var(--blue); font-weight: 800; }
.quantity { margin: 22px 0; display: flex; align-items: center; gap: 13px; }
.quantity input { width: 88px; }

/* Cart */
.cart-row { padding: 18px 0; display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; gap: 20px; align-items: center; border-bottom: 1px solid var(--line); }
.cart-row img { width: 112px; height: 90px; object-fit: cover; border-radius: 15px; }
.cart-row h3 { margin-bottom: 4px; }
.cart-item-actions { display: flex; align-items: center; gap: 8px; }
.remove-item { padding: 0; border: 0; background: none; color: var(--coral-dark); font-weight: 900; }
.empty-cart { padding: 54px 20px; border: 2px dashed var(--line); border-radius: 24px; text-align: center; }
.checkout-bar { padding-top: 26px; text-align: right; }
.cart-fly {
  position: fixed;
  z-index: 1000;
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 10px 28px rgba(6, 33, 74, .4);
  pointer-events: none;
  transition: transform .7s cubic-bezier(.2, .7, .2, 1), opacity .7s;
}

/* Checkout modal */
.modal { position: fixed; inset: 0; z-index: 500; padding: 20px; display: none; align-items: center; justify-content: center; background: rgba(4, 26, 61, .82); }
.modal.open { display: flex; }
.modal-card { position: relative; width: min(680px, 100%); max-height: 92vh; overflow: auto; padding: 30px; border-radius: 28px; background: var(--white); box-shadow: 0 24px 70px rgba(0, 0, 0, .34); }
.modal-card h2 { padding-right: 45px; }
.modal-close { position: absolute; top: 14px; right: 16px; width: 42px; height: 42px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--ice); color: var(--navy); font-size: 27px; line-height: 1; }
.checkout-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 15px; }
.checkout-grid .wide { grid-column: 1 / -1; }
.checkout-success { display: none; padding: 54px 20px; text-align: center; }
.checkout-success h2 { margin-top: 12px; font-size: 38px; }

/* Footer */
.footer { padding-block: 48px 30px; background: #041a3d; color: #c9d8ec; }
.footgrid { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 34px; }
.footer .logo { display: inline-block; margin-bottom: 12px; color: var(--white); }
.footer h4 { margin: 0 0 13px; color: var(--white); }
.footer p { max-width: 31ch; color: #9fb6d6; font-size: 14px; }
.footer a:not(.logo) { display: block; margin-block: 7px; font-size: 14px; font-weight: 700; }
.footer a:hover { color: var(--aqua); }

@media (max-width: 1000px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero-grid { grid-template-columns: 1fr 1fr; gap: 34px; }
  .nav { gap: 14px; }
  .nav a { font-size: 13px; }
}

@media (max-width: 820px) {
  .head { position: relative; }
  .headin { min-height: auto; padding-block: 15px 13px; flex-wrap: wrap; gap: 14px; }
  .nav { width: 100%; margin-left: 0; padding-bottom: 0; justify-content: flex-start; flex-wrap: wrap; gap: 8px 15px; overflow: visible; }
  .nav a { font-size: 12.5px; }
  .hero { padding-block: 50px; }
  .hero-grid, .product-shell { grid-template-columns: 1fr; }
  .hero img { height: 390px; }
  .product-main-image { height: min(620px, 82vw); min-height: 360px; }
  .product-info { position: static; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footgrid { grid-template-columns: 1.5fr 1fr 1fr; }
  .footgrid > :last-child { grid-column: 2; }
}

@media (max-width: 560px) {
  .wrap { width: min(100% - 30px, 1180px); }
  h1 { font-size: 39px; }
  .hero img { height: 310px; border-radius: 24px; }
  .section { padding-block: 44px; }
  .section-head { align-items: flex-start; flex-direction: column; }
  .grid, .grid.three { grid-template-columns: 1fr; }
  .card > img, .card > a:first-child img { height: 230px; }
  .footgrid { grid-template-columns: 1fr 1fr; }
  .footgrid > :last-child { grid-column: auto; }
  .product-main-image { height: 340px; min-height: 0; border-radius: 22px; }
  .product-info .pill { width: 100%; margin-bottom: 10px; }
  .cart-row { grid-template-columns: 82px minmax(0, 1fr); gap: 14px; }
  .cart-row img { width: 82px; height: 72px; }
  .cart-row > .price { grid-column: 2; margin: -4px 0 0; }
  .checkout-grid { grid-template-columns: 1fr; }
  .checkout-grid .wide { grid-column: auto; }
  .modal-card { padding: 24px 20px; border-radius: 22px; }
  .form-card { padding: 23px 18px; }
  .form-card form .pill, .modal-card form .pill { width: 100%; }
  .logo { font-size: 26px; }
  .nav { gap: 8px 13px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
