/*
Theme Name: Трави Полісся
Theme URI: https://apteka24.org.ua/
Author: Custom Design
Description: Сучасна адаптивна тема WordPress для зеленої аптеки «Трави Полісся» з головною сторінкою у форматі каталогу, візуальними категоріями, картками екстрактів та інтерактивним слайдером Google-відгуків.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: travy-polissya
*/

:root {
  --tp-bg: #f8f6f0;
  --tp-surface: #ffffff;
  --tp-green: #1f4a2c;
  --tp-green-dark: #15351f;
  --tp-green-soft: #eef4ef;
  --tp-gold: #e6a817;
  --tp-text: #1f2937;
  --tp-muted: #5f6b66;
  --tp-border: #e7e2d5;
  --tp-radius: 16px;
  --tp-shadow: 0 6px 20px rgba(31, 74, 44, 0.07);
  --tp-container: 1180px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--tp-bg);
  color: var(--tp-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--tp-green);
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

a:hover {
  color: var(--tp-green-dark);
}

.tp-container {
  width: 100%;
  max-width: var(--tp-container);
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.tp-site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--tp-border);
}

.tp-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 76px;
}

.tp-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--tp-green);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  flex-shrink: 0;
}

.tp-nav {
  display: flex;
  align-items: center;
}

.tp-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

.tp-nav a {
  color: var(--tp-text);
  font-size: 15px;
  font-weight: 500;
}

.tp-nav a:hover,
.tp-nav .current-menu-item > a {
  color: var(--tp-green);
}

.tp-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.tp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all 0.2s ease;
}

.tp-btn-primary {
  background: var(--tp-green);
  color: #ffffff;
}

.tp-btn-primary:hover {
  background: var(--tp-green-dark);
  color: #ffffff;
}

.tp-btn-outline {
  background: transparent;
  color: var(--tp-green);
  border-color: var(--tp-green);
}

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

.tp-icon-btn {
  appearance: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--tp-border);
  background: var(--tp-surface);
  color: var(--tp-green);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.tp-burger {
  display: none;
}

.tp-search-bar {
  display: none;
  border-top: 1px solid var(--tp-border);
  background: var(--tp-surface);
  padding: 14px 0;
}

.tp-search-bar.is-open {
  display: block;
}

.tp-search-form {
  display: flex;
  gap: 10px;
  max-width: 640px;
  margin: 0 auto;
}

.tp-search-form input[type="search"] {
  flex: 1;
  padding: 11px 16px;
  border: 1px solid var(--tp-border);
  border-radius: 999px;
  font-size: 15px;
  background: var(--tp-bg);
}

/* Hero Section */
.tp-hero {
  background: linear-gradient(135deg, #f8f6f0 0%, #eef3ea 100%);
  border-bottom: 1px solid var(--tp-border);
  padding: 56px 0 48px;
}

.tp-hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 40px;
}

.tp-hero-badge {
  display: inline-block;
  background: var(--tp-green-soft);
  color: var(--tp-green);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.tp-hero h1 {
  margin: 0 0 16px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(32px, 4.5vw, 50px);
  line-height: 1.15;
  color: var(--tp-green-dark);
}

.tp-hero-lead {
  margin: 0 0 28px;
  font-size: 17px;
  color: var(--tp-muted);
  max-width: 540px;
}

.tp-hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.tp-hero-visual {
  background: var(--tp-surface);
  border-radius: 24px;
  padding: 18px;
  box-shadow: var(--tp-shadow);
  border: 1px solid var(--tp-border);
  overflow: hidden;
}

.tp-hero-visual img {
  width: 100%;
  border-radius: 16px;
  object-fit: cover;
  aspect-ratio: 4 / 3;
}

/* Trust Bar */
.tp-trust-bar {
  background: var(--tp-surface);
  border-bottom: 1px solid var(--tp-border);
  padding: 20px 0;
}

.tp-trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.tp-trust-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--tp-green-dark);
}

/* Sections */
.tp-section {
  padding: 56px 0;
}

.tp-section-alt {
  background: var(--tp-surface);
  border-top: 1px solid var(--tp-border);
  border-bottom: 1px solid var(--tp-border);
}

.tp-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.tp-section-title {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(24px, 3vw, 34px);
  color: var(--tp-green-dark);
}

.tp-section-sub {
  margin: 6px 0 0;
  color: var(--tp-muted);
  font-size: 15px;
}

/* Categories Grid */
.tp-cats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.tp-cat-card {
  background: var(--tp-surface);
  border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius);
  padding: 22px 18px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.tp-cat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--tp-shadow);
  border-color: var(--tp-green);
}

.tp-cat-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--tp-green-soft);
  color: var(--tp-green);
  display: flex;
  align-items: center;
  justify-content: center;
}

.tp-cat-name {
  font-weight: 700;
  font-size: 15.5px;
  color: var(--tp-text);
  line-height: 1.3;
}

.tp-cat-count {
  font-size: 12.5px;
  color: var(--tp-muted);
}

/* Products / Extracts Grid */
.tp-products-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.tp-product-card {
  background: var(--tp-surface);
  border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 3px 12px rgba(31, 74, 44, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.tp-product-thumb {
  display: block;
  aspect-ratio: 16 / 10;
  background: #f2efe7;
  overflow: hidden;
  position: relative;
}

.tp-product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.tp-product-card:hover .tp-product-thumb img {
  transform: scale(1.04);
}

.tp-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #eef4ef, #f8f6f0);
  color: var(--tp-green);
}

.tp-product-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.tp-product-cat {
  font-size: 12px;
  font-weight: 600;
  color: var(--tp-green);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.tp-product-title {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.35;
}

.tp-product-title a {
  color: var(--tp-text);
}

.tp-product-title a:hover {
  color: var(--tp-green);
}

.tp-product-excerpt {
  margin: 0 0 18px;
  font-size: 14.5px;
  color: var(--tp-muted);
  flex: 1;
}

.tp-product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid #f1efe9;
}

/* Google Reviews Slider */
.tp-reviews-box {
  background: var(--tp-bg);
  border: 1px solid var(--tp-border);
  border-radius: 22px;
  padding: 36px 24px 28px;
  position: relative;
  overflow: hidden;
}

.tp-reviews-head {
  text-align: center;
  margin-bottom: 24px;
}

.tp-reviews-brand {
  margin: 0 0 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(24px, 3vw, 32px);
  color: var(--tp-green);
  letter-spacing: 0.04em;
}

.tp-reviews-sub {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15.5px;
  font-weight: 500;
}

.tp-slider-viewport {
  overflow: hidden;
}

.tp-slider-track {
  display: flex;
  transition: transform 0.45s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.tp-slider-slide {
  flex: 0 0 100%;
  width: 100%;
  padding: 4px;
}

.tp-reviews-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.tp-review-card {
  background: var(--tp-surface);
  border-radius: 14px;
  padding: 18px;
  border: 1px solid rgba(31, 74, 44, 0.07);
  box-shadow: 0 4px 12px rgba(31, 74, 44, 0.06);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.tp-review-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.tp-review-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #e6dfd1;
  color: var(--tp-text);
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tp-review-author {
  font-weight: 700;
  font-size: 15.5px;
  line-height: 1.25;
}

.tp-stars {
  display: inline-flex;
  gap: 2px;
  color: var(--tp-gold);
}

.tp-review-text {
  margin: 0 0 12px;
  font-size: 14.5px;
  line-height: 1.5;
  color: #24292f;
}

.tp-review-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid #f1efe9;
  font-size: 12px;
  color: var(--tp-muted);
}

.tp-slider-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 22px;
  flex-wrap: wrap;
}

.tp-nav-btn {
  appearance: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #d5cebe;
  background: #ffffff;
  color: var(--tp-green);
  font-size: 20px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tp-nav-btn:hover {
  background: var(--tp-green);
  color: #ffffff;
  border-color: var(--tp-green);
}

.tp-dots {
  display: inline-flex;
  gap: 8px;
}

.tp-dot {
  appearance: none;
  border: none;
  padding: 0;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #cfc8b6;
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.tp-dot.is-active {
  width: 26px;
  background: var(--tp-green);
}

.tp-counter {
  font-size: 13px;
  font-weight: 600;
  color: var(--tp-green);
}

/* Single Post & Page */
.tp-article-wrap {
  max-width: 860px;
  margin: 0 auto;
  background: var(--tp-surface);
  border: 1px solid var(--tp-border);
  border-radius: 20px;
  padding: 36px;
  box-shadow: var(--tp-shadow);
}

.tp-breadcrumbs {
  font-size: 13.5px;
  color: var(--tp-muted);
  margin-bottom: 14px;
}

.tp-article-title {
  margin: 0 0 20px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(26px, 3.5vw, 38px);
  line-height: 1.2;
  color: var(--tp-green-dark);
}

.tp-article-thumb {
  margin-bottom: 24px;
  border-radius: 14px;
  overflow: hidden;
}

.tp-entry-content {
  font-size: 16px;
  line-height: 1.75;
}

.tp-entry-content h2,
.tp-entry-content h3 {
  font-family: Georgia, "Times New Roman", serif;
  color: var(--tp-green-dark);
}

.tp-consult-box {
  margin-top: 32px;
  padding: 22px 24px;
  border-radius: 16px;
  background: var(--tp-green-soft);
  border: 1px solid #d1e2d5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.tp-consult-phones {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-weight: 700;
}

/* Pagination */
.tp-pagination {
  margin-top: 36px;
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tp-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--tp-surface);
  border: 1px solid var(--tp-border);
  font-weight: 600;
  color: var(--tp-text);
}

.tp-pagination .page-numbers.current,
.tp-pagination .page-numbers:hover {
  background: var(--tp-green);
  color: #ffffff;
  border-color: var(--tp-green);
}

/* Footer */
.tp-site-footer {
  background: var(--tp-green);
  color: rgba(255, 255, 255, 0.88);
  padding: 52px 0 28px;
}

.tp-footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1.2fr;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.tp-footer-brand {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 10px;
  letter-spacing: 0.04em;
}

.tp-footer-title {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
}

.tp-footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.tp-site-footer a {
  color: rgba(255, 255, 255, 0.88);
}

.tp-site-footer a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.tp-footer-bottom {
  padding-top: 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.7);
}

/* Responsive */
@media (max-width: 960px) {
  .tp-hero-grid {
    grid-template-columns: 1fr;
  }
  .tp-cats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .tp-products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .tp-footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .tp-burger {
    display: inline-flex;
  }
  .tp-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--tp-surface);
    border-bottom: 1px solid var(--tp-border);
    padding: 18px 20px;
    box-shadow: var(--tp-shadow);
  }
  .tp-nav.is-open {
    display: block;
  }
  .tp-nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .tp-header-actions .tp-btn-consult {
    display: none;
  }
  .tp-trust-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .tp-products-grid,
  .tp-reviews-grid {
    grid-template-columns: 1fr;
  }
  .tp-article-wrap {
    padding: 22px 18px;
  }
}
