/*
Theme Name: Organics by Emii
Theme URI: https://organicsbyemii.netlify.app/
Author: Organics by Emii
Author URI: https://organicsbyemii.netlify.app/
Description: Botanical haircare and skincare theme for Organics by Emii. A faithful WordPress conversion of the original single-page site. Every piece of front-page and inner-page content is editable: products and prices are real, editable entries, and all headings, labels, links and menus come from the Customizer.
Version: 1.4.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: organics-by-emii
Tags: one-column, custom-logo, custom-menu, featured-images, blog, e-commerce
*/

/* ---------------------------------------------------------------
   NOTE: The main site design lives in assets/css/main.css.
   This file carries the theme header, WordPress core classes,
   and styling for blog / page / archive / 404 templates that did
   not exist in the original static site.
   --------------------------------------------------------------- */

/* ---- WordPress core required classes ---- */
.alignleft { float: left; margin-right: 1.5em; margin-bottom: 1em; }
.alignright { float: right; margin-left: 1.5em; margin-bottom: 1em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignnone { margin: 0 0 1em; }
.wp-caption { max-width: 100%; margin-bottom: 1.5em; }
.wp-caption img { margin: 0 auto; }
.wp-caption-text,
.wp-block-image figcaption {
  font-size: 0.82rem;
  color: var(--ink-soft);
  text-align: center;
  padding-top: 8px;
}
.sticky .entry-title::after { content: ' ★'; color: var(--gold); }
.gallery-caption { font-size: 0.82rem; color: var(--ink-soft); }
.bypostauthor > .comment-body {}

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  width: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  word-wrap: normal !important;
}
.screen-reader-text:focus {
  background: var(--cream);
  color: var(--forest-deep);
  clip: auto !important;
  clip-path: none;
  display: block;
  font-size: 0.9rem;
  height: auto;
  left: 12px;
  line-height: normal;
  padding: 14px 22px;
  text-decoration: none;
  top: 12px;
  width: auto;
  z-index: 100000;
}

/* ---- Admin bar offset so the fixed header is never covered ---- */
.admin-bar header#siteHeader { top: 32px; }
@media screen and (max-width: 782px) {
  .admin-bar header#siteHeader { top: 46px; }
}
.admin-bar .mobile-nav { top: 32px; }
@media screen and (max-width: 782px) {
  .admin-bar .mobile-nav { top: 46px; }
}

/* ---- Inner pages: blog, single, archive, search, 404 ---- */
.site-main-inner {
  padding: clamp(120px, 16vh, 190px) clamp(20px, 6vw, 80px) clamp(70px, 10vw, 120px);
  max-width: 1180px;
  margin: 0 auto;
}
.page-head {
  border-bottom: 1px solid var(--line);
  padding-bottom: 28px;
  margin-bottom: clamp(36px, 5vw, 60px);
}
.page-head .eyebrow { display: block; margin-bottom: 14px; }
.page-head h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.15;
}
.page-head p {
  color: var(--ink-soft);
  margin-top: 14px;
  max-width: 62ch;
  line-height: 1.75;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: clamp(28px, 4vw, 44px);
}
.post-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.post-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 26px 50px -22px rgba(31, 53, 41, 0.35);
}
.post-card .thumb { aspect-ratio: 3/2; overflow: hidden; background: var(--cream-warm); }
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.post-card:hover .thumb img { transform: scale(1.05); }
.post-card .card-body { padding: 24px 24px 28px; }
.post-card h2 { font-size: 1.3rem; line-height: 1.3; margin-bottom: 10px; }
.post-card .meta,
.entry-meta {
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}
.post-card p { color: var(--ink-soft); font-size: 0.94rem; line-height: 1.7; }
.read-more {
  display: inline-block;
  margin-top: 16px;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--forest-deep);
  border-bottom: 1px solid var(--gold);
  padding-bottom: 3px;
}

.entry-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: clamp(34px, 5vw, 64px);
  align-items: start;
}
@media (max-width: 960px) { .entry-layout { grid-template-columns: 1fr; } }

.entry-content { color: var(--ink-soft); font-size: 1.02rem; line-height: 1.85; }
.entry-content > * + * { margin-top: 1.15em; }
.entry-content h2 { font-size: 1.7rem; margin-top: 1.7em; color: var(--forest-deep); }
.entry-content h3 { font-size: 1.3rem; margin-top: 1.5em; color: var(--forest-deep); }
.entry-content a { color: var(--forest-deep); border-bottom: 1px solid var(--gold); }
.entry-content ul,
.entry-content ol { padding-left: 1.3em; }
.entry-content li + li { margin-top: 0.5em; }
.entry-content blockquote {
  padding-left: 22px;
  border-left: 2px solid var(--gold);
  font-family: 'Fraunces', serif;
  font-style: italic;
  color: var(--forest-deep);
  font-size: 1.12rem;
}
.entry-content img { border-radius: 4px; }
.entry-content table { width: 100%; border-collapse: collapse; }
.entry-content th,
.entry-content td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.entry-thumb { border-radius: 4px; overflow: hidden; margin-bottom: 34px; }

.widget-area { position: sticky; top: 120px; }
.widget {
  background: var(--cream-warm);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 24px;
  margin-bottom: 24px;
}
.widget-title {
  font-family: 'Jost', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.74rem;
  color: var(--gold);
  margin-bottom: 14px;
}
.widget ul { list-style: none; }
.widget li + li { margin-top: 10px; }
.widget a { color: var(--ink-soft); font-size: 0.92rem; }
.widget a:hover { color: var(--forest-deep); }
.widget select,
.widget input[type="search"],
.widget input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: #fff;
  font-family: 'Jost', sans-serif;
  color: var(--ink);
  border-radius: 2px;
}
.widget input[type="submit"],
.search-form button {
  margin-top: 10px;
  background: var(--forest-deep);
  color: var(--cream-warm);
  border: none;
  padding: 11px 22px;
  border-radius: 2px;
  font-family: 'Jost', sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.76rem;
  cursor: pointer;
}

.pagination {
  margin-top: clamp(40px, 6vw, 70px);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.pagination .page-numbers {
  border: 1px solid var(--line);
  padding: 9px 15px;
  border-radius: 2px;
  font-size: 0.86rem;
  color: var(--ink-soft);
}
.pagination .page-numbers.current,
.pagination .page-numbers:hover {
  background: var(--forest-deep);
  border-color: var(--forest-deep);
  color: var(--cream-warm);
}

.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 46px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  font-size: 0.86rem;
}
.post-nav a { color: var(--forest-deep); }

.comments-area { margin-top: 54px; padding-top: 30px; border-top: 1px solid var(--line); }
.comments-area h2, .comments-area h3 { font-size: 1.35rem; margin-bottom: 18px; }
.comment-list { list-style: none; }
.comment-list li { margin-bottom: 22px; }
.comment-body { background: var(--cream-warm); border: 1px solid var(--line); border-radius: 4px; padding: 18px 20px; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 2px;
  font-family: 'Jost', sans-serif;
  background: #fff;
  color: var(--ink);
}
.comment-form p { margin-bottom: 14px; }
.comment-form input[type="submit"] {
  background: var(--gold);
  color: var(--forest-deep);
  border: none;
  padding: 14px 30px;
  border-radius: 2px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  font-family: 'Jost', sans-serif;
}

.error-404 { text-align: center; max-width: 60ch; margin: 0 auto; }
.error-404 .code {
  font-family: 'Fraunces', serif;
  font-size: clamp(4rem, 14vw, 9rem);
  color: var(--gold);
  line-height: 1;
}
.error-404 p { color: var(--ink-soft); line-height: 1.8; margin: 18px 0 30px; }

.no-results { color: var(--ink-soft); line-height: 1.8; }

/* ---- Scope resets: the original design styles bare <nav> and <header>
   elements, which would otherwise leak into pagination, post navigation,
   navigation widgets and block content on inner pages. ---- */
.site-main-inner nav ul,
.widget-area nav ul { display: block; }
.site-main-inner nav a,
.widget-area nav a {
  color: var(--ink-soft);
  text-transform: none;
  letter-spacing: normal;
  font-size: inherit;
  font-weight: 400;
  padding-bottom: 0;
}
.site-main-inner nav a::after,
.widget-area nav a::after { display: none; }
.site-main-inner .entry-content header,
.site-main-inner article > header {
  position: static;
  display: block;
  padding: 0;
  background: none;
  backdrop-filter: none;
  box-shadow: none;
}
.site-main-inner .pagination.navigation { display: flex; }

/* ---- Grid safety for non-default item counts.
   The original design assumes exactly three products and three reviews, and
   main.css hardcodes repeat(3,1fr). These classes are only emitted when the
   count differs, so the original three-up layout is byte-for-byte untouched. ---- */
@media (min-width: 901px) {
  .product-grid.obe-cols-1 { grid-template-columns: minmax(0, 420px); justify-content: center; }
  .product-grid.obe-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 860px; margin: 0 auto; }
  .product-grid.obe-cols-4 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
}
@media (min-width: 861px) {
  .test-grid.obe-cols-1 { grid-template-columns: minmax(0, 620px); justify-content: center; }
  .test-grid.obe-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .test-grid.obe-cols-4 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
}
