html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section {
  display: block;
}
body {
  line-height: 1;
}
ol,
ul {
  list-style: none;
}
blockquote,
q {
  quotes: none;
}
blockquote:before,
blockquote:after,
q:before,
q:after {
  content: '';
  content: none;
}
table {
  border-collapse: collapse;
  border-spacing: 0;
}

:root {
  --font-primary: 'Lora', serif;
  --primary: #4e4d93;
  --dark-primary: #2a254b;
  --light-gray: #f9f9f9;
  --button-primary: #494465;
  --link-primary: #cac6da;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  font-size: 14px;
  line-height: 1.5;
  color: var(--dark-primary);
  background-color: white;
}

a {
  text-decoration: none;
  color: inherit;
}

ul,
ol {
  list-style: none;
}

button {
  border: none;
  cursor: pointer;
  font: inherit;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0;
  overflow: hidden;
}

/* TYPOGRAPHY */
@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400..700;1,400..700&display=swap');
h1,
h2,
h3 {
  line-height: 1.3;
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.5rem;
}

/* BUTTON COMPONENT */
.button {
  padding: 1rem 2rem;
  margin-bottom: 1.5rem;
  font-size: 1rem;
  transition: background-color 0.3s ease, transform 0.15s ease, opacity 0.3s;
}

.button:active {
  transform: scale(0.98);
}

.button:focus {
  outline: 2px solid var(--primary);
}

/* HEADER */
.header {
  padding: 20px 0;
  margin-bottom: 55px;
}

.header__top {
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.header__container {
  max-width: 1450px;
}

.header__search-btn,
.header__cart-btn,
.header__user-btn {
  background-color: transparent;
  width: 2rem;
  height: 2rem;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.header__search-btn:hover,
.header__cart-btn:hover,
.header__user-btn:hover {
  transform: scale(1.15);
  opacity: 0.8;
}

.header__search-btn:focus,
.header__cart-btn:focus,
.header__user-btn:focus {
  outline: 1px solid var(--primary);
}

.header__search-btn:active,
.header__cart-btn:active,
.header__user-btn:active {
  transform: scale(0.9);
}

.header__logo {
  font-size: 1.5rem;
  font-weight: 600;
}

.header__logo-link {
  color: #211f2d;
}

.header__logo-link:hover {
  color: var(--link-primary);
}

.header__nav {
  padding-top: 20px;
}

/* NAVIGATION */
.nav__list {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
}

.nav__link {
  color: var(--dark-primary);
  font-size: 1rem;
  padding-bottom: 0.25rem;
  display: inline-block;
  transition: color 0.3s ease;
}

.nav__link:hover {
  color: var(--link-primary);
}

.nav__link:focus {
  outline: 1px solid var(--primary);
  outline-offset: 2px;
}

/* MOBILE NAVIGATION */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 43px;
  height: 43px;
  background: transparent;
  border: none;
  padding: 12px 10px;
  cursor: pointer;
  z-index: 1001;
}

.menu-toggle__line {
  width: 100%;
  height: 2px;
  background: var(--dark-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Состояние открытого меню */
.menu-toggle.active .menu-toggle__line:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.menu-toggle.active .menu-toggle__line:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active .menu-toggle__line:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* HERO SECTION */
.hero {
  margin-bottom: 80px;
}

.hero__wrapper {
  display: flex;
}

.hero__content {
  padding: 60px 80px 60px 60px;
  background-color: var(--dark-primary);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
}

.hero__title {
  max-width: 500px;
  font-size: 2rem;
  line-height: 1.2;
  margin-bottom: 3rem;
  color: white;
}

.hero__button {
  background-color: var(--button-primary);
  color: white;
  margin-bottom: auto;
  align-self: flex-start;
}

.hero__button:hover {
  background-color: rgba(145, 136, 197, 0.5);
}

.hero__description {
  font-size: 1rem;
  color: white;
  line-height: 1.6;
}

/* FEATURES SECTION */
.features {
  margin-bottom: 100px;
}

.features__title {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 2rem;
}

.features__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.feature {
  padding-block: 2rem;
  background-color: white;
}

.feature__icon {
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 1rem;
}

.feature__title {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.feature__description {
  font-size: 1rem;
  line-height: 1.5;
}

/* PRODUCTS SECTION */
.products {
  margin-bottom: 100px;
}

.products__title {
  font-size: 2rem;
  margin-bottom: 2rem;
}

.products__grid {
  display: grid;
  gap: 2rem;
  margin-bottom: 3rem;
}

.products--new .products__grid {
  grid-template-columns: repeat(4, 1fr);
}

.products--popular .products__grid {
  grid-template-columns: 2fr 1fr 1fr;
}

.product-card__title {
  font-size: 1.25rem;
  font-weight: 500;
  margin: 1rem 0 0.5rem 0;
}

.product-card__price {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.products__footer {
  text-align: center;
}

.product-card__button {
  background-color: var(--light-gray);
  color: var(--dark-primary);
}

.product-card__button:hover {
  background-color: rgba(145, 136, 197, 0.2);
}

/* NEWSLETTER SECTION */
.newsletter {
  width: 100%;
  padding: 3rem 0;
  background-color: var(--light-gray);
}

.newsletter__container {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: white;
  padding: 4rem 0;
}

.newsletter__title {
  font-size: 2rem;
  margin-bottom: 1rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.newsletter__description {
  font-size: 1rem;
  margin-bottom: 2rem;
  line-height: 1.6;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.newsletter__form {
  display: flex;
  justify-content: center;
}

.form__input {
  height: 24px;
  padding: 1rem 2rem;
  width: 100%;
  min-width: 300px;
  border: none;
  font-size: 1rem;
  font-family: var(--font-primary);
  background-color: var(--light-gray);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.form__input:focus {
  box-shadow: 0 0 0 2px rgba(78, 77, 147, 0.3);
  outline: none;
}

.form__input::placeholder {
  color: #999;
}

.form__input:hover {
  background-color: rgba(153, 153, 153, 0.15);
}

.form__button {
  background-color: var(--dark-primary);
  color: white;
}

/* PREFOOTER */
.prefooter__container {
  max-width: 1440px;
  padding: 0;
}

.prefooter__wrapper {
  display: flex;
  align-items: stretch;
  max-height: 600px;
}

.prefooter__content {
  padding: 70px 100px 55px 85px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
}

.prefooter__title {
  font-size: 1.5rem;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

.prefooter__text {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  text-align: justify;
}

.prefooter__button {
  background-color: var(--light-gray);
  color: var(--dark-primary);
  margin-top: auto;
  align-self: flex-start;
}

.prefooter__button:hover {
  background-color: rgba(145, 136, 197, 0.2);
}

/* FOOTER */
.footer {
  color: white;
  background-color: var(--dark-primary);
  padding: 40px 0 25px;
}

.footer__wrapper {
  display: flex;
  gap: 8rem;
  margin-bottom: 3rem;
}

.footer__menu {
  display: flex;
  gap: 3rem;
}

.footer__title {
  font-size: 1rem;
  margin-bottom: 1rem;
}

.footer__list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.form-footer__title {
  font-size: 1rem;
  margin-bottom: 1rem;
}

.footer__right {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 600px;
}

.footer__form {
  display: flex;
  flex-wrap: nowrap;
}

.form-footer__input {
  background-color: var(--button-primary);
  opacity: 0.7;
}

.form-footer__input:hover,
.form-footer__input:focus {
  opacity: 0.4;
}

.form-footer__button {
  background-color: white;
  color: var(--dark-primary);
}

.footer__link:hover {
  color: var(--link-primary);
}

.footer__bottom {
  border-top: 1px solid var(--primary);
}

.footer__copyright {
  padding: 24px 0 0;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.feature,
.product-card {
  animation: fadeInUp 0.6s ease-out;
}

/* Scroll to Top Button */
.scroll-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 56px;
  height: 56px;
  background: var(--button-primary);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scroll-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-top:hover {
  background: var(--dark-primary);
  transform: scale(1.1);
}

.scroll-top:active {
  transform: scale(0.95);
}

@media (max-width: 1440px) {
  .container,
  .newsletter .container {
    max-width: 1000px;
  }

  .hero__content {
    padding: 60px 60px 60px 40px;
  }

  .prefooter__container {
    max-width: 100%;
  }

  .prefooter__img {
    max-width: 500px;
    height: 100%;
  }

  .footer__wrapper {
    flex-wrap: wrap;
    row-gap: 60px;
    margin-bottom: 1rem;
  }

  .footer__menu {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 992px) {
  .container {
    max-width: 768px;
  }

  .hero {
    background-color: var(--dark-primary);
    min-height: 500px;
    margin-bottom: 60px;
  }

  .hero__wrapper {
    flex-direction: column;
    gap: 1.5rem;
  }

  .hero__content {
    padding: 40px 0 20px;
  }

  .hero__title {
    order: 1;
    margin-bottom: 4rem;
  }

  .hero__description {
    margin: 0 0 32px;
    order: 2;
  }

  .hero__button {
    order: 3;
    text-align: center;
    width: 100%;
  }

  .hero img {
    display: none;
  }

  .features {
    margin-bottom: 60px;
  }

  .features__title {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    text-align: start;
  }

  .features__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .products {
    margin-bottom: 60px;
  }

  .products__title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
  }

  .products--popular .products__grid {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 1rem;
  }

  .product-card--big {
    grid-column: span 2;
  }

  .product-card__img--large {
    width: 100%;
  }

  .product-card__img--width {
    width: 100%;
  }

  .newsletter {
    background: 0 0;
    padding: 2rem 0 3rem;
  }

  .newsletter__title {
    font-size: 1.25rem;
  }

  .newsletter__description {
    font-size: 0.9rem;
  }

  .prefooter__container {
    max-width: 992px;
  }

  .prefooter__wrapper {
    flex-wrap: wrap;
    max-height: 100%;
  }

  .prefooter__content {
    max-width: 768px;
    padding: 40px 10px 55px 10px;
    margin: 0 auto;
  }

  .prefooter__title {
    font-size: 1.25rem;
  }

  .prefooter__text {
    text-align: left;
    font-size: 0.9rem;
  }

  .prefooter__button {
    margin-top: 45px;
    width: 100%;
  }

  .prefooter__right {
    width: 100%;
    height: 400px;
  }

  .prefooter__img {
    width: 100%;
    max-width: 992px;
    min-height: 400px;
  }

  .footer {
    padding: 30px 0 25px;
  }

  .footer__wrapper {
    flex-wrap: wrap;
    row-gap: 30px;
  }

  .footer__menu {
    flex-wrap: wrap;
  }

  .footer__bottom {
    text-align: center;
  }

  .header {
    margin-bottom: 0;
    padding-bottom: 0;
  }

  .header__top {
    border-bottom: none;
    justify-content: center;
    gap: 4rem;
  }

  .menu-toggle {
    display: flex;
    position: absolute;
    right: 16px;
    top: 14px;
  }

  .header__nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    max-width: 100vw;
    box-sizing: border-box;
    background: white;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    padding: 80px 30px 30px;
    transition: right 0.4s ease;
    z-index: 1000;
    overflow-y: auto;
  }

  .header__nav.active {
    right: 0;
  }

  .nav__list {
    flex-direction: column;
    gap: 0;
  }

  .nav__item {
    width: 100%;
  }

  .nav__link {
    display: block;
    width: 100%;
    padding: 15px 0;
    font-size: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
  }

  .nav__link:hover,
  .nav__link.active {
    color: var(--primary);
    padding-left: 10px;
  }

  .nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
  }

  .nav-overlay.active {
    display: block;
  }

  .header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.75);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  }
}

@media (max-width: 768px) {
  .container,
  .newsletter .container {
    max-width: 500px;
  }

  .features__grid {
    grid-template-columns: repeat(1, 1fr);
    gap: 1rem;
  }

  .feature {
    padding-block: 1rem;
  }

  .products--new .products__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .prefooter__container {
    max-width: 768px;
  }

  .prefooter__wrapper {
    justify-content: center;
  }

  .prefooter__content {
    max-width: 500px;
  }

  .footer__menu {
    column-gap: 2rem;
  }

  .scroll-top {
    width: 48px;
    height: 48px;
    bottom: 20px;
    right: 20px;
    font-size: 20px;
  }
}

@media (max-width: 576px) {
  .container,
  .newsletter .container {
    max-width: 320px;
  }

  .newsletter {
    padding: 0;
  }

  .form__input {
    padding: 1rem;
    min-width: 180px;
  }

  .button {
    padding: 1rem 0.5rem;
  }

  .prefooter__container {
    max-width: 576px;
  }

  .prefooter__content {
    max-width: 320px;
  }

  .footer__menu {
    column-gap: 1.3rem;
  }

  .features,
  .products {
    margin-bottom: 40px;
  }

  .menu-toggle {
    right: 6px;
  }
}

@media (max-width: 360px) {
  .header__top {
    gap: 3rem;
  }
}