/* ============================
   1. ОБЩИЕ СТИЛИ
============================ */
body {
  margin: 0;
  max-width: 1290px;
  font-family: "Open Sans", Arial, sans-serif;
  line-height: 1.6;
  color: #333;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ============================
   2. ХЕДЕР
============================ */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  position: relative;
  background: #f8fafc;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  flex-wrap: nowrap;
  white-space: nowrap;
  gap: 48px;
  list-style: none;
  margin: 0;
  padding-right: 60px;
  padding-left: 10px;
  flex-shrink: 1;
}

.nav a {
  text-decoration: none;
  font-size: 24px;
  font-weight: 300;
  transition: 0.3s;
 }

.nav a:hover {
  color: #eb6e00e6;
}

.logo {
  width: 100%;
  max-width: 95px;
  min-width: 50px;
  height: auto;
}

/* Бургер по умолчанию скрыт */
.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 30px;
  height: 24px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.burger span {
  display: block;
  height: 3px;
  width: 100%;
  background: #2089c6;
  border-radius: 3px;
  transition: 0.3s ease;
}

/* =============================================================
   3. СЕКЦИИ
============================================================= */
.about-section {
  padding: 40px 20px 0px 20px;
  }

.about-container {
  margin: 10px;
  display: flex;
  gap: 50px;
  align-items: center;
  flex-wrap: wrap; 
 }

.about-image {
  flex: 1 1 500px;
  text-align: center;
}

.about-image img {
  max-width: 100%;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.about-text {
  flex: 1 1 440px;
  font-size: clamp(14px, 2vw, 17px);
  line-height: 1.5;
  padding-left: 10px;
}

.about-text p {
  margin-bottom: 16px;
  font-weight: 300;
}


/* Карточки */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
  padding: 40px 20px;
}

.card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  flex: 1 1 auto; /* карточка может сжиматься */
  min-width: 0;   /* чтобы контент не раздувал grid */
  padding: 15px;
  border-radius: 12px;
  background: rgba(255, 191, 135, 0.066);
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.card-image {
  width: 100%;       /* пусть занимает всю ширину карточки */
  height: auto;      /* сохраняет пропорции */
  max-height: 200px; /* ограничим для гармонии, можно поиграть */
  object-fit: contain; /* чтобы не обрезалось */
}

.knits-name {
 margin: 0px; 
 font-size: 16px;
 font-weight: 300; 
}

.knits-price {
 margin: 0px;
 font-size: 14px; 
}

/* Модалка скрыта по умолчанию */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.8);
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

/* Картинка внутри */
.modal-content {
  max-width: 90%;
  max-height: 80%;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

/* Подпись */
#modal-caption {
  margin-top: 15px;
  color: #fff;
  font-size: 16px;
  text-align: center;
}

/* Крестик закрытия */
.modal-close {
  position: absolute;
  top: 20px; right: 30px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
}
.modal-close:hover {
  color: #ffbf87;
}

.sizes-section {
  padding: 10px 20px 0px 20px;
  }

#sizes-title {
  text-align: center;
  font-size: 24px;
  font-weight: 300;
  margin: 0px;
  }

.sizes-container {
  margin: 10px;
  display: flex;
  gap: 30px;
  align-items: center;
  flex-wrap: wrap; 
 }

.table {
	width: 100%;
  flex: 1 1 400px;
  text-align: center;
  table-layout: auto;
	border: none;
	margin-bottom: 20px;
	border-collapse: separate;
}

caption {
  caption-side: top;
  font-size: 20px; 
  font-weight: 300;
  text-align: center; 
}

.table thead th {
	font-weight: bold;
	text-align: center;
  white-space: wrap;
	border: none;
	padding: 5px;
	background: #EDEDED;
	font-size: 14px;
	border-top: 1px solid #ddd;
}
.table tr th:first-child, .table tr td:first-child {
	border-left: 1px solid #ddd;
}
.table tr th:last-child, .table tr td:last-child {
	border-right: 1px solid #ddd;
}
.table thead tr th:first-child {
	border-radius: 20px 0 0 0;
}
.table thead tr th:last-child {
	border-radius: 0 20px 0 0;
}
.table tbody td {
	text-align: center;
	border: none;
	padding: 5px;
	font-size: 16px;
	vertical-align: top;
}
.table tbody tr:nth-child(even) {
	background: #F8F8F8;
}
.table tbody tr:last-child td{
	border-bottom: 1px solid #ddd;
}
.table tbody tr:last-child td:first-child {
	border-radius: 0 0 0 20px;
}
.table tbody tr:last-child td:last-child {
	border-radius: 0 0 20px 0;
}

.shopping-section {
  padding: 0px 20px 20px 20px;
  }

.shopping-container {
  margin: 10px;
  display: flex;
  gap: 50px;
  align-items: center;
  flex-wrap: wrap; 
 }

 #shopping-title {
  text-align: center;
  font-size: 24px;
  font-weight: 300;
  margin: 0px;
  }

 .shopping-text {
  flex: 1 1 440px;
  font-size: clamp(14px, 2vw, 17px);
  line-height: 1.7;
  padding-left: 10px;
}

.shopping-text p {
  margin-bottom: 16px;
  font-weight: 300;
}

/* ============================
   4. FOOTER 
============================ */
footer {
  background-color: #2089c6;
  color: white;
  margin: 0 auto;
  text-align: center;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  position: relative;
  padding: 0 1.2rem;
}

.scroll-top {
  display: none; /* скрыта по умолчанию */
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: white;
  color: #333;
  font-size: 22px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  transition: opacity 0.3s ease;
  z-index: 999;
}
.scroll-top:hover {
  background: #ffbf87; /* твой акцентный цвет */
  color: white;
}


/* ============================
   5. АДАПТИВНОСТЬ
============================ */
 @media (min-width: 950px) and (max-width: 1290px) {
  .about-text {
  font-size: 17px;
  line-height: 1.6;
  }
  .about-text p {
  margin: 7px;
  }
  }

@media (max-width: 768px) {
  .header {
    align-items: center;
    padding: 0px 20px;
    position: relative;
    flex-wrap: wrap;
    line-height: 1.2;
  }

  .nav {
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: #f8fafc;
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
  }
  .nav a {
  font-size: 20px;
  }
  .nav.active {
    max-height: 300px;
    padding: 15px 20px;
  }
  .burger {
    display: flex;
    
  }
    /* Анимация "крестика" */
  .burger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  .burger.active span:nth-child(2) {
    opacity: 0;
  }
  .burger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
  }
  
  .about-container {
  gap: 20px;
  }

  .about-text {
  flex: 1 1 400px;
  padding-left: 0px;
}
  #footer-email {
    padding: 10px 0px;
    font-size: 16px;
    flex-shrink: 1;
  }
}

@media (max-width: 300px) {
.cards {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  padding: 0px;
}
.about-section {
  padding: 5px;
}
}

@media (max-width: 360px) {
  .table thead th {
	word-break: break-all;
	padding: 0px;
	font-size: 12px;
}
.table tbody td {
	padding: 0px;
	font-size: 12px;
}
}
