/* =========================================================
   Omas Gears & Accessories — Design tokens
   Palette drawn from the beadwork itself: moss/olive (the
   fabric lining + lime beads), warm bone background, brass
   for hardware, dusty blush for the pearl/peach beadwork.
   ========================================================= */
:root {
  --bone: #F2EEE3;
  --bone-deep: #E7E0CE;
  --ink: #2B2A22;
  --moss: #4B5A2F;
  --moss-deep: #38431F;
  --brass: #A9895C;
  --blush: #E9C7AE;
  --line: rgba(43, 42, 34, 0.14);
  --white: #FFFDF8;

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Work Sans", -apple-system, BlinkMacSystemFont, sans-serif;

  --max-width: 1160px;
  --radius: 2px;
}

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

body {
  margin: 0;
  background: var(--bone);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  margin: 0;
  color: var(--ink);
}

h1 { font-size: clamp(2.4rem, 5vw, 4.2rem); font-weight: 500; }
h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; max-width: 62ch; }

.eyebrow-note {
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--moss-deep);
  font-style: italic;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bone);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
  gap: 24px;
}

.brand {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.brand span { color: var(--moss); }

.main-nav {
  display: flex;
  gap: 28px;
  align-items: center;
}
.main-nav a {
  font-size: 0.95rem;
  color: var(--ink);
  position: relative;
  padding-bottom: 3px;
}
.main-nav a.active,
.main-nav a:hover {
  color: var(--moss-deep);
}
.main-nav a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -3px;
  height: 2px;
  background: var(--moss);
}

.cart-link {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--ink);
  padding: 8px 14px;
  border-radius: var(--radius);
  font-size: 0.9rem;
}
.cart-link:hover { background: var(--ink); color: var(--white); }
#cart-count { font-weight: 600; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  color: var(--ink);
}

@media (max-width: 760px) {
  .main-nav {
    position: fixed;
    top: 64px; left: 0; right: 0;
    background: var(--bone);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 24px 28px;
    gap: 18px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
  }
  .main-nav.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .nav-toggle { display: block; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--white);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn:hover { background: var(--moss-deep); border-color: var(--moss-deep); }

.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-outline:hover { background: var(--ink); color: var(--white); }

.btn-block { width: 100%; justify-content: center; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ---------- Hero ---------- */
.hero {
  padding: 56px 0 88px;
}
.hero .wrap {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.hero-copy .eyebrow-note { display: block; margin-bottom: 14px; }
.hero-copy h1 { margin-bottom: 22px; }
.hero-copy p { font-size: 1.08rem; margin-bottom: 30px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-photo {
  position: relative;
}
.hero-photo img {
  width: 100%;
  height: 560px;
  object-fit: cover;
  border-radius: var(--radius);
}
.hero-photo::before {
  content: "";
  position: absolute;
  top: 20px; left: -20px;
  width: 100%;
  height: 100%;
  border: 1px solid var(--moss);
  z-index: -1;
}

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-photo { order: -1; }
  .hero-photo img { height: 380px; }
  .hero-photo::before { display: none; }
}

/* ---------- Section headers ---------- */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 36px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 22px;
}
.section-head p { margin: 8px 0 0; }

/* ---------- Colour shop strip ---------- */
.colour-strip {
  padding: 60px 0;
}
.colour-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.colour-card {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--radius);
}
.colour-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.colour-card:hover img { transform: scale(1.04); }
.colour-card .tag {
  position: absolute;
  left: 16px; bottom: 16px;
  background: var(--white);
  padding: 8px 16px;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: var(--radius);
}

@media (max-width: 760px) {
  .colour-grid { grid-template-columns: 1fr; }
}

/* ---------- Product grid ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px 24px;
  padding: 20px 0 80px;
}
.product-card {
  display: block;
}
.product-photo {
  aspect-ratio: 1 / 1.1;
  overflow: hidden;
  background: var(--bone-deep);
  border-radius: var(--radius);
  margin-bottom: 14px;
}
.product-photo img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.4s ease;
}
.product-card:hover .product-photo img { transform: scale(1.03); }
.product-name { font-family: var(--font-display); font-size: 1.08rem; margin-bottom: 4px; }
.product-price { color: var(--moss-deep); font-weight: 600; }

@media (max-width: 900px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .product-grid { grid-template-columns: 1fr; gap: 40px; }
}

/* ---------- Story / craft section ---------- */
.story {
  background: var(--moss);
  color: var(--white);
  padding: 80px 0;
}
.story .wrap {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
  align-items: center;
}
.story h2 { color: var(--white); margin-bottom: 20px; }
.story p { color: rgba(255,255,255,0.86); }
.story-photo img { border-radius: var(--radius); height: 420px; object-fit: cover; width: 100%; }

@media (max-width: 900px) {
  .story .wrap { grid-template-columns: 1fr; }
  .story-photo { order: -1; }
  .story-photo img { height: 300px; }
}

/* ---------- Product detail page ---------- */
.product-detail {
  padding: 48px 0 90px;
}
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 0.85fr;
  gap: 60px;
}
.detail-photo img {
  width: 100%;
  border-radius: var(--radius);
  aspect-ratio: 1/1.05;
  object-fit: cover;
}
.breadcrumb {
  font-size: 0.88rem;
  color: var(--moss-deep);
  margin-bottom: 24px;
  display: block;
}
.detail-info h1 { font-size: 2rem; margin-bottom: 10px; }
.detail-price { font-size: 1.4rem; color: var(--moss-deep); font-weight: 600; margin-bottom: 22px; }
.detail-desc { margin-bottom: 28px; }
.qty-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}
.qty-control {
  display: flex;
  align-items: center;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
}
.qty-control button {
  background: none; border: none;
  width: 38px; height: 38px;
  font-size: 1.1rem; cursor: pointer;
}
.qty-control input {
  width: 40px; text-align: center;
  border: none; background: none;
  font-family: var(--font-body); font-size: 1rem;
}
.detail-meta {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 0.92rem;
  color: rgba(43,42,34,0.75);
}
.detail-meta div { margin-bottom: 6px; }

@media (max-width: 860px) {
  .detail-grid { grid-template-columns: 1fr; }
}

/* ---------- Cart page ---------- */
.cart-page { padding: 48px 0 100px; }
.cart-table { width: 100%; border-collapse: collapse; margin-bottom: 36px; }
.cart-table th {
  text-align: left;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(43,42,34,0.6);
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
  font-weight: 600;
}
.cart-table td {
  border-bottom: 1px solid var(--line);
  padding: 20px 8px;
  vertical-align: middle;
}
.cart-item-info { display: flex; gap: 16px; align-items: center; }
.cart-item-info img { width: 76px; height: 76px; object-fit: cover; border-radius: var(--radius); }
.cart-item-name { font-family: var(--font-display); font-size: 1.05rem; }
.remove-link { font-size: 0.85rem; color: var(--moss-deep); cursor: pointer; }
.remove-link:hover { text-decoration: underline; }

.cart-summary {
  max-width: 380px;
  margin-left: auto;
  border: 1px solid var(--line);
  padding: 26px;
  border-radius: var(--radius);
  background: var(--white);
}
.summary-row {
  display: flex; justify-content: space-between;
  margin-bottom: 12px; font-size: 0.96rem;
}
.summary-total {
  font-weight: 600; font-size: 1.1rem;
  border-top: 1px solid var(--line);
  padding-top: 14px; margin-top: 6px;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}
.empty-state p { margin: 0 auto 20px; }

/* ---------- Checkout form ---------- */
.checkout-grid {
  display: grid;
  grid-template-columns: 1fr 0.85fr;
  gap: 56px;
}
.field { margin-bottom: 18px; }
.field label {
  display: block; font-size: 0.88rem; margin-bottom: 6px;
  color: rgba(43,42,34,0.75);
}
.field input, .field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.98rem;
  background: var(--white);
}
.field input:focus, .field textarea:focus {
  outline: 2px solid var(--moss);
  outline-offset: 1px;
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.order-summary-box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  background: var(--white);
  height: fit-content;
}
.order-line {
  display: flex; justify-content: space-between;
  font-size: 0.92rem; margin-bottom: 10px;
}

@media (max-width: 860px) {
  .checkout-grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
}

/* ---------- About page ---------- */
.about-hero { padding: 60px 0 40px; max-width: 720px; }
.about-body { padding-bottom: 80px; }
.about-body .wrap { max-width: 720px; }
.about-body p { max-width: none; font-size: 1.05rem; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 46px 0 40px;
  margin-top: 40px;
}
.footer-grid {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 30px;
}
.footer-grid h4 { font-size: 0.95rem; margin-bottom: 14px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 8px; font-size: 0.92rem; }
.footer-bottom {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: rgba(43,42,34,0.6);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: 26px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: var(--white);
  padding: 14px 24px;
  border-radius: var(--radius);
  font-size: 0.92rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 100;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
