/* ============================================================
   ORTOPEDA.shop — design system
   Calm blue-green (teal) · friendly rounded type · 45+ readable
   Adapted for PHP site from Claude Design handoff bundle
   ============================================================ */

:root {
  /* color */
  --bg: #f4f8f7;
  --surface: #ffffff;
  --surface-2: #eef4f3;
  --ink: #16302f;
  --ink-2: #3c5755;
  --muted: #6b8482;
  --line: #dde8e6;
  --line-strong: #c7d8d5;

  --accent: #0d9488;
  --accent-ink: #ffffff;
  --accent-strong: #0a7a70;
  --accent-soft: #e6f5f3;
  --accent-tint: #edf6f5;
  --accent-line: #b3d9d4;

  --star: #f4a52b;
  --sale: #e15b4b;
  --ok: #2f9e54;

  /* type */
  --font-head: "Baloo 2", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, sans-serif;
  --fs: 18px;

  /* shape */
  --r-xl: 28px;
  --r-lg: 20px;
  --r-md: 14px;
  --r-sm: 10px;
  --r-pill: 999px;

  --sh-sm: 0 1px 2px rgba(16, 48, 47, 0.06), 0 1px 3px rgba(16, 48, 47, 0.05);
  --sh-md: 0 6px 18px rgba(16, 48, 47, 0.07), 0 2px 6px rgba(16, 48, 47, 0.05);
  --sh-lg:
    0 20px 48px rgba(16, 48, 47, 0.12), 0 6px 16px rgba(16, 48, 47, 0.07);

  --max: 1240px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.12;
  margin: 0;
  color: var(--ink);
  letter-spacing: -0.01em;
}

p {
  margin: 0;
  text-wrap: pretty;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font-family: inherit;
  cursor: pointer;
}
img {
  display: block;
  max-width: 100%;
}
ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 28px;
}
main {
  flex: 1;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: var(--r-pill);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.02rem;
  line-height: 1;
  padding: 15px 26px;
  min-height: 52px;
  transition:
    transform 0.12s ease,
    box-shadow 0.2s ease,
    background 0.2s ease,
    color 0.2s ease;
  white-space: nowrap;
}
.btn:active {
  transform: translateY(1px) scale(0.99);
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: var(--sh-sm);
}
.btn-primary:hover {
  background: var(--accent-strong);
  box-shadow: var(--sh-md);
}
.btn-ghost {
  background: var(--surface);
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--line-strong);
}
.btn-ghost:hover {
  box-shadow: inset 0 0 0 1.5px var(--accent);
  color: var(--accent-strong);
}
.btn-soft {
  background: var(--accent-soft);
  color: var(--accent-strong);
}
.btn-soft:hover {
  background: #d4eeec;
}
.btn-lg {
  min-height: 60px;
  padding: 18px 34px;
  font-size: 1.12rem;
}
.btn-sm {
  min-height: 42px;
  padding: 10px 18px;
  font-size: 0.95rem;
}
.btn-block {
  width: 100%;
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.linkish {
  color: var(--accent-strong);
  font-weight: 700;
  cursor: pointer;
}
.linkish:hover {
  text-decoration: underline;
}

/* ---------- chips / badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.8rem;
  padding: 5px 11px;
  border-radius: var(--r-pill);
  line-height: 1;
}
.badge-accent {
  background: var(--accent);
  color: #fff;
}
.badge-soft {
  background: var(--accent-soft);
  color: var(--accent-strong);
}
.badge-sale {
  background: var(--sale);
  color: #fff;
}
.badge-doc {
  background: #e9f3ee;
  color: #1f7a45;
}
.badge-new {
  background: #143;
}

/* ---------- cards ---------- */
.card {
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-sm);
  border: 1px solid var(--line);
}

/* ---------- image placeholder ---------- */
.ph {
  position: relative;
  overflow: hidden;
  background: repeating-linear-gradient(
    135deg,
    #edf6f5 0 14px,
    #e0efee 14px 28px
  );
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
}
.ph::after {
  content: attr(data-label);
  font-family: "Nunito", monospace;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #0d9488;
  background: rgba(255, 255, 255, 0.82);
  padding: 4px 9px;
  margin: 12px;
  border-radius: 7px;
  text-transform: lowercase;
}

/* ---------- stars ---------- */
.stars {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--star);
}
.stars svg {
  width: 17px;
  height: 17px;
}

/* ---------- header ---------- */
.hdr {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.hdr-top {
  display: flex;
  align-items: center;
  gap: 22px;
  height: 78px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 11px;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--ink);
  cursor: pointer;
  letter-spacing: -0.02em;
}
.logo-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--accent);
  display: grid;
  place-items: center;
  color: #fff;
  flex: none;
}
.logo-mark svg {
  width: 24px;
  height: 24px;
}
.logo b {
  color: var(--accent-strong);
}

.search {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-2);
  border: 1.5px solid transparent;
  border-radius: var(--r-pill);
  padding: 0 18px;
  height: 50px;
  max-width: 460px;
  transition: all 0.15s;
}
.search:focus-within {
  border-color: var(--accent);
  background: #fff;
}
.search input {
  flex: 1;
  border: 0;
  background: transparent;
  font-family: var(--font-body);
  font-size: 1rem;
  outline: none;
  color: var(--ink);
}
.search svg {
  width: 20px;
  height: 20px;
  color: var(--muted);
  flex: none;
}
.search form {
  flex: 1;
}

.hdr-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.icon-btn {
  position: relative;
  width: 50px;
  height: 50px;
  border-radius: var(--r-pill);
  background: transparent;
  border: 0;
  display: grid;
  place-items: center;
  color: var(--ink);
  transition: background 0.15s;
}
.icon-btn:hover {
  background: var(--surface-2);
}
.icon-btn svg {
  width: 24px;
  height: 24px;
}
.cart-count {
  position: absolute;
  top: 5px;
  right: 5px;
  min-width: 21px;
  height: 21px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.72rem;
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 2px var(--surface);
}

.hdr-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 52px;
  border-top: 1px solid var(--line);
}
.navlink {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink-2);
  padding: 9px 16px;
  border-radius: var(--r-pill);
  transition: all 0.15s;
  cursor: pointer;
}
.navlink:hover {
  background: var(--surface-2);
  color: var(--ink);
}
.navlink.on {
  color: var(--accent-strong);
  background: var(--accent-soft);
}
.nav-phone {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-2);
  font-weight: 700;
}
.nav-phone svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
}

/* ---------- announcement bar ---------- */
.announce {
  background: var(--accent-strong);
  color: #fff;
  text-align: center;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 9px 16px;
  letter-spacing: 0.01em;
}

/* ---------- trust strip ---------- */
.trust {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 13px;
}
.trust-ic {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  display: grid;
  place-items: center;
  flex: none;
}
.trust-ic svg {
  width: 24px;
  height: 24px;
}
.trust-item b {
  display: block;
  font-family: var(--font-head);
  font-size: 0.98rem;
  line-height: 1.2;
}
.trust-item span {
  font-size: 0.85rem;
  color: var(--muted);
}

/* ---------- footer ---------- */
.footer {
  background: var(--ink);
  color: #cfe0de;
  margin-top: 80px;
}
.footer a:hover {
  color: #fff;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.4fr;
  gap: 40px;
  padding: 56px 0 40px;
}
.footer h4 {
  color: #fff;
  font-size: 1.05rem;
  margin-bottom: 16px;
}
.footer ul {
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.footer li {
  color: #a9c3c0;
  cursor: pointer;
  font-size: 0.96rem;
}
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 22px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  color: #8fadaa;
  font-size: 0.88rem;
  flex-wrap: wrap;
}

/* ---------- product card ---------- */
.pcard {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    box-shadow 0.2s ease;
}
.pcard:hover {
  transform: translateY(-4px);
  box-shadow: var(--sh-md);
}
.pcard .ph {
  aspect-ratio: 4/3;
}
.pcard-badges {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 2;
}
.pcard-fav {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  border: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  z-index: 2;
}
.pcard-fav:hover {
  color: var(--sale);
}
.pcard-fav svg {
  width: 20px;
  height: 20px;
}
.pcard-body {
  padding: 17px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.pcard-cat {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.pcard-name {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.14rem;
  line-height: 1.2;
}
.pcard-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.86rem;
  color: var(--muted);
}
.pcard-foot {
  margin-top: auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  padding-top: 6px;
}
.price {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--ink);
  white-space: nowrap;
}
.price-old {
  font-size: 0.95rem;
  color: var(--muted);
  text-decoration: line-through;
  font-weight: 600;
}
.pcard-add {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  border: 0;
  display: grid;
  place-items: center;
  flex: none;
  transition: all 0.15s;
}
.pcard-add:hover {
  background: var(--accent);
  color: #fff;
}
.pcard-add svg {
  width: 23px;
  height: 23px;
}

/* ---------- grids ---------- */
.pgrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.pgrid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.section {
  padding: 64px 0;
}
.section-sm {
  padding: 44px 0;
}
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
}
.section-head h2 {
  font-size: 2.1rem;
}
.eyebrow {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--accent-strong);
  font-size: 0.92rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

/* ---------- forms ---------- */
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.field label {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink-2);
}
.field input,
.field select,
.field textarea {
  font-family: var(--font-body);
  font-size: 1.02rem;
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r-md);
  padding: 14px 16px;
  outline: none;
  transition: all 0.15s;
  width: 100%;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.field.err input,
.field.err select {
  border-color: var(--sale);
}
.field .msg {
  font-size: 0.82rem;
  color: var(--sale);
  font-weight: 600;
}

/* ---------- breadcrumb ---------- */
.crumbs {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 22px 0;
}
.crumbs span.sep {
  opacity: 0.5;
}
.crumbs .c-link {
  cursor: pointer;
}
.crumbs .c-link:hover {
  color: var(--accent-strong);
}

/* ---------- misc ---------- */
.divider {
  height: 1px;
  background: var(--line);
}
.muted {
  color: var(--muted);
}
.center {
  text-align: center;
}
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

/* ---------- cookie banner ---------- */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: var(--ink);
  color: #fff;
  padding: 20px 28px;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.15);
}
.cookie-banner-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.cookie-banner p {
  font-size: 0.95rem;
  max-width: 600px;
}
.cookie-banner a {
  color: var(--accent-soft);
  text-decoration: underline;
}
.cookie-btns {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

/* ---------- fade-in ---------- */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.route-anim {
  animation: rise 0.32s ease both;
}

/* ---------- policy pages ---------- */
.policy-page {
  max-width: 820px;
  padding: 60px 28px 80px;
}
.policy-page h1 {
  font-size: 2.4rem;
  margin-bottom: 28px;
}
.policy-page h2 {
  font-size: 1.5rem;
  margin: 32px 0 14px;
}
.policy-page p {
  margin-bottom: 14px;
  line-height: 1.7;
}
.policy-page ul {
  list-style: disc;
  padding-left: 24px;
  margin-bottom: 14px;
}
.policy-page li {
  margin-bottom: 6px;
}

/* ---------- toast ---------- */
.toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  padding: 15px 24px;
  border-radius: var(--r-pill);
  box-shadow: var(--sh-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 90;
  font-family: var(--font-head);
  font-weight: 600;
  animation: rise 0.25s ease;
}
.toast-check {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: var(--accent);
  display: grid;
  place-items: center;
  flex: none;
}
.toast a {
  color: #7fd6cd;
  margin-left: 6px;
  font-weight: 700;
}
.toast a:hover {
  text-decoration: underline;
}

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .pgrid {
    grid-template-columns: repeat(3, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 760px) {
  .pgrid,
  .pgrid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .trust {
    grid-template-columns: repeat(2, 1fr);
  }
  .search {
    display: none;
  }
  .cookie-banner-inner {
    flex-direction: column;
    text-align: center;
  }
  .cookie-btns {
    justify-content: center;
  }
}
