/*
Theme Name: Plantify
Theme URI: https://example.com
Author: Your Name
Description: Минималистичная тема для магазина растений с поддержкой WooCommerce
Version: 1.0
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.4
License: GPLv2 or later
Text Domain: plantify
*/

/* ---------- Сброс и базовые стили ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #2e3b2c;
  background-color: #fafbf7;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: #4a6741;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #2f4d2a;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Типографика */
h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.3;
  color: #1e2e1a;
}

h1 { font-size: 2.2rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.4rem; }

/* ---------- Шапка ---------- */
.site-header {
  background: #ffffff;
  border-bottom: 1px solid #eaf0e6;
  padding: 18px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-branding {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: #1e2e1a;
}

.site-branding a {
  color: inherit;
}

.main-navigation ul {
  list-style: none;
  display: flex;
  gap: 28px;
}

.main-navigation a {
  font-weight: 500;
  color: #3b4a38;
}

.main-navigation a:hover {
  color: #1e2e1a;
}

/* Корзина в шапке */
.header-cart {
  position: relative;
}

.header-cart a {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #3b4a38;
  font-weight: 500;
}

.cart-count {
  background: #7a9b6a;
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  min-width: 22px;
  text-align: center;
}

/* ---------- Подвал ---------- */
.site-footer {
  background: #ffffff;
  border-top: 1px solid #eaf0e6;
  padding: 30px 0;
  margin-top: 60px;
  text-align: center;
  font-size: 0.9rem;
  color: #6b7c68;
}

/* ---------- Главная (front-page) ---------- */
.hero {
  background: linear-gradient(135deg, #eef6e9 0%, #f8fbf5 100%);
  padding: 80px 0 60px;
  text-align: center;
  margin-bottom: 60px;
}

.hero h1 {
  font-size: 2.8rem;
  margin-bottom: 14px;
  color: #1e2e1a;
}

.hero p {
  font-size: 1.2rem;
  color: #4b5d47;
  max-width: 600px;
  margin: 0 auto 24px;
}

.btn {
  display: inline-block;
  background: #7a9b6a;
  color: white;
  padding: 12px 32px;
  border-radius: 6px;
  font-weight: 600;
  transition: background 0.2s;
}

.btn:hover {
  background: #5e7a4e;
  color: white;
}

.featured-products {
  padding-bottom: 60px;
}

.featured-products h2 {
  text-align: center;
  margin-bottom: 40px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 30px;
}

/* ---------- Карточка товара ---------- */
.product-card {
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.product-card img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  background: #f1f6ef;
}

.product-card .card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-card .card-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.product-card .card-title a {
  color: #1e2e1a;
}

.product-card .price {
  font-weight: 700;
  color: #4a6741;
  margin-bottom: 12px;
}

.product-card .add-to-cart {
  margin-top: auto;
}

.product-card .button {
  width: 100%;
  text-align: center;
  background: #edf4e9;
  color: #3b4a38;
  padding: 10px;
  border-radius: 6px;
  font-weight: 600;
  display: inline-block;
  transition: background 0.2s;
}

.product-card .button:hover {
  background: #7a9b6a;
  color: white;
}

/* ---------- Каталог (архив товаров) ---------- */
.woocommerce-products-header {
  text-align: center;
  padding: 40px 0 30px;
}

.woocommerce-ordering {
  margin-bottom: 30px;
  display: flex;
  justify-content: flex-end;
}

.woocommerce-ordering select {
  padding: 8px 14px;
  border: 1px solid #dde6d7;
  border-radius: 6px;
  font-size: 0.95rem;
}

/* ---------- Страница товара ---------- */
.single-product .product {
  display: flex;
  flex-wrap: wrap;
  gap: 50px;
  margin-top: 30px;
}

.single-product .product .woocommerce-product-gallery {
  flex: 1 1 45%;
  min-width: 300px;
}

.single-product .product .summary {
  flex: 1 1 45%;
  min-width: 300px;
}

.single-product .product_title {
  font-size: 2rem;
  margin-bottom: 12px;
}

.single-product .price {
  font-size: 1.5rem;
  font-weight: 700;
  color: #4a6741;
  margin: 16px 0;
}

.single-product .cart .quantity input {
  width: 70px;
  padding: 10px;
  border: 1px solid #dde6d7;
  border-radius: 6px;
}

.single-product .single_add_to_cart_button {
  background: #7a9b6a;
  color: white;
  border: none;
  padding: 12px 28px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  margin-left: 10px;
  transition: background 0.2s;
}

.single-product .single_add_to_cart_button:hover {
  background: #5e7a4e;
}

/* ---------- Мобильная версия ---------- */
@media (max-width: 768px) {
  .header-inner {
    flex-wrap: wrap;
    gap: 12px;
  }

  .main-navigation ul {
    gap: 18px;
    flex-wrap: wrap;
  }

  .hero {
    padding: 50px 20px 40px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
  }

  .single-product .product {
    gap: 30px;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.8rem;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }
}