/* =========================================================
   DUFTBUDDY / DUFTBESTIE - STYLE.CSS
   Strukturierter Referenzstand
   ========================================================= */

/* =========================================================
   01. Basis / Reset
   ========================================================= */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: #172126;
  background: #f6f3ef;
  line-height: 1.55;
}

main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 34px 20px;
}

h2 {
  font-size: clamp(28px, 4vw, 44px);
  margin: 0 0 16px;
}

button,
.hero-button {
  display: inline-block;
  border: 0;
  border-radius: 999px;
  background: var(--customer-accent, #f3c85b);
  color: #171717;
  font-weight: 800;
  padding: 14px 22px;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .18);
}

button:disabled {
  opacity: .45;
  cursor: not-allowed;
}

select,
input {
  width: 100%;
  border: 1px solid #d8d6d1;
  border-radius: 12px;
  padding: 12px;
  font-size: 1rem;
  background: #fff;
}


/* =========================================================
   02. Hero
   ========================================================= */

.hero {
  min-height: 88vh;
  position: relative;
  background: #172126 url("hero-buddy.png") center / cover no-repeat !important;
}

body.hero-mode-bestie .hero {
  background-image: url("hero-bestie.png") !important;
}

.hero-shade {
  min-height: 88vh;
  display: flex;
  align-items: center;
  padding: 40px;
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, .70),
    rgba(0, 0, 0, .25),
    rgba(0, 0, 0, .10)
  );
}

.hero-card {
  max-width: 620px;
  color: #fff;
  background: rgba(0, 0, 0, .45);
  backdrop-filter: blur(3px);
  border: 1px solid rgba(255, 255, 255, .18);
  padding: 34px;
  border-radius: 22px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, .35);
  overflow: hidden;
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .82rem;
  font-weight: 700;
  color: #f3c85b;
}

.hero h1 {
  margin: 0 0 18px;
  text-transform: uppercase;
  font-size: clamp(3.6rem, 5.6vw, 6.2rem);
  line-height: .92;
  white-space: nowrap;
  max-width: 100%;
  letter-spacing: -0.04em;
}

body.hero-mode-bestie .hero h1 {
  font-size: clamp(3.2rem, 5.1vw, 5.7rem);
}

.lead {
  font-size: 1.25rem;
  margin: 0 0 26px;
}


/* =========================================================
   03. Hero Umschaltung Buddy / Bestie
   ========================================================= */

.hero-theme-toggle {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.hero-theme-btn {
  border: 1px solid rgba(255, 255, 255, .28);
  background: rgba(255, 255, 255, .10);
  color: #fff;
  box-shadow: none;
  padding: 9px 14px;
  border-radius: 999px;
  font-size: .86rem;
  font-weight: 800;
  backdrop-filter: blur(4px);
}

.hero-theme-btn.is-active {
  background: var(--customer-accent, #f3c85b);
  color: #171717;
  border-color: var(--customer-accent, #f3c85b);
}


/* =========================================================
   04. Allgemeine Sektionen
   ========================================================= */

.intro,
.berater {
  background: #fff;
  border-radius: 24px;
  padding: 30px;
  margin: 0 0 28px;
  box-shadow: 0 10px 35px rgba(0, 0, 0, .07);
}

.section-head {
  margin-bottom: 20px;
}


/* =========================================================
   05. Intro / Schritte / Hinweisbox
   ========================================================= */

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 24px 0;
}

.steps article {
  background: #f6f3ef;
  border-radius: 18px;
  padding: 18px;
  min-height: 120px;
}

.steps strong {
  display: block;
  font-size: 2rem;
  color: #1f4f5f;
}

.note {
  background: #fff7db;
  border-left: 5px solid #f3c85b;
  padding: 14px 16px;
  border-radius: 10px;
}

.sample-preview {
  display: none !important;
}

.note-with-sample {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 18px;
}

.note-with-sample .note-text {
  flex: 1;
}

.note-with-sample small {
  display: block;
  margin-top: 6px;
  color: #7a746d;
  font-size: .82rem;
}

.note-with-sample img {
  width: 92px;
  max-width: 22vw;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, .10));
}


/* =========================================================
   06. Top 5 / Kundenfavoriten
   ========================================================= */

.top5-section {
  position: relative;
  overflow: hidden;
  color: #fff;
  border-radius: 28px;
  margin: 36px 0;
  padding: 42px 28px !important;
  background:
    linear-gradient(rgba(10, 10, 12, .72), rgba(10, 10, 12, .76)),
    url("top5-bg-desktop.png") center / cover no-repeat;
  box-shadow: 0 20px 48px rgba(0, 0, 0, .24);
}

.top5-section h2,
.top5-section h3,
.top5-section p,
.top5-section .section-title {
  color: #fff !important;
}

.top5-section .section-head p:not(.eyebrow),
.top5-section .section-subtitle {
  color: rgba(255, 255, 255, .82) !important;
}

.top5-list {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-top: 22px;
}

.top5-card {
  min-height: 132px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-radius: 18px;
  padding: 16px;
  backdrop-filter: blur(6px);
  background: rgba(255, 255, 255, .10) !important;
  border: 1px solid rgba(255, 255, 255, .12) !important;
}

.top5-rank {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #d4af37 !important;
  color: #111 !important;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 1.2rem;
}

.top5-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.top5-content strong {
  font-size: 1rem;
  line-height: 1.25;
}

.top5-content span {
  color: #f3c85b;
  font-weight: 800;
  font-size: .9rem;
}

.top5-name,
.top5-count {
  color: #fff !important;
}

.top5-empty {
  grid-column: 1 / -1;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 18px;
  padding: 18px;
  color: rgba(255, 255, 255, .82);
}


/* =========================================================
   07. Filter / Layout
   ========================================================= */

.filters {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}

.filters label,
.order-box label {
  display: flex;
  flex-direction: column;
  font-weight: 700;
  font-size: .9rem;
  gap: 6px;
}

.layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
  align-items: start;
}


/* =========================================================
   08. Duftkarten
   ========================================================= */

.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.card {
  position: relative;
  border: 1px solid #e4e0d8;
  background: #fbfaf8;
  border-radius: 18px;
  padding: 16px;
  display: grid;
  grid-template-columns: 1fr 82px;
  gap: 10px;
  align-items: start;
}

.card-main {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.card-top {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.nr {
  background: #1f4f5f;
  color: #fff;
  border-radius: 999px;
  padding: 5px 10px;
  font-weight: 800;
}

.tag {
  display: inline-block;
  background: #ece8de;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: .78rem;
  font-weight: 700;
}

.card h3 {
  margin: 0;
  font-size: 1.15rem;
}

.card p {
  margin: 0;
  color: #4a5458;
}

.duft-img {
  width: 92px !important;
  height: 92px !important;
  object-fit: contain !important;
  display: block !important;
  opacity: 1 !important;
  border: 0 !important;
  background: transparent !important;
  align-self: start;
  justify-self: end;
}

.card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.card button {
  align-self: flex-start;
  padding: 10px 14px;
}

.detail-btn {
  background: #ece8de;
  color: #172126;
  box-shadow: none;
}

.card.selected {
  outline: 3px solid #f3c85b;
  background: #fff9e8;
}


/* =========================================================
   09. Kinder-Kacheln
   ========================================================= */

.card-kinder {
  background: linear-gradient(135deg, #eefaff 0%, #f8fdff 100%) !important;
  border-color: #a9d9ec !important;
}

.card-kinder .badge {
  background: #dff2fa !important;
  color: #123642 !important;
}

.card-kinder .nr {
  background: #2f91b5 !important;
  color: #fff !important;
}

.card-kinder .flacon {
  max-width: 112px;
}


/* =========================================================
   10. Bestseller Badge
   ========================================================= */

.badge-bestseller-gif {
  position: absolute;
  right: 18px;
  bottom: 118px;
  width: 220px;
  max-width: 34%;
  z-index: 5;
  pointer-events: none;
}


/* =========================================================
   11. Order Box / Anfrage
   ========================================================= */

.order-box {
  position: sticky;
  top: 18px;
  background: #172126;
  color: #fff;
  border-radius: 22px;
  padding: 22px;
  box-shadow: 0 16px 45px rgba(0, 0, 0, .16);
}

.order-box h3 {
  margin-top: 0;
}

.order-box input {
  border-color: transparent;
}

.order-box input:required {
  border-left: 4px solid rgba(243, 200, 91, .85);
}

.order-box input:required:valid {
  border-left-color: #25D366;
}

.order-box ol {
  padding-left: 22px;
  min-height: 74px;
}

.counter {
  font-weight: 800;
  color: #f3c85b;
}

.checkbox {
  flex-direction: row !important;
  align-items: flex-start;
  font-weight: 400 !important;
}

.checkbox input {
  width: auto;
  margin-top: 5px;
}

.small {
  font-size: .82rem;
  opacity: .8;
}


/* =========================================================
   12. Beraterbox / WhatsApp
   ========================================================= */

.berater-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 18px;
  padding: 12px;
  margin: 14px 0;
}

.berater-box img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(212, 175, 55, .75);
  box-shadow: 0 8px 18px rgba(0, 0, 0, .25);
}

.berater-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.berater-text strong {
  color: #fff;
  font-size: .98rem;
}

.berater-text span {
  color: rgba(255, 255, 255, .82);
  font-size: .82rem;
  line-height: 1.35;
}

.whatsapp-btn {
  width: 100%;
  border: 0;
  border-radius: 16px;
  padding: 13px 14px;
  margin: 0 0 16px;
  font-weight: 800;
  cursor: pointer;
  background: #25D366;
  color: #fff;
  font-size: .94rem;
  box-shadow: 0 10px 22px rgba(37, 211, 102, .24);
  transition: .18s ease;
}

.whatsapp-btn:hover {
  transform: translateY(-1px);
  background: #1ebe5d;
}


/* =========================================================
   13. Modal / Duftpyramide
   ========================================================= */

.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
}

.modal.is-open {
  display: block;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .62);
}

.modal-card {
  position: relative;
  background: #fff;
  max-width: 680px;
  width: calc(100% - 32px);
  max-height: 88vh;
  overflow: auto;
  margin: 6vh auto;
  padding: 26px;
  border-radius: 24px;
  box-shadow: 0 22px 80px rgba(0, 0, 0, .35);
}

.modal-close {
  position: absolute;
  right: 16px;
  top: 14px;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 50%;
  background: #172126;
  color: #fff;
  font-size: 28px;
  line-height: 1;
}

.modal-head {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
  padding-right: 48px;
}

.modal-card h2 {
  font-size: clamp(26px, 4vw, 40px);
  margin-bottom: 8px;
}

.modal-family {
  font-weight: 800;
  color: #1f4f5f;
}

.modal-description {
  font-size: 1.05rem;
  color: #4a5458;
}

.pyramid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 20px;
}

.pyramid div {
  background: #fff7db;
  border: 1px solid #f0dfaa;
  border-radius: 16px;
  padding: 14px;
}

.pyramid strong {
  display: block;
  margin-bottom: 8px;
  color: #172126;
}

.pyramid p {
  margin: 0;
  color: #4a5458;
}


/* =========================================================
   14. Footer
   ========================================================= */

footer {
  text-align: center;
  padding: 26px;
  color: #697377;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
}


/* =========================================================
   15. Responsive
   ========================================================= */

@media (max-width: 900px) {
  .hero {
    min-height: 72vh;
    background-image: url("hero-mobile-buddy.png") !important;
    background-position: center top;
  }

  body.hero-mode-bestie .hero {
    background-image: url("hero-mobile-bestie.png") !important;
  }

  .hero-shade {
    min-height: 72vh;
    padding: 22px;
    align-items: flex-end;
  }

  .hero-card {
    padding: 24px;
  }

  .intro,
  .berater {
    padding: 22px;
  }

  .layout {
    grid-template-columns: 1fr;
  }

  .steps,
  .filters,
  .cards,
  .pyramid {
    grid-template-columns: 1fr;
  }

  .order-box {
    position: static;
  }

  .card {
    grid-template-columns: 1fr 74px;
  }

  .duft-img {
    width: 78px !important;
    height: 78px !important;
  }

  .card-actions button {
    width: 100%;
  }

  .top5-section {
    display: block !important;
    width: 100% !important;
    margin: 0 0 28px 0 !important;
    padding: 28px 18px !important;
    border-radius: 22px;
    background:
      linear-gradient(rgba(10, 10, 12, .76), rgba(10, 10, 12, .82)),
      url("top5-bg-mobile.png") center / cover no-repeat;
  }

  .top5-list {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    width: 100% !important;
  }

  .top5-card {
    display: grid !important;
    grid-template-columns: 48px 1fr !important;
    align-items: center !important;
    min-height: auto !important;
    width: 100% !important;
  }

  .top5-rank {
    width: 42px !important;
    height: 42px !important;
  }

  .top5-content {
    min-width: 0 !important;
  }

  .top5-empty {
    display: block !important;
    width: 100% !important;
  }

  .berater-box img {
    width: 58px;
    height: 58px;
  }

  .hero-theme-toggle {
    margin-top: 14px;
  }

  .hero-theme-btn {
    padding: 8px 12px;
    font-size: .8rem;
  }

  .modal-card {
    margin: 3vh auto;
    max-height: 94vh;
    padding: 22px;
  }
}

@media (max-width: 700px) {
  .hero h1 {
    font-size: clamp(2.8rem, 15vw, 4.4rem);
  }

  body.hero-mode-bestie .hero h1 {
    font-size: clamp(2.4rem, 12vw, 3.6rem);
  }

  .note-with-sample {
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
  }

  .note-with-sample img {
    width: 72px;
    max-width: 26vw;
  }

  .note-with-sample small {
    font-size: .76rem;
  }

  .badge-bestseller-gif {
    right: 10px;
    bottom: 110px;
    width: 130px;
    max-width: 34%;
  }
}

@media (max-width: 600px) {
  .card-kinder .flacon {
    max-width: 96px;
  }
}



/* === Mobile Auswahl-Fokus nach 3 Düften === */
.mobile-selection-notice{
  display:none;
}

@media(max-width:900px){
  .mobile-selection-notice.is-visible{
    display:block;
    background:#fff7db;
    border-left:5px solid var(--customer-accent, #f3c85b);
    border-radius:16px;
    padding:14px 16px;
    margin:0 0 14px;
    box-shadow:0 8px 22px rgba(0,0,0,.08);
  }

  .mobile-selection-notice strong{
    display:block;
    color:#172126;
    font-size:1rem;
    margin-bottom:4px;
  }

  .mobile-selection-notice span{
    display:block;
    color:#4a5458;
    font-size:.9rem;
  }

  .mobile-selection-actions{
    display:flex;
    gap:8px;
    flex-wrap:wrap;
    margin-top:12px;
  }

  .mobile-selection-actions button{
    flex:1 1 130px;
    padding:11px 14px;
  }

  #mobileShowAll{
    background:#ece8de;
    color:#172126;
    box-shadow:none;
  }
}



/* === Mobile Auswahl-Fokus FIX3: ruhiges Ausblenden ohne Neuaufbau === */
@media(max-width:900px){
  body.mobile-selection-focus .card.mobile-not-selected{
    display:none !important;
  }

  body.mobile-selection-focus .cards{
    animation:none !important;
  }
}
