/*
Theme Name: First Botanics
Theme URI: https://firstbotanics.com
Author: First Botanics
Author URI: https://firstbotanics.com
Description: Premium minimal WooCommerce theme for First Botanics — botanical supplements ecommerce.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: first-botanics
Tags: woocommerce, ecommerce, botanical, minimal, premium
WooCommerce tested up to: 9.5
*/

/* ═══════════════════════════════════════════
   DESIGN SYSTEM — First Botanics
   ═══════════════════════════════════════════ */

:root {
  /* Colors */
  --fb-deep-brown: #5A3318;
  --fb-warm-brown: #7A4A2A;
  --fb-golden: #C97A00;
  --fb-soft-gold: #D89024;
  --fb-cream: #F8F5EF;
  --fb-white: #FFFFFF;
  --fb-text: #2C1810;
  --fb-text-light: #6B5A4E;
  --fb-border: #E8E0D6;
  --fb-border-light: #F0EBE4;
  --fb-success: #3A7D44;
  --fb-error: #C0392B;
  --fb-bg-subtle: #FAF8F4;

  /* Typography */
  --fb-font-display: 'Cormorant Garamond', Georgia, serif;
  --fb-font-body: 'Outfit', system-ui, -apple-system, sans-serif;

  /* Spacing */
  --fb-space-xs: 4px;
  --fb-space-sm: 8px;
  --fb-space-md: 16px;
  --fb-space-lg: 24px;
  --fb-space-xl: 32px;
  --fb-space-2xl: 48px;
  --fb-space-3xl: 72px;

  /* Layout */
  --fb-max-width: 1280px;
  --fb-header-height: 72px;
  --fb-announce-height: 36px;
  --fb-radius-sm: 4px;
  --fb-radius-md: 8px;
  --fb-radius-lg: 12px;
  --fb-radius-xl: 16px;

  /* Shadows */
  --fb-shadow-sm: 0 2px 8px rgba(90,51,24,0.04);
  --fb-shadow-md: 0 4px 16px rgba(90,51,24,0.08);
  --fb-shadow-lg: 0 12px 40px rgba(90,51,24,0.1);
  --fb-shadow-xl: 0 24px 80px rgba(0,0,0,0.12);

  /* Transitions */
  --fb-ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --fb-duration: 0.25s;
}

/* ═══════════════════════════════════════════
   RESET & BASE
   ═══════════════════════════════════════════ */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--fb-font-body);
  color: var(--fb-text);
  background: var(--fb-white);
  line-height: 1.6;
  font-weight: 400;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color var(--fb-duration) var(--fb-ease); }
a:hover { color: var(--fb-golden); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--fb-font-display);
  font-weight: 600;
  color: var(--fb-deep-brown);
  line-height: 1.2;
}

/* ═══════════════════════════════════════════
   LAYOUT
   ═══════════════════════════════════════════ */

.fb-container {
  width: 100%;
  max-width: var(--fb-max-width);
  margin: 0 auto;
  padding: 0 var(--fb-space-lg);
}

.fb-section {
  padding: var(--fb-space-3xl) 0;
}

.fb-section-bg {
  background: var(--fb-cream);
}

.fb-grid {
  display: grid;
  gap: var(--fb-space-lg);
}

/* ═══════════════════════════════════════════
   ANNOUNCEMENT BAR
   ═══════════════════════════════════════════ */

.fb-announce {
  background: var(--fb-deep-brown);
  color: var(--fb-cream);
  text-align: center;
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  padding: var(--fb-space-sm) var(--fb-space-md);
  position: sticky;
  top: 0;
  z-index: 100;
}

.fb-announce strong { color: var(--fb-soft-gold); font-weight: 500; }

/* ═══════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════ */

.fb-header {
  position: sticky;
  top: var(--fb-announce-height);
  z-index: 99;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--fb-border-light);
  transition: box-shadow var(--fb-duration);
}

.fb-header.scrolled {
  box-shadow: var(--fb-shadow-sm);
}

.fb-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--fb-header-height);
  gap: var(--fb-space-lg);
}

.fb-logo {
  font-family: var(--fb-font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--fb-deep-brown);
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.fb-logo__sub {
  font-family: var(--fb-font-body);
  font-size: 0.5rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fb-golden);
  display: block;
  margin-top: -2px;
  font-weight: 500;
}

/* Navigation */
.fb-nav { display: flex; align-items: center; gap: var(--fb-space-xl); }
.fb-nav__link {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: var(--fb-space-xs);
}

/* Header actions */
.fb-header__actions {
  display: flex;
  align-items: center;
  gap: var(--fb-space-md);
}

.fb-header__btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--fb-text);
  display: flex;
  align-items: center;
  position: relative;
  transition: color var(--fb-duration);
}

.fb-header__btn:hover { color: var(--fb-golden); }

.fb-cart-count {
  position: absolute;
  top: -6px;
  right: -8px;
  background: var(--fb-golden);
  color: white;
  font-size: 0.625rem;
  font-weight: 600;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ═══════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════ */

.fb-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--fb-space-sm);
  padding: 13px 28px;
  font-family: var(--fb-font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  border-radius: var(--fb-radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--fb-duration) var(--fb-ease);
  white-space: nowrap;
}

.fb-btn--primary {
  background: var(--fb-deep-brown);
  color: var(--fb-cream);
}

.fb-btn--primary:hover {
  background: var(--fb-warm-brown);
  transform: translateY(-1px);
  box-shadow: var(--fb-shadow-md);
}

.fb-btn--outline {
  background: transparent;
  color: var(--fb-deep-brown);
  border: 1.5px solid var(--fb-deep-brown);
}

.fb-btn--outline:hover {
  background: var(--fb-deep-brown);
  color: var(--fb-cream);
}

.fb-btn--gold {
  background: var(--fb-golden);
  color: white;
}

.fb-btn--gold:hover {
  background: var(--fb-soft-gold);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(201,122,0,0.25);
}

.fb-btn--sm { padding: 9px 18px; font-size: 0.75rem; }
.fb-btn--full { width: 100%; justify-content: center; }

/* ═══════════════════════════════════════════
   SECTION HEADERS
   ═══════════════════════════════════════════ */

.fb-section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: var(--fb-space-xl);
  flex-wrap: wrap;
  gap: var(--fb-space-md);
}

.fb-eyebrow {
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fb-golden);
  font-weight: 500;
  margin-bottom: var(--fb-space-sm);
}

.fb-section-title {
  font-size: clamp(1.75rem, 3.5vw, 2.375rem);
  color: var(--fb-deep-brown);
}

/* ═══════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════ */

.fb-hero {
  background: linear-gradient(135deg, var(--fb-cream) 0%, #EDE6DA 50%, #F5EFE4 100%);
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}

.fb-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(201,122,0,0.07) 0%, transparent 70%);
  border-radius: 50%;
}

.fb-hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.fb-hero__title {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  margin-bottom: var(--fb-space-lg);
  letter-spacing: -0.02em;
}

.fb-hero__text {
  font-size: 1rem;
  color: var(--fb-text-light);
  line-height: 1.7;
  margin-bottom: var(--fb-space-xl);
  max-width: 440px;
}

.fb-hero__cta { display: flex; gap: var(--fb-space-md); flex-wrap: wrap; }

/* ═══════════════════════════════════════════
   PRODUCT CARDS
   ═══════════════════════════════════════════ */

.fb-product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--fb-space-lg);
}

.fb-product-card {
  background: var(--fb-white);
  border: 1px solid var(--fb-border-light);
  border-radius: var(--fb-radius-lg);
  overflow: hidden;
  transition: all 0.3s var(--fb-ease);
}

.fb-product-card:hover {
  border-color: var(--fb-border);
  box-shadow: var(--fb-shadow-lg);
  transform: translateY(-3px);
}

.fb-product-card__img {
  aspect-ratio: 1;
  background: var(--fb-cream);
  position: relative;
  overflow: hidden;
}

.fb-product-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--fb-ease);
}

.fb-product-card:hover .fb-product-card__img img {
  transform: scale(1.05);
}

.fb-product-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  border-radius: var(--fb-radius-sm);
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.fb-product-badge--best { background: var(--fb-deep-brown); color: var(--fb-cream); }
.fb-product-badge--new { background: var(--fb-golden); color: white; }
.fb-product-badge--sale { background: var(--fb-error); color: white; }

.fb-product-card__actions {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  opacity: 0;
  transform: translateX(8px);
  transition: all var(--fb-duration) var(--fb-ease);
}

.fb-product-card:hover .fb-product-card__actions {
  opacity: 1;
  transform: translateX(0);
}

.fb-product-card__action-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--fb-shadow-sm);
  transition: all 0.2s;
}

.fb-product-card__action-btn:hover {
  background: var(--fb-deep-brown);
  color: white;
}

.fb-product-card__info { padding: var(--fb-space-md); }

.fb-product-card__cat {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fb-golden);
  font-weight: 500;
  margin-bottom: 6px;
}

.fb-product-card__name {
  font-family: var(--fb-font-display);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--fb-deep-brown);
  margin-bottom: var(--fb-space-sm);
  line-height: 1.3;
}

.fb-product-card__rating {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 10px;
  font-size: 0.75rem;
  color: var(--fb-text-light);
}

.fb-product-card__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.fb-product-card__price {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--fb-deep-brown);
}

.fb-add-to-cart-sm {
  padding: 7px 14px;
  background: var(--fb-deep-brown);
  color: white;
  border: none;
  border-radius: var(--fb-radius-sm);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
  font-family: var(--fb-font-body);
  transition: background var(--fb-duration);
}

.fb-add-to-cart-sm:hover { background: var(--fb-warm-brown); }

/* ═══════════════════════════════════════════
   TRUST BAR
   ═══════════════════════════════════════════ */

.fb-trust-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--fb-space-lg);
  padding: var(--fb-space-2xl) 0;
}

.fb-trust-item { text-align: center; padding: var(--fb-space-lg) var(--fb-space-md); }
.fb-trust-item__icon { color: var(--fb-golden); margin-bottom: var(--fb-space-md); }
.fb-trust-item__label {
  font-family: var(--fb-font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--fb-deep-brown);
  margin-bottom: var(--fb-space-xs);
}
.fb-trust-item__desc { font-size: 0.75rem; color: var(--fb-text-light); }

/* ═══════════════════════════════════════════
   CATEGORY CARDS
   ═══════════════════════════════════════════ */

.fb-cat-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--fb-space-md);
}

.fb-cat-card {
  background: var(--fb-white);
  border: 1px solid var(--fb-border-light);
  border-radius: var(--fb-radius-lg);
  padding: var(--fb-space-xl) var(--fb-space-lg);
  text-align: center;
  transition: all 0.3s var(--fb-ease);
}

.fb-cat-card:hover {
  border-color: var(--fb-golden);
  transform: translateY(-4px);
  box-shadow: var(--fb-shadow-lg);
}

/* ═══════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════ */

.fb-footer {
  background: var(--fb-cream);
  padding: 64px 0 32px;
  border-top: 1px solid var(--fb-border);
}

.fb-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--fb-space-2xl);
}

.fb-footer__col h4 {
  font-family: var(--fb-font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--fb-deep-brown);
  margin-bottom: var(--fb-space-md);
}

.fb-footer__col a {
  display: block;
  font-size: 0.8125rem;
  color: var(--fb-text-light);
  margin-bottom: 10px;
}

.fb-footer__bottom {
  margin-top: var(--fb-space-xl);
  padding-top: var(--fb-space-lg);
  border-top: 1px solid var(--fb-border);
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--fb-text-light);
}

/* ═══════════════════════════════════════════
   EMAIL CAPTURE
   ═══════════════════════════════════════════ */

.fb-email-section {
  background: var(--fb-deep-brown);
  padding: 64px 0;
  text-align: center;
  color: var(--fb-cream);
}

.fb-email-section h2 {
  font-family: var(--fb-font-display);
  font-size: clamp(1.75rem, 3.5vw, 2.375rem);
  color: var(--fb-cream);
  margin-bottom: var(--fb-space-md);
}

.fb-email-form {
  display: flex;
  gap: var(--fb-space-sm);
  max-width: 480px;
  margin: 0 auto;
}

.fb-email-form input {
  flex: 1;
  padding: 14px 18px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--fb-radius-md);
  background: rgba(255,255,255,0.08);
  font-size: 0.875rem;
  color: white;
  font-family: var(--fb-font-body);
}

/* ═══════════════════════════════════════════
   WOOCOMMERCE OVERRIDES
   ═══════════════════════════════════════════ */

/* Cart page */
.woocommerce table.shop_table {
  border: 1px solid var(--fb-border-light);
  border-radius: var(--fb-radius-lg);
  overflow: hidden;
}

.woocommerce table.shop_table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--fb-text-light);
  background: var(--fb-bg-subtle);
  padding: var(--fb-space-md) var(--fb-space-lg);
}

.woocommerce table.shop_table td {
  padding: var(--fb-space-md) var(--fb-space-lg);
  border-top: 1px solid var(--fb-border-light);
  vertical-align: middle;
}

.woocommerce .quantity .qty {
  border: 1.5px solid var(--fb-border);
  border-radius: var(--fb-radius-md);
  padding: var(--fb-space-sm) var(--fb-space-md);
  font-family: var(--fb-font-body);
  width: 64px;
  text-align: center;
}

/* Checkout */
.woocommerce-checkout .woocommerce-input-wrapper input,
.woocommerce-checkout .woocommerce-input-wrapper textarea,
.woocommerce-checkout select {
  border: 1.5px solid var(--fb-border);
  border-radius: var(--fb-radius-md);
  padding: 12px var(--fb-space-md);
  font-family: var(--fb-font-body);
  font-size: 0.875rem;
  width: 100%;
  transition: border-color var(--fb-duration);
}

.woocommerce-checkout .woocommerce-input-wrapper input:focus,
.woocommerce-checkout select:focus {
  border-color: var(--fb-golden);
  outline: none;
  box-shadow: 0 0 0 3px rgba(201,122,0,0.1);
}

.woocommerce #place_order {
  background: var(--fb-deep-brown) !important;
  color: var(--fb-cream) !important;
  border: none !important;
  border-radius: var(--fb-radius-md) !important;
  padding: 16px 32px !important;
  font-family: var(--fb-font-body) !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  letter-spacing: 0.04em !important;
  transition: all var(--fb-duration) !important;
}

.woocommerce #place_order:hover {
  background: var(--fb-warm-brown) !important;
}

/* Single product page */
.woocommerce div.product div.images {
  border-radius: var(--fb-radius-xl);
  overflow: hidden;
}

.woocommerce div.product .product_title {
  font-family: var(--fb-font-display);
  font-size: 2rem;
  color: var(--fb-deep-brown);
}

.woocommerce div.product p.price {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--fb-deep-brown);
}

.woocommerce div.product .woocommerce-tabs ul.tabs li a {
  font-family: var(--fb-font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--fb-text-light);
  letter-spacing: 0.02em;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li.active a {
  color: var(--fb-deep-brown);
}

.single_add_to_cart_button {
  background: var(--fb-deep-brown) !important;
  color: var(--fb-cream) !important;
  border-radius: var(--fb-radius-md) !important;
  padding: 14px 32px !important;
  font-family: var(--fb-font-body) !important;
  font-weight: 500 !important;
  letter-spacing: 0.04em !important;
}

.single_add_to_cart_button:hover {
  background: var(--fb-warm-brown) !important;
}

/* My account */
.woocommerce-MyAccount-navigation ul {
  list-style: none;
  padding: 0;
}

.woocommerce-MyAccount-navigation ul li a {
  display: block;
  padding: 12px var(--fb-space-md);
  border-radius: var(--fb-radius-md);
  font-size: 0.875rem;
  transition: background var(--fb-duration);
}

.woocommerce-MyAccount-navigation ul li.is-active a,
.woocommerce-MyAccount-navigation ul li a:hover {
  background: var(--fb-cream);
  color: var(--fb-deep-brown);
}

/* Notices */
.woocommerce-message,
.woocommerce-info {
  border-top-color: var(--fb-golden) !important;
  background: var(--fb-bg-subtle) !important;
  border-radius: var(--fb-radius-md) !important;
}

.woocommerce-error {
  border-top-color: var(--fb-error) !important;
  border-radius: var(--fb-radius-md) !important;
}

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */

@media (max-width: 1024px) {
  .fb-hero__inner { grid-template-columns: 1fr; text-align: center; }
  .fb-hero__text { margin: 0 auto var(--fb-space-xl); }
  .fb-hero__cta { justify-content: center; }
  .fb-cat-grid { grid-template-columns: repeat(3, 1fr); }
  .fb-product-grid { grid-template-columns: repeat(3, 1fr); }
  .fb-footer__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .fb-nav { display: none; }
  .fb-mobile-toggle { display: flex; }
  .fb-cat-grid { grid-template-columns: repeat(2, 1fr); }
  .fb-product-grid { grid-template-columns: repeat(2, 1fr); }
  .fb-trust-bar { grid-template-columns: repeat(2, 1fr); }
  .fb-footer__grid { grid-template-columns: 1fr; }
  .fb-email-form { flex-direction: column; }
}

@media (max-width: 480px) {
  .fb-product-grid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════ */

@keyframes fb-fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fb-fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fb-slideRight { from { transform: translateX(100%); } to { transform: translateX(0); } }

.fb-fade-up { animation: fb-fadeUp 0.6s var(--fb-ease) both; }
