/* =============================================================
   shared.css — Wrendolyn Makes
   Common styles used across all pages.
   Link this in every page's <head>:
     <link rel="stylesheet" href="shared.css"/>
   Page-specific styles stay in each HTML file's <style> block.
   ============================================================= */

/* ---- CSS VARIABLES ---- */
:root {
  --body:        #FAF6F0;
  --cream:       #FAF6F0;
  --blush:       #E8C4B8;
  --burgundy:    #6B2737;
  --wine:        #4A1520;
  --gold:        #C4A882;
  --dark:        #2A1A1E;
  --mid:         #8C6B72;
  --deepred:     #4A1520;
  --light-pink:  #FCCCF9;
  --dark-brown:  #291A13;
}

/* ---- RESET ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Jost', sans-serif;
  background-color: var(--body);
  color: var(--dark);
  font-weight: 300;
  overflow-x: hidden;
}

/* ---- NOISE TEXTURE OVERLAY ---- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23noise)' opacity='0.035'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1000;
  opacity: 0.4;
}

/* ---- NAVIGATION ---- */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 3rem;
  background: rgba(250, 246, 240, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(196, 168, 130, 0.25);
  transition: all 0.3s ease;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--dark);
  text-decoration: none;
  transition: color 0.3s;
}

.nav-logo:hover { color: var(--burgundy); }

.nav-contact {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--dark);
  text-decoration: none;
  transition: color 0.3s;
}

.nav-contact:hover { color: var(--burgundy); }

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.9rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dark);
  text-decoration: none;
  position: relative;
  transition: color 0.3s;
  cursor: pointer;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0; right: 0;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.nav-links a:hover { color: var(--burgundy); }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-links a.active { color: var(--burgundy); }
.nav-links a.active::after { transform: scaleX(1); }

/* ---- PAGE HEADER ---- */
.page-header {
  padding: 10rem 2rem 4rem;
  text-align: center;
  position: relative;
}

.page-header::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(232,196,184,0.3) 0%, transparent 65%);
  pointer-events: none;
}

.page-eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}

.page-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 300;
  color: var(--wine);
  line-height: 1;
  margin-bottom: 1.5rem;
}

.page-title em { font-style: italic; }

.page-subtitle {
  font-size: 0.92rem;
  color: var(--mid);
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.8;
}

/* ---- SECTION NAV / TABS ---- */
.section-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  border-bottom: 1px solid rgba(196,168,130,0.3);
  margin-bottom: 4rem;
  padding: 0 0.8rem;
}

.section-tab {
  padding: 1.2rem 2.5rem;
  text-align: center;
  font-size: 1.2rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dark);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: all 0.3s;
  margin-bottom: -1px;
  cursor: pointer;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: 'Jost', sans-serif;
  font-weight: 500;
}

.section-tab:hover,
.section-tab.active {
  color: var(--burgundy);
  border-bottom-color: var(--burgundy);
}

/* ---- SECTION SHARED ---- */
.section-eyebrow {
  font-size: 0.68rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 400;
  color: var(--wine);
}

.section-desc {
  font-size: 0.88rem;
  color: var(--mid);
  max-width: 500px;
  line-height: 1.8;
}

.section-header {
  margin-bottom: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 1rem;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 2rem; }

/* ---- BUTTONS ---- */
.btn {
  display: inline-block;
  padding: 0.9rem 2.2rem;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  transition: all 0.3s;
  white-space: nowrap;
  font-family: 'Jost', sans-serif;
}

.btn--light { background: var(--cream); color: var(--wine); }
.btn--light:hover { background: var(--blush); }
.btn--outline-light { border: 1px solid rgba(232,196,184,0.5); color: var(--cream); }
.btn--outline-light:hover { background: rgba(250,246,240,0.1); }

/* ---- LOADING / ERROR STATES ---- */
.loading-state { text-align: center; padding: 5rem 2rem; grid-column: 1 / -1; }

.loading-spinner {
  display: inline-block;
  width: 36px;
  height: 36px;
  border: 2px solid rgba(196,168,130,0.3);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 1.5rem;
}

.loading-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem;
  color: var(--mid);
}

.error-state {
  grid-column: 1 / -1;
  background: rgba(107,39,55,0.06);
  border: 1px solid rgba(107,39,55,0.2);
  border-left: 3px solid var(--burgundy);
  padding: 2.5rem;
}

.error-state h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem;
  color: var(--wine);
  margin-bottom: 0.8rem;
}

.error-state p { font-size: 0.88rem; color: var(--mid); line-height: 1.8; }
.error-state code { background: rgba(107,39,55,0.08); padding: 0.15rem 0.4rem; font-size: 0.82rem; color: var(--burgundy); }

/* ---- EMPTY STATE ---- */
.empty-state { text-align: center; padding: 5rem 2rem; grid-column: 1 / -1; }
.empty-state-icon { font-size: 3rem; margin-bottom: 1rem; opacity: 0.4; }
.empty-state-text { font-family: 'Cormorant Garamond', serif; font-size: 1.5rem; color: var(--mid); }

/* ---- FOOTER ---- */
footer {
  text-align: center;
  padding: 3rem 2rem;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
}

footer a { text-decoration: none; }

/* ---- SIZE GUIDE POPUP ---- */
.sizepop-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(42,26,30,0.88);
  z-index: 500;
  align-items: center;
  justify-content: center;
  padding: 1.4rem;
  animation: fadeIn 0.25s ease;
  cursor: pointer;
}

.sizepop-overlay.active { display: flex; }

.sizepop {
  background: var(--cream);
  max-width: 520px;
  width: 100%;
  padding: 1rem 2.2rem;
  position: relative;
  cursor: default;
  animation: zoomIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.sizepop-close {
  position: absolute;
  top: 2.1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  background: var(--gold);
  color: var(--wine);
  border: none;
  border-radius: 50%;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
  z-index: 1;
}

.sizepop-close:hover { background: var(--blush); transform: scale(1.1); }

.sizepop-eyebrow {
  font-size: 0.65rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.3rem;
}

.sizepop-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.8rem;
  font-weight: 400;
  color: var(--wine);
  margin-bottom: 0.5rem;
  line-height: 1;
}

.sizepop-measure {
  background: rgba(196,168,130,0.1);
  border-left: 3px solid var(--gold);
  padding: 0.5rem 0.75rem;
  margin-bottom: 1rem;
}

.sizepop-measure p { font-size: 1rem; line-height: 1.35; color: var(--dark); }

.sizepop-table { width: 100%; border-collapse: collapse; margin-bottom: 0.4rem; }
.sizepop-table thead { background: var(--wine); }

.sizepop-table th {
  padding: 0.55rem 0.8rem;
  text-align: left;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--cream);
  font-weight: 400;
}

.sizepop-table td {
  padding: 0.65rem 0.8rem;
  font-size: 1rem;
  border-bottom: 1px solid rgba(196,168,130,0.2);
  color: var(--dark);
}

.sizepop-table td:first-child {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  color: var(--wine);
  font-weight: 500;
}

.sizepop-table tr:last-child td { border-bottom: none; }
.sizepop-table tr:hover td { background: rgba(196,168,130,0.06); }

.sizepop-note { font-size: 0.78rem; color: var(--mid); font-style: italic; line-height: 1.7; margin-bottom: 1.2rem; }

.sizepop-link {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--burgundy);
  text-decoration: none;
  transition: color 0.2s;
}

.sizepop-link:hover { color: var(--wine); }

/* ---- STORE LIGHTBOX ---- */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(42, 26, 30, 0.92);
  z-index: 999;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.25s ease;
  cursor: default;
  touch-action: none;
}

.lightbox-overlay.active { display: flex; }

.lightbox-inner {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  overflow: auto;
  touch-action: none;
}

.lightbox-inner img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  display: block;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
  animation: zoomIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
  transition: transform 0.2s ease;
  cursor: zoom-in;
  touch-action: none;
  user-select: none;
}

.lightbox-close {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  width: 40px;
  height: 40px;
  background: var(--gold);
  color: var(--wine);
  border: none;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
  z-index: 1001;
  line-height: 1;
  box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

.lightbox-close:hover { background: var(--blush); transform: scale(1.1); }

.lightbox-caption {
  text-align: center;
  margin-top: 1rem;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  color: var(--blush);
  letter-spacing: 0.08em;
}

.lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(250,246,240,0.15);
  color: var(--cream);
  border: 1px solid rgba(250,246,240,0.25);
  width: 44px;
  height: 44px;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 1001;
  backdrop-filter: blur(4px);
  border-radius: 50%;
}

.lightbox-nav:hover {
  background: rgba(250,246,240,0.28);
  transform: translateY(-50%) scale(1.1);
}

.lightbox-nav--prev { left: 1.5rem; }
.lightbox-nav--next { right: 1.5rem; }

.lightbox-nav.hidden { opacity: 0; pointer-events: none; }

.lightbox-counter {
  text-align: center;
  margin-top: 0.6rem;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(232,196,184,0.5);
}

.lightbox-counter.hidden { display: none; }

/* ---- PRODUCT IMAGE CAROUSEL ---- */
.product-image-carousel {
  position: relative;
  aspect-ratio: 3/4;
  overflow: visible;
  background: linear-gradient(145deg, var(--blush), rgba(196,168,130,0.3));
}

.carousel-slides {
  display: flex;
  height: 100%;
  width: 100%;
}

.carousel-slide {
  min-width: 100%;
  width: 100%;
  height: 100%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.6s ease;
  display: block;
}

.product-card:hover .carousel-slide img { transform: scale(1.05); }

.carousel-btn {
  position: absolute;
  bottom: -20%;
  right: 50%;
  transform: translateY(-50%);
  background: var(--light-pink);
  color: var(--cream);
  border: none;
  width: 35px;
  height: 32px;
  cursor: pointer;
  display: flex;
  align-items: right;
  justify-content: center;
  font-size: 0.8rem;
  transition: all 0.2s ease;
  z-index: 4;
  backdrop-filter: blur(4px);
  opacity: 1;
}

.product-card:hover .carousel-btn { opacity: 1; }
.carousel-btn:hover { background: var(--wine); transform: translateY(-50%) scale(1.1); }
.carousel-btn--prev { right: 3.25rem; }
.carousel-btn--next { right: 0.75rem; }

.carousel-dots {
  position: absolute;
  bottom: 0.6rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.35rem;
  z-index: 3;
}

.carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(250,246,240,0.5);
  transition: background 0.2s, transform 0.2s;
  cursor: pointer;
  border: none;
  padding: 0;
}

.carousel-dot.active { background: var(--cream); transform: scale(1.3); }

/* ---- FLOATING ACTION BUTTONS (custom.html) ---- */
.fab-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  z-index: 200;
  align-items: flex-end;
}

.fab {
  padding: 0.85rem 1.4rem;
  border: none;
  cursor: pointer;
  font-family: 'Jost', sans-serif;
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 8px 25px rgba(0,0,0,0.25);
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
}

.fab.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.fab--form { background: var(--burgundy); color: var(--cream); }
.fab--form:hover { background: var(--wine); transform: translateY(-2px); box-shadow: 0 12px 30px rgba(0,0,0,0.3); }
.fab--top { background: rgba(250,246,240,0.92); color: var(--wine); border: 1px solid rgba(196,168,130,0.4); backdrop-filter: blur(8px); }
.fab--top:hover { background: var(--cream); transform: translateY(-2px); }

/* ---- ANIMATIONS ---- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes zoomIn {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  nav { padding: 1rem 1.5rem; }
  .nav-links { gap: 1.5rem; }
}

@media (max-width: 480px) {
  .nav-links { display: none; }
  .section-tab { padding: 1rem 0.8rem; font-size: 0.65rem; }
}
