/* Unified responsive layer for publish UI (Public) */

/* Defensive media defaults */
img,
video {
  max-width: 100%;
  height: auto;
}

/* Keep hero block stable across breakpoints */
.duftfinder-hero-outer {
  width: 100%;
  max-height: 525px;
}

.duftfinder-hero {
  height: min(525px, 50vh);
  max-height: 515px;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.4rem;
}

.duftfinder-visual {
  width: 100%;
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.duftfinder-visual .duftfinder-img {
  display: block;
  width: min(320px, 100%);
  max-height: 100%;
  object-fit: contain;
}

/* Tablet */
@media (max-width: 991.98px) {
  .layout-top-inner {
    padding: 1rem 0.8rem 1.35rem;
  }

  .layout-header-inner {
    max-width: 100%;
  }

  .duftfinder-hero {
    height: min(500px, 42vh) !important;
    min-height: 250px;
    max-height: 500px;
    padding: 1.1rem 0.9rem;
  }

  .duftfinder-title {
    font-size: clamp(1.35rem, 2.8vw, 1.8rem);
    letter-spacing: 0.14em;
    line-height: 1.15;
    margin-bottom: 0;
  }

  .duftfinder-tagline {
    margin-bottom: 0.35rem;
    font-size: 0.92rem;
  }

  .duftfinder-visual {
    height: clamp(95px, 16vh, 155px);
    min-height: 0;
    margin-bottom: 0.45rem;
  }

  .duftfinder-visual .duftfinder-img {
    width: min(250px, 100%);
    height: auto;
    max-height: 100%;
  }

  .duftfinder-btn-primary {
    font-size: 0.95rem;
    padding: 0.68rem 1rem;
    max-width: 320px;
    width: 100%;
  }
}

/* Mobile */
@media (max-width: 767.98px) {
  .layout-header-inner {
    flex-wrap: wrap;
    gap: 0.55rem;
    padding: 0.6rem 0.75rem;
    padding-top: calc(0.6rem + env(safe-area-inset-top, 0px));
  }

  .layout-logo {
    order: 1;
  }

  .layout-lang {
    order: 2;
    margin-left: auto;
  }

  .layout-search-wrap {
    order: 3;
    width: 100%;
    max-width: 100%;
    margin: 0;
  }

  .layout-search-wrap .layout-search-input {
    min-height: 44px;
    font-size: 0.94rem;
  }

  .duftfinder-hero-outer {
    border-radius: 18px;
    padding: 4px;
  }

  .duftfinder-hero {
    border-radius: 14px;
    height: min(430px, 39vh) !important;
    min-height: 205px;
    max-height: 430px;
    padding: 0.85rem 0.7rem;
  }

  .duftfinder-title {
    font-size: clamp(1.02rem, 4.4vw, 1.35rem);
    letter-spacing: 0.08em;
    line-height: 1.12;
  }

  .duftfinder-tagline {
    font-size: 0.8rem;
    margin-bottom: 0.28rem;
    line-height: 1.2;
  }

  .duftfinder-visual {
    height: clamp(74px, 13.2vh, 115px);
    margin-bottom: 0.35rem;
  }

  .duftfinder-visual .duftfinder-img {
    width: min(250px, 100%);
    max-height: 100%;
    height: auto;
  }

  .duftfinder-btn-primary {
    max-width: 280px;
    font-size: 0.86rem;
    padding: 0.58rem 0.75rem;
  }
}

/* Search + wizard consistency */
@media (max-width: 991.98px) {
  .search-hero {
    border-radius: 14px;
    padding: 1.35rem 0.9rem 0.9rem;
    margin-bottom: 0.9rem;
  }

  .results-card {
    border-radius: 14px;
  }

  .results-header {
    padding: 0.9rem;
  }

  .product-row {
    padding: 0.85rem 0.9rem;
    gap: 0.65rem;
  }

  .duftfinder-wizard-inner {
    max-width: 100%;
    padding: 0 0.3rem 0.65rem;
  }

  .wizard-step {
    min-height: 0;
  }

  .wizard-options-gender {
    gap: 0.75rem;
  }

  .wizard-option-gender {
    flex: 0 0 calc(33.333% - 0.5rem);
    max-width: calc(33.333% - 0.5rem) !important;
    min-width: 0;
    padding: 0.65rem 0.4rem 1.2rem;
  }

  .wizard-option-gender .wizard-option-img-wrap {
    height: clamp(92px, 14vh, 132px);
  }

  .wizard-options-mevsim,
  .wizard-options-renk,
  .wizard-options-kullanim {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: flex-start;
  }

  /* col-sm-6 behavior on tablet/mobile */
  .wizard-option-mevsim,
  .wizard-option-renk,
  .wizard-option-kullanim {
    flex: 0 0 calc(50% - 0.375rem);
    max-width: calc(50% - 0.375rem);
    min-height: 7.4rem;
    height: auto;
    padding: 0.55rem;
  }

  .wizard-mevsim-img,
  .wizard-renk-swatch,
  .wizard-kullanim-img {
    height: clamp(74px, 10.6vh, 95px);
  }

  .wizard-option-mevsim .wizard-option-label,
  .wizard-option-renk .wizard-option-label,
  .wizard-option-kullanim .wizard-option-label {
    font-size: 0.8rem;
    line-height: 1.15;
  }

  .wizard-product-list {
    max-height: 46vh;
  }
}

@media (max-width: 767.98px) {
  .feature-strip-nav {
    width: 32px;
    height: 32px;
  }

  .feature-chip {
    font-size: 0.78rem;
    padding: 7px 12px;
  }

  .results-header {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 0.45rem;
  }

  .product-row {
    flex-direction: column;
    align-items: stretch;
  }

  .wizard-step-desc {
    font-size: 0.98rem;
    margin-bottom: 0.55rem;
  }

  .wizard-options {
    gap: 0.65rem;
    padding: 0;
  }

  .wizard-option-gender {
    flex: 0 0 calc(50% - 0.325rem);
    max-width: calc(50% - 0.325rem) !important;
  }

  .duftfinder-wizard-fullpage {
    padding-bottom: calc(5.25rem + env(safe-area-inset-bottom, 0px));
  }

  .duftfinder-wizard-actions {
    position: sticky;
    bottom: 0;
    z-index: 5;
    margin-top: 1.1rem;
    padding-top: 0.85rem;
    gap: 8px;
    border-top: 1px solid #e5e7eb;
    background: linear-gradient(180deg, rgba(250, 251, 252, 0.9) 0%, rgba(250, 251, 252, 1) 48%);
    backdrop-filter: blur(4px);
    padding-bottom: calc(0.45rem + env(safe-area-inset-bottom, 0px));
  }

  .duftfinder-wizard-btn {
    flex: 1;
    width: 100%;
    justify-content: center;
    min-height: 44px;
  }
}

@media (max-width: 479.98px) {
  .wizard-option-gender {
    flex: 0 0 calc(50% - 0.325rem);
    max-width: calc(50% - 0.325rem) !important;
  }

  .wizard-option-mevsim,
  .wizard-option-renk,
  .wizard-option-kullanim {
    flex: 0 0 calc(50% - 0.325rem);
    max-width: calc(50% - 0.325rem);
    min-height: 7rem;
  }

  .wizard-product-list .product-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Touch and accessibility */
@media (hover: none) and (pointer: coarse) {
  .feature-chip:hover,
  .product-row:hover,
  .wizard-option:hover,
  .wizard-feature-chip:hover,
  .duftfinder-wizard-btn-primary:hover,
  .duftfinder-wizard-btn-secondary:hover {
    transform: none;
    box-shadow: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .feature-chip,
  .product-row,
  .wizard-option,
  .wizard-feature-chip,
  .duftfinder-wizard-btn,
  .duftfinder-wizard-progress-fill {
    transition: none !important;
    animation: none !important;
  }
}
