/*
Theme Name: Coastal Forester
Theme URI: https://yoursite.com
Author: Your Name
Description: High-end editorial one-page shop. Colors, fonts and logo editable via Appearance → Customize.
Version: 2.0
License: GNU General Public License v2 or later
Text Domain: coastal-forester
*/

@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,200..800;1,6..72,200..800&family=Be+Vietnam+Pro:wght@100;300;400;500;700&family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=Lora:ital,wght@0,400;0,600;1,400&family=DM+Serif+Display:ital@0;1&family=Inter:wght@300;400;500&family=Jost:wght@300;400;500&family=Raleway:wght@300;400;500&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:wght,FILL@100..700,0..1&display=swap');

:root {
  --primary:               #182419;
  --primary-container:     #2d3a2d;
  --on-primary:            #ffffff;
  --on-primary-container:  #95a493;
  --secondary:             #546253;
  --surface:               #fcf9f4;
  --surface-container-low: #f6f3ee;
  --surface-dim:           #dcdad5;
  --on-surface:            #1c1c19;
  --accent:                #546253;
  --font-headline:         'Newsreader', serif;
  --font-body:             'Be Vietnam Pro', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background-color: var(--surface);
  color: var(--on-surface);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, .serif { font-family: var(--font-headline); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.grainy-overlay { position: relative; }
.grainy-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url('images/grain.png');
  opacity: 0.05;
  pointer-events: none;
  z-index: 10;
}

/* --- NAV --- */
.site-nav {
  position: fixed; top: 0; width: 100%;
  z-index: 50;
  background-color: rgba(252,249,244,0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.site-nav__inner {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.25rem 3rem;
  max-width: 1536px; margin: 0 auto;
}
.site-nav__logo { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; }
.site-nav__logo img.custom-logo { height: 44px; width: auto; object-fit: contain; }
.site-nav__logo-badge {
  width: 40px; height: 40px;
  background-color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  border-radius: 0.25rem;
}
.site-nav__logo-badge span {
  font-family: var(--font-headline);
  font-size: 1.1rem; font-weight: 700;
  color: var(--surface); line-height: 1;
}
.site-nav__site-name {
  font-family: var(--font-headline);
  font-size: 1.1rem; font-weight: 700; color: var(--primary);
}
.site-nav .menu { display: none; list-style: none; gap: 3rem; align-items: center; }
@media (min-width: 768px) { .site-nav .menu { display: flex; } }
.site-nav .menu li a {
  font-size: 0.7rem; letter-spacing: 0.15em; text-transform: uppercase;
  font-family: var(--font-body); color: rgba(24,36,25,0.55); transition: color 0.25s;
}
.site-nav .menu li a:hover { color: var(--primary); }
.site-nav .menu li.current-menu-item a {
  font-family: var(--font-headline); font-size: 1rem;
  letter-spacing: -0.01em; text-transform: none;
  border-bottom: 2px solid var(--primary); padding-bottom: 2px; color: var(--primary);
}
.site-nav__cart-btn {
  background: none; border: none; cursor: pointer;
  color: var(--primary); display: flex; align-items: center; transition: transform 0.2s;
}
.site-nav__cart-btn:hover { transform: scale(0.92); }
.nav-toggle {
  display: flex; flex-direction: column; gap: 5px;
  cursor: pointer; background: none; border: none; padding: 4px;
}
@media (min-width: 768px) { .nav-toggle { display: none; } }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--primary); transition: all 0.3s; }
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.site-nav.is-open .menu {
  display: flex; flex-direction: column;
  position: absolute; top: 100%; left: 0; right: 0;
  background: rgba(252,249,244,0.97);
  padding: 2rem; gap: 1.5rem; align-items: flex-start;
  border-top: 1px solid rgba(24,36,25,0.08);
}

/* --- HERO --- */
#shop {
  position: relative; width: 100%;
  display: flex; align-items: center;
  overflow: hidden;
  border-radius: 0 0 60px 60px;
  box-shadow: 0 16px 48px rgba(28,28,25,0.10);
  min-height: 92vh;
}
@media (min-width: 768px) { #shop { min-height: 80vh; aspect-ratio: 16/9; } }
.hero__bg { position: absolute; inset: 0; z-index: 0; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; }
.hero__overlay { position: absolute; inset: 0; background: rgba(24,36,25,0.22); }
.hero__content {
  position: relative; z-index: 20;
  padding: 6rem 2rem 4rem;
  max-width: 1536px; margin: 0 auto; width: 100%;
}
@media (min-width: 768px) { .hero__content { padding: 0 3rem; } }
.hero__content h1 {
  font-size: clamp(2.8rem, 9vw, 6.5rem);
  color: var(--surface); line-height: 0.93;
  letter-spacing: -0.02em; margin-bottom: 2rem; max-width: 680px;
}
.hero__btn {
  display: inline-block;
  background-color: var(--primary-container);
  color: var(--on-primary-container);
  padding: 0.85rem 2.25rem;
  font-family: var(--font-body); font-size: 0.7rem;
  letter-spacing: 0.15em; text-transform: uppercase;
  border: none; border-radius: 1rem; cursor: pointer;
  transition: background-color 0.3s, transform 0.15s;
}
.hero__btn:hover { background-color: var(--primary); color: var(--on-primary); }
.hero__btn:active { transform: scale(0.97); }

/* --- COLLECTION --- */
#collection { padding: 6rem 0 8rem; background-color: var(--surface); }
.collection__inner { max-width: 1536px; margin: 0 auto; padding: 0 1.5rem; }
@media (min-width: 768px) { .collection__inner { padding: 0 3rem; } }
.collection__header { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 4rem; }
@media (min-width: 768px) {
  .collection__header { flex-direction: row; justify-content: space-between; align-items: baseline; }
}
.collection__header h2 { font-size: clamp(1.8rem, 5vw, 3.5rem); letter-spacing: -0.02em; }
.collection__subtitle { font-family: var(--font-body); font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.2em; opacity: 0.6; }
.products-grid { display: grid; grid-template-columns: 1fr; gap: 3.5rem 2.5rem; }
@media (min-width: 480px) { .products-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .products-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 768px) {
  .products-grid .product-card:nth-child(2),
  .products-grid .product-card:nth-child(5) { margin-top: 3rem; }
}
.product-card { cursor: pointer; }
.product-card__image-wrap {
  aspect-ratio: 4/5; background-color: var(--surface-container-low);
  overflow: hidden; border-radius: 1rem;
  box-shadow: 0 4px 16px rgba(28,28,25,0.06);
  margin-bottom: 1.25rem; transition: box-shadow 0.3s;
}
.product-card:hover .product-card__image-wrap { box-shadow: 0 10px 32px rgba(28,28,25,0.12); }
.product-card__image-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s ease; }
.product-card:hover .product-card__image-wrap img { transform: scale(1.05); }
.product-card__name { font-size: 1.1rem; font-family: var(--font-headline); margin-bottom: 0.3rem; }
.product-card__price { font-family: var(--font-body); font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.15em; opacity: 0.6; }

/* --- STORY --- */
#story { padding: 7rem 0 8rem; background-color: var(--surface-container-low); position: relative; }
.story__pill {
  display: none; position: absolute; top: -2.75rem; left: 50%; transform: translateX(-50%);
  z-index: 30; background-color: var(--primary); color: var(--surface);
  padding: 1.25rem 2.5rem; border-radius: 1rem;
  box-shadow: 0 16px 48px rgba(28,28,25,0.18); white-space: nowrap;
}
@media (min-width: 1024px) { .story__pill { display: block; } }
.story__pill span { font-family: var(--font-headline); font-size: 1.35rem; font-style: italic; }
.story__inner {
  max-width: 1536px; margin: 0 auto; padding: 0 1.5rem;
  display: grid; grid-template-columns: 1fr; gap: 4rem; align-items: center;
}
@media (min-width: 768px) { .story__inner { padding: 0 3rem; } }
@media (min-width: 1024px) { .story__inner { grid-template-columns: 5fr 6fr; } }
.story__text-col { order: 2; }
@media (min-width: 1024px) { .story__text-col { order: 1; } }
.story__eyebrow { font-family: var(--font-body); font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.3em; color: var(--secondary); margin-bottom: 1.25rem; }
.story__text-col h2 { font-size: clamp(1.75rem, 4vw, 3.25rem); line-height: 1.1; margin-bottom: 1.75rem; }
.story__body p { font-size: 1rem; line-height: 1.85; color: rgba(28,28,25,0.78); margin-bottom: 1.25rem; }
.story__divider { margin-top: 2.5rem; height: 2px; width: 5rem; background: rgba(24,36,25,0.18); }
.story__image-col { order: 1; }
@media (min-width: 1024px) { .story__image-col { order: 2; } }
.story__image-wrap { position: relative; }
.story__image-wrap img { width: 100%; border-radius: 1rem; box-shadow: 0 24px 64px rgba(28,28,25,0.14); filter: grayscale(100%); transition: filter 0.7s; }
.story__image-wrap img:hover { filter: grayscale(0%); }
.story__est-badge { display: none; position: absolute; bottom: -2rem; left: -2rem; background: var(--surface); padding: 1.5rem 2rem; border-radius: 1rem; box-shadow: 0 12px 32px rgba(28,28,25,0.10); }
@media (min-width: 768px) { .story__est-badge { display: block; } }
.story__est-badge span { font-family: var(--font-headline); font-size: 2.25rem; font-style: italic; color: var(--primary); }

/* --- GALLERY --- */
#journal { padding: 7rem 0 8rem; background-color: var(--surface); }
.gallery__inner { max-width: 1536px; margin: 0 auto; padding: 0 1.5rem; }
@media (min-width: 768px) { .gallery__inner { padding: 0 3rem; } }
.gallery__header { margin-bottom: 3.5rem; }
.gallery__header h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 0.4rem; }
.gallery__header p { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.2em; opacity: 0.6; }
.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
@media (min-width: 1024px) {
  .gallery-grid { grid-template-columns: repeat(4, 1fr); gap: 2rem; }
  .gallery-item:nth-child(2), .gallery-item:nth-child(4) { margin-top: 3rem; }
}
.gallery-item { display: flex; flex-direction: column; gap: 0.75rem; }
.gallery-item__image { aspect-ratio: 4/5; overflow: hidden; border-radius: 1rem; }
.gallery-item__image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s ease; }
.gallery-item__image img:hover { transform: scale(1.05); }
.gallery-item__caption { font-family: var(--font-body); font-size: 0.7rem; font-style: italic; opacity: 0.6; }

/* --- NEWSLETTER --- */
#newsletter { padding: 7rem 0; background-color: var(--primary); color: var(--surface); position: relative; overflow: hidden; }
#newsletter::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, var(--primary), #0f1710); z-index: 0; }
.newsletter__inner { max-width: 52rem; margin: 0 auto; padding: 0 1.5rem; text-align: center; position: relative; z-index: 20; }
.newsletter__inner h2 { font-size: clamp(2rem, 5vw, 3.5rem); margin-bottom: 1.5rem; }
.newsletter__inner p { font-size: 1.05rem; opacity: 0.70; max-width: 34rem; margin: 0 auto 3rem; line-height: 1.75; }
.newsletter__form { display: flex; flex-direction: column; gap: 1rem; max-width: 28rem; margin: 0 auto; }
@media (min-width: 500px) { .newsletter__form { flex-direction: row; } }
.newsletter__input {
  background: transparent; border: none; border-bottom: 1px solid rgba(252,249,244,0.30);
  color: var(--surface); padding: 1rem 0; font-size: 0.875rem;
  font-family: var(--font-body); outline: none; flex: 1; transition: border-color 0.3s;
}
.newsletter__input::placeholder { color: rgba(252,249,244,0.40); }
.newsletter__input:focus { border-bottom-color: var(--surface); }
.newsletter__btn {
  background: var(--surface); color: var(--primary); border: none;
  padding: 1rem 2rem; font-size: 0.65rem; font-family: var(--font-body);
  letter-spacing: 0.2em; text-transform: uppercase; border-radius: 1rem;
  cursor: pointer; transition: background-color 0.3s; white-space: nowrap;
}
.newsletter__btn:hover { background: var(--surface-container-low); }

/* --- FOOTER --- */
.site-footer { background-color: var(--surface-dim); padding: 5rem 1.5rem; position: relative; overflow: hidden; }
@media (min-width: 768px) { .site-footer { padding: 6rem 3rem; } }
.site-footer::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(to right, transparent, rgba(24,36,25,0.10), transparent); }
.site-footer__inner { max-width: 1536px; margin: 0 auto; display: flex; flex-direction: column; gap: 3rem; }
@media (min-width: 768px) { .site-footer__inner { flex-direction: row; justify-content: space-between; align-items: flex-start; } }
.site-footer__brand { display: flex; flex-direction: column; gap: 1.5rem; }
.site-footer__logo { display: flex; align-items: center; gap: 0.75rem; }
.site-footer__logo img.custom-logo { height: 44px; width: auto; }
.site-footer__logo-badge { width: 44px; height: 44px; background: var(--primary); display: flex; align-items: center; justify-content: center; border-radius: 0.25rem; }
.site-footer__logo-badge span { font-family: var(--font-headline); font-size: 1.25rem; font-weight: 700; color: var(--surface); }
.site-footer__site-name { font-family: var(--font-headline); font-size: 1.1rem; font-weight: 700; color: var(--primary); }
.site-footer__copy { font-size: 0.8rem; color: rgba(24,36,25,0.65); max-width: 20rem; line-height: 1.75; }
.site-footer__nav .menu { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem 2.5rem; }
@media (min-width: 768px) { .site-footer__nav .menu { grid-template-columns: repeat(4, 1fr); } }
.site-footer__nav .menu li a { font-size: 0.8rem; color: rgba(24,36,25,0.65); opacity: 0.85; transition: opacity 0.2s; }
.site-footer__nav .menu li a:hover { opacity: 1; color: var(--on-surface); }
.site-footer__icons { display: flex; gap: 1.5rem; align-items: center; }
.site-footer__icons span { color: var(--primary); cursor: pointer; font-family: 'Material Symbols Outlined'; font-size: 22px; transition: transform 0.2s; }
.site-footer__icons span:hover { transform: scale(1.12); }

section[id] { scroll-margin-top: 90px; }

@media (max-width: 640px) {
  .collection__inner, .gallery__inner, .story__inner, .site-footer { padding-left: 1.5rem; padding-right: 1.5rem; }
  .site-nav__inner { padding: 1rem 1.5rem; }
}


.site-nav__logo,
.site-nav__logo a,
.custom-logo-link {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  margin: 0 !important;
  padding: 0 !important;
}

.site-nav__logo img,
.custom-logo-link img {
  height: 44px !important;
  width: auto !important;
  display: block !important;
  margin: 0 !important;
}



/* ── Mobile product page fixes ── */
@media (max-width: 767px) {

  /* Stop image overlapping with size/cart elements */
  .product-page {
    padding-top: 80px;
  }

  .product-main {
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1.5rem 6rem;
    gap: 2rem;
  }

  /* Image column — not sticky on mobile */
  .product-images {
    position: relative !important;
    top: auto !important;
    width: 100%;
    z-index: 1;
  }

  .product-image-main {
    aspect-ratio: 4/5;
    width: 100%;
    border-radius: 1.25rem;
    overflow: hidden;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
  }

  /* Details below image, not overlapping */
  .product-details {
    position: relative;
    z-index: 1;
    margin-top: 1rem;
  }

  /* Size buttons row */
  .product-sizes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
  }

  /* Cart bar stays at bottom */
  .product-actions {
    position: relative;
    z-index: 1;
    flex-direction: row;
    align-items: center;
  }

  /* Sticky bottom bar */
  .sticky-atc {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1rem 1.5rem;
    background: rgba(252,249,244,0.97);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(24,36,25,0.08);
  }

  /* Thumb strip scrollable */
  .product-image-thumbs {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    gap: 0.75rem;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .product-thumb {
    flex-shrink: 0;
    width: 64px;
    height: 80px;
  }
	
	h1, h2, h3, h4, .serif,
.product-title,
.hero__content h1,
.collection__header h2,
.story__text-col h2,
.gallery__header h2,
.newsletter__inner h2,
.related-header h2,
.product-card__name,
.story__est-badge span,
.story__pill span {
  font-family: "fatfrank", sans-serif !important;
  font-weight: 400 !important;
  font-style: normal !important;
}
}
