@import url("https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Public+Sans:ital,wght@0,100..900;1,100..900&display=swap");

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

:root {
  --light: rgba(221, 84, 255, 0.1);
  --dark: rgba(108, 35, 110, 0.5);
  --bright: rgb(180, 25, 180);
}

body {
  font-family: "Public Sans", sans-serif;
  line-height: 1.7;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Inter", sans-serif;
  font-style: normal;
  font-family: 700;
  line-height: 1.1;
}

.navigation {
  width: 60%;
  margin: auto;
}

.logo {
  font-size: 36px;
  font-weight: 700;
  margin: 10px auto;
}

header {
  position: relative;
}

.hero-line {
  position: absolute;
  top: 50px;
  left: 0;
  width: 100%;
  height: 430px;
  background-color: var(--light);
  z-index: -1;
}

.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  max-width: 60%;
  margin: 40px auto;
  column-gap: 50px;
}

.left-hero {
  display: grid;
  grid-template-areas:
    "top"
    "bottom";
  row-gap: 20px;
}

.left-top {
  grid-area: top;
}

.left-bottom {
  grid-area: bottom;
}

.left-hero h1 {
  font-size: 60px;
  margin-bottom: 15px;
}

.price-block {
  margin: 20px 0;
  display: flex;
  flex-direction: row;
  gap: 20px;
  align-items: center;
  font-size: 18px;
}

.old-price {
  position: relative;
}

.old-price::after {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  height: 2px;
  background-color: red;
  transform: translateY(-50%) rotate(20deg);
  transform-origin: center;
}

.new-price {
  padding: 5px 10px;
  background-color: black;
  color: white;
  font-weight: 700;
  border-radius: 5px;
}

.button-hero {
  display: inline-block;
  text-decoration: none;
  font-size: 18px;
  color: white;
  padding: 10px 15px;
  background-color: black;
  border-radius: 5px;
}

.right-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.badge-block {
  position: absolute;
  top: 20px;
  left: 30px;
}

.badge-sale {
  position: relative;
  display: inline-block;
}

.badge-sale img {
  display: block;
  width: 120px;
  height: auto;
}

.badge-sale span {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  text-transform: uppercase;
  text-align: center;
  font-family: "Inter";
  font-weight: 700;
  font-size: 18px;
}

.hero-product {
  width: 450px;
  max-width: 100%;
  height: auto;
}

.rating-hero {
  display: flex;
  flex-direction: row;
  gap: 10px;
  align-items: center;
  position: absolute;
  bottom: -18px;
  left: 30%;
}

.container {
  width: 60%;
  margin: 50px auto;
}

.wiw-flex {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

.wiw-left {
  width: 60%;
}

.wiw-container-title {
  font-size: 34px;
  margin-bottom: 15px;
}

.wiw-right {
  text-align: center;
  width: 35%;
}

.wiw-right h3 {
  font-size: 24px;
}

.instruction {
  display: flex;
  flex-direction: row;
  gap: 30px;
  margin: 30px auto;
  justify-content: space-between;
}

.step {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  justify-content: center;
}

.step img {
  width: 80px;
}

.description-block {
  text-align: center;
  padding: 30px;
  background-color: var(--dark);
  color: white;
}

.description-block h2 {
  font-size: 32px;
  text-transform: uppercase;
  margin-bottom: 15px;
}

.description-block p {
  width: 500px;
  margin: auto;
}

.container-title {
  font-size: 32px;
  text-align: center;
  max-width: 600px;
  margin: 0 auto 30px;
}

.offer-block {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  gap: 30px;
}

.offer-block-left {
  order: 1;
}
.offer-block-right {
  order: 2;
  position: relative;
}

.offer-block-left h3 {
  margin-bottom: 15px;
}

.rating-block {
  display: flex;
  flex-direction: row;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.produckt-benefits {
  margin-left: 20px;
}

.order-button {
  font-size: 18px;
  color: white;
  background-color: black;
  border-radius: 5px;
  padding: 10px 15px;
  border: 0;
  margin-top: 20px;
}

.daly-price {
  text-align: center;
  font-weight: 600;
  font-size: 14px;
}

.table-section h2 {
  margin-bottom: 10px;
}

.container-subtitle {
  text-align: center;
  max-width: 600px;
  margin: auto;
}

.table-container {
  max-width: 1200px;
  margin: 0 auto;
}

.comparison-table {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin: 30px auto 10px;
}

/* LEFT FIXED COLUMN */
.props-col {
  flex: 0 0 280px; /* ширина левого столбца */
  display: flex;
  flex-direction: column;
}

/* RIGHT SWIPER AREA */
.tableSwiper {
  flex: 1 1 auto;
  overflow: hidden;
}

/* Cells */
.cell {
  height: 75px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 5px solid #fff; /* “пробелы” как в примере */
  box-sizing: border-box;
}

/* left column text */
.props-col .cell {
  justify-content: flex-start;
  padding: 0 18px;
  font-size: 18px;
  font-weight: 700;
  background: #fff;
}

.cell.head {
  font-weight: 700;
}

/* Product column layout */
.product-col {
  display: flex;
  flex-direction: column;
}

/* backgrounds per column */
.product-col.prod .cell {
  background: var(--bright);
  color: #fff;
}
.product-col.gray .cell {
  background: #d8d8d8;
  color: #111;
}
.product-col.light-gray .cell {
  background: #f3f3f3;
  color: #111;
}

.prod-head,
.col-head {
  font-weight: 700;
}

/* Icons (вместо content:url — так коррект hint для всех браузеров) */
.icon {
  width: 34px;
  height: 34px;
  display: inline-block;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.icon-check {
  background-image: url("../img/check-mark.svg");
}
.icon-cross {
  background-image: url("../img/x-mark.svg");
}

/* если у “галочки” нужна тёмная обводка (как у тебя было style="border-color:#333") */
.icon-dark {
  filter: grayscale(1) contrast(1.1) brightness(0.6);
}

/* Controls */
.slider-controls {
  display: none;
  justify-content: center;
  gap: 18px;
  margin: 12px 0 6px;
}

.arrow-btn {
  width: 56px;
  height: 44px;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  font-size: 32px;
  background: none;
}

/* Footer note */
.footer-note {
  font-size: 14px;
  text-align: right;
}

.button-container {
  text-align: center;
}

.order-button-table {
  font-size: 18px;
  color: white;
  background-color: black;
  border-radius: 5px;
  padding: 15px 20px;
  border: 0;
  margin-top: 20px;
}

.changes-section {
  background-color: var(--dark);
  padding: 30px 0;
  margin: 40px auto;
  color: white;
}

.changesSwiper {
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  max-width: 1200px;
  margin: auto;
}

.changes-wrapper {
  justify-content: center;
}

.changes-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  font-weight: 700;
  width: 200px;
}

.changes-card img {
  width: 140px;
  height: auto;
}

.changes-controls {
  display: none;
  justify-content: center;
  gap: 18px;
  margin-top: 12px;
}

.arrow-btn--white {
  color: white;
  font-size: 32px;
}

.reviewsSwiper {
  max-width: 1200px;
  margin: 20px auto;
  overflow: visible;
}

.reviews-block {
  justify-content: space-between;
}

.card-reviews {
  border: 2px solid #111;
  border-radius: 5px;
  width: 350px;
  height: 350px;
  position: relative;
}

.card-reviews p {
  padding: 10px;
}

.user-block {
  display: flex;
  flex-direction: column;
  position: absolute;
  bottom: 0;
  left: 0;
  padding: 10px 15px;
  background-color: #111;
  width: 100%;
  height: 80px;
  border-radius: 5px;
}

.name-review {
  color: white;

  font-size: 18px;
  font-weight: 600;

  display: flex;
  flex-direction: row;
  gap: 10px;
  align-items: center;
}

.name-review img {
  width: 20px;
  height: 20px;
}

.review-rating {
  width: 80px;
}

.reviews-controls {
  display: none;
  justify-content: center;
  gap: 18px;
  margin: 12px 0 0;
}

.composition-block {
  position: relative;
  width: 100%;
  height: 500px;
}

.composition-block img {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30%;
  z-index: 20;
}

.composition-line {
  position: absolute;
  bottom: 0;
  left: 0;
  background-color: var(--light);
  width: 100%;
  height: 400px;
}

.composition-text {
  position: absolute;
  top: 30%;
  left: 45%;
  transform: translateX(0);
  max-width: 500px;
  font-size: 18px;
  z-index: 5;
}

.composition-text h3 {
  font-size: 28px;
  margin-bottom: 20px;
}

.composition-text p {
  margin-bottom: 25px;
}

.composition-button {
  text-decoration: none;
  padding: 10px 15px;
  text-transform: uppercase;
  background-color: #111;
  border-radius: 5px;
  color: white;
  font-size: 18px;
}

.compositionSwiper {
  background-color: var(--dark);
  color: white;
}

.composition-wrapper {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  max-width: 1400px;
  margin: auto;
}

.ingredient-card {
  width: 250px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 30px 0;
}

.ingredient-card img {
  width: 90px;
}

.ingredient-card h4 {
  font-size: 20px;
  margin-bottom: 20px;
}

.composition-controls {
  display: none;
}

.footer {
  text-align: center;
  background-color: #111;
  color: white;
  padding: 20px;
}

.logo-footer {
  font-size: 28px;
  font-weight: 700;
}

.pls {
  display: flex;
  flex-direction: row;
  gap: 20px;
  justify-content: center;
}

.pls a {
  color: white;
  text-decoration: none;
}

@media (max-width: 768px) {
  .navigation {
    width: 100%;
    padding: 10px;
  }

  .logo {
    font-size: 28px;
  }

  .hero-line {
    top: 3%;
    height: 790px;
  }
  .hero {
    max-width: 92%;
    margin: 20px auto;
    grid-template-columns: 1fr;
    grid-template-areas:
      "leftTop"
      "right"
      "leftBottom";
    row-gap: 18px;
  }

  .left-hero .left-top {
    grid-area: leftTop;
  }
  .right-hero {
    grid-area: right;
  }
  .left-hero .left-bottom {
    grid-area: leftBottom;
  }

  .left-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .left-hero {
    display: contents;
  }

  .left-hero h1 {
    font-size: 34px;
    line-height: 1.15;
  }

  .price-block {
    margin: 12px 0 10px;
  }

  .button-hero {
    text-align: center;
    padding: 14px 16px;
  }

  .badge-block {
    left: 8px;
    top: 8px;
  }

  .rating-hero {
    position: static;
    margin-top: 10px;
    justify-content: center;
  }

  .container {
    width: 100%;
    padding: 10px;
  }

  .container-title {
    font-size: 32px;
    max-width: 100%;
  }

  .offer-block {
    flex-direction: column;
  }

  .offer-block-right {
    order: 1;
  }
  .offer-block-left {
    order: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .offer-block-left h3 {
    text-align: center;
  }

  .produckt-benefits {
    margin-left: 45px;
  }

  .utp {
    text-align: center;
  }

  .offer-block-right .hero-product {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
  }

  .wiw-flex {
    flex-direction: column;
    gap: 20px;
  }

  .wiw-left {
    width: 100%;
    text-align: center;
  }

  .wiw-container-title {
    text-align: center;
  }

  .wiw-right {
    text-align: center;
    width: 100%;
  }

  .wiw-right h3 {
    font-size: 24px;
  }

  .instruction {
    gap: 15px;
  }

  .description-block p {
    width: 100%;
  }

  .changesSwiper {
    display: block;
    max-width: 100%;
    padding: 0 10px;
    overflow: hidden;
  }
  
  .changes-wrapper {
    justify-content: space-around;
  }

  .changes-card {
    width: 100%;
    box-sizing: border-box;
  }

  .changes-card img {
    width: 180px;
  }

  .changes-controls {
    display: flex;
  }

  .reviewsSwiper {
    overflow: hidden !important;
    padding: 0;
  }

  .reviews-block {
    justify-content: flex-start;
  }

  .card-reviews {
    width: 100%;
    height: 300px;
    margin: 0 auto;
  }

  .reviews-controls {
    display: flex;
  }

  .composition-block {
    position: relative;
    width: 100%;
    height: 600px;
  }

  .composition-block img {
    position: absolute;
    top: -12%;
    left: 0;
    width: 90%;
  }

  .composition-line {
    position: absolute;
    bottom: 0;
    left: 0;
    background-color: var(--light);
    width: 100%;
    height: 600px;
  }

  .composition-text {
    top: auto; /* ключ: сбросить top */
    bottom: 15px; /* теперь bottom начнёт работать */
    left: 50%;
    transform: translateX(-50%);
    width: min(560px, 92%);
    max-width: 100%;
    padding: 10px 12px;
    text-align: center;
    box-sizing: border-box;
  }

  .composition-text h3 {
    font-size: 28px;
    margin-bottom: 20px;
  }

  .composition-text p {
    margin-bottom: 25px;
  }

  .composition-button {
    text-decoration: none;
    padding: 10px 15px;
    text-transform: uppercase;
    background-color: #111;
    border-radius: 5px;
    color: white;
    font-size: 18px;
  }

  .compositionSwiper {
    overflow: hidden !important;
    padding: 15px 0;
  }

  .composition-wrapper {
    justify-content: flex-start;
  }

  .compositionSwiper .swiper-slide {
    width: 100% !important;
  }

  .ingredient-card {
    width: 100%;
    padding: 24px 10px;
    box-sizing: border-box;
  }

  .composition-controls {
    display: flex;
    justify-content: center;
  }

  .pls {
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
  }
}

@media (max-width: 767px) {
  .props-col {
    flex-basis: 46%;
  }
  .props-col .cell {
    font-size: 16px;
  }
  .slider-controls {
    display: flex;
  }

  .tableSwiper .swiper-slide {
    width: 100% !important;
  }
}

@media (min-width: 768px) {
  .tableSwiper .swiper-slide {
    width: 285px !important;
  }
}

.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  display: none; /* по умолчанию скрыта */
}

.popup-form {
  background-color: #fff;
  border-radius: 1rem;
  max-width: 420px;
  width: 90%;
  padding: 20px;
  font-family: "Inter", sans-serif;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  text-align: center;
  position: relative; /* обязательно для позиционирования крестика */
}

.popup-form img.logo {
  width: 120px;
  margin-bottom: 8px;
}

.popup-form .certified {
  font-size: 0.85rem;
  color: #555;
  margin-bottom: 16px;
}

.price-block-form {
  margin-bottom: 16px;
}

.price-block-form h3 {
  font-size: 1.4rem;
  margin-bottom: 8px;
}

.old-price-form {
  text-decoration: line-through;
  color: #888;
  margin-right: 8px;
}

.new-price-form {
  color: #27ae60;
  font-size: 2rem;
  font-weight: 700;
}

.stock-counter {
  font-size: 0.9rem;
  color: #d63031;
  margin-top: 8px;
}

.popup-form input {
  width: 100%;
  padding: 12px;
  margin: 6px 0;
  border-radius: 0.5rem;
  border: 1px solid #ddd;
  font-size: 1rem;
  box-sizing: border-box;
}

.popup-form button {
  width: 100%;
  padding: 14px;
  background-color: #1d772c;
  color: white;
  border: none;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s;
  margin-top: 10px;
}

.popup-form button:hover {
  background-color: #219150;
}

.trust-icons {
  display: flex;
  justify-content: space-between;
  margin-top: 18px;
  font-size: 0.7rem;
  color: #555;
}

.trust-icons div {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 4px;
}

.trust-icons svg {
  width: 32px;
  height: 32px;
  margin-bottom: 4px;
}

@media (max-width: 480px) {
  .trust-icons {
    flex-wrap: wrap;
  }

  .trust-icons div {
    width: 50%;
    margin-bottom: 12px;
  }
}

.popup-form {
  position: relative;
}

.close-popup {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 24px;
  color: #aaa;
  cursor: pointer;
  user-select: none;
  line-height: 1;
  z-index: 10;
  transition: color 0.2s;
}

.close-popup:hover {
  color: #555;
}

#stockCount {
  display: inline-block;
  transition: transform 0.3s ease;
}

.popup-overlay {
  backdrop-filter: blur(5px); /* размытие фона */
  -webkit-backdrop-filter: blur(5px); /* поддержка Safari */
  background: rgba(0, 0, 0, 0.4); /* чуть прозрачнее для эстетики */
}
