/*
Theme Name: Phytolife (ФитоЛайф)
Theme URI: https://example.com/phytolife
Author: DeepMind Antigravity Pair Programmer
Description: Премиум тема WordPress для интернет-магазина БАДов и биодобавок на базе WooCommerce и Contact Form 7.
Version: 1.0.0
Text Domain: phytolife
*/

/* ==========================================================================
   Design Tokens & CSS Variables
   ========================================================================== */
:root {
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  
  --bg-main: #fafaf9;
  --bg-card: #ffffff;
  
  --green-950: #052e16;
  --green-900: #14532d;
  --green-800: #166534;
  --green-700: #15803d;
  --green-600: #16a34a;
  --green-500: #22c55e;
  --green-400: #4ade80;
  --green-300: #86efac;
  --green-200: #bbf7d0;
  --green-100: #dcfce7;
  --green-50:  #f0fdf4;
  
  --yellow-500: #eab308;
  --yellow-400: #facc15;
  --yellow-100: #fef9c3;
  --yellow-800: #854d0e;

  --stone-950: #0c0a09;
  --stone-900: #1c1917;
  --stone-800: #292524;
  --stone-700: #44403c;
  --stone-600: #57534e;
  --stone-400: #a8a29e;
  --stone-200: #e7e5e4;
  --stone-100: #f5f5f4;
  --stone-50:  #fafaf9;

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;
}

/* ==========================================================================
   Base & Reset
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--stone-800);
  line-height: 1.5;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ==========================================================================
   Layout Containers
   ========================================================================== */
.container {
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

.site-header {
  background-color: var(--green-950);
  color: #ffffff;
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: var(--shadow-md);
}

.site-header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  padding-bottom: 1rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #ffffff;
}

.site-logo-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-full);
  background-color: var(--green-500);
  color: var(--green-950);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.25rem;
}

.site-logo-accent {
  color: var(--green-400);
}

.main-nav {
  display: none;
  gap: 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
}

@media (min-width: 768px) {
  .main-nav {
    display: flex;
  }
}

.main-nav a {
  transition: color 0.2s;
}

.main-nav a:hover {
  color: var(--green-300);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.cart-button {
  position: relative;
  padding: 0.5rem;
  border-radius: var(--radius-full);
  background: transparent;
  border: none;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
}

.cart-button:hover {
  background-color: var(--green-900);
}

.cart-count {
  position: absolute;
  top: 0;
  right: 0;
  background-color: var(--yellow-500);
  color: var(--green-950);
  font-size: 0.75rem;
  font-weight: 700;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
  position: relative;
  background-color: var(--green-900);
  color: #ffffff;
  padding-top: 4rem;
  padding-bottom: 4rem;
  overflow: hidden;
  text-align: center;
}

@media (min-width: 768px) {
  .hero-section {
    padding-top: 6rem;
    padding-bottom: 6rem;
  }
}

.hero-badge {
  display: inline-block;
  padding: 0.25rem 1rem;
  border-radius: var(--radius-full);
  background-color: rgba(22, 101, 52, 0.6);
  color: var(--green-200);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  border: 1px solid var(--green-700);
}

.hero-title {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  max-width: 56rem;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 3.75rem;
  }
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--green-100);
  max-width: 40rem;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 2.5rem;
}

/* Toggle mode bar */
.mode-toggle-bar {
  background-color: rgba(5, 46, 22, 0.6);
  padding: 0.5rem;
  border-radius: var(--radius-2xl);
  display: inline-flex;
  gap: 0.5rem;
  backdrop-filter: blur(4px);
  border: 1px solid var(--green-800);
  box-shadow: var(--shadow-xl);
  margin-bottom: 2rem;
  max-width: 100%;
  flex-wrap: wrap;
  justify-content: center;
}

.mode-btn {
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-xl);
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.95rem;
}

.mode-btn-retail {
  background-color: transparent;
  color: var(--green-300);
}

.mode-btn-retail.active {
  background-color: var(--green-600);
  color: #ffffff;
  box-shadow: var(--shadow-lg);
}

.mode-btn-wholesale {
  background-color: transparent;
  color: var(--green-300);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.mode-btn-wholesale.active {
  background-color: var(--yellow-500);
  color: var(--green-950);
  box-shadow: var(--shadow-lg);
}

.btn-primary {
  display: inline-block;
  background-color: var(--green-500);
  color: var(--green-950);
  font-weight: 700;
  padding: 0.75rem 2rem;
  border-radius: var(--radius-full);
  transition: all 0.2s ease;
  box-shadow: 0 0 15px rgba(34, 197, 94, 0.4);
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background-color: var(--green-400);
  transform: scale(1.05);
}

.btn-secondary {
  display: inline-block;
  background-color: var(--green-900);
  color: #ffffff;
  font-weight: 600;
  padding: 0.75rem 2rem;
  border-radius: var(--radius-xl);
  border: none;
  cursor: pointer;
  transition: background-color 0.2s;
  box-shadow: var(--shadow-md);
}

.btn-secondary:hover {
  background-color: var(--green-800);
}

.btn-outline {
  display: inline-block;
  background-color: transparent;
  border: 2px solid var(--green-700);
  color: var(--green-800);
  font-weight: 700;
  padding: 0.75rem 2rem;
  border-radius: var(--radius-full);
  transition: all 0.2s;
  cursor: pointer;
}

.btn-outline:hover {
  background-color: var(--green-700);
  color: #ffffff;
}

/* ==========================================================================
   Sections & Cards
   ========================================================================== */
.section-padding {
  padding-top: 5rem;
  padding-bottom: 5rem;
}

.section-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--green-950);
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .section-title {
    font-size: 2.5rem;
  }
}

.section-subtitle {
  color: var(--stone-600);
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
}

.text-center {
  text-align: center;
}

/* Featured / About Block */
.featured-card {
  display: flex;
  flex-direction: column;
  background-color: #ffffff;
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  border: 1px solid var(--stone-100);
}

@media (min-width: 1024px) {
  .featured-card {
    flex-direction: row;
  }
}

.featured-image-wrap {
  width: 100%;
  background-color: var(--green-50);
  padding: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 250px;
}

@media (min-width: 1024px) {
  .featured-image-wrap {
    width: 50%;
  }
}

.featured-content {
  width: 100%;
  padding: 2rem;
}

@media (min-width: 1024px) {
  .featured-content {
    width: 50%;
    padding: 3rem;
  }
}

.feature-list {
  list-style: none;
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.feature-icon {
  color: var(--green-600);
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.2rem;
}

/* Grid & Product Cards */
.products-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}

@media (min-width: 640px) {
  .products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .products-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.product-card {
  background-color: #ffffff;
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--stone-100);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.3s;
}

.product-card:hover {
  box-shadow: var(--shadow-xl);
}

.product-card-top {
  position: relative;
  padding: 1.5rem;
  background-color: rgba(250, 250, 249, 0.5);
  flex-grow: 1;
}

.badge {
  display: inline-block;
  background-color: var(--green-500);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
}

.badge-wrapper {
  position: absolute;
  top: 1rem;
  left: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  z-index: 5;
}

.product-image {
  width: 100%;
  height: 12rem;
  object-fit: contain;
  margin-bottom: 1rem;
  mix-blend-mode: multiply;
}

.product-manufacturer {
  font-size: 0.75rem;
  color: var(--green-600);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.product-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--stone-800);
  margin-bottom: 0.5rem;
}

.product-description {
  font-size: 0.875rem;
  color: var(--stone-500);
}

.product-card-bottom {
  padding: 1.5rem;
  padding-top: 0;
  margin-top: auto;
  border-top: 1px solid var(--stone-100);
  background-color: #ffffff;
}

.product-price-box {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-top: 1rem;
}

.product-price-label {
  font-size: 0.75rem;
  color: var(--stone-400);
  margin-bottom: 0.25rem;
}

.product-price-val {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--green-800);
}

.btn-add-cart {
  width: 100%;
  background-color: var(--stone-100);
  color: var(--green-950);
  font-weight: 600;
  padding: 0.75rem;
  border-radius: var(--radius-xl);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s;
}

.btn-add-cart:hover {
  background-color: var(--green-600);
  color: #ffffff;
}

/* Wholesale Info Banner */
.wholesale-banner {
  background-color: var(--yellow-100);
  border-left: 4px solid var(--yellow-500);
  padding: 1rem 1.5rem;
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.wholesale-banner-title {
  font-weight: 700;
  color: var(--yellow-800);
}

.wholesale-banner-desc {
  font-size: 0.875rem;
  color: #713f12;
}

/* Reviews Section */
.reviews-section {
  background-color: var(--green-950);
  color: #ffffff;
}

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}

@media (min-width: 768px) {
  .reviews-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.review-card {
  background-color: var(--green-900);
  padding: 2rem;
  border-radius: var(--radius-2xl);
  border: 1px solid var(--green-800);
}

.review-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.stars-rating {
  color: var(--yellow-400);
  display: flex;
  gap: 0.25rem;
}

.review-type {
  font-size: 0.75rem;
  background-color: var(--green-800);
  color: var(--green-200);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
}

.review-text {
  color: var(--green-100);
  font-style: italic;
  margin-bottom: 1.5rem;
}

.review-author {
  font-weight: 700;
  color: #ffffff;
}

/* Blog / Articles Grid */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 2rem;
  margin-top: 2.5rem;
}

@media (min-width: 768px) {
  .articles-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.article-card {
  background-color: #ffffff;
  border-radius: var(--radius-2xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--stone-100);
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
}

.article-card:hover {
  box-shadow: var(--shadow-xl);
}

.article-img-wrap {
  height: 12rem;
  overflow: hidden;
}

.article-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.article-card:hover .article-img-wrap img {
  transform: scale(1.05);
}

.article-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.article-date {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--green-600);
  margin-bottom: 0.5rem;
}

.article-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--stone-800);
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.article-excerpt {
  font-size: 0.875rem;
  color: var(--stone-600);
  margin-bottom: 1rem;
}

.article-link {
  color: var(--green-700);
  font-weight: 600;
  font-size: 0.875rem;
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

/* Modal Popup CF7 */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-backdrop.active {
  display: flex;
}

.modal-content {
  background-color: #ffffff;
  border-radius: var(--radius-2xl);
  padding: 2.5rem;
  max-width: 32rem;
  width: 100%;
  position: relative;
  box-shadow: var(--shadow-xl);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--stone-400);
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
}

.modal-close:hover {
  background-color: var(--stone-100);
  color: var(--stone-800);
}

/* Contact Form 7 Styled Inputs */
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--stone-200);
  border-radius: var(--radius-md);
  margin-top: 0.25rem;
  margin-bottom: 1rem;
  font-family: inherit;
  font-size: 0.95rem;
}

.wpcf7 input[type="submit"] {
  background-color: var(--green-700);
  color: #ffffff;
  font-weight: 700;
  padding: 0.75rem 2rem;
  border-radius: var(--radius-xl);
  border: none;
  cursor: pointer;
  width: 100%;
  font-size: 1rem;
  transition: background-color 0.2s;
}

.wpcf7 input[type="submit"]:hover {
  background-color: var(--green-800);
}

/* Footer */
.site-footer {
  background-color: var(--stone-950);
  color: var(--stone-400);
  padding-top: 4rem;
  padding-bottom: 3rem;
  border-top: 4px solid var(--green-600);
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 2rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.footer-heading {
  color: #ffffff;
  font-weight: 700;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.footer-links a:hover {
  color: var(--green-400);
}

.footer-bottom {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--stone-800);
  text-align: center;
  font-size: 0.875rem;
}

/* Toast Notifications */
.phytolife-toast {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 9999;
  background-color: var(--green-800);
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  animation: slideInDown 0.3s ease-out;
}

@keyframes slideInDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Filter tabs */
.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}

.filter-tab-btn {
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid var(--stone-200);
  background-color: #ffffff;
  color: var(--stone-600);
  cursor: pointer;
  transition: all 0.2s;
}

.filter-tab-btn.active, .filter-tab-btn:hover {
  background-color: var(--green-800);
  color: #ffffff;
  border-color: var(--green-800);
}

/* Single product & WooCommerce overrides */
.single-product-container {
  background-color: #ffffff;
  border-radius: var(--radius-2xl);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  margin-top: 2rem;
  margin-bottom: 3rem;
}
