/*
Theme Name: Finreef Guppies
Theme URI: https://example.com
Author: Your Name
Author URI: https://example.com
Description: A small-batch aquarium livestock storefront theme, built for a guppy breeder selling online. Fully responsive, with Customizer controls for colors and fonts, a blog for guppy care guides, built-in local SEO (meta description, Open Graph, schema), and full WooCommerce support including cart, checkout, and variable products (pair / trio / breeding pair). Works standalone; if WooCommerce is active, real products and categories load automatically.
Version: 1.4
Requires at least: 6.0
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: finreef-guppies
Tags: e-commerce, blog, custom-colors, custom-menu, one-column, two-columns
*/

:root {
  --deep:    #0c2b2c;
  --deep2:   #123c3d;
  --topaz:   #d1a13e;
  --seafoam: #6fb8ab;
  --paper:   #f6f1e4;
  --ink:     #14201f;
  --mute:    #6d7a76;
}

* { box-sizing: border-box; }

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--paper);
  color: var(--ink);
  margin: 0;
}
h1, h2, h3 { font-family: 'Fraunces', serif; margin: 0; }
a { color: inherit; }
img { max-width: 100%; display: block; }

.fg-wrap { max-width: 1100px; margin: 0 auto; border: 1px solid #ddd6c2; background: var(--paper); }

/* ---------- Header ---------- */
.fg-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem 2rem;
  border-bottom: 1px solid #ddd6c2;
}
.fg-logo { font-size: 1.2rem; font-weight: 600; letter-spacing: 0.02em; text-decoration: none; }
.fg-logo span { color: var(--topaz); }
.fg-links { display: flex; gap: 1.6rem; font-size: 0.85rem; list-style: none; padding: 0; margin: 0; }
.fg-links a { text-decoration: none; }
.fg-cart { font-size: 0.85rem; font-weight: 600; text-decoration: none; }

/* ---------- Hero ---------- */
.fg-hero {
  position: relative;
  background: radial-gradient(120% 100% at 20% 0%, var(--deep2) 0%, var(--deep) 60%);
  color: var(--paper);
  padding: 4.2rem 2rem 3.4rem;
  overflow: hidden;
}
.fg-caustics { position: absolute; inset: 0; opacity: 0.35; mix-blend-mode: screen; }
.fg-hero-inner { position: relative; max-width: 560px; }
.fg-eyebrow {
  font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--seafoam); margin-bottom: 0.7rem; display: block;
}
.fg-hero h1 { font-size: 2.6rem; line-height: 1.08; font-weight: 600; margin-bottom: 0.9rem; }
.fg-hero p { font-size: 1rem; color: #d7e6e0; max-width: 440px; line-height: 1.5; margin-bottom: 1.6rem; }
.fg-hero-cta {
  display: inline-block; background: var(--topaz); color: var(--deep);
  font-weight: 600; font-size: 0.9rem; padding: 0.75rem 1.5rem;
  text-decoration: none; border-radius: 2px;
}

/* ---------- Trust strip ---------- */
.fg-strip { display: flex; flex-wrap: wrap; background: var(--deep2); border-top: 1px solid rgba(255,255,255,0.08); }
.fg-strip-item { flex: 1 1 200px; padding: 1rem 2rem; border-right: 1px solid rgba(255,255,255,0.08); display: flex; align-items: center; gap: 0.7rem; }
.fg-strip-item:last-child { border-right: none; }
.fg-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--seafoam); flex-shrink: 0; }
.fg-strip-text { font-size: 0.8rem; color: #d7e6e0; }
.fg-strip-text b { color: var(--paper); display: block; font-size: 0.85rem; }

/* ---------- Sections ---------- */
.fg-section { padding: 3rem 2rem; }
.fg-section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 1.6rem; flex-wrap: wrap; gap: 0.5rem; }
.fg-section-head h2 { font-size: 1.5rem; }
.fg-section-head a { font-size: 0.82rem; color: var(--deep2); text-decoration: underline; }

/* ---------- Category tiles ---------- */
.fg-cats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.fg-cat { background: var(--deep2); color: var(--paper); border-radius: 4px; padding: 1.4rem 1rem; text-align: center; font-size: 0.85rem; font-weight: 500; }
.fg-cat span { display: block; font-size: 0.68rem; color: var(--seafoam); margin-top: 0.3rem; text-transform: uppercase; letter-spacing: 0.06em; }

/* ---------- Product cards ---------- */
.fg-products { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.fg-product { border: 1px solid #ddd6c2; background: #fff; }
.fg-product-media { background: #eef3f1; height: 170px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.fg-product-media img, .fg-product-media svg { width: 100%; height: 100%; object-fit: cover; }
.fg-product-body { padding: 1rem 1.1rem 1.2rem; }
.fg-product-name { font-size: 0.95rem; font-weight: 600; margin-bottom: 0.2rem; }
.fg-product-meta { font-size: 0.78rem; color: var(--mute); margin-bottom: 0.6rem; }
.fg-product-row { display: flex; align-items: center; justify-content: space-between; }
.fg-product-price { font-weight: 700; }
.fg-product-btn { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; background: var(--deep); color: var(--paper); border: none; padding: 0.5rem 0.8rem; border-radius: 2px; cursor: pointer; text-decoration: none; display: inline-block; }

/* ---------- Generic page/single content ---------- */
.fg-content { padding: 3rem 2rem; max-width: 760px; margin: 0 auto; line-height: 1.65; }
.fg-content h1 { font-size: 2rem; margin-bottom: 1rem; }

/* ---------- Footer ---------- */
.fg-footer { border-top: 1px solid #ddd6c2; padding: 1.6rem 2rem; font-size: 0.78rem; color: var(--mute); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; }

/* =====================================================
   Blog (guppy care guides)
   ===================================================== */
.fg-blog { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.fg-blog-card { border: 1px solid #ddd6c2; background: #fff; display: flex; flex-direction: column; }
.fg-blog-media { display: block; background: #eef3f1; height: 160px; overflow: hidden; }
.fg-blog-media img, .fg-blog-media svg { width: 100%; height: 100%; object-fit: cover; }
.fg-blog-body { padding: 1rem 1.1rem 1.2rem; }
.fg-blog-date { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--mute); }
.fg-blog-body h2, .fg-blog-body h3 { font-size: 1.05rem; line-height: 1.3; margin: 0.35rem 0 0.5rem; }
.fg-blog-body h2 a, .fg-blog-body h3 a { text-decoration: none; }
.fg-blog-body p { font-size: 0.85rem; color: var(--mute); line-height: 1.5; margin: 0 0 0.7rem; }
.fg-blog-more { font-size: 0.8rem; font-weight: 600; color: var(--deep2); text-decoration: none; }
.fg-blog-title { font-size: 1.8rem; }
.fg-pagination { margin-top: 2rem; font-size: 0.9rem; }
.fg-pagination .nav-links { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.fg-pagination .page-numbers { padding: 0.4rem 0.8rem; border: 1px solid #ddd6c2; text-decoration: none; background: #fff; }
.fg-pagination .page-numbers.current { background: var(--deep); color: var(--paper); border-color: var(--deep); }

/* Single post */
.fg-single-head { margin-bottom: 1.5rem; }
.fg-eyebrow-dark { font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--topaz); display: block; margin-bottom: 0.5rem; font-weight: 600; }
.fg-single .fg-blog-date { display: block; margin-top: 0.5rem; }
.fg-single-thumb { margin-bottom: 1.6rem; }
.fg-single-thumb img { width: 100%; height: auto; border: 1px solid #ddd6c2; }
.fg-single-content h2 { font-size: 1.4rem; margin: 1.8rem 0 0.7rem; }
.fg-single-content h3 { font-size: 1.15rem; margin: 1.4rem 0 0.6rem; }
.fg-single-content img { border: 1px solid #ddd6c2; height: auto; }
.fg-related { margin-top: 3rem; border-top: 1px solid #ddd6c2; padding-top: 2rem; }
.fg-related h2 { font-size: 1.3rem; margin-bottom: 1.2rem; }

/* Homepage SEO block */
.fg-seo-block { padding: 2.6rem 2rem 3rem; border-top: 1px solid #ddd6c2; max-width: 820px; }
.fg-seo-block h2 { font-size: 1.35rem; margin-bottom: 0.8rem; }
.fg-seo-block p { font-size: 0.92rem; line-height: 1.7; color: var(--ink); margin: 0 0 0.8rem; }

/* =====================================================
   WooCommerce: shop, product, cart, checkout
   ===================================================== */
.fg-woo { max-width: 1000px; }
.fg-woo .woocommerce-breadcrumb { font-size: 0.78rem; color: var(--mute); margin-bottom: 1.4rem; }
.fg-woo .woocommerce-breadcrumb a { color: var(--deep2); }

/* Buttons */
.woocommerce .button,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce button.button.alt,
.woocommerce a.button.alt {
  background: var(--deep); color: var(--paper);
  border-radius: 2px; font-weight: 600; font-size: 0.85rem;
  border: none; text-transform: uppercase; letter-spacing: 0.04em;
}
.woocommerce .button:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce button.button.alt:hover,
.woocommerce a.button.alt:hover { background: var(--deep2); color: var(--paper); }
.woocommerce button.single_add_to_cart_button,
.woocommerce .wc-proceed-to-checkout a.checkout-button { background: var(--topaz); color: var(--deep); }
.woocommerce button.single_add_to_cart_button:hover,
.woocommerce .wc-proceed-to-checkout a.checkout-button:hover { background: #c3922f; color: var(--deep); }

/* Prices */
.woocommerce div.product p.price,
.woocommerce div.product span.price,
.woocommerce ul.products li.product .price { color: var(--deep); font-weight: 700; }

/* Product grid */
.woocommerce ul.products li.product { background: #fff; border: 1px solid #ddd6c2; padding-bottom: 1rem; text-align: center; }
.woocommerce ul.products li.product .woocommerce-loop-product__title { font-family: inherit; font-size: 0.95rem; font-weight: 600; }

/* Variations (Pair / Trio / Breeding pair selector) */
.woocommerce div.product form.cart .variations { margin-bottom: 1rem; }
.woocommerce div.product form.cart .variations label { font-weight: 600; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; }
.woocommerce div.product form.cart .variations select {
  border: 1px solid #ccc4ab; background: #fff; padding: 0.55rem 0.7rem;
  border-radius: 2px; font-size: 0.9rem; min-width: 200px;
}
.woocommerce div.product form.cart .woocommerce-variation-price { margin-bottom: 0.8rem; }

/* Cart page */
.woocommerce table.shop_table { border: 1px solid #ddd6c2; border-radius: 0; border-collapse: collapse; background: #fff; }
.woocommerce table.shop_table th { background: var(--deep); color: var(--paper); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; }
.woocommerce table.shop_table td { border-top: 1px solid #ece5d1; font-size: 0.9rem; }
.woocommerce table.shop_table td.product-name a { text-decoration: none; font-weight: 600; }
.woocommerce a.remove { color: #a33 !important; }
.woocommerce a.remove:hover { background: #a33; color: #fff !important; }
.woocommerce .quantity .qty { border: 1px solid #ccc4ab; padding: 0.4rem; border-radius: 2px; }
.woocommerce .cart-collaterals .cart_totals h2 { font-size: 1.2rem; }
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button { font-size: 1rem; }

/* Checkout */
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select {
  border: 1px solid #ccc4ab; background: #fff; padding: 0.55rem 0.7rem; border-radius: 2px;
}
.woocommerce form .form-row label { font-size: 0.82rem; font-weight: 500; }
#payment { background: #fff !important; border: 1px solid #ddd6c2; }

/* Notices */
.woocommerce-message, .woocommerce-info { border-top-color: var(--seafoam); background: #fff; }
.woocommerce-message::before, .woocommerce-info::before { color: var(--seafoam); }
.woocommerce-error { background: #fff; }

/* =====================================================
   Responsive navigation (hamburger)
   ===================================================== */
.fg-nav { position: relative; }
.fg-nav-toggle { display: none; }
.fg-nav-right { display: flex; align-items: center; gap: 1rem; }
.fg-burger { display: none; flex-direction: column; gap: 4px; cursor: pointer; padding: 6px 2px; }
.fg-burger span { width: 20px; height: 2px; background: var(--ink); display: block; transition: transform 0.2s ease, opacity 0.2s ease; }
.fg-links a:hover { color: var(--deep2); text-decoration: underline; }
.fg-menu .current-menu-item > a { color: var(--deep2); font-weight: 600; }

/* =====================================================
   Responsive
   ===================================================== */
@media (max-width: 920px) {
  .fg-cats { grid-template-columns: repeat(2, 1fr); }
  .fg-products, .fg-blog { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .fg-nav { padding: 0.9rem 1.2rem; }
  .fg-burger { display: flex; }
  .fg-menu {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--paper); border-bottom: 1px solid #ddd6c2;
    z-index: 50;
  }
  .fg-nav-toggle:checked ~ .fg-menu { display: block; }
  .fg-nav-toggle:checked ~ .fg-nav-right .fg-burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .fg-nav-toggle:checked ~ .fg-nav-right .fg-burger span:nth-child(2) { opacity: 0; }
  .fg-nav-toggle:checked ~ .fg-nav-right .fg-burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  .fg-menu .fg-links { flex-direction: column; gap: 0; padding: 0.4rem 0; }
  .fg-menu .fg-links li { list-style: none; }
  .fg-menu .fg-links a { display: block; padding: 0.8rem 1.4rem; font-size: 0.95rem; border-bottom: 1px solid #e8e1cd; }

  .fg-hero { padding: 3rem 1.4rem 2.6rem; }
  .fg-hero h1 { font-size: 1.9rem; }
  .fg-strip-item { flex: 1 1 100%; border-right: none; border-bottom: 1px solid rgba(255,255,255,0.08); padding: 0.9rem 1.4rem; }
  .fg-strip-item:last-child { border-bottom: none; }
  .fg-section { padding: 2.2rem 1.4rem; }
  .fg-content { padding: 2.2rem 1.4rem; }
  .fg-seo-block { padding: 2.2rem 1.4rem 2.6rem; }
  .fg-cats { grid-template-columns: repeat(2, 1fr); }
  .fg-products, .fg-blog { grid-template-columns: 1fr; }
  .woocommerce table.shop_table td, .woocommerce table.shop_table th { padding: 0.6rem 0.5rem; }
}

@media (max-width: 420px) {
  .fg-cats { grid-template-columns: 1fr; }
  .fg-hero h1 { font-size: 1.65rem; }
  .fg-logo { font-size: 1.05rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* Custom logo image in header */
.fg-logo-img { line-height: 0; }
.fg-logo-img img { height: 36px; width: auto; display: block; }
@media (max-width: 420px) { .fg-logo-img img { height: 30px; } }

/* =====================================================
   Hero slider
   ===================================================== */
.fg-slider { position: relative; height: 440px; padding: 0; overflow: hidden; }
.fg-slide {
  position: absolute; inset: 0; opacity: 0; transition: opacity 0.9s ease;
  background-size: cover; background-position: center right;
  display: flex; align-items: center; padding: 3rem 2rem; pointer-events: none;
}
.fg-slide.is-active { opacity: 1; pointer-events: auto; }
.fg-slide-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--deep) 95%, transparent) 0%,
    color-mix(in srgb, var(--deep) 60%, transparent) 55%,
    color-mix(in srgb, var(--deep) 18%, transparent) 100%);
}
.fg-slide .fg-hero-inner { position: relative; z-index: 1; }
.fg-slide-title { font-size: 2.6rem; line-height: 1.08; font-weight: 600; margin-bottom: 0.9rem; color: var(--paper); }
.fg-dots { position: absolute; left: 2rem; bottom: 1.2rem; display: flex; gap: 0.55rem; z-index: 2; }
.fg-dot-btn {
  width: 10px; height: 10px; border-radius: 50%; border: none; padding: 0; cursor: pointer;
  background: rgba(246, 241, 228, 0.35); transition: background 0.25s ease;
}
.fg-dot-btn.is-on { background: var(--topaz); }
.fg-dot-btn:focus-visible { outline: 2px solid var(--topaz); outline-offset: 2px; }

@media (max-width: 720px) {
  .fg-slider { height: 400px; }
  .fg-slide { padding: 2.2rem 1.4rem; background-position: 70% center; }
  .fg-slide-title { font-size: 1.9rem; }
  .fg-slide-overlay {
    background: linear-gradient(180deg,
      color-mix(in srgb, var(--deep) 90%, transparent) 0%,
      color-mix(in srgb, var(--deep) 65%, transparent) 100%);
  }
  .fg-dots { left: 1.4rem; }
}

/* =====================================================
   Hero slider
   ===================================================== */
.fg-slider { padding: 0; min-height: 440px; display: block; }
.fg-slider .fg-slide {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0; visibility: hidden;
  transition: opacity 0.7s ease, visibility 0.7s ease;
  display: flex; align-items: center;
  padding: 3.6rem 2rem 4rem;
}
.fg-slider .fg-slide.is-active { opacity: 1; visibility: visible; z-index: 1; }
.fg-slide-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(12,43,44,0.94) 0%, rgba(12,43,44,0.72) 45%, rgba(12,43,44,0.25) 100%);
}
.fg-slider .fg-hero-inner { position: relative; z-index: 2; }
.fg-slide-title { font-size: 2.3rem; line-height: 1.1; font-weight: 600; margin-bottom: 0.9rem; color: var(--paper); }

.fg-dots {
  position: absolute; left: 2rem; bottom: 1.4rem; z-index: 3;
  display: flex; gap: 0.55rem;
}
.fg-dot-btn {
  width: 10px; height: 10px; border-radius: 50%;
  border: 1px solid var(--paper); background: transparent;
  padding: 0; cursor: pointer; transition: background 0.2s ease;
}
.fg-dot-btn.is-on { background: var(--topaz); border-color: var(--topaz); }
.fg-dot-btn:hover { background: var(--seafoam); border-color: var(--seafoam); }

@media (max-width: 720px) {
  .fg-slider { min-height: 480px; }
  .fg-slider .fg-slide { padding: 2.6rem 1.4rem 3.4rem; background-position: 70% center; }
  .fg-slide-overlay { background: linear-gradient(180deg, rgba(12,43,44,0.9) 0%, rgba(12,43,44,0.6) 100%); }
  .fg-slide-title { font-size: 1.7rem; }
  .fg-dots { left: 1.4rem; }
}


.fg-footer { display: flex; flex-direction: column; gap: 6px; }
.fg-footer-info { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 4px; }
.fg-footer-info span { display: inline-block; }
.fg-footer-info a { color: inherit; text-decoration: underline; }


.fg-search { position: relative; display: flex; align-items: center; margin-right: 4px; }
.fg-search-toggle { background: none; border: none; cursor: pointer; color: inherit; padding: 6px; display: flex; align-items: center; }
.fg-search-box { display: none; position: absolute; right: 0; top: 100%; margin-top: 10px; background: var(--paper); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.18); padding: 10px; z-index: 50; width: 220px; }
.fg-search-box.is-open { display: block; }
.fg-search-box .search-form { display: flex; gap: 6px; }
.fg-search-box .search-field { flex: 1; padding: 8px 10px; border: 1px solid var(--mute); border-radius: 6px; font-size: 0.9rem; }
.fg-search-box .search-submit { background: var(--deep); color: #fff; border: none; border-radius: 6px; padding: 0 12px; cursor: pointer; }
@media (max-width: 720px) {
  .fg-search-box { right: -40px; }
}
