/* ---------------- RESET ---------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden;
}

/* ---------------- VARIABLES ---------------- */
:root {
  --primary-color: #0b1d2d;
  --secondary-color: #D2AC47;
  --background-color: #F7F8FA;
  --text-color: #222;
  --border-light: #ccc;
  --font-primary: 'Poppins', sans-serif;
  --font-secondary: 'Playfair Display', serif;
}

/* ---------------- BASE ---------------- */
body {
  font-family: var(--font-primary);
  background-color: white;
  color: var(--text-color);
}

/* ---------------- CONTAINER ---------------- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ---------------- HEADER ---------------- */
.site-header {
  background-color: var(--primary-color);
  padding: 0.5rem 0;
}

.header-inner {
  display: flex;
  justify-content: space-between; 
  align-items: center;
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 1rem;
  flex-wrap: nowrap; 
}


.site-header .logo {
  display: block;
}

.site-header .logo img {
  height: 120px; 
  width: auto;
  object-fit: contain;
}


.main-nav {
  display: flex;
  gap: 1.5rem;
}

.main-nav a {
  color: white;
  text-decoration: none;
  font-weight: 500;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--secondary-color);
}

/* ---------------- HERO ---------------- */
.hero {
  width: 100vw;
  background: linear-gradient(135deg, #0b1d2d, #001f54);
  color: white;
  text-align: center;
  padding: 0.5rem 1rem 2rem; 
}

.hero-inner {
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-family: var(--font-secondary);
  font-size: 2.4rem;
  margin-bottom: 1rem;
}

/* ---------------- SEARCH ---------------- */
.search-bar {
  max-width: 600px;
  margin: 1.5rem auto 0;
  position: relative;
}

.search-bar input {
  width: 100%;
  padding: 1rem 1.75rem;
  border-radius: 999px;
  border: 1px solid var(--border-light);
  font-size: 1rem;
  background-color: white;
  color: black;
}

.clear-btn {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  color: #888;
  cursor: pointer;
  display: none; 
  user-select: none;
  z-index: 20;
}

.clear-btn:hover {
  color: #333;
}

.perfume-grid.single-centered {
  display: flex !important;
  justify-content: center;
  align-items: flex-start;
}

#searchSuggestions {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  background: white;
  color: black;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  max-height: 220px;
  overflow-y: auto;
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  width: 100%;
  z-index: 10;
}

#searchSuggestions li {
  padding: 0.75rem 1rem;
  cursor: pointer;
  font-size: 0.95rem;
}

#searchSuggestions li:hover {
  background-color: grey;
}

/* ---------------- FILTERS ---------------- */
.filters {
  margin: 2rem auto;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.filter-btn {
  padding: 0.6rem 1.4rem;
  border-radius: 999px;
  border: 1px solid var(--primary-color);
  background: white;
  color: var(--primary-color);
}

.filter-btn.active {
  background: var(--primary-color);
  color: white;
}

/* ---------------- PERFUME GRID ---------------- */
.perfume-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  padding: 2rem 1rem;
  background-color: white;
}

.perfume-grid.single-result {
  display: flex;
  justify-content: center;
}

.perfume-grid.single-result .perfume-card {
  max-width: 340px;
  width: 100%;
}

/* ---------------- PERFUME CARD ---------------- */
.perfume-card {
  background-color: var(--primary-color);
  color: white;
  border-radius: 16px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.perfume-card img {
  width: 100%;
  height: 220px;
  object-fit: contain;
  background-color: white;
  padding: 1rem;
  border-radius: 12px;
  margin-bottom: 1rem;
}

.perfume-card h3 {
  font-family: var(--font-secondary);
  text-align: center;
  margin-bottom: 0.75rem;
}

/* ---------------- VOLUMES ---------------- */
.volumes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
  width: 100%;
  margin-bottom: 1rem;
}

.volume-btn {
  background: white;
  color: var(--primary-color);
  padding: 1.0rem;
  border-radius: 8px;
  text-align: center;
  font-weight: 500;
  border: 2px solid transparent;
  cursor: pointer;
  transition: 0.2s ease;
}

.volume-btn.active {
  border: 2px solid var(--secondary-color);
  box-shadow: 0 0 0 2px rgba(210, 172, 71, 0.3);
}

.volume-btn,
.afiliate-box {
  font-family: var(--font-primary);
}
/* ---------------- AFFILIATES ---------------- */
.affiliate-links {
  display: grid;
  flex-direction: column;
  gap: 0.6rem;
  width: 100%;
}

.affiliate-box {
  background: white;
  color: var(--primary-color);
  padding: 0.6rem;
  border-radius: 8px;
  text-decoration: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 500;
  transition: 0.2s ease;
}

/* Hide extra affiliates */
.affiliate-more {
  display: none;
  flex-direction: column;
  gap: 0.6rem;
  width: 100%;
}

/* When opened */
.affiliate-more.open {
  display: flex;
}

/* Toggle button */
.affiliate-toggle {
  grid-column: 1/-1;
  background: transparent;
  border: none;
  color: var(--secondary-color);
  font-weight: 500;
  cursor: pointer;
  padding: 0.5rem;
  margin-top: 0.3rem;
  text-align: center;
}

.affiliate-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}


.affiliate-box .arrow {
  color: var(--secondary-color);
  font-weight: 1150;
  font-size: 2.0rem;
  transition: transform 0.2s ease;
}

/* ---------------- FOOTER ---------------- */
.site-footer {
  width: 100vw;
  background-color: var(--primary-color);
  color: white;
  text-align: center;
  padding: 2rem 1rem;
}

/* ---------------- HOW IT WORKS ---------------- */
.how-it-works {
  background-color: var(--background-color);
  padding: 4rem 1rem;
  text-align: center;
}

.how-it-works h2 {
  font-family: var(--font-secondary);
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

.how-subtitle {
  max-width: 600px;
  margin: 0 auto 3rem;
  color: #555;
  font-size: 1rem;
}

.how-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.step {
  background: white;
  border-radius: 16px;
  padding: 2rem 1.5rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
  transition: transform 0.3s;
}

.step:hover {
  transform: translateY(-6px);
}

.step-number {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: var(--secondary-color);
  font-weight: 600;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step p {
  font-size: 0.95rem;
  color: #333;
  line-height: 1.5;
}

.pagination {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin: 2rem 0;
}

.pagination button {
  padding: 0.5rem 1rem;
  border-radius: 6px;
  border: 1px solid #0b1d2d;
  background: white;
  cursor: pointer;
}

.pagination button.active {
  background: #0b1d2d;
  color: white;
}

/* ---------------- MOBILE ---------------- */
body {
  overflow-x: hidden;
}

.perfume-card,
.volumes,
.affiliate-links,
.volume-box,
.affiliate-box {
  min-width: 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
}


@media (max-width: 600px) {
  .perfume-grid {
    grid-template-columns: 1fr !important;
  }

  .perfume-card {
    width: 100%;
  }
  .perfume-card,
  .affiliate-box,
  .volume-btn,
  .affiliate-links,
  .affiliate-more {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: break-word;
    word-break: break-word;
  }
  .affiliate-box {
    display: flex;
    flex-wrap: wrap;
  }
  .affiliate-right {
    flex-wrap: wrap;
    max-width: 100%;
  }
  .affiliate-box .arrow {
    font-size: 1.4rem;
  }
  .volumes {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 360px) {
  .volumes {
    grid-template-columns: 1fr;
  }
  .perfume-card h3 {
    font-size: 1.1rem;
  }
}

@media (max-width: 768px) {
  .how-steps {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .header-inner {
    flex-wrap: wrap; 
    justify-content: space-between; 
    padding: 0.5rem 1rem;
  }
  .main-nav {
    flex-wrap: wrap; 
    gap: 1rem;       
  }
  .main-nav a {
    font-size: 0.9rem; 
  }
}
