/* MaisonFit v2 - Matching Shopify Dawn Theme */

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

:root {
  --color-foreground: 18, 18, 18;
  --color-background: 255, 255, 255;
  --color-accent: 124, 119, 78;
  --color-warm: 239, 203, 170;
  --font-heading: 'New York', 'Iowan Old Style', 'Palatino Linotype', 'Georgia', serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --page-width: 120rem;
}

html { font-size: 62.5%; }

body {
  font-family: var(--font-body);
  font-size: 1.5rem;
  color: rgb(var(--color-foreground));
  background: rgb(var(--color-background));
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; }

.page-width {
  max-width: 120rem;
  margin: 0 auto;
  padding: 0 2.4rem;
}

/* === ANNOUNCEMENT BAR === */
.announcement-bar {
  background: rgb(var(--color-foreground));
  color: rgb(var(--color-background));
  text-align: center;
  padding: 1rem 2.4rem;
  font-size: 1.3rem;
  letter-spacing: 0.04em;
}
.announcement-bar a { color: rgb(var(--color-background)); text-decoration: underline; }

/* === HEADER === */
.site-header {
  background: rgb(var(--color-background));
  border-bottom: 1px solid rgba(var(--color-foreground), 0.08);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 2.4rem;
  max-width: var(--page-width);
  margin: 0 auto;
}

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

/* Main Nav */
.main-nav { display: flex; align-items: center; gap: 0; list-style: none; margin: 0; padding: 0; }
.main-nav > li { position: relative; display: block; }
.main-nav > li > a {
  display: block;
  padding: 1rem 1.2rem;
  font-size: 1.28rem;
  font-weight: 400;
  color: rgba(var(--color-foreground), 0.75);
  transition: color 0.2s;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.main-nav > li > a:hover,
.main-nav > li:hover > a {
  color: rgb(var(--color-foreground));
}

/* Dropdown */
.dropdown {
  display: block;
  list-style: none;
  margin: 0;
  padding: 1.2rem 0;
  position: absolute;
  top: 100%;
  left: 0;
  background: rgb(var(--color-background));
  min-width: 26rem;
  border: 1px solid rgba(var(--color-foreground), 0.08);
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.25s, visibility 0.25s, transform 0.25s;
  z-index: 200;
}
.main-nav > li:hover > .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown li { display: block; }
.dropdown li a {
  display: block;
  padding: 0.8rem 2.4rem;
  font-size: 1.4rem;
  color: rgba(var(--color-foreground), 0.7);
  transition: all 0.15s;
  white-space: nowrap;
}
.dropdown li a:hover {
  color: rgb(var(--color-foreground));
  background: rgba(var(--color-foreground), 0.04);
  padding-left: 2.8rem;
}

.header-icons { display: flex; align-items: center; gap: 1.6rem; }
.header-icons a, .header-icons button {
  color: rgb(var(--color-foreground));
  font-size: 1.4rem;
  background: none;
  border: none;
  padding: 0.4rem;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 0.8rem;
}
.nav-toggle span {
  display: block;
  width: 2.2rem;
  height: 2px;
  background: rgb(var(--color-foreground));
  margin: 5px 0;
  transition: all 0.3s;
}

/* === HERO / SLIDESHOW === */
.hero-banner {
  position: relative;
  overflow: hidden;
}

.hero-banner img {
  width: 100%;
  height: auto;
  display: block;
}

.hero-overlay {
  position: absolute;
  top: 60%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  padding: 4rem 4rem 4rem 13.6rem;
}

.hero-overlay h1 {
  font-family: var(--font-heading);
  font-size: 4.8rem;
  font-weight: 400;
  color: #fff;
  background: #000;
  display: inline-block;
  padding: 1.2rem 2.4rem;
}

/* === FEATURED PRODUCTS === */
.featured-section {
  padding: 6rem 0;
}

.featured-section h2 {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 400;
  text-align: center;
  margin-bottom: 4rem;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.8rem;
}

.product-card { position: relative; }

.product-card .product-images {
  position: relative;
  overflow: hidden;
  background: #f6f6f6;
}

.product-card .product-images img {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  transition: opacity 0.4s;
}

.product-card .product-images .hover-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
}

.product-card:hover .product-images .hover-img {
  opacity: 1;
}

.product-info {
  padding: 1.2rem 0;
  text-align: center;
}

.product-info h3 {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 400;
  margin-bottom: 0.4rem;
}

.product-info .price {
  font-size: 1.4rem;
  color: rgba(var(--color-foreground), 0.7);
}

.product-info .price-label {
  font-size: 1.2rem;
  color: rgba(var(--color-foreground), 0.5);
}

/* === FOOTER === */
.site-footer {
  background: rgb(var(--color-warm));
  padding: 6rem 0 3rem;
  color: rgb(var(--color-foreground));
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1.5fr;
  gap: 4.8rem;
  margin-bottom: 4rem;
}

.footer-col h4 {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 400;
  margin-bottom: 1.6rem;
}

.footer-col a {
  display: block;
  font-size: 1.4rem;
  padding: 0.3rem 0;
  color: rgba(var(--color-foreground), 0.7);
  transition: color 0.2s;
}
.footer-col a:hover { color: rgb(var(--color-foreground)); }

/* Newsletter */
.newsletter-form {
  display: flex;
  max-width: 36rem;
  border: 1px solid rgba(var(--color-foreground), 0.3);
}

.newsletter-form input {
  flex: 1;
  padding: 1.2rem 1.6rem;
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 1.4rem;
  color: rgb(var(--color-foreground));
  outline: none;
}

.newsletter-form input::placeholder { color: rgba(var(--color-foreground), 0.5); }

.newsletter-form button {
  padding: 1.2rem 1.6rem;
  background: transparent;
  border: none;
  color: rgb(var(--color-foreground));
  font-size: 1.6rem;
  cursor: pointer;
}

.footer-bottom {
  border-top: 1px solid rgba(var(--color-foreground), 0.15);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.2rem;
  color: rgba(var(--color-foreground), 0.5);
}

.payment-icons { display: flex; gap: 0.8rem; align-items: center; }
.payment-icons span {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  background: #fff;
  border-radius: 3px;
  font-size: 1.1rem;
  font-weight: 600;
  color: #333;
}

/* === PRODUCT PAGE === */
.product-page {
  padding: 4rem 0;
}

.product-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4.8rem;
  align-items: start;
}

.product-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.8rem;
}

.product-gallery img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  background: #f6f6f6;
}

.product-gallery img:first-child {
  grid-column: 1 / -1;
  aspect-ratio: 3/4;
}

.product-details h1 {
  font-family: var(--font-heading);
  font-size: 3.2rem;
  font-weight: 400;
  margin-bottom: 1.2rem;
}

.product-price {
  font-size: 1.8rem;
  margin-bottom: 2.4rem;
}

.product-description {
  font-size: 1.5rem;
  line-height: 1.7;
  color: rgba(var(--color-foreground), 0.75);
  margin-bottom: 3.2rem;
}

.option-group { margin-bottom: 2.4rem; }
.option-group label {
  display: block;
  font-size: 1.3rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.8rem;
}

.option-swatches { display: flex; gap: 0.8rem; flex-wrap: wrap; }

.swatch {
  padding: 1rem 1.8rem;
  border: 1px solid rgba(var(--color-foreground), 0.2);
  background: transparent;
  font-family: var(--font-body);
  font-size: 1.3rem;
  cursor: pointer;
  transition: all 0.2s;
}
.swatch:hover, .swatch.active {
  border-color: rgb(var(--color-foreground));
  background: rgb(var(--color-foreground));
  color: rgb(var(--color-background));
}

.btn-add-cart {
  width: 100%;
  padding: 1.6rem;
  background: rgb(var(--color-foreground));
  color: rgb(var(--color-background));
  border: none;
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.2s;
  margin-top: 2.4rem;
}
.btn-add-cart:hover { opacity: 0.85; }

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .main-nav { display: none; }
  .main-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgb(var(--color-background));
    padding: 2rem;
    border-bottom: 1px solid rgba(var(--color-foreground), 0.08);
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
  }
  .main-nav.open .dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    padding-left: 1.6rem;
  }
  .nav-toggle { display: block; }
  .products-grid { grid-template-columns: 1fr; max-width: 40rem; margin: 0 auto; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-overlay h1 { font-size: 3rem; }
  .product-layout { grid-template-columns: 1fr; }
}

@media (min-width: 480px) and (max-width: 768px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); max-width: none; }
}

/* === ANNOUNCEMENT BAR CYCLER === */
.announcement-bar { position: relative; display: flex; align-items: center; overflow: hidden; }
.announcement-slides { position: relative; flex: 1; height: 1.6em; }
.announcement-slide {
  position: absolute;
  width: 100%;
  top: 0; left: 0;
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
  text-align: center;
}
.announcement-slide.active {
  opacity: 1;
  pointer-events: auto;
}
.announcement-prev,
.announcement-next {
  background: none;
  border: none;
  color: rgb(var(--color-background));
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 1rem;
  opacity: 0.7;
  flex-shrink: 0;
}
.announcement-prev:hover,
.announcement-next:hover { opacity: 1; }

/* === SEARCH === */
.search-toggle { cursor: pointer; display: flex; align-items: center; }
.search-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 500;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12rem;
}
.search-overlay.open { display: flex; }
.search-box {
  background: rgb(var(--color-background));
  width: 100%;
  max-width: 64rem;
  padding: 2.4rem;
  display: flex;
  gap: 1.2rem;
  align-items: center;
  box-shadow: 0 8px 40px rgba(0,0,0,0.18);
}
.search-box input {
  flex: 1;
  border: none;
  border-bottom: 1.5px solid rgb(var(--color-foreground));
  font-family: var(--font-body);
  font-size: 1.8rem;
  padding: 0.8rem 0;
  background: transparent;
  outline: none;
}
.search-box button[type=submit] {
  background: rgb(var(--color-foreground));
  color: rgb(var(--color-background));
  border: none;
  padding: 0.8rem 2rem;
  font-size: 1.4rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
}
.search-box .search-close {
  background: none;
  border: none;
  font-size: 2.4rem;
  line-height: 1;
  cursor: pointer;
  color: rgb(var(--color-foreground));
  padding: 0 0.4rem;
}
