/* ==========================================================================
   Cup Lovers — стилі сайту
   Кольори й шрифти — за брендбуком (Brand Guideline Cup Lovers, 2026)
   ========================================================================== */

:root {
  --cl-sage: #84987C;
  --cl-sage-dark: #6d8065;
  --cl-rose: #E0A6A7;
  --cl-taupe: #AB9685;
  --cl-ink: #323435;
  --cl-cream: #FBF5EC;
  --cl-cream-deep: #F3EADC;
  --cl-navy: #0C254C;
  --cl-gold: #DFC09F;
  --cl-white: #FFFFFF;

  --cl-font-head: 'Nunito', sans-serif;
  --cl-font-body: 'Inter', sans-serif;

  --cl-radius: 20px;
  --cl-radius-sm: 12px;
  --cl-container: 1180px;
}

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

body {
  margin: 0;
  font-family: var(--cl-font-body);
  color: var(--cl-ink);
  background: var(--cl-cream);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--cl-font-head);
  margin: 0 0 .5em;
  line-height: 1.15;
  font-weight: 700;
}

h1 { font-size: clamp(2.1rem, 4vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 600; }
h3 { font-size: 1.2rem; font-weight: 600; }

p { margin: 0 0 1em; }

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

img { max-width: 100%; display: block; }

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

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 245, 236, .92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(50, 52, 53, .08);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  max-width: var(--cl-container);
  margin: 0 auto;
}

.logo {
  font-family: var(--cl-font-head);
  font-weight: 800;
  font-size: 1.35rem;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--cl-ink);
}
.logo .heart { color: var(--cl-sage); font-size: 1.1rem; }

.main-nav { display: flex; gap: 28px; align-items: center; }
.main-nav a {
  font-size: .95rem;
  font-weight: 500;
  color: var(--cl-ink);
  opacity: .8;
  transition: opacity .15s;
}
.main-nav a:hover, .main-nav a.active { opacity: 1; color: var(--cl-sage-dark); }

.nav-cta {
  background: var(--cl-sage);
  color: var(--cl-white) !important;
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 600 !important;
  opacity: 1 !important;
}
.nav-cta:hover { background: var(--cl-sage-dark); }

.burger { display: none; background: none; border: 0; font-size: 1.5rem; cursor: pointer; }

@media (max-width: 820px) {
  .main-nav { position: fixed; inset: 64px 0 0 0; background: var(--cl-cream); flex-direction: column; padding: 24px; gap: 18px; transform: translateY(-110%); transition: transform .25s ease; }
  .main-nav.open { transform: translateY(0); }
  .burger { display: block; }
}

/* ---------- Hero ---------- */
.hero {
  padding: 76px 0 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -180px; left: 50%;
  transform: translateX(-50%);
  width: 720px; height: 720px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(132,152,124,.16) 0%, rgba(132,152,124,0) 70%);
  z-index: 0;
}
.hero__inner { position: relative; z-index: 1; max-width: 720px; margin: 0 auto; }
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--cl-white);
  color: var(--cl-sage-dark);
  padding: 8px 18px 8px 8px;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 700;
  margin-bottom: 22px;
  box-shadow: 0 6px 18px rgba(50,52,53,.08);
}
.hero__eyebrow .mark {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--cl-sage); color: var(--cl-white);
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem;
}
.hero h1 { color: var(--cl-ink); }
.hero h1 em { font-style: normal; color: var(--cl-sage-dark); }
.hero p.lead {
  font-size: 1.12rem;
  max-width: 52ch;
  opacity: .8;
  margin: 0 auto;
}
.hero__actions { display: flex; gap: 14px; margin-top: 28px; justify-content: center; flex-wrap: wrap; }

/* Ланцюжок медальйонів під заголовком */
.hero__chain {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 0;
  margin-top: 56px;
  padding-bottom: 60px;
}
.hero__chain img {
  border-radius: 50%;
  object-fit: cover;
  border: 5px solid var(--cl-cream);
  box-shadow: 0 14px 30px rgba(50,52,53,.14);
  margin: 0 -18px;
  background: var(--cl-cream-deep);
}
.hero__chain a:nth-child(1) img { width: 84px; height: 84px; outline: 3px solid var(--cl-rose); }
.hero__chain a:nth-child(2) img { width: 128px; height: 128px; outline: 3px solid var(--cl-sage); margin-bottom: 22px; z-index: 2; }
.hero__chain a:nth-child(3) img { width: 168px; height: 168px; outline: 3px solid var(--cl-taupe); z-index: 3; }
.hero__chain a:nth-child(4) img { width: 128px; height: 128px; outline: 3px solid var(--cl-gold); margin-bottom: 22px; z-index: 2; }
.hero__chain a:nth-child(5) img { width: 84px; height: 84px; outline: 3px solid var(--cl-rose); }

@media (max-width: 700px) {
  .hero__chain { flex-wrap: wrap; padding-bottom: 30px; }
  .hero__chain img { margin: 0 -10px; }
  .hero__chain a:nth-child(1) img, .hero__chain a:nth-child(5) img { width: 58px; height: 58px; }
  .hero__chain a:nth-child(2) img, .hero__chain a:nth-child(4) img { width: 92px; height: 92px; margin-bottom: 12px; }
  .hero__chain a:nth-child(3) img { width: 116px; height: 116px; }
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: .98rem;
  border: 2px solid transparent;
  cursor: pointer;
  font-family: var(--cl-font-body);
  transition: transform .15s, background .15s, border-color .15s;
}
.btn-primary { background: var(--cl-sage); color: var(--cl-white); }
.btn-primary:hover { background: var(--cl-sage-dark); transform: translateY(-1px); }
.btn-outline { background: transparent; border-color: var(--cl-ink); color: var(--cl-ink); }
.btn-outline:hover { background: var(--cl-ink); color: var(--cl-cream); }
.btn-sm { padding: 10px 18px; font-size: .88rem; }

/* ---------- Values / strip ---------- */
.values {
  padding: 50px 0;
  border-top: 1px solid rgba(50,52,53,.08);
  border-bottom: 1px solid rgba(50,52,53,.08);
}
.values__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}
.value-item { text-align: left; }
.value-item .dot {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--cl-cream-deep);
  color: var(--cl-sage-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; margin-bottom: 12px;
}
.value-item h4 { font-family: var(--cl-font-head); font-size: 1rem; margin-bottom: 6px; }
.value-item p { font-size: .92rem; opacity: .75; margin: 0; }

@media (max-width: 760px) {
  .values__grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Section heading ---------- */
.section { padding: 64px 0; }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.section-head p { max-width: 50ch; opacity: .75; margin: 0; }

/* ---------- Category shelf (home) — стрічка круглих бейджів ---------- */
.cat-shelf {
  display: flex;
  gap: 28px;
  overflow-x: auto;
  padding: 8px 4px 16px;
  scrollbar-width: thin;
}
.cat-shelf::-webkit-scrollbar { height: 6px; }
.cat-shelf::-webkit-scrollbar-thumb { background: rgba(50,52,53,.15); border-radius: 999px; }

.cat-badge {
  flex: 0 0 auto;
  width: 148px;
  text-align: center;
}
.cat-badge__photo {
  position: relative;
  width: 128px; height: 128px;
  border-radius: 50%;
  margin: 0 auto 14px;
  overflow: hidden;
  isolation: isolate;
}
.cat-badge__photo img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .35s ease;
}
.cat-badge:hover .cat-badge__photo img { transform: scale(1.08); }
/* Кольорова ужимка поверх фото — щоб різні фото товарів виглядали як єдина серія */
.cat-badge__photo::after {
  content: '';
  position: absolute; inset: 0;
  mix-blend-mode: multiply;
  opacity: .5;
}
.cat-badge:nth-child(8n+1) .cat-badge__photo { outline: 4px solid var(--cl-sage); }
.cat-badge:nth-child(8n+1) .cat-badge__photo::after { background: var(--cl-sage); }
.cat-badge:nth-child(8n+2) .cat-badge__photo { outline: 4px solid var(--cl-rose); }
.cat-badge:nth-child(8n+2) .cat-badge__photo::after { background: var(--cl-rose); }
.cat-badge:nth-child(8n+3) .cat-badge__photo { outline: 4px solid var(--cl-taupe); }
.cat-badge:nth-child(8n+3) .cat-badge__photo::after { background: var(--cl-taupe); }
.cat-badge:nth-child(8n+4) .cat-badge__photo { outline: 4px solid var(--cl-navy); }
.cat-badge:nth-child(8n+4) .cat-badge__photo::after { background: var(--cl-navy); }
.cat-badge:nth-child(8n+5) .cat-badge__photo { outline: 4px solid var(--cl-gold); }
.cat-badge:nth-child(8n+5) .cat-badge__photo::after { background: var(--cl-gold); }
.cat-badge:nth-child(8n+6) .cat-badge__photo { outline: 4px solid var(--cl-sage); }
.cat-badge:nth-child(8n+6) .cat-badge__photo::after { background: var(--cl-sage); }
.cat-badge:nth-child(8n+7) .cat-badge__photo { outline: 4px solid var(--cl-rose); }
.cat-badge:nth-child(8n+7) .cat-badge__photo::after { background: var(--cl-rose); }
.cat-badge:nth-child(8n+8) .cat-badge__photo { outline: 4px solid var(--cl-taupe); }
.cat-badge:nth-child(8n+8) .cat-badge__photo::after { background: var(--cl-taupe); }

.cat-badge h3 { font-size: .95rem; margin-bottom: 2px; }
.cat-badge span { font-size: .8rem; opacity: .6; }

/* ---------- Product grid ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px 20px;
}
@media (max-width: 980px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px) { .product-grid { grid-template-columns: repeat(2, 1fr); gap: 14px 12px; } }

.product-card {
  background: var(--cl-white);
  border-radius: var(--cl-radius-sm);
  overflow: hidden;
  border: 1px solid rgba(50,52,53,.07);
  display: flex;
  flex-direction: column;
  transition: box-shadow .2s, transform .2s;
}
.product-card:hover { box-shadow: 0 14px 30px rgba(50,52,53,.1); transform: translateY(-2px); }
/* Фото — на м'якій кольоровій "підставці" з відступом, а не встик: так студійні
   фото товару з різним тлом виглядають як єдина серія, а не випадковий набір. */
.product-card__img {
  aspect-ratio: 1/1;
  padding: 16px;
  overflow: hidden;
}
.product-card__img img {
  width: 100%; height: 100%; object-fit: contain;
  border-radius: calc(var(--cl-radius-sm) - 6px);
}
.product-card:nth-child(4n+1) .product-card__img { background: #EFE2DB; }
.product-card:nth-child(4n+2) .product-card__img { background: #E9EDE7; }
.product-card:nth-child(4n+3) .product-card__img { background: #F1E4D8; }
.product-card:nth-child(4n+4) .product-card__img { background: #ECE4DC; }
.product-card__body { padding: 14px 16px 16px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; flex: 1; }
.product-card__body h3 { font-size: .96rem; font-weight: 600; font-family: var(--cl-font-body); line-height: 1.35; }
.product-card__price { font-family: var(--cl-font-head); font-weight: 700; color: var(--cl-sage-dark); font-size: .95rem; margin-top: auto; }
.product-card__cta { margin-top: 6px; align-self: center; }

/* ---------- Category chips ---------- */
.cat-chips {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.cat-chip {
  padding: 9px 18px;
  border-radius: 999px;
  border: 1.5px solid rgba(50,52,53,.15);
  font-size: .88rem;
  font-weight: 500;
  background: var(--cl-white);
}
.cat-chip.active { background: var(--cl-ink); color: var(--cl-cream); border-color: var(--cl-ink); }
.cat-chip:hover:not(.active) { border-color: var(--cl-sage); }

/* ---------- Breadcrumb ---------- */
.breadcrumb { font-size: .85rem; opacity: .65; margin-bottom: 18px; }
.breadcrumb a:hover { text-decoration: underline; }

/* ---------- Product detail ---------- */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 52px;
  align-items: flex-start;
}
.pd-gallery__main {
  aspect-ratio: 1/1;
  border-radius: var(--cl-radius);
  overflow: hidden;
  background: #EFE2DB;
  margin-bottom: 12px;
  padding: 32px;
}
.pd-gallery__main img { width: 100%; height: 100%; object-fit: contain; border-radius: 10px; }
.pd-gallery__thumbs { display: flex; gap: 10px; }
.pd-gallery__thumbs img {
  width: 78px; height: 78px; object-fit: contain; border-radius: 10px;
  cursor: pointer; border: 2px solid transparent; background: #EFE2DB; padding: 8px;
}
.pd-gallery__thumbs img.active { border-color: var(--cl-sage); }

.pd-info .cat-chip { pointer-events: none; margin-bottom: 14px; display: inline-block; }
.pd-info h1 { font-size: 1.7rem; }
.pd-info .sku { opacity: .55; font-size: .85rem; margin-bottom: 18px; }
.pd-info .price { font-family: var(--cl-font-head); font-size: 1.3rem; font-weight: 700; color: var(--cl-sage-dark); margin-bottom: 6px; }
.pd-info .price small { font-family: var(--cl-font-body); font-weight: 400; font-size: .8rem; opacity: .6; display: block; }
.pd-info .desc { margin: 22px 0; opacity: .88; }
.pd-info .desc h4 { font-family: var(--cl-font-body); font-size: .9rem; text-transform: none; opacity: .55; margin-bottom: 8px; }

.pd-note {
  margin-top: 26px;
  padding: 16px 18px;
  background: var(--cl-cream-deep);
  border-radius: var(--cl-radius-sm);
  font-size: .88rem;
  opacity: .8;
}

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

/* ---------- CTA banner ---------- */
.cta-banner {
  position: relative;
  background: var(--cl-rose);
  color: var(--cl-ink);
  border-radius: var(--cl-radius);
  padding: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  overflow: hidden;
  isolation: isolate;
}
.cta-banner::before {
  content: '♥';
  position: absolute;
  right: -30px; top: -40px;
  font-size: 220px;
  color: rgba(50,52,53,.06);
  z-index: -1;
  font-family: var(--cl-font-head);
}
.cta-banner h2 { color: var(--cl-ink); margin-bottom: 8px; }
.cta-banner p { opacity: .75; margin: 0; max-width: 46ch; }
.cta-banner .btn-primary { background: var(--cl-ink); color: var(--cl-cream); }
.cta-banner .btn-primary:hover { background: #46484a; }

/* ---------- Info blocks (about) ---------- */
.about-block { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.about-block img { border-radius: var(--cl-radius); width: 100%; aspect-ratio: 4/3; object-fit: cover; }
@media (max-width: 860px) { .about-block { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--cl-taupe);
  color: var(--cl-ink);
  padding: 56px 0 28px;
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 32px;
  margin-bottom: 36px;
}
.footer-grid h4 { color: var(--cl-ink); font-size: .95rem; margin-bottom: 14px; }
.footer-grid a, .footer-grid p { color: rgba(50,52,53,.72); font-size: .9rem; display: block; margin-bottom: 8px; }
.footer-grid a:hover { color: var(--cl-ink); text-decoration: underline; }
.footer-logo { font-family: var(--cl-font-head); font-weight: 800; font-size: 1.3rem; color: var(--cl-ink); margin-bottom: 10px; }
.footer-bottom {
  border-top: 1px solid rgba(50,52,53,.16);
  padding-top: 20px;
  font-size: .8rem;
  color: rgba(50,52,53,.6);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
@media (max-width: 780px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- Modal / lead form ---------- */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(50,52,53,.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--cl-cream);
  border-radius: var(--cl-radius);
  max-width: 440px;
  width: 100%;
  padding: 32px;
  position: relative;
  max-height: 92vh;
  overflow-y: auto;
}
.modal__close {
  position: absolute; top: 16px; right: 16px;
  background: none; border: 0; font-size: 1.3rem; cursor: pointer; opacity: .6;
}
.modal h3 { margin-bottom: 4px; }
.modal .modal-sub { font-size: .88rem; opacity: .65; margin-bottom: 20px; }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: .85rem; font-weight: 500; margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1.5px solid rgba(50,52,53,.18);
  font-family: var(--cl-font-body);
  font-size: .95rem;
  background: var(--cl-white);
}
.field input:focus, .field textarea:focus { outline: 2px solid var(--cl-sage); border-color: var(--cl-sage); }
.field textarea { resize: vertical; min-height: 70px; }

.form-msg { font-size: .88rem; margin-top: 10px; display: none; }
.form-msg.success { color: var(--cl-sage-dark); display: block; }
.form-msg.error { color: #b3453f; display: block; }

.modal .btn { width: 100%; justify-content: center; }

/* ---------- Empty state ---------- */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  opacity: .7;
}

/* focus visibility */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--cl-sage);
  outline-offset: 2px;
}

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