/* ========== ОБЩИЕ СБРОСЫ И ПЕРЕМЕННЫЕ ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --color-bg-start: #f5efe8;     /* теплый светлый */
  --color-bg-end: #e8dfd3;        /* для градиента фона */
  --color-text: #2c2c2c;
  --color-accent: #8b5a2b;
  --color-light: #e8e0d5;
  --color-white: #ffffff;
  --shadow-light: 0 4px 12px rgba(0,0,0,0.05);
  --shadow-medium: 0 8px 20px rgba(0,0,0,0.1);
  --shadow-accent: 0 2px 8px rgba(139, 90, 43, 0.3);
  --gradient-placeholder: linear-gradient(135deg, #d6ccc2 0%, #b7aa9d 100%);
  --border-radius-card: 12px;
  --border-radius-button: 30px;
  --border-radius-thumb: 8px;
  --border-radius-image: 8px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: linear-gradient(145deg, var(--color-bg-start) 0%, var(--color-bg-end) 100%);
  color: var(--color-text);
  line-height: 1.6;
  font-size: 16px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  background: var(--gradient-placeholder);
  transition: opacity 0.2s, box-shadow 0.2s;
  border-radius: var(--border-radius-image);
}

img[src] {
  background: none;
}

/* ========== ШАПКА ========== */
.site-header {
  padding: 20px 0;
  border-bottom: 1px solid var(--color-light);
  background: rgba(250, 247, 242, 0.9);
  backdrop-filter: blur(5px);
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: var(--shadow-light);
}

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

.logo {
  font-size: 1.8rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 5px;
}

.burger span {
  width: 25px;
  height: 2px;
  background-color: var(--color-text);
  transition: 0.2s;
}

.nav-menu {
  display: flex;
  gap: 30px;
  align-items: center;
}

.nav-menu a {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 5px 0;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.nav-menu a:hover {
  border-bottom-color: var(--color-accent);
}

.social-icons {
  display: flex;
  gap: 15px;
}

.social-icons a {
  font-size: 1.4rem;
  opacity: 0.7;
  transition: opacity 0.2s;
}
.social-icons a:hover {
  opacity: 1;
}

@media (max-width: 768px) {
  .burger {
    display: flex;
  }
  .nav-menu {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    background: var(--color-bg-start);
    flex-direction: column;
    gap: 0;
    box-shadow: var(--shadow-medium);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    border-bottom: 1px solid var(--color-light);
  }
  .nav-menu.active {
    max-height: 300px;
  }
  .nav-menu a {
    width: 100%;
    text-align: center;
    padding: 15px 0;
    border-bottom: 1px solid var(--color-light);
  }
  .nav-menu a:last-child {
    border-bottom: none;
  }
}

/* ========== ПОДВАЛ ========== */
.site-footer {
  margin-top: 60px;
  padding: 30px 0;
  border-top: 1px solid var(--color-light);
  text-align: center;
  font-size: 0.9rem;
  color: #5a5a5a;
}

/* ========== ГЛАВНАЯ ========== */
.hero {
  padding: 60px 0 40px;
  text-align: center;
}

.hero h1 {
  font-size: 2.4rem;
  font-weight: 400;
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.02);
}

.hero p {
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.2rem;
  color: #4a4a4a;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 25px;
  margin: 40px 0;
}

.category-item {
  background-color: var(--color-white);
  box-shadow: var(--shadow-light);
  transition: transform 0.2s, box-shadow 0.2s;
  border-radius: var(--border-radius-card);
  overflow: hidden;
}

.category-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-medium);
}

.category-item a {
  display: block;
  position: relative;
}

.category-item img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
  width: 100%;
  border-radius: 0;
}

.category-title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(250, 247, 242, 0.9);
  padding: 12px;
  text-align: center;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  backdrop-filter: blur(2px);
}

.philosophy {
  max-width: 800px;
  margin: 60px auto;
  text-align: center;
  padding: 40px 30px;
  border-top: 1px solid var(--color-light);
  border-bottom: 1px solid var(--color-light);
  background: rgba(255,255,255,0.3);
  box-shadow: var(--shadow-light), 0 10px 30px rgba(0,0,0,0.03);
  border-radius: var(--border-radius-card);
}

.philosophy p {
  font-size: 1.3rem;
  font-style: italic;
  color: #3a3a3a;
}

/* ========== КАТАЛОГ ========== */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 40px 0 30px;
}

.filter-btn {
  background: none;
  border: 1px solid var(--color-light);
  padding: 8px 16px;
  cursor: pointer;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
  background-color: var(--color-white);
  border-radius: var(--border-radius-button);
  box-shadow: var(--shadow-light);
}

.filter-btn.active,
.filter-btn:hover {
  background-color: var(--color-accent);
  color: white;
  border-color: var(--color-accent);
  box-shadow: 0 4px 12px rgba(139, 90, 43, 0.3);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  margin: 30px 0;
}

.product-card {
  background: var(--color-white);
  box-shadow: var(--shadow-light);
  transition: transform 0.2s, box-shadow 0.2s;
  border-radius: var(--border-radius-card);
  overflow: hidden;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-medium);
}

.product-card img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
  width: 100%;
  border-radius: var(--border-radius-card) var(--border-radius-card) 0 0;
}

.product-info {
  padding: 15px;
  text-align: center;
}

.product-info h3 {
  font-weight: 400;
  margin-bottom: 5px;
}

.wood {
  font-size: 0.9rem;
  color: #6b6b6b;
  margin-bottom: 8px;
}

.story-short {
  font-size: 0.95rem;
  color: #3a3a3a;
  margin-bottom: 10px;
  font-style: italic;
}

.price {
  font-weight: 500;
  color: var(--color-accent);
  font-size: 1.2rem;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 40px 0;
}

.pagination a {
  display: inline-block;
  padding: 8px 12px;
  border: 1px solid var(--color-light);
  background: var(--color-white);
  transition: background 0.2s, box-shadow 0.2s;
  border-radius: var(--border-radius-button);
  box-shadow: var(--shadow-light);
}

.pagination a:hover {
  background: var(--color-accent);
  color: white;
  border-color: var(--color-accent);
  box-shadow: 0 4px 12px rgba(139, 90, 43, 0.3);
}

/* ========== КАРТОЧКА ТОВАРА ========== */
.product-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin: 40px 0;
}

.product-gallery {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.main-image {
  background: var(--color-white);
  border: 1px solid var(--color-light);
  border-radius: var(--border-radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-light);
}

.main-image img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 0;
}

.thumbnail-list {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.thumbnail {
  width: 80px;
  height: 80px;
  object-fit: cover;
  cursor: pointer;
  opacity: 0.6;
  border: 2px solid transparent;
  transition: opacity 0.2s, border-color 0.2s, box-shadow 0.2s;
  border-radius: var(--border-radius-thumb);
  box-shadow: var(--shadow-light);
}

.thumbnail:hover,
.thumbnail.active {
  opacity: 1;
  border-color: var(--color-accent);
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

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

.product-details h1 {
  font-size: 2rem;
  font-weight: 400;
}

.specs {
  list-style: none;
  border-top: 1px solid var(--color-light);
  border-bottom: 1px solid var(--color-light);
  padding: 20px 0;
}

.specs li {
  display: flex;
  margin-bottom: 10px;
}

.specs .label {
  width: 100px;
  font-weight: 500;
}

.specs .value {
  color: #3a3a3a;
}

.story {
  font-style: italic;
  color: #4a4a4a;
  padding: 20px;
  font-size: 1.1rem;
  line-height: 1.7;
  background: rgba(255,255,255,0.3);
  border-radius: var(--border-radius-card);
}

.order-btn {
  align-self: flex-start;
  background-color: var(--color-accent);
  color: white;
  border: none;
  padding: 14px 30px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
  border-radius: var(--border-radius-button);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: var(--shadow-accent);
}

.order-btn:hover {
  background-color: #6b451f;
  box-shadow: 0 4px 12px rgba(139, 90, 43, 0.4);
}

/* ========== БЛОГ ========== */
.blog-posts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  margin: 40px 0;
}

.blog-card {
  background: var(--color-white);
  box-shadow: var(--shadow-light);
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 20px;
  align-items: start;
  border-radius: var(--border-radius-card);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}

.blog-card:hover {
  box-shadow: var(--shadow-medium);
  transform: translateY(-2px);
}

.blog-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
  border-radius: 0;
}

.blog-content {
  padding: 20px 20px 20px 0;
}

.blog-content h2 {
  font-size: 1.8rem;
  font-weight: 400;
  margin-bottom: 10px;
  color: var(--color-text);
}

.post-meta {
  font-size: 0.9rem;
  color: #8a8a8a;
  margin-bottom: 15px;
  font-style: italic;
}

.blog-content p {
  margin-bottom: 15px;
  color: #3a3a3a;
  line-height: 1.7;
}

.read-more {
  display: inline-block;
  color: var(--color-accent);
  border-bottom: 1px solid currentColor;
  font-weight: 500;
  transition: color 0.2s;
}

.read-more:hover {
  color: #6b451f;
}

/* ========== КНОПКИ ПОДЕЛИТЬСЯ ========== */
.share-block {
  display: flex;
  gap: 15px;
  margin-top: 20px;
  align-items: center;
  justify-content: center;
}

.share-icon {
  font-size: 1.5rem;
  color: var(--color-accent);
  opacity: 0.7;
  transition: opacity 0.2s, transform 0.2s;
  cursor: pointer;
}

.share-icon:hover {
  opacity: 1;
  transform: translateY(-2px);
}

.product-card .share-block {
  margin-top: 10px;
  justify-content: center;
}

.product-card .share-icon {
  font-size: 1.2rem;
}

.blog-content .share-block {
  justify-content: flex-start;
  margin-top: 15px;
}

/* ========== АДАПТИВНОСТЬ ========== */
@media (max-width: 992px) {
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .product-container {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

@media (max-width: 576px) {
  .category-grid {
    grid-template-columns: 1fr;
  }
  .product-grid {
    grid-template-columns: 1fr;
  }
  .hero h1 {
    font-size: 1.8rem;
  }
  .thumbnail {
    width: 60px;
    height: 60px;
  }
}