/*
Theme Name: The Indoor Grower
Theme URI: https://www.theindoorgrower.com/
Author: The Indoor Grower
Description: Classic WordPress theme converted from The Indoor Grower static hydroponics site. Keeps the original green & natural design, the homepage layout, growing-method pages, shop, $5 guide page and blog. Includes a one-click importer (Appearance → Import Site Content) that recreates the original pages, posts, menus and featured images.
Version: 1.0.4
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: the-indoor-grower
Tags: blog, two-columns, right-sidebar, custom-logo, custom-menu, featured-images, threaded-comments, accessibility-ready
*/

/* The original site stylesheet lives in assets/css/site.css and is loaded first.
   The rules below only cover markup that WordPress itself generates. */

.widget-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-light);
  border-bottom: 2px solid var(--green-pale);
  padding-bottom: 8px;
  margin-bottom: 14px;
}

.logo:hover { color: var(--white); text-decoration: none; }
.logo .custom-logo { max-height: 44px; width: auto; }

.blog-thumb { overflow: hidden; }
.blog-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* WordPress core classes */
.alignleft { float: left; margin: 0 20px 16px 0; }
.alignright { float: right; margin: 0 0 16px 20px; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption, figure { max-width: 100%; margin-bottom: 20px; }
.wp-caption-text, figcaption { font-size: 0.85rem; color: var(--text-light); margin-top: 6px; }
.article-body img { border-radius: 6px; margin-bottom: 20px; }
.article-body ul { margin: 0 0 20px 22px; }
.article-body table { width: 100%; border-collapse: collapse; margin-bottom: 20px; }
.sticky, .bypostauthor, .gallery-caption {}
.screen-reader-text {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* The original CSS styles bare <header>, <footer> and <nav> elements as the site
   chrome. Neutralise those rules for elements WordPress prints inside content. */
.main-col header, .main-col footer, .comment-list header, .comment-list footer {
  position: static; background: none; box-shadow: none; padding: 0; color: inherit; z-index: auto;
}
.pagination ul { display: flex; gap: 8px; }

/* Comments */
.comments-area { margin-top: 48px; }
.comments-area h2 { font-size: 1.3rem; margin-bottom: 16px; }
.comment-list { list-style: none; margin: 0 0 24px; }
.comment-list .comment { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 20px; margin-bottom: 16px; }
.comment-list .children { list-style: none; margin-left: 24px; margin-top: 16px; }
.comment-meta { font-size: 0.85rem; color: var(--text-light); margin-bottom: 8px; }
.comment-form label { display: block; font-weight: 600; margin-bottom: 4px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 6px; font: inherit; margin-bottom: 12px;
}
.comment-form .submit, .search-form button {
  background: var(--green-mid); color: var(--white); border: 0; border-radius: 6px; padding: 10px 20px; font-weight: 600; cursor: pointer;
}

/* Search form */
.search-form { display: flex; gap: 8px; }
.search-form input[type="search"] { flex: 1; padding: 10px 12px; border: 1px solid var(--border); border-radius: 6px; font: inherit; }

.no-results { text-align: center; padding: 40px 0; }

/* Fix: the original byline inherited the dark paragraph colour on the green header. */
.article-header .meta { color: var(--white); }

/* Block widgets (Search, Latest Posts…) added in Appearance → Widgets */
.widget h2, .widget .wp-block-heading { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-light); border-bottom: 2px solid var(--green-pale); padding-bottom: 8px; margin-bottom: 14px; }
.widget .wp-block-search__inside-wrapper { display: flex; gap: 6px; }
.widget .wp-block-search__input { flex: 1; padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px; font: inherit; }
.widget .wp-block-search__button { background: var(--green-mid); color: var(--white); border: 0; border-radius: 6px; padding: 8px 14px; font-weight: 600; cursor: pointer; }
.widget .wp-block-search__label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; }
.widget .wp-block-latest-posts, .widget .wp-block-archives, .widget .wp-block-categories { list-style: none; margin: 0; }

/* Fix: hero paragraphs inherited the dark paragraph colour on the green background. */
.page-hero p, .guide-hero p { color: var(--white); }
/* Fix: keep the sidebar newsletter button inside its box. */
.widget .newsletter-form .field-group input[type="email"] { min-width: 0; width: 100%; }

/* $5 guide switched off in the Customizer: hide every promo for it. */
body.tig-guide-off .guide-banner,
body.tig-guide-off .btn-gumroad,
body.tig-guide-off .btn-gumroad-lg,
body.tig-guide-off [data-tig-guide],
body.tig-guide-off .widget:has([data-tig-guide]),
body.tig-guide-off .product-callout:has([data-tig-guide]),
body.tig-guide-off .product-callout:has(.btn-gumroad-lg) { display: none !important; }
