/* =========================================================
   ALUZ - statyczny layout sklepu
   Autor: ChatGPT
   Cel: wierne odwzorowanie projektu graficznego w HTML + CSS
   ========================================================= */

/* ---------- Reset i zmienne ---------- */
:root {
  --color-background: #fcfbfd;
  --color-surface: #ffffff;
  --color-border: #ece8f2;
  --color-text: #170f35;
  --color-text-muted: #6d6a7d;
  --color-primary: #7d18c8;
  --color-primary-dark: #6f0eb6;
  --color-primary-soft: #eee7fa;
  --color-success: #dcf4ec;
  --color-peach: #f8ece8;
  --color-star: #f5ba1b;
  --color-shadow: rgba(30, 15, 61, 0.08);
  --color-shadow-soft: rgba(30, 15, 61, 0.05);

  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 22px;

  --font-main: Arial, Helvetica, sans-serif;
  --page-width: 1188px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-background);
  color: var(--color-text);
  font-family: var(--font-main);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  display: block;
  max-width: 100%;
}

button,
input {
  font: inherit;
}

button {
  border: none;
  background: none;
  padding: 0;
  color: inherit;
}

button:hover {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible {
  outline: 2px solid #9f56de;
  outline-offset: 2px;
}

.page-shell {
  width: min(var(--page-width), calc(100% - 48px));
  margin: 0 auto;
}

/* ---------- Komponenty wspólne ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 18px;
  border-radius: var(--radius-xs);
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button--primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: #ffffff;
}

.button--primary img,
.button--search img,
.circle-action img,
.link-button img,
.header-action img,
.slider-button img,
.favorite-button img {
  width: 18px;
  height: 18px;
}

.button--search {
  width: 54px;
  height: 100%;
  border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: #ffffff;
}

.link-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--color-primary);
  font-size: 13px;
  font-weight: 700;
}

.circle-action {
  position: absolute;
  right: 14px;
  bottom: 12px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--color-primary);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(84, 24, 137, 0.2);
}

.circle-action img {
  width: 16px;
  height: 16px;
}

/* ---------- Górny pasek ---------- */
.top-info-bar {
  background: var(--color-primary-soft);
}

.top-info-bar__inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  align-items: center;
  min-height: 40px;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  line-height: 1.15;
  white-space: nowrap;
}

.info-item__icon {
  width: 28px;
  height: 28px;
  color: var(--color-primary);
  flex-shrink: 0;
}

.info-item strong,
.info-item span {
  display: block;
}

.info-item strong {
  font-weight: 700;
}

/* ---------- Header ---------- */
.site-header {
  display: grid;
  grid-template-columns: 110px 198px minmax(280px, 1fr) 235px;
  gap: 38px;
  align-items: center;
  min-height: 86px;
}

.site-header__logo img {
  width: 105px;
  height: 53px;
  object-fit: contain;
}

.category-trigger {
  justify-content: flex-start;
  padding-inline: 14px;
  font-size: 14px;
  font-weight: 700;
}

.category-trigger img:first-child,
.category-trigger img:last-child {
  width: 18px;
  height: 18px;
}

.category-trigger img:last-child {
  margin-left: auto;
}

.search-box {
  display: flex;
  align-items: stretch;
  height: 38px;
  border: 1px solid #d4ccdf;
  border-radius: var(--radius-xs);
  background: var(--color-surface);
  overflow: hidden;
}

.search-box input {
  flex: 1;
  min-width: 0;
  border: none;
  padding: 0 16px;
  background: transparent;
  color: var(--color-text);
  font-size: 14px;
}

.search-box input::placeholder {
  color: #8a8797;
}

.header-actions {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.header-action {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.header-action img {
  width: 24px;
  height: 24px;
}

.badge {
  position: absolute;
  top: -4px;
  right: -4px;
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
}

/* ---------- Hero ---------- */
.hero-banner {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 219px;
  margin-top: 8px;
  border-radius: var(--radius-lg);
  background:
    url("../images/hero-banner.png") center / cover no-repeat,
    #efe8fb;
}

.hero-banner__content {
  position: relative;
  z-index: 1;
  margin-left: 128px;
}

.hero-banner h1 {
  margin: 0 0 12px;
  font-size: 46px;
  line-height: 0.95;
  letter-spacing: -0.9px;
  font-weight: 800;
}

.hero-banner p {
  margin: 0 0 16px;
  font-size: 17px;
  line-height: 1.1;
  font-weight: 600;
}

.hero-banner__cta {
  min-width: 180px;
  font-size: 15px;
  font-weight: 700;
}

.slider-button {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 4px 14px rgba(65, 30, 111, 0.18);
}

.slider-button--left {
  left: 18px;
}

.slider-button--right {
  right: 18px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: -9px;
  z-index: 2;
  display: flex;
  gap: 5px;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: #ffffff;
  transform: translateX(-50%);
  box-shadow: 0 2px 8px rgba(22, 0, 59, 0.1);
}

.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d8d2e5;
}

.hero-dot--active {
  background: var(--color-primary);
}

/* ---------- Kategorie ---------- */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 22px;
}

.category-card {
  position: relative;
  min-height: 118px;
  padding: 16px 62px 16px 102px;
  border-radius: var(--radius-md);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.category-card--animals {
  background-image: url("../images/category-animals.png");
}

.category-card--kids {
  padding-left: 108px;
  background-image: url("../images/category-kids.png");
}

.category-card--home {
  padding-left: 96px;
  background-image: url("../images/category-home.png");
}

.category-card__content h2 {
  margin: 0 0 4px;
  font-size: 22px;
  line-height: 1.1;
  letter-spacing: -0.6px;
  font-weight: 800;
}

.category-card__content p {
  margin: 0;
  font-size: 14px;
  line-height: 1.15;
}

/* ---------- Produkty ---------- */
.products-section {
  margin-top: 18px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 10px;
}

.section-header h2 {
  margin: 0;
  font-size: 27px;
  line-height: 1.1;
  letter-spacing: -0.9px;
  font-weight: 800;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 208px;
  padding: 10px 22px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  box-shadow: 0 1px 4px var(--color-shadow-soft);
}

.favorite-button {
  position: absolute;
  top: 8px;
  right: 10px;
  color: #2b2253;
}

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

.product-card__image-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 84px;
  margin-bottom: 8px;
}

.product-card__image {
  max-height: 84px;
  object-fit: contain;
}

.product-card__rating {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 700;
}

.product-card__rating img {
  width: 12px;
  height: 12px;
  color: var(--color-star);
}

.product-card__rating small {
  color: var(--color-text-muted);
  font-size: 10px;
}

.product-card h3 {
  margin: 0;
  min-height: 30px;
  font-size: 12px;
  line-height: 1.22;
  font-weight: 500;
}

.product-card__price {
  margin: 6px 0 12px;
  font-size: 17px;
  line-height: 1.1;
  font-weight: 800;
}

.product-card__button {
  margin-top: auto;
  width: 100%;
  min-height: 30px;
  font-size: 12px;
  font-weight: 600;
}

/* ---------- Newsletter ---------- */
.newsletter-banner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 88px;
  margin: 22px 0 10px;
  padding: 0 34px;
  border-radius: 21px;
  background:
    url("../images/newsletter-art.png") right bottom / 323px 100px no-repeat,
    linear-gradient(110deg, #ece2fa, #e7d8f7 68%, #e9ddf7);
}

.newsletter-banner__envelope {
  width: 71px;
  height: 57px;
  object-fit: contain;
}

.newsletter-banner__headline h2,
.newsletter-banner__headline p {
  margin: 0;
}

.newsletter-banner__headline h2 {
  font-size: 24px;
  line-height: 1.05;
  letter-spacing: -0.8px;
  font-weight: 800;
}

.newsletter-banner__headline p {
  margin-top: 2px;
  font-size: 22px;
  line-height: 1.1;
  font-weight: 800;
}

.newsletter-banner__headline span {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 8px;
  background: var(--color-primary);
  color: #ffffff;
}

.newsletter-banner__description {
  margin: 0;
  font-size: 12px;
  line-height: 1.3;
}

.newsletter-form {
  display: flex;
  align-items: center;
  width: 270px;
  height: 34px;
  margin-left: auto;
  overflow: hidden;
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 8px rgba(81, 46, 128, 0.14);
}

.newsletter-form input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: none;
  padding: 0 12px;
  background: transparent;
  font-size: 12px;
}

.newsletter-form .button {
  min-height: 100%;
  border-radius: var(--radius-xs);
  padding-inline: 18px;
  font-size: 12px;
  font-weight: 700;
}

/* ---------- Responsywność ---------- */
@media (max-width: 1140px) {
  .site-header {
    grid-template-columns: 105px 188px minmax(240px, 1fr) 220px;
    gap: 18px;
  }

  .products-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .newsletter-banner {
    flex-wrap: wrap;
    gap: 10px 16px;
    padding-block: 16px;
    background-position: right bottom;
  }

  .newsletter-form {
    margin-left: 92px;
  }
}

@media (max-width: 900px) {
  .top-info-bar__inner {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 8px;
    padding: 10px 0;
  }

  .site-header {
    grid-template-columns: 95px 1fr 176px;
    gap: 12px;
    padding: 14px 0;
  }

  .site-header__logo {
    grid-column: 1;
  }

  .category-trigger {
    grid-column: 2;
  }

  .header-actions {
    grid-column: 3;
    gap: 10px;
  }

  .search-box {
    grid-column: 1 / -1;
  }

  .hero-banner__content {
    margin-left: 94px;
  }

  .hero-banner h1 {
    font-size: 40px;
  }

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

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

  .newsletter-form {
    margin-left: 0;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: calc(100% - 28px);
  }

  .top-info-bar__inner {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .info-item:nth-child(n + 3) {
    display: none;
  }

  .site-header {
    grid-template-columns: 1fr;
  }

  .site-header__logo,
  .category-trigger,
  .header-actions,
  .search-box {
    grid-column: auto;
  }

  .site-header__logo img {
    width: 92px;
    height: auto;
  }

  .header-actions {
    justify-content: flex-start;
    gap: 16px;
  }

  .header-action {
    font-size: 11px;
  }

  .hero-banner {
    overflow: hidden;
    background-position: 64% center;
  }

  .hero-banner::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(241, 232, 250, 0.98) 16%, rgba(241, 232, 250, 0.9) 40%, transparent 78%);
  }

  .hero-banner__content {
    margin-left: 28px;
    max-width: 210px;
  }

  .hero-banner h1 {
    font-size: 33px;
  }

  .hero-banner p {
    font-size: 13px;
    line-height: 1.2;
  }

  .hero-banner__cta {
    min-width: 148px;
    font-size: 12px;
  }

  .slider-button {
    width: 28px;
    height: 28px;
  }

  .slider-button--left {
    left: 6px;
  }

  .slider-button--right {
    right: 8px;
  }

  .category-card,
  .category-card--kids,
  .category-card--home {
    min-height: 108px;
    padding: 18px 56px 18px 28%;
  }

  .category-card__content h2 {
    font-size: 19px;
  }

  .category-card__content p {
    font-size: 13px;
  }

  .section-header h2 {
    font-size: 24px;
  }

  .newsletter-banner {
    padding: 14px;
    background-size: 190px auto;
  }

  .newsletter-banner__envelope {
    width: 44px;
    height: 36px;
  }

  .newsletter-banner__headline h2 {
    font-size: 18px;
  }

  .newsletter-banner__headline p {
    font-size: 17px;
  }

  .newsletter-banner__description {
    width: 100%;
  }

  .newsletter-form {
    width: 100%;
    max-width: 300px;
  }
}

/* Link do konta zachowuje wygląd istniejącej ikony w nagłówku. */
a.header-action {
  color: inherit;
  text-decoration: none;
}
