/* ========== 1. Общие настройки ========== */
:root {
  /* Цвета */
  --color-primary-main: #C7B3FC;
  --color-primary-light: #E6DEFC;
  --color-primary-dark: #9176CF;
 
  --color-contrast: #FFFFFF;
  --color-border: #E0B0FF;

  --color-bg: #FAF8FF;
  --color-bg-dark: #20123A;
  
  --color-text: #1C1526;
  --color-text-secondary: #73607A; 

  --color-error: #FF5263;
  --color-warning: #FFC75F;
  --color-success: #3DDC97;
       
  /* Шрифты */
  --font-base: 'Montserrat', sans-serif;
  --font-alt: 'Montserrat Alternates', sans-serif;
  --font-logo: 'Pacifico', sans-serif;

  /* Типографика */

  --font-h1-family: 'Montserrat Alternates', sans-serif;
  --font-h1-size: 64px;
  --font-h1-weight: 400;
  --font-h1-line: 120%;

  --font-h2-family: 'Montserrat Alternates', sans-serif;
  --font-h2-size: 40px;
  --font-h2-weight: 400;
  --font-h2-line: 130%;

  --font-h3-family: 'Montserrat Alternates', sans-serif;
  --font-h3-size: 32px;
  --font-h3-weight: 400;
  --font-h3-line: 130%;

  --font-h4-family: 'Montserrat Alternates', sans-serif;
  --font-h4-size: 24px;
  --font-h4-weight: 600;
  --font-h4-line: 130%;

  --font-button-family: 'Montserrat', sans-serif;
  --font-button-size: 18px;
  --font-button-weight: 700;
  --font-button-line: 120%;

  --font-body-family: 'Montserrat', sans-serif;
  --font-body-size: 16px;
  --font-body-weight: 400;
  --font-body-line: 150%;

  --font-price-family: 'Montserrat', sans-serif;
  --font-price-size: 18px;
  --font-price-weight: 600;
  --font-price-line: 130%;
}

*::before,
*::after {
  box-sizing: border-box;
}
* {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

body {
  margin: 0;
  font-family: 'Montserrat', sans-serif;
  height: 100%;
  display: grid;
  grid-template-rows: 1fr auto;  
}

.main-content {
  padding-top: 70px; /* Высота твоей .header */
  flex: 1;
  min-height: 400px;
}

.header {
    position: fixed;
    background: #C7B3FC;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 100px;
    height: 100px;
    width: 100%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    z-index: 100;
  }

.logo-container {
      display: flex;
      align-items: center;
      height: 100px;
}

.logo-image {
    width: 100px;
    height: 100px;
}

.logo-text {
  font-family: 'Pacifico', cursive;
  font-size: 24px;
  display: flex;
  align-items: center;
  margin-left: 12px;
  height: 100px;
  color: #000;
}

.right-header {
    display: flex;
    align-items: center;
    gap: 70px;
    height: 64px;
}

.cart {
    display: flex;
    align-items: center;
    font-family: 'Montserrat Alternates', sans-serif;
    font-size: 24px;
    color: white;
    height: 100px;
}

.hero {      
    position: relative;
    width: 100%;
    max-width: 1920px;
    height: 740px;
    margin:  auto;
    background-size: 100% 100%;
    background-position: relative;
    opacity: 0.6;
    background: url('/static/img/hero-bg.png') no-repeat center center;
    }

.hero-content-wrapper {
    position: absolute;
    top: 164px;
    left: 84px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 610px;
    height: 500px;
    z-index: 1;
    opacity: 1;
}

.hero h1 {
    font-family: var(--font-h1-family) ;
    font-weight: var(--font-h1-weight);
    font-size: var(--font-h1-size);
    line-height: var(--font-h1-line);
}

.hero h2 {
    font-family: var(--font-h2-family) ;
    font-weight: var(--font-h2-weight);
    font-size: var(--font-h2-size);
    line-height: var(--font-h2-line);
}

.hero p {
    font-size: var(--font-body-size);
    line-height: var(--font-body-line);
    max-width: 462px;
    font-family: var(--font-body-family);
}

.hero-button {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 30px;
    gap: 36px;
    width: 322px;
    height: 80px;
    background: #C7B3FC;
    border-radius: 20px;
    text-decoration: none;
    font-family: var(--font-button-family);
    font-weight: var(--font-button-weight);
    font-size: var(--font-button-size);
    line-height: var(--font-button-line);
    color: #1C1526;
}   

.catalog {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 80px;
  gap: 50px;
  width: 100%;
  background: var(--color-contrast);
}

.catalog-title {
  width: 100%;
  font-family: var(--font-h2-family);
  font-size: var(--font-h2-size);
  font-weight: var(--font-h2-weight);
  line-height: var(--font-h2-line);
  color: #000;
  text-align: center;
  margin-bottom: 0;
  padding-top: 50px;
}

.product-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 100px;
  width: 100%;
  position: relative;
  z-index: 0;
}

/* --- Карточка товара --- */
.product-card {
  position: relative;
  width: 600px;
  height: 360px;
  background: var(--color-bg);
  border: 1px solid var(--color-primary-main);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}


.product-img {
  width: 300px;
  height: 300px;
  object-fit: cover;
  object-position: center;
  border-radius: 200px;
  /* box-shadow: 0 4px 4px rgba(0,0,0,0.12); */
  /* background: var(--color-bg-dark, #eee); */
}


/* Контент карточки */
.product-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 10px 0 0 0;
  width: 244px;
  height: 300px;
  gap: 0;
  margin-left: 16px;
}
.product-name {
  font-family: var(--font-h4-family);
  font-size: var(--font-h4-size);
  font-weight: var(--font-h4-weight);
  line-height: var(--font-h4-line);
  color: var(--color-text);
  height: 92px;
  margin: -5px 0;
  display: flex;
  align-items: center;
  text-align: center;
}
.product-desc {
  font-family: var(--font-body-family);
  font-size: var(--font-body-size);
  font-weight: var(--font-body-weight);
  line-height: var(--font-body-line);
  color: var(--color-text);
  height: 63px;
  margin: -5px 0;
  display: flex;
  align-items: center;
  text-align: center;
}
.price {
  font-family: var(--font-price-family);
  font-size: var(--font-price-size);
  font-weight: var(--font-price-weight);
  line-height: var(--font-price-line);
  color: var(--color-text);
  height: 58px;
  margin: -5px 0 10px 0;
  display: flex;
  align-items: center;
  text-align: center;
}

.price span {
  font-weight: 700;
}


.add-to-cart {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 0px 10px;
  gap: 38px;
  background: var(--color-primary-light);
  border: 0px solid var(--color-primary-dark);
  border-radius: 10px;
  font-family: var(--font-button-family);
  font-size: var(--font-button-size);
  font-weight: var(--font-button-weight);
  line-height: var(--font-button-line);
  width: 200%;
  height: 200%;

}

.add-to-cart:hover:not([disabled]) {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 0px 10px;
  gap: 38px;
  background: var(--color-primary-dark);
  color: var(--color-contrast);
  border: 0px solid #C7B3FC;
  box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
  border-radius: 10px;
  cursor: pointer;
  transition: background .15s   

}

.add-to-cart[disabled] {
  background: var(--color-primary-light);
  color: var(--color-text-secondary);
  cursor: not-allowed;
  box-shadow: none;
  opacity: 0.8;
  pointer-events: none;
}

.add-to-cart::before {
  
  pointer-events: none; 
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1; /* Убедимся, что ::before не перекрывает кнопку */
}

/* Счетчик товара */
.quantity-counter {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 0px 10px;
  gap: 40px;
  
  border: 0px solid var(--color-primary-dark);
  

}

.quantity-counter .decrease,
.quantity-counter .increase {
  background: var(--color-primary-light);
  border: 0px solid var(--color-primary-dark);
  border-radius: 10px; 
  width: 48px;
 height: 48px;
 flex: none; 
 order: 0;
 flex-grow: 0;
}

.quantity-counter .decrease:hover,
.quantity-counter .increase:hover {
  background: var(--color-primary-dark);
  color: var(--color-contrast);
  border: 0px solid #C7B3FC;
  box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
  border-radius: 10px;
  cursor: pointer;
  transition: background .15s;
  filter: drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.25));
  order: 0;
  flex-grow: 0;
}


.quantity-counter .quantity {
  font-family: var(--font-body-family);
  font-size: var(--font-body-size);
  font-weight: var(--font-body-weight);
  line-height: var(--font-body-line);
  color: var(--color-text);
  min-width: 2ch;
  text-align: center;
}


/* Стили для out-of-stock */
.product-card.out-of-stock {
  opacity: 0.7;
  pointer-events: none;
}
.product-card.out-of-stock .add-to-cart {
  background: var(--color-bg);
  color: var(--color-text-secondary);
  cursor: not-allowed;
  opacity: 0.8;
}

.footer {

  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 16px;
  width: 100%;
  min-height: 160px;
  background: var(--color-primary-main);
  box-sizing: border-box;
  margin-top: auto;
}

.footer__logo-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100px;
  height: 140px;
  flex-shrink: 0;
  margin-left: 100px;
}

.footer__logo {
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.footer__logo-text {
  width: 100px;
  height: 40px;
  font-family: 'Pacifico', cursive;
  font-style: normal;
  font-weight: 400;
  font-size: 24px;
  line-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  text-align: center;
}

.footer__center {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 140px;
}

.footer__insta img {
  width: 48px;
  height: 48px;
  display: block;
}

.footer__info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 37px 26px;
  gap: 20px;
  width: 300px;
  height: 140px;
  flex-shrink: 0;
}

.footer__unp,
.footer__copy {
  width: auto;
  font-family: 'Montserrat', sans-serif;
  font-style: normal;
  font-weight: 400;
  font-size: 16px;
  line-height: 150%;
  color: #000;
  display: flex;
  align-items: center;
  text-align: center;
  justify-content: center;
}

.footer__unp {
  height: 48px;
}

.footer__copy {
  height: 24px;
}

.cart-page {
  margin: 80px;
}


.empty-cart {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.cart-page h1 {
    font-family: var(--font-h1-family) ;
    font-weight: var(--font-h1-weight);
    font-size: var(--font-h1-size);
    line-height: var(--font-h1-line);
    margin-bottom: 32px;
}


.cart-page h2 {
    font-family: var(--font-h2-family) ;
    font-weight: var(--font-h2-weight);
    font-size: var(--font-h2-size);
    line-height: var(--font-h2-line);
    padding-bottom: 40px;

}

.checkout-page {
  margin: 80px;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  background: #FAF8FF;
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.column1 img.cart-img {
  width: 160px;
  height: auto;
  border-radius: 10px;
}

.column2 {
  flex: 1 1 300px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.product-name-cart {
  font-family: var(--font-h4-family);
  font-weight: var(--font-h4-weight);
  font-size: var(--font-h4-size);
  color: var(--color-text);
  margin-bottom: 12px;
}

.product-price-cart {
  font-size: var(--font-price-size);
  color: var(--color-text);
  margin-bottom: 20px;
}

.counter-cart {
  display: flex;
  align-items: center;
  gap: 10px;
}

.counter-cart button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.quantity {
  font-size: 18px;
  color: var(--color-text);
  width: 24px;
  text-align: center;
}

.column3 {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  min-width: 100px;
}

.total {
  font-size: var(--font-price-size);
  font-weight: var(--font-price-weight);
  color: var(--color-text);
}

.delete {
  background: none;
  border: none;
  cursor: pointer;
  margin-top: 10px;
}

.total-info {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text);
  margin-top: 40px;
}

.cart-button {
  background: var(--color-primary-main);
  color: var(--color-text);
  font-size: 16px;
  padding: 10px 24px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
}

.cart-button:hover {
  background: var(--color-primary-dark);
  color: var(--color-contrast);
  box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transition: background .15s 
}


.checkout-page h1 {
    font-family: var(--font-h1-family);
    font-size: var(--font-h1-size);
    font-weight: var(--font-h1-weight);
    padding-bottom: 40px;

}


.checkout-container {
    display: flex;
    gap: 60px;
    margin-bottom: 60px;
}

.form-block {
    width: 530px;
}
.form-block label {
    font-size: 12px;
    color: #73607A;
    display: block;
    margin-bottom: 4px;
}
.form-block input,
.form-block textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 16px;
    border: 1px solid rgba(0, 0, 0, 0.23);
    border-radius: 10px;
    background: #FAF8FF;
    font-size: 16px;
    font-family: var(--font-body-family);
    font-weight: var(--font-body-weight);
    line-height: var(--font-body-line);
    color: var(--color-text);
    margin-bottom: 24px;
}
.form-block textarea {
    height: 120px;
}
.consent {
    font-size: 16px;
    color: var(--color-text);
    display: flex;
    align-items: center;
    padding-bottom: 24px;
}
.order-list {
    width: 713px;
    height: auto;
    background: #FAF8FF;
    border-radius: 20px;
    padding: 32px;
    font-size: 16px;
    color: var(--color-text);
}
.order-list ul {
    padding: 0;
    list-style: none;
    margin: 0 0 24px;
}
.order-list li {
    margin-bottom: 8px;
    font-size: 18px;
    font-family: 'Montserrat Alternates', sans-serif;
}
.order-list .total {
    font-weight: bold;
    font-size: 20px;
}
.submit-btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 10px 30px;
    background: #C7B3FC;
    color: var(--color-text);
    border: none;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
}


.checkout_page {
  margin: 80px;
}

.success-page {
  margin: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.success-page h1 {
    font-family: var(--font-h1-family);
    font-size: var(--font-h1-size);
    font-weight: var(--font-h1-weight);
    padding-bottom: 40px;

}


.success-page h1 {
    font-family: var(--font-h1-family);
    font-size: var(--font-h1-size);
    font-weight: var(--font-h1-weight);
    padding-bottom: 40px;

}

.success-page p {
    font-size: var(--font-body-size);
    line-height: var(--font-body-line);
    font-family: var(--font-body-family);
}

.success-page img {
    width: 20%;
    height: auto;
    margin: 20px 0;
}

@media (max-width: 768px) {
  
  :root {
  --font-h1-family: 'Montserrat Alternates', sans-serif;
  --font-h1-size: 40px;
  --font-h1-weight: 700;
  --font-h1-line: 120%;

  --font-h2-family: 'Montserrat Alternates', sans-serif;
  --font-h2-size: 32px;
  --font-h2-weight: 400;
  --font-h2-line: 130%;

  --font-h3-family: 'Montserrat Alternates', sans-serif;
  --font-h3-size: 26px;
  --font-h3-weight: 400;
  --font-h3-line: 130%;

  --font-h4-family: 'Montserrat Alternates', sans-serif;
  --font-h4-size: 20px;
  --font-h4-weight: 600;
  --font-h4-line: 130%;

  --font-button-family: 'Montserrat', sans-serif;
  --font-button-size: 16px;
  --font-button-weight: 700;
  --font-button-line: 120%;

  --font-body-family: 'Montserrat', sans-serif;
  --font-body-size: 16px;
  --font-body-weight: 400;
  --font-body-line: 150%;

  --font-price-family: 'Montserrat', sans-serif;
  --font-price-size: 18px;
  --font-price-weight: 600;
  --font-price-line: 130%;
}
  
    /* Header */
 .header {
  padding: 20px;
 }
  .logo-text {
    display: none;
  }

 
  
  /* Hero */
  .hero {
    padding: 0 0 32px 0;
    padding-left: 20px;
    min-height: 350px;
    background-size: cover;
    background-position: center;
  }
  .hero-content-wrapper {
    position: static;
    width: 100%;
    padding: 60px 8px 0 8px;
    gap: 10px;
  }

  .hero-button {
    width: 100%;
    max-width: 240px;
    height: 48px;
    font-size: 16px;
    border-radius: 12px;
    padding: 0 18px;
  }
  .hero p {
    font-size: 16px;
    line-height: 150%;
    padding: 10px 2px;
  }

  /* Каталог */
  .catalog {
    padding: 24px 0 36px 0;
    gap: 22px;
  }
  .catalog-title, .h2 {
    font-size: 32px;
    line-height: 130%;
    margin-bottom: 12px;
  }
  .product-list {
    gap: 22px;
    flex-direction: column;
    align-items: center;
    width: 100%;
    min-width: 0;
  }
  .product-card {
   
    align-items: center;
    width: auto;
    height: auto;
    padding: 0px 10px;
    margin: 10px 10px;
  }

  .product-card::before {
    width: 130px;
    height: 130px;
    border-radius: 24px;
    left: 0;
    top: 0;
  }
  
  .product-img-wrap {
    width: 130px;
    height: 130px;
    }
    
  .product-img {
    width: 130px;
    height: 130px;
  }
  .product-info {
    flex-direction: column;
    align-items: center;
    text-align: center;
    height: auto;
    width: 160px;
    padding: 10px;
  }
  .product-name, .h4 {
    font-size: 20px;
    height: auto;
    min-height: 28px;
    text-align: center;
    margin: 6px 0 0 0;
  }
  .product-desc, .body {
    font-size: 16px;
    text-align: center; 
    margin: 4px 0 0 0;
    line-height: 150%;
    height: auto;
  }
  .price, .product-price {
    font-size: 18px;
    margin: 6px 0 8px 0;
    height: auto;
  }
  .add-to-cart {   
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 0px 10px;
  gap: 38px;
  width: 202px;
  top: 20px;
  background: var(--color-primary-main);
  border: 0px solid var(--color-bg-dark);
  border-radius: 10px;        
  width: 100%;
  max-width: 180px;
  min-width: unset;
  height: 38px;
  font-family: var(--font-button-family);
  font-size: var(--font-button-size);
  font-weight: var(--font-button-weight);
  border-radius: 10px;
  margin: 0 auto;
  padding: 0 8px;
}
  .quantity-counter {
    gap: 8px;
  }
  .quantity-counter .decrease,
  .quantity-counter .increase {
    width: 38px;
    height: 38px;
    font-size: 16px;
    border-radius: 10px;
  background: none;
  border: none;
  }
  .quantity-counter .quantity {
    min-width: 2ch;
    font-size: 16px;
  }

  .column1 img.cart-img {
    width: 100px;
    height: auto;
    border-radius: 10px;
}

.cart-page {
    margin: 10px;
    margin-top: 100px;
  }


.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0px;
  background: #FAF8FF;
  border-radius: 20px;
  padding: 16px;
  margin-bottom: 24px;
  flex-wrap: nowrap;
}

.column3 {
  gap: 46px;
}

.checkout-page {
    margin: 10px;
    margin-top: 100px;
}

.checkout-page h1 {
    word-break: keep-all;
}

.order-list   {
  width: auto;
  }
.checkout-container {
    display: flex;
    gap: 60px;
    flex-direction: column-reverse;
}


  /* Футер */
  .footer {
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 12px 4px;
    min-height: 120px;
  }
  .footer__logo-item {
    flex-direction: row;
    align-items: center;
    width: auto;
    height: auto;
    gap: 10px;
    margin-left: 0px;
  }
  .footer__logo {
    width: 100px;
    height: 100px;
  }
  .footer__logo-text {
    display: none;
  }
  .footer__center {
    width: 100%;
    justify-content: center;
    height: auto;
  }
  .footer__info {
    width: 100%;
    padding: 0;
    gap: 5px;
    height: auto;
  }
  .footer__unp,
  .footer__copy {
    width: 100%;
    font-size: 16px;
    min-height: 16px;
  }

.form-block {
    width: auto;
}
  
  .cart-icon {
  position: relative;
  display: inline-block;
  }

    .cart-icon img {
    width: 50px; 
    height: 50px;
    }

.counter {
  position: absolute;
  top: -6px;
  right: -6px;
  background-color: var(--color-primary-dark);
  color: var(--color-contrast);
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 50%;
  min-width: 20px;
  height: 20px;
  text-align: center;
  line-height: 16px;
  font-weight: bold;
  box-shadow: 0 0 0 1px var(--color-border);
}
.success-page img {
    width: 70%;
}

.main-content {
    padding-top: 70px;
    flex: 1;
    min-height: 500px;
}




}




