/* ===== Ustawienia ogólne ===== */
:root {
  --page-width: 1120px;
  --text: #111111;
  --muted-text: #5d5d5d;
  --line: #dddddd;
  --surface: #e7e7e7;
  --surface-medium: #d2d2d2;
  --placeholder: #a9a9a9;
  --footer: #444444;
  --white: #ffffff;
  --radius: 9px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: var(--white);
}

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

svg {
  display: block;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.container {
  width: min(var(--page-width), calc(100% - 40px));
  margin-inline: auto;
}

/* ===== Nagłówek ===== */
.site-header {
  padding: 19px 0 17px;
}

.header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 40px;
}

.logo {
  font-size: 31px;
  font-weight: 800;
  letter-spacing: -1.7px;
}

.main-nav {
  display: flex;
  justify-content: center;
  gap: 38px;
  font-size: 12px;
}

.main-nav a:hover {
  text-decoration: underline;
}

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

.icon-button,
.bag-button,
.favorite-button {
  border: 0;
  background: transparent;
  color: #575757;
  padding: 0;
}

.icon-button {
  width: 22px;
  height: 22px;
}

.icon-button svg,
.bag-button svg,
.favorite-button svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.seller-button {
  margin-left: 16px;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--surface);
  font-size: 11px;
}

/* ===== Wyszukiwarka ===== */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.search-hero {
  min-height: 302px;
  display: grid;
  place-content: center;
  padding: 48px 20px 38px;
  border-radius: var(--radius);
  background: var(--surface);
}

.search-form {
  width: min(735px, calc(100vw - 100px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  grid-template-areas:
    "query submit"
    "toggle toggle"
    "feedback feedback";
  gap: 16px;
  align-items: center;
}

.search-query {
  grid-area: query;
  width: 100%;
  height: 37px;
  padding: 0 18px;
  border: 0;
  border-radius: 9px;
  outline: 0;
  background: var(--white);
  font-size: 11px;
}

.search-query:focus,
.select-field:focus-within {
  box-shadow: 0 0 0 2px #1d96ff;
}

.search-submit {
  grid-area: submit;
  height: 37px;
  padding: 0 20px;
  border: 0;
  border-radius: 8px;
  background: var(--surface-medium);
  color: var(--text);
  font-size: 11px;
  text-align: center;
}

.search-mode-toggle {
  grid-area: toggle;
  justify-self: center;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 0;
  font-size: 9px;
}

.search-mode-toggle:hover {
  text-decoration: underline;
}

.search-feedback {
  grid-area: feedback;
  min-height: 14px;
  margin: -7px 0 0;
  color: var(--muted-text);
  text-align: center;
  font-size: 10px;
}

.advanced-filters[hidden] {
  display: none;
}

.search-form.is-advanced {
  grid-template-columns: 1fr;
  grid-template-areas:
    "query"
    "filters"
    "submit"
    "toggle"
    "feedback";
  gap: 12px;
}

.search-form.is-advanced .search-submit {
  width: 204px;
  justify-self: center;
  margin-top: 17px;
}

.advanced-filters {
  grid-area: filters;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px 16px;
}

.select-field {
  position: relative;
  display: block;
  min-width: 0;
  border-radius: 9px;
  background: var(--white);
}

.select-field::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 15px;
  width: 7px;
  height: 7px;
  border-right: 1px solid #5f7483;
  border-bottom: 1px solid #5f7483;
  pointer-events: none;
  transform: translateY(-70%) rotate(45deg);
}

.select-field select {
  width: 100%;
  height: 37px;
  padding: 0 36px 0 15px;
  border: 0;
  border-radius: inherit;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 11px;
  appearance: none;
  cursor: pointer;
}

.filter-gender {
  grid-column: 1;
}

.filter-age {
  grid-column: 2;
}

.filter-interests {
  grid-column: 3 / 5;
}

.filter-relationship {
  grid-column: 1;
}

.filter-price-from {
  grid-column: 2;
}

.filter-price-to {
  grid-column: 3;
}

.filter-location {
  grid-column: 4;
}

.search-form.is-loading .search-submit {
  opacity: 0.65;
  cursor: wait;
}

/* ===== Korzyści ===== */
.benefits {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 70px;
  padding: 31px 80px;
}

.benefit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.benefit-icon {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 50%;
  background: #c9c9c9;
}

.benefit p {
  margin: 0;
  font-size: 12px;
}

/* ===== Duży baner ===== */
.promo-large {
  min-height: 326px;
  display: flex;
  align-items: center;
  padding: 55px 180px;
  border-radius: var(--radius);
  background: var(--surface);
}

.promo-content h1 {
  margin: 0 0 16px;
  font-size: 34px;
  line-height: 1;
}

.promo-content p {
  margin: 0 0 32px;
  font-size: 15px;
  line-height: 1.35;
  font-weight: 600;
}

.button {
  display: inline-flex;
  min-width: 170px;
  height: 35px;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  font-size: 11px;
}

/* ===== Produkty ===== */
.product-section {
  padding-top: 27px;
}

.category-tabs {
  display: flex;
  justify-content: center;
  gap: 62px;
  margin-bottom: 31px;
}

.tab {
  border: 0;
  background: transparent;
  color: #c4c4c4;
  font-size: 16px;
  font-weight: 700;
}

.tab.active {
  color: var(--text);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
}

.product-card {
  min-width: 0;
  overflow: hidden;
  border-radius: 8px;
  background: var(--surface);
}

.product-image {
  position: relative;
  aspect-ratio: 1.27 / 1;
  background: var(--placeholder);
}

.favorite-button {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--white);
  color: #666666;
}

.favorite-button svg {
  width: 18px;
  height: 18px;
}

.product-info {
  min-height: 104px;
  padding: 14px 14px 12px;
}

.product-info h2,
.product-info h3 {
  margin: 0 0 6px;
  text-transform: uppercase;
  font-size: 11px;
  line-height: 1.1;
}

.product-info p {
  margin: 0;
  color: #292929;
  font-size: 10px;
}

.product-bottom {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-top: 15px;
}

.product-bottom strong {
  font-size: 18px;
}

.bag-button {
  width: 18px;
  height: 18px;
}

/* ===== Dwa mniejsze banery ===== */
.split-promos {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  padding-top: 39px;
}

.small-promo {
  min-height: 322px;
  display: flex;
  align-items: flex-end;
  padding: 44px;
  border-radius: var(--radius);
  background: var(--surface);
}

.small-promo h2 {
  margin: 0 0 21px;
  font-size: 28px;
}

/* ===== Tytuły sekcji ===== */
.section-title {
  margin: 0 0 27px;
  text-align: center;
  font-size: 15px;
}

/* ===== Blog ===== */
.blog-section {
  padding-top: 37px;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

.blog-card {
  overflow: hidden;
  border-radius: 8px;
  background: var(--surface);
}

.blog-image {
  aspect-ratio: 1.56 / 1;
  background: var(--placeholder);
}

.blog-content {
  min-height: 190px;
  padding: 17px 14px 19px;
}

.blog-content time {
  display: block;
  margin-bottom: 6px;
  font-size: 10px;
}

.blog-content h3 {
  margin: 0 0 14px;
  text-transform: uppercase;
  font-size: 12px;
}

.blog-content p {
  margin: 0 0 20px;
  font-size: 11px;
  line-height: 1.45;
}

.blog-content a {
  font-size: 11px;
}

/* ===== Newsletter ===== */
.newsletter {
  min-height: 140px;
  display: grid;
  grid-template-columns: 210px 1fr;
  align-items: center;
  gap: 40px;
  margin-top: 39px;
  margin-bottom: 26px;
  padding: 30px 44px;
  border-radius: var(--radius);
  background: var(--surface);
}

.newsletter h2 {
  margin: 0;
  font-size: 28px;
}

.newsletter-form {
  display: grid;
  grid-template-columns: 1fr 92px;
  gap: 15px;
}

.newsletter-form input {
  width: 100%;
  height: 37px;
  padding: 0 18px;
  border: 0;
  border-radius: 9px;
  outline: 0;
  background: var(--white);
  color: var(--text);
  font-size: 11px;
}

.newsletter-form input:focus {
  box-shadow: 0 0 0 2px #1d96ff;
}

.newsletter-form button {
  height: 37px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  background: var(--surface-medium);
  color: var(--text);
  font-size: 11px;
  text-align: center;
}

.newsletter-form button:hover {
  filter: brightness(0.96);
}

/* ===== Stopka ===== */
.site-footer {
  background: var(--footer);
  color: var(--white);
  padding: 45px 0 58px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.8fr repeat(3, 1fr);
  gap: 80px;
}

.footer-logo {
  display: inline-block;
  margin-bottom: 30px;
  font-size: 31px;
}

.footer-about p {
  width: min(240px, 100%);
  margin: 0 0 24px;
  color: #eeeeee;
  font-size: 11px;
  line-height: 1.45;
}

.socials {
  display: flex;
  gap: 23px;
}

.socials a {
  width: 21px;
  height: 21px;
}

.socials svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.footer-column {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.footer-column h2 {
  margin: 6px 0 2px;
  font-size: 12px;
}

.footer-column a {
  color: #f2f2f2;
  font-size: 11px;
}

/* ===== Responsywność ===== */
@media (max-width: 1050px) {
  .header-inner {
    grid-template-columns: auto 1fr;
  }

  .main-nav {
    order: 3;
    grid-column: 1 / -1;
  }

  .header-actions {
    justify-self: end;
  }

  .promo-large {
    padding-inline: 90px;
  }

  .benefits {
    padding-inline: 20px;
    gap: 25px;
  }

  .footer-grid {
    gap: 45px;
  }
}

@media (max-width: 800px) {
  .main-nav {
    flex-wrap: wrap;
    gap: 16px 25px;
  }

  .seller-button {
    display: none;
  }

  .search-hero {
    min-height: 230px;
  }

  .search-form {
    width: min(735px, calc(100vw - 64px));
  }

  .advanced-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-gender,
  .filter-age,
  .filter-relationship,
  .filter-price-from,
  .filter-price-to,
  .filter-location {
    grid-column: auto;
  }

  .filter-interests {
    grid-column: 1 / -1;
  }

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

  .benefit {
    justify-content: flex-start;
  }

  .promo-large {
    min-height: 270px;
    padding: 50px;
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .split-promos {
    grid-template-columns: 1fr;
  }

  .small-promo {
    min-height: 240px;
  }

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

  .newsletter {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .container {
    width: min(var(--page-width), calc(100% - 24px));
  }

  .site-header {
    padding-top: 14px;
  }

  .header-inner {
    gap: 18px;
  }

  .logo {
    font-size: 25px;
  }

  .header-actions {
    gap: 5px;
  }

  .main-nav {
    display: none;
  }

  .search-form {
    width: calc(100vw - 48px);
    grid-template-columns: 1fr;
    grid-template-areas:
      "query"
      "submit"
      "toggle"
      "feedback";
  }

  .search-form .search-submit {
    width: 100%;
  }

  .search-form.is-advanced .search-submit {
    width: 100%;
  }

  .advanced-filters {
    grid-template-columns: 1fr;
  }

  .filter-interests {
    grid-column: auto;
  }

  .promo-large {
    padding: 35px 25px;
  }

  .promo-content h1 {
    font-size: 28px;
  }

  .promo-content p {
    font-size: 13px;
  }

  .category-tabs {
    gap: 18px;
  }

  .tab {
    font-size: 13px;
  }

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

  .small-promo {
    padding: 30px;
  }

  .newsletter {
    padding: 26px 22px;
  }

  .newsletter-form {
    grid-template-columns: 1fr;
  }

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