/* ===== Melissaa Homewear — base ===== */

:root {
  --color-white: #FFFFFF;
  --color-cream: #FAF5EF;
  --color-cream-deep: #F3E9DD;
  --color-lavender: #C7BEE0;
  --color-lavender-deep: #A996CE;
  --color-lavender-light: #EDE8F7;
  --color-lavender-pale: #F5F2FB;
  --color-line: #E6DFF0;
  --color-text: #3B3542;
  --color-text-soft: #756C82;

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Jost', 'Helvetica Neue', Arial, sans-serif;

  --container: 1240px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
  font-weight: 300;
}

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

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  margin: 0;
  color: var(--color-text);
}

p { margin: 0; line-height: 1.65; }

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--color-lavender-deep);
  margin: 0 0 14px;
}

.section-text {
  color: var(--color-text-soft);
  max-width: 480px;
  font-weight: 300;
}

/* ===== Reveal on scroll ===== */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation: none !important; transition-duration: 0.01ms !important; }
}

/* ===== Announcement bar ===== */

.announcement {
  background: var(--color-lavender-light);
  color: var(--color-text);
  text-align: center;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  padding: 10px 16px;
  font-weight: 400;
}

/* ===== Header ===== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px clamp(20px, 5vw, 64px);
  background: var(--color-white);
  border-bottom: 1px solid var(--color-line);
}

.site-header .logo {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.logo {
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--color-text);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 36px;
}

.main-nav a {
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text);
  position: relative;
  padding-bottom: 4px;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--color-lavender-deep);
  transition: width 0.35s var(--ease);
}

.main-nav a:hover::after { width: 100%; }

.nav-mobile-only { display: none; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 36px;
}

.header-actions a {
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text);
  position: relative;
  padding-bottom: 4px;
  white-space: nowrap;
}

.header-actions a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--color-lavender-deep);
  transition: width 0.35s var(--ease);
}

.header-actions a:hover::after { width: 100%; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  overflow: visible;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--color-text);
  width: 24px;
  border-radius: 1px;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}

/* ===== Buttons ===== */

.btn {
  display: inline-block;
  padding: 15px 34px;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--color-text);
  transition: background 0.35s var(--ease), color 0.35s var(--ease), transform 0.35s var(--ease);
}

.btn-primary {
  background: var(--color-text);
  color: var(--color-white);
}

.btn-primary:hover {
  background: transparent;
  color: var(--color-text);
  transform: translateY(-2px);
}

/* ===== Hero ===== */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 88vh;
}

.hero-media {
  overflow: hidden;
  position: relative;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  animation: heroZoom 1.4s var(--ease) forwards;
}

.hero-media-secondary img { animation-delay: 0.1s; }

@keyframes heroZoom {
  from { transform: scale(1.12); opacity: 0; }
  to { transform: scale(1.04); opacity: 1; }
}

.hero-copy {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  background: rgba(255,255,255,0.86);
  backdrop-filter: blur(6px);
  padding: 48px clamp(28px, 5vw, 64px);
  max-width: 460px;
  animation: heroFade 1s var(--ease) 0.3s both;
}

@keyframes heroFade {
  from { opacity: 0; transform: translate(-50%, -46%); }
  to { opacity: 1; transform: translate(-50%, -50%); }
}

.hero-copy h1 {
  font-size: clamp(2.4rem, 4.4vw, 3.4rem);
  line-height: 1.08;
  margin-bottom: 20px;
}

.hero-text {
  color: var(--color-text-soft);
  margin-bottom: 28px;
  font-weight: 300;
}

/* ===== Section shell ===== */

section {
  padding: 110px clamp(20px, 5vw, 64px);
  max-width: var(--container);
  margin: 0 auto;
}

.section-head {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 56px;
}

.section-head h1,
.section-head h2 {
  font-size: clamp(1.9rem, 3vw, 2.6rem);
  margin-bottom: 16px;
}

/* ===== Simple sub-pages (delivery / certificate) ===== */

.page-hero {
  padding-top: 64px;
}

.delivery-list {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.delivery-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 24px 0;
  border-bottom: 1px solid var(--color-line);
}

.delivery-item:first-child {
  border-top: 1px solid var(--color-line);
}

.delivery-label {
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.delivery-note {
  font-size: 0.86rem;
  color: var(--color-text-soft);
  margin-top: 4px;
}

.delivery-price {
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.delivery-item.is-highlight {
  border: none;
  margin-top: 12px;
  padding: 24px 28px;
  background: var(--color-lavender-light);
}

.delivery-item.is-highlight .delivery-label {
  color: var(--color-lavender-deep);
  font-weight: 500;
}

.delivery-footnote {
  font-size: 0.78rem;
  color: var(--color-text-soft);
  margin-top: 14px;
  padding: 0 28px;
}

.features-3col {
  grid-template-columns: repeat(3, 1fr);
}

/* ===== Product grid ===== */

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px 32px;
}

.product-card {
  display: flex;
  flex-direction: column;
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}

.product-card.is-hidden {
  display: none;
}

.product-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--color-lavender-pale);
  margin-bottom: 18px;
  cursor: default;
  touch-action: pan-y;
}

.product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.product-card:hover .product-media img {
  transform: scale(1.06);
}

.gallery-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s var(--ease);
  z-index: 1;
}

.gallery-slide.is-active {
  opacity: 1;
  visibility: visible;
  z-index: 2;
}

.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.88);
  color: var(--color-text);
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s var(--ease), background 0.3s var(--ease);
  z-index: 3;
}

.product-media:hover .gallery-arrow,
.gallery-arrow:focus-visible {
  opacity: 1;
}

.gallery-arrow:hover { background: var(--color-white); }
.gallery-arrow-prev { left: 10px; }
.gallery-arrow-next { right: 10px; }

.product-media-pending,
.gallery-slide-pending {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  text-align: center;
  background: linear-gradient(160deg, var(--color-lavender-pale), var(--color-lavender-light));
}

.pending-photo-text {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--color-lavender-deep);
  line-height: 1.4;
}

.product-tag {
  position: absolute;
  top: 14px;
  left: 14px;
  background: var(--color-white);
  color: var(--color-text);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 12px;
}

.product-name {
  font-size: 1.15rem;
  font-weight: 500;
  line-height: 1.3;
  min-height: 2.6em;
  margin-bottom: 6px;
}

.product-sizes {
  font-size: 0.82rem;
  color: var(--color-text-soft);
  margin-bottom: 12px;
}

.product-colors {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 14px;
}

.color-swatch {
  position: relative;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--swatch-color);
  box-shadow: inset 0 0 0 1px rgba(59, 53, 66, 0.12);
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.color-swatch:hover,
.color-swatch:focus-visible {
  transform: scale(1.2);
  outline: none;
}

.color-swatch.is-selected {
  box-shadow: 0 0 0 2px var(--color-white), 0 0 0 3px var(--color-lavender-deep);
}

.color-swatch::after {
  content: attr(data-color);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translate(-50%, 4px);
  background: #FBF6EC;
  color: var(--color-text);
  border: 1px solid var(--color-cream-deep);
  font-size: 0.65rem;
  letter-spacing: 0.03em;
  white-space: normal;
  max-width: 160px;
  text-align: center;
  padding: 5px 10px;
  border-radius: 3px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
  z-index: 5;
}

.color-swatch:hover::after,
.color-swatch:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.product-price {
  font-size: 0.94rem;
  letter-spacing: 0.02em;
  margin-top: auto;
  padding-top: 8px;
}

/* ===== Promo strip ===== */

.promo-strip {
  max-width: none;
  padding: 56px clamp(20px, 5vw, 64px);
  border-top: 1px solid var(--color-line);
  border-bottom: 1px solid var(--color-line);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}

.promo-text {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.6vw, 1.8rem);
  line-height: 1.3;
  color: var(--color-text);
}

.promo-text strong {
  color: var(--color-lavender-deep);
  font-weight: 600;
  font-size: 1.15em;
}

.promo-link {
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--color-text);
  padding-bottom: 2px;
  transition: opacity 0.3s var(--ease);
}

.promo-link:hover { opacity: 0.6; }

/* ===== About ===== */

.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
}

.about-media { overflow: hidden; }

.about-media img { transition: transform 0.6s var(--ease); }
.about-media:hover img { transform: scale(1.03); }

.about-copy h1,
.about-copy h2 {
  font-size: clamp(1.9rem, 3vw, 2.5rem);
  margin-bottom: 24px;
  line-height: 1.2;
}

#certificate-info .about-copy h1 {
  margin-bottom: 40px;
}

.about-copy p {
  color: var(--color-text-soft);
  margin-bottom: 18px;
  max-width: 460px;
}

/* ===== Features ===== */

.features {
  background: var(--color-cream);
  max-width: none;
  padding: 90px clamp(20px, 5vw, 64px);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
}

.feature {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.feature-icon {
  width: 40px;
  height: 40px;
  color: var(--color-lavender-deep);
  margin-bottom: 20px;
  transition: transform 0.4s var(--ease);
}

.feature:hover .feature-icon {
  transform: translateY(-4px);
}

.feature h3 {
  font-size: 1.05rem;
  font-weight: 500;
  margin-bottom: 8px;
}

.feature p {
  font-size: 0.86rem;
  color: var(--color-text-soft);
  max-width: 230px;
}

/* ===== Reviews ===== */

.reviews-carousel-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
}

.reviews-carousel {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 4px 4px 16px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--color-lavender-deep) transparent;
}

.reviews-carousel::-webkit-scrollbar { height: 6px; }
.reviews-carousel::-webkit-scrollbar-thumb {
  background: var(--color-lavender);
  border-radius: 4px;
}

.review-card {
  flex: 0 0 300px;
  scroll-snap-align: start;
  border: 1px solid var(--color-line);
  padding: 32px 28px;
  background: var(--color-lavender-pale);
  display: flex;
  flex-direction: column;
}

.review-stars {
  color: var(--color-lavender-deep);
  letter-spacing: 3px;
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.review-card p {
  color: var(--color-text);
  font-size: 0.9rem;
  line-height: 1.6;
  flex-grow: 1;
}

.review-nav {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border: 1px solid var(--color-line);
  background: var(--color-white);
  color: var(--color-text);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  transition: all 0.3s var(--ease);
}

.review-nav:hover {
  background: var(--color-text);
  color: var(--color-white);
  border-color: var(--color-text);
}

/* ===== Contact ===== */

.contact {
  max-width: none;
  background: var(--color-lavender-light);
  text-align: center;
}

.contact-inner {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.contact h2 {
  font-size: clamp(1.8rem, 3vw, 2.3rem);
  margin-bottom: 14px;
}

.contact .section-text {
  margin: 0 auto 32px;
}

/* ===== Footer ===== */

.site-footer {
  padding: 56px clamp(20px, 5vw, 64px) 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  border-top: 1px solid var(--color-line);
  text-align: center;
}

.footer-nav {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-nav a {
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--color-text-soft);
  transition: color 0.3s var(--ease);
}

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

.footer-note {
  font-size: 0.76rem;
  color: var(--color-text-soft);
}

/* ===== Responsive ===== */

@media (max-width: 960px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .features { grid-template-columns: repeat(2, 1fr); }
  .care-grid { grid-template-columns: repeat(2, 1fr); }
  .about { grid-template-columns: 1fr; }
  .about-copy { text-align: center; }
  .about-copy p { margin-left: auto; margin-right: auto; }

  #certificate-info .about-copy { order: 1; }
  #certificate-info .about-media { order: 2; }
}

@media (max-width: 720px) {
  .main-nav {
    position: fixed;
    inset: 0;
    z-index: 40;
    padding-top: 90px;
    background: var(--color-white);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
  }
  .main-nav.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .nav-toggle { display: flex; order: -1; }
  .header-actions { display: none; }
  .nav-mobile-only { display: block; }
  .site-header .logo { font-size: 1.1rem; letter-spacing: 0.05em; white-space: nowrap; }
  .nav-toggle.is-active {
    position: fixed;
    top: 22px;
    left: 20px;
    z-index: 100;
  }
  .nav-toggle.is-active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .nav-toggle.is-active span:nth-child(2) { opacity: 0; }
  .nav-toggle.is-active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

  .hero { grid-template-columns: 1fr; min-height: auto; position: relative; }
  .hero-media { height: 46vh; }
  .hero-copy {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: none;
    width: calc(100% - 32px);
    padding: 32px 24px;
  }

  .product-grid { grid-template-columns: 1fr 1fr; gap: 24px 16px; }

  .features {
    grid-template-columns: repeat(4, 1fr);
    gap: 22px 8px;
    padding: 56px 14px;
  }
  .feature-icon { width: 26px; height: 26px; margin-bottom: 8px; }
  .feature h3 { font-size: 0.68rem; line-height: 1.25; margin-bottom: 4px; }
  .feature p { font-size: 0.62rem; line-height: 1.35; max-width: none; }

  .review-card {
    flex-basis: 78vw;
    padding: 20px 18px;
  }
  .review-stars { font-size: 0.78rem; margin-bottom: 10px; }
  .review-card p { font-size: 0.8rem; line-height: 1.45; }
  .review-nav { display: none; }
  section { padding: 72px 20px; }
}

@media (max-width: 380px) {
  .site-header .logo { font-size: 0.95rem; }
  .features { gap: 18px 6px; padding: 48px 10px; }
  .feature-icon { width: 24px; height: 24px; }
  .feature h3 { font-size: 0.62rem; }
  .feature p { font-size: 0.58rem; }
}
