/* ===========================
   SOULHAPPY COLLECTIVE — CSS
   =========================== */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #F5F3EE;
  --white: #ffffff;
  --text: #2c2c2c;
  --text-light: #777777;
  --border: #e0ddd7;
  --accent: #3d3d3d;
  --font-body: 'Lato', 'Helvetica Neue', Arial, sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;
  --max-w: 1100px;
  --radius: 4px;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

/* ===========================
   HEADER / NAV
   =========================== */

.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 4.25rem;
}

/* Logo */
.logo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  text-decoration: none;
}

.logo img {
  height: 2.5rem;
  width: auto;
}



/* Center nav links */
.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
  justify-content: center;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text);
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  border-bottom-color: var(--text);
}

/* Right icons */
.nav-icons {
  display: flex;
  gap: 20px;
  justify-content: flex-end;
  align-items: center;
}

.nav-icons button,
.nav-icons a {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
}

.nav-icons button:hover,
.nav-icons a:hover {
  opacity: 0.6;
}

.nav-icons svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Cart badge */
.cart-wrap {
  position: relative;
}

.cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--text);
  color: var(--white);
  font-size: 9px;
  font-weight: 700;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  display: none;
}

/* Mobile hamburger */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-direction: column;
  gap: 5px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s;
}

/* Mobile nav drawer */
.mobile-nav {
  display: none;
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 20px 24px;
}

.mobile-nav.open {
  display: block;
}

.mobile-nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mobile-nav a {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

/* ===========================
   HERO BANNER
   =========================== */

.hero-banner {
  background-color: var(--white);
  overflow: hidden;
}

.hero-banner__img {
  display: block;
  width: 100%;
  height: 12.5rem;
  object-fit: contain;
  object-position: center;
}


/* ===========================
   SECTION HEADER + COLLECTION PILLS
   =========================== */

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 32px;
}

.section-header .section-title {
  margin-bottom: 0;
}

.collection-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pill {
  background: none;
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 6px 16px;
  font-size: 13px;
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--text-light);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.pill:hover {
  border-color: var(--text);
  color: var(--text);
}

.pill--active {
  background: var(--text);
  border-color: var(--text);
  color: var(--white);
}

/* ===========================
   SECTION: OUR SELECTION
   =========================== */

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

.section-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 4vw, 32px);
  font-weight: 400;
  color: var(--text);
  margin-bottom: 32px;
}

/* Product Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.product-card {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.product-card:hover .product-img-wrap img {
  transform: scale(1.03);
}

.product-img-wrap {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--white);
  margin-bottom: 12px;
}

.product-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.product-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 6px;
}

.product-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.4;
}

.product-price {
  font-size: 13px;
  color: var(--text-light);
}

/* ===========================
   DIVIDER
   =========================== */

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}

/* ===========================
   FOOTER / WELCOME + EMAIL
   =========================== */

.site-footer {
  background: var(--bg);
  text-align: center;
  padding: 64px 24px 40px;
}

.footer-welcome h2 {
  font-family: var(--font-display);
  font-size: clamp(16px, 3vw, 22px);
  font-weight: 400;
  margin-bottom: 12px;
  color: var(--text);
}

.footer-welcome p {
  font-size: 14px;
  color: var(--text-light);
  max-width: 540px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.subscribe-section h3 {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 16px;
  color: var(--text);
}

.subscribe-form {
  display: flex;
  max-width: 380px;
  margin: 0 auto 48px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
}

.subscribe-form input[type="email"] {
  flex: 1;
  border: none;
  outline: none;
  padding: 12px 16px;
  font-size: 14px;
  font-family: var(--font-body);
  background: transparent;
  color: var(--text);
}

.subscribe-form input[type="email"]::placeholder {
  color: var(--text-light);
}

.subscribe-form button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0 16px;
  color: var(--text);
  display: flex;
  align-items: center;
  transition: opacity 0.2s;
}

.subscribe-form button:hover {
  opacity: 0.6;
}

.subscribe-form button svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Footer bottom bar */
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  align-items: center;
  font-size: 12px;
  color: var(--text-light);
}

.footer-bottom a {
  color: var(--text-light);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-bottom a:hover {
  color: var(--text);
}

.footer-payments {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* ===========================
   CONTACT PAGE
   =========================== */

.contact-section {
  max-width: 560px;
  margin: 0 auto;
  padding: 64px 24px;
}

.contact-section h1 {
  font-family: var(--font-display);
  font-size: clamp(24px, 5vw, 40px);
  font-weight: 400;
  margin-bottom: 12px;
}

.contact-section .subtitle {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 40px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.form-group input,
.form-group textarea,
.form-group select {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: var(--font-body);
  background: var(--white);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--text);
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

.btn-primary {
  display: inline-block;
  background: var(--text);
  color: var(--white);
  border: none;
  padding: 14px 28px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: var(--radius);
  cursor: pointer;
  transition: opacity 0.2s;
  font-family: var(--font-body);
}

.btn-primary:hover {
  opacity: 0.8;
}

/* ===========================
   TOAST NOTIFICATION
   =========================== */

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--text);
  color: var(--white);
  padding: 12px 24px;
  border-radius: 40px;
  font-size: 13px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 999;
  white-space: nowrap;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===========================
   RESPONSIVE
   =========================== */

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .nav-inner {
    grid-template-columns: auto 1fr auto;
    gap: 12px;
  }


  .hero-banner__inner {
    padding: 56px 24px;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .section {
    padding: 36px 16px;
  }

  .site-footer {
    padding: 48px 16px 32px;
  }
}

@media (max-width: 480px) {
  .product-grid {
    grid-template-columns: 1fr;
    max-width: 320px;
    margin: 0 auto;
  }

  .nav-inner {
    height: 64px;
  }

  .logo img {
    height: 2rem;
  }
}

/* ===========================
   PRODUCT DETAIL PAGE
   =========================== */

.pdp {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 48px 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}

.pdp__img-wrap {
  aspect-ratio: 1 / 1;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
}

.pdp__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pdp__info {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pdp__back {
  font-size: 13px;
  color: var(--text-light);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.pdp__back:hover {
  color: var(--text);
}

.pdp__tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-light);
}

.pdp__title {
  font-family: var(--font-display);
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 400;
  line-height: 1.2;
  color: var(--text);
}

.pdp__price {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

.pdp__description {
  font-size: 15px;
  color: var(--text-light);
  line-height: 1.7;
}

.pdp__btn {
  display: inline-block;
  background: var(--text);
  color: var(--white);
  border: none;
  padding: 14px 32px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: var(--radius);
  cursor: pointer;
  transition: opacity 0.2s;
  margin-top: 8px;
  width: 100%;
}

.pdp__btn:hover {
  opacity: 0.75;
}

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

/* ===========================
   LEGAL PAGES
   =========================== */

.legal-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 56px 24px;
}

.legal-page h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 400;
  color: var(--text);
  margin-bottom: 8px;
}

.legal-updated {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 40px;
}

.legal-page h2 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-top: 36px;
  margin-bottom: 10px;
}

.legal-page p,
.legal-page li {
  font-size: 15px;
  color: var(--text-light);
  line-height: 1.75;
}

.legal-page ul {
  padding-left: 20px;
  margin-top: 8px;
  margin-bottom: 8px;
}

.legal-page a {
  color: var(--text);
  text-decoration: underline;
}

.legal-page code {
  font-family: monospace;
  font-size: 13px;
  background: var(--border);
  padding: 1px 5px;
  border-radius: 3px;
}
