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


* {
  margin: 0;
  padding: 0;
}

#overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  /* полупрозрачный чёрный */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s;
  z-index: 2;
  /* чуть ниже меню (меню у нас z-index:3) */
}

/* активный (видимый) оверлей */
#overlay.active {
  opacity: 1;
  visibility: visible;
}

.inter {
  font-family: "Inter", sans-serif;
  font-optical-sizing: auto;
  font-weight: weight;
  font-style: normal;
}

body {
  font-family: "Inter", sans-serif;
  background: #fafafa;
}

.burger {
  white-space: nowrap;
  background-color: white;
  display: flex;
  flex-direction: column;
  gap: 30px;
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  z-index: 7;
  transition: all 0.5s ease;
  overflow: hidden;
}

/* общий стиль кнопки-иконки */
.icon-button {
  width: 40px;
  /* фиксированный размер */
  height: 40px;
  display: flex;
  /* центрируем вложенное img */
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  /* делаем круг */
  cursor: pointer;
  transition: background 0.3s;
}

/* фон по наведению */
.icon-button:hover {
  background: rgba(0, 0, 0, 0.1);
  /* легкий серый */
}

/* саму картинку ограничиваем размерами */
.icon-button img {
  width: 20px;
  /* подберите под свой дизайн */
  height: 20px;
  display: block;
}

#cart_icon:hover {
  background: rgba(0, 0, 0, 0.1);
  padding: 10px;
}

.burger.open {
  width: 20%;
  padding: 20px;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.list {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  gap: 15px;
}

.list a {
  color: rgb(60, 60, 60);
  text-decoration: none;
}

.other-links {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.other-links a {
  text-decoration: none;
  color: rgb(60, 60, 60);
}

.phone_number {
  color: black;
  text-decoration: none;
  font-weight: bold;
  display: flex;
  gap: 5px;
}

.header-wrapper {
  position: fixed;
  top: 0;
  z-index: 6;
  width: 100%;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px;
  color: white;
}

header span {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

header span,
.logo h1 {
  font-family: "Sulphur Point", sans-serif;
  font-weight: 400;
  font-size: 25px;
}

.icons {
  display: flex;
}

.icons img {
  width: 25px;
  height: 25px;
}

.container {
  background-image: url(./images/poshram.webp);
  background-position: center center;
  background-repeat: no-repeat;
  width: 100%;
  height: 80vh;
}

.container .content {
  position: absolute;
  top: 20%;
  left: 5%;
  width: 50%;
}

.content h1 {
  font-family: "Sulphur Point", sans-serif;
  font-weight: 545;
  font-size: 80px;
  color: white;
  line-height: 0.9;
}

.content p {
  font-size: 20px;
  color: white;
  margin-top: 20px;
  word-spacing: 3px;
}

.content button {
  margin-top: 20px;
  padding: 10px;
  border: none;
  background-color: white;
  border-radius: 5px;
}

.content button,
a {
  text-decoration: none;
  color: black;
}

.all {
  display: flex;
  height: 90vh;
  justify-content: center;
  align-items: center;
}

.grid {
  height: auto;
  width: 80%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 300px);
}

.item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(70%);
}

.box3 {
  grid-column: 1 / 3;
  grid-row: 2 / 3;
}

.box4 {
  grid-column: 3 / 5;
  grid-row: 1 / 3;
}

.item h2 {
  position: relative;
  bottom: 53%;
  width: 40%;
  left: 30%;
  z-index: 99;
  color: white;
}

.preview-grid,
.popular-grid {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 20px;
}

.preview-grid::-webkit-scrollbar,
.popular-grid::-webkit-scrollbar {
  width: 0;
}

.preview-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.preview-section h2,
.popular h2 {
  text-align: center;
  font-weight: 500;
}

.card-img-wrap img {
  width: 280px;
  height: 350px;
  object-fit: cover;
  border-radius: 5px;
}

.card:hover {
  transform: translateY(-5px);
}

.bot {
  display: flex;
  justify-content: space-between;
}

.category {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.category h3 {
  font-size: 15px;
  font-weight: 400;
  cursor: pointer;
}

.bot button {
  grid-column: 2/3;
  grid-row: 1/3;
  align-self: center;
  justify-self: end;
  padding: 8px 16px;
  background-color: #0fb300;
  color: white;
  border: none;
  border-radius: 10px;
  font-weight: 10px;
  transition: 0.3s;
}

.also_about {
  margin: 30px 0;
  height: 25vh;
  width: 100%;
  background-color: rgb(255, 229, 229);
  display: flex;
  flex-direction: column;
  gap: 35px;
  justify-content: center;
  align-items: center;
}

.order-now:hover {
  background-color: #0d9001;
}

.category h3.active {
  text-decoration: underline;
}

.card {
  position: relative;
  width: 100%;
  transition: transform 0.3s ease;
  cursor: pointer;
  position: relative;
  z-index: 1;
}

.card-img-wrap {
  position: relative;
}

.heart-icon:hover {
  opacity: 1;
}

.card:hover {
  transform: scale(1.03);
}

.all-products-img {
  width: 100%;
  height: 350px;
  object-fit: cover;
  border-radius: 6px;
}

.card p {
  font-size: 15px;
  color: rgb(87, 87, 87);
}

.card p {
  margin: 4px 0;
}

.price {
  color: #303030;
  font-weight: bold;
  margin: 0;
}

#showMoreBtn,
#showPopularBtn {
  cursor: pointer;
  text-align: center;
}

.carousel-wrapper {
  margin: 30px 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.carousel {
  position: relative;
  overflow: hidden;
  /* прячем остальное */
  width: 100%;
  height: 50vh;
  /* чуть выше картинок */
  display: flex;
  align-items: center;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease;
  will-change: transform;
  /* для производительности */
}

.carousel-track img {
  width: 200px;
  height: 300px;
  object-fit: cover;
  border-radius: 5px;
  flex-shrink: 0;
  margin: 0 20px;
  transition: transform 0.5s ease, opacity 0.5s ease;
  opacity: 0.6;
}

/* Активная (центральная) картинка */
.carousel-track img.active {
  transform: scale(1.3);
  opacity: 1;
  z-index: 1;
}

/* Навигация */
.nav {
  opacity: 0.8;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: white;
  border: none;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  padding: 0.3em 0.5em;
  cursor: pointer;
  border-radius: 50%;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
  z-index: 2;
}

.prev {
  left: 5px;
}

.next {
  right: 5px;
}


.fixed-buttons {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 5;
  display: flex;
  gap: 10px;
}

.fixed-buttons a {
  background-color: #0fb300;
  width: 48px;
  height: 48px;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.3s;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.fixed-buttons a:hover {
  background-color: #0d9001;
}

.fixed-buttons a img {
  width: 24px;
}

.scroll-to-top {
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 24px;
  background-color: #d7d7d7;
  color: #000000b4;
  font-size: 30px;
  font-family: sans-serif;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  opacity: 0.8;
  transition: opacity 0.2s;
  z-index: 1000;
}

.scroll-to-top:hover {
  opacity: 1;
}

.footer {
  height: 30vh;
  display: flex;
  justify-content: space-around;
  padding-top: 50px;
}

hr {
  color: gray;
}

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

.row {
  display: flex;
  gap: 20px;
}

.col h5 {
  color: gray;
}

.col a {
  color: gray;
}



/* ---------------------------------------------------
   Responsive Breakpoints
   --------------------------------------------------- */

/* 1024px and below */
@media screen and (max-width: 1024px) {
  .container {
    background-position: 60%;
  }

  .box1 h2,
  .box2 h2 {
    left: 18%;
  }

  #previewContainer,
  .popular-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }

  .content h1 {
    font-size: 60px;
  }

  .container .content {
    width: 60%;
  }

}

/* 825px and below */
@media screen and (max-width: 768px) {
  .burger.open {
    width: 30%;
  }

  .container {
    background-position: 80%;
  }

  .content h1,
  .content p {
    display: none;
  }

  .container .content {
    left: 40%;
    top: 60%;
  }

  .grid {
    width: 100%;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 300px);
    gap: 5px;
  }

  .box3 {
    grid-column: span 1;
  }

  .box4 {
    grid-row: span 1;
    grid-column: 2/3;
  }

  .box1 h2,
  .box2 h2 {
    left: 30%;
  }

  .preview-section h2,
  .popular h2 {
    font-size: 1.8rem;
  }

  .footer {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .row {
    justify-content: center;
  }
}

/* 545px and below */
/* 545px and below */
@media screen and (max-width: 545px) {
  .burger.open {
    width: 60%;
  }

  .container {
    background-position: 75%;
  }

  .grid {
    grid-template-rows: repeat(2, 250px);
  }

  .item h2 {
    font-size: 15px;
  }

  .popular h2 {
    font-size: 1.5rem;
  }
}

/* 320px and below */
@media screen and (max-width: 430px) {
  .container .content {
    top: 70%;
    left: 32%;
  }

  .all {
    height: 70vh;
  }

  .grid {
    grid-template-rows: repeat(2, 200px);
  }

  .also_about h2 {
    font-size: 20px;
  }
}
@media (min-width: 401px) and (max-width: 414px) {
  .item h2 {
    bottom: 120px;
  }
}
@media (min-width: 415px) and (max-width: 430px) {
  .item h2 {
    bottom: 120px;
  }
}

@media screen and (max-width: 320px) {
  .container .content {
    left: 30%;
  }

  header span {
    font-size: 20px;
  }

  .also_about h2 {
    font-size: 18px;
  }
}