:root {
  --ink: #152326;
  --muted: #627477;
  --paper: #f7fbfa;
  --surface: #ffffff;
  --line: #dfe9e7;
  --deep: #112b2e;
  --teal: #2ca6b1;
  --cyan: #84dce7;
  --green: #9acb82;
  --violet: #8372c7;
  --gold: #c7b276;
  --shadow: 0 18px 45px rgba(21, 35, 38, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(132, 220, 231, 0.16), transparent 340px),
    var(--paper);
  overflow-x: hidden;
}

body.modal-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(247, 251, 250, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
}

.brand img {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--deep);
}

.brand span {
  display: grid;
  gap: 2px;
}

.brand strong,
h1,
h2,
h3 {
  font-family: "Cormorant Garamond", serif;
}

.brand strong {
  font-size: 1.6rem;
  line-height: 1;
}

.brand small {
  color: var(--muted);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.94rem;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--teal);
}

.cart-chip,
.button,
.text-button,
.quantity-control button {
  cursor: pointer;
}

.cart-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--ink);
  background: var(--surface);
}

.cart-chip span {
  min-width: 24px;
  min-height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: var(--deep);
  font-size: 0.78rem;
  font-weight: 800;
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.shop-hero {
  min-height: 320px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  align-items: center;
  gap: 34px;
  padding: 42px 0 30px;
  border-bottom: 1px solid var(--line);
}

.hero-copy {
  max-width: 640px;
  min-width: 0;
}

.eyebrow,
.product-kicker {
  margin: 0 0 10px;
  color: #337a82;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  font-size: 4.2rem;
  line-height: 0.96;
  letter-spacing: 0;
  overflow-wrap: break-word;
}

h2 {
  margin-bottom: 0;
  font-size: 2.3rem;
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.75rem;
  line-height: 1.05;
  letter-spacing: 0;
}

p {
  color: var(--muted);
  line-height: 1.7;
  overflow-wrap: break-word;
}

.hero-logo {
  width: 100%;
  max-width: 280px;
  aspect-ratio: 1;
  justify-self: end;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.shop-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
  padding: 34px 0;
}

.section-title {
  margin-bottom: 18px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.product-card,
.cart-panel,
.empty-state,
.contact-tile {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.product-card {
  overflow: hidden;
  transition: border-color 160ms ease, transform 160ms ease;
}

.product-card:hover,
.product-card:focus {
  border-color: var(--teal);
  transform: translateY(-2px);
  outline: none;
}

.product-art {
  height: 190px;
  background: var(--deep);
}

.product-art img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.product-info {
  padding: 18px;
}

.product-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}

.product-row strong {
  font-size: 1.45rem;
}

.button {
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 12px 14px;
  font-weight: 800;
}

.button-primary {
  width: 100%;
  color: #fff;
  background: var(--deep);
}

.button-secondary {
  color: #08383e;
  background: rgba(132, 220, 231, 0.22);
  border-color: rgba(44, 166, 177, 0.32);
}

.button:hover,
.cart-chip:hover,
.text-button:hover,
.quantity-control button:hover {
  border-color: var(--teal);
}

.cart-panel {
  position: sticky;
  top: 100px;
  padding: 18px;
}

.cart-head,
.cart-total,
.cart-item,
.quantity-control {
  display: flex;
  align-items: center;
}

.cart-head,
.cart-total,
.cart-item {
  justify-content: space-between;
  gap: 14px;
}

.text-button {
  border: 0;
  color: var(--teal);
  background: transparent;
  font-weight: 800;
}

.cart-items {
  display: grid;
  gap: 12px;
  margin: 18px 0;
}

.cart-item {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.cart-item div:first-child {
  display: grid;
  gap: 4px;
}

.cart-item span {
  color: var(--muted);
  font-size: 0.9rem;
}

.quantity-control {
  gap: 10px;
}

.quantity-control button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--paper);
  font-weight: 800;
}

.quantity-control span {
  min-width: 22px;
  text-align: center;
  color: var(--ink);
  font-weight: 800;
}

.empty-cart {
  margin: 0;
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  text-align: center;
}

.cart-total {
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.cart-total strong {
  font-size: 1.5rem;
}

.cart-total-final {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.estimate-highlight {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid rgba(44, 166, 177, 0.28);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(132, 220, 231, 0.18), rgba(132, 220, 231, 0.08));
}

.estimate-highlight-label {
  margin-bottom: 6px;
  color: #116c77;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.estimate-highlight strong {
  display: block;
  margin-bottom: 8px;
  font-size: 2rem;
}

.estimate-highlight p:last-child {
  margin-bottom: 0;
  color: var(--ink);
  line-height: 1.55;
}

.shipping-estimator {
  display: grid;
  gap: 8px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.shipping-estimator span {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 800;
}

.shipping-estimator select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--ink);
  background: var(--paper);
}

.shipping-estimator small {
  color: var(--muted);
  line-height: 1.5;
}

.checkout-form {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.checkout-form label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 800;
}

.checkout-form input,
.checkout-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--ink);
  background: var(--paper);
  resize: vertical;
}

.form-note {
  margin: 0;
  font-size: 0.84rem;
}

#order-status {
  margin-top: 2px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fbfc;
  color: var(--ink);
  font-weight: 700;
}

#order-status.status-pending {
  background: #eef8fb;
  border-color: rgba(23, 134, 147, 0.28);
  color: #0d6570;
}

#order-status.status-success {
  background: #edf9f1;
  border-color: rgba(40, 141, 74, 0.28);
  color: #1f6b38;
}

#order-status.status-error {
  background: #fff2f2;
  border-color: rgba(163, 24, 24, 0.2);
  color: #a31818;
}

#order-submit:disabled {
  opacity: 0.72;
  cursor: wait;
}

.reviews-section,
.contact-section {
  padding: 34px 0;
  border-top: 1px solid var(--line);
}

.empty-state {
  padding: 24px;
}

.empty-state p {
  margin: 8px 0 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.contact-form-panel {
  margin-top: 24px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.contact-tile {
  display: grid;
  gap: 8px;
  padding: 20px;
}

.contact-tile span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contact-tile strong {
  color: #116c77;
}

.contact-page {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 30px;
  align-items: center;
  min-height: 420px;
  padding: 46px 0;
}

.contact-logo {
  width: 100%;
  max-width: 240px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.site-footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 36px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.site-footer span {
  color: var(--ink);
  font-weight: 800;
}

.product-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.product-modal[aria-hidden="false"] {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 43, 46, 0.62);
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  max-height: min(820px, calc(100vh - 48px));
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 24px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  padding: 22px;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--paper);
  cursor: pointer;
  font-weight: 800;
}

.modal-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-content: start;
}

.modal-gallery img {
  width: 100%;
  aspect-ratio: 1;
  display: block;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.modal-gallery img:first-child {
  grid-column: 1 / -1;
  aspect-ratio: 4 / 3;
}

.modal-copy {
  padding: 28px 8px 8px;
}

.modal-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 22px 0;
}

.modal-price-row strong {
  font-size: 1.8rem;
}

.modal-reviews {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.modal-reviews h3 {
  font-size: 1.45rem;
}

@media (max-width: 960px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .shop-hero,
  .shop-layout,
  .contact-page {
    grid-template-columns: 1fr;
  }

  .hero-logo,
  .contact-logo {
    justify-self: start;
  }

  .cart-panel {
    position: static;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .modal-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  main,
  .site-footer {
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
  }

  .topbar {
    gap: 12px;
    padding: 8px 12px 10px;
  }

  .brand {
    gap: 8px;
    min-width: 0;
  }

  .brand img {
    width: 40px;
    height: 40px;
  }

  .brand strong {
    font-size: 1.2rem;
  }

  .brand small {
    font-size: 0.82rem;
  }

  .site-nav {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    align-items: stretch;
    font-size: 0.82rem;
  }

  .site-nav a,
  .cart-chip {
    width: 100%;
    min-height: 40px;
    justify-content: center;
    text-align: center;
    padding: 8px 10px;
    line-height: 1.2;
  }

  h1 {
    font-size: 2.45rem;
    line-height: 1.02;
  }

  h2 {
    font-size: 2rem;
  }

  .shop-hero {
    min-height: 0;
    padding-top: 28px;
    overflow: hidden;
  }

  .hero-copy,
  .catalog,
  .product-card,
  .cart-panel,
  .empty-state,
  .contact-tile {
    max-width: 100%;
    min-width: 0;
  }

  .product-info {
    min-width: 0;
  }

  .product-row,
  .cart-item,
  .contact-grid,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .contact-form-panel {
    padding: 18px;
  }

  .product-row,
  .cart-item,
  .site-footer {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 420px) {
  main,
  .site-footer {
    width: calc(100vw - 56px);
    max-width: 334px;
    margin-left: 12px;
    margin-right: auto;
  }

  h1 {
    font-size: 2.2rem;
  }

  .hero-logo,
  .contact-logo {
    max-width: 280px;
  }

  .product-modal {
    padding: 12px;
  }

  .modal-card {
    max-height: calc(100vh - 24px);
    padding: 14px;
  }

  .modal-gallery {
    grid-template-columns: 1fr;
  }

  .modal-copy {
    padding: 8px 0 0;
  }

  .modal-price-row {
    align-items: stretch;
    flex-direction: column;
  }
}
