/*
Theme Name: Jadon Source
Theme URI: https://jadonsource.com
Author: Jadon Source
Description: Inquiry and sourcing theme — Alibaba-style product catalog, no cart/checkout. V1.1.3.
Version: 1.1.3
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: jadon-source
*/

/* ===== Reset & base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #1a1a1a;
  background: #f5f6f8;
}
img { max-width: 100%; height: auto; display: block; }
a { color: #0d7377; text-decoration: none; }
a:hover { color: #095456; text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.25; color: #111; margin-top: 0; }
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1rem; }
ul { margin: 0 0 1rem; padding-left: 1.25rem; }
.site-main { min-height: 50vh; }

/* ===== Layout ===== */
.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}
.section {
  padding: 2.5rem 0;
  background: #fff;
}
.section--alt { background: #f5f6f8; }
.section--tight { padding: 1.5rem 0; }
.section-title {
  text-align: center;
  margin-bottom: 0.5rem;
}
.section-sub {
  text-align: center;
  color: #555;
  max-width: 640px;
  margin: 0 auto 1.75rem;
}

/* ===== Header ===== */
.site-header {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0;
  flex-wrap: wrap;
}
.site-branding a {
  font-size: 1.25rem;
  font-weight: 700;
  color: #111;
  text-decoration: none;
  letter-spacing: -0.02em;
}
.site-branding a:hover { color: #0d7377; text-decoration: none; }
.site-branding .tagline {
  display: block;
  font-size: 0.75rem;
  font-weight: 400;
  color: #666;
  margin-top: 0.1rem;
}
.primary-nav > ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem 0.85rem;
}
.primary-nav a {
  color: #333;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  padding: 0.35rem 0.15rem;
  display: block;
}
.primary-nav a:hover { color: #0d7377; }

/* Products dropdown */
.primary-nav .menu-item-has-children {
  position: relative;
}
.primary-nav .menu-item-has-children > a::after {
  content: " ▾";
  font-size: 0.7em;
  opacity: 0.7;
}
.primary-nav .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  list-style: none;
  margin: 0;
  padding: 0.4rem 0;
  z-index: 120;
}
.primary-nav .menu-item-has-children:hover > .sub-menu,
.primary-nav .menu-item-has-children:focus-within > .sub-menu {
  display: block;
}
.primary-nav .sub-menu a {
  padding: 0.5rem 1rem;
  white-space: nowrap;
  font-size: 0.875rem;
}
.primary-nav .sub-menu a:hover {
  background: #e6f4f4;
  color: #095456;
  text-decoration: none;
}
.header-cta {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 0.65rem 1.25rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  line-height: 1.3;
}
.btn:hover { text-decoration: none; }
.btn--primary {
  background: #0d7377;
  color: #fff;
  border-color: #0d7377;
}
.btn--primary:hover { background: #095456; color: #fff; border-color: #095456; }
.btn--outline {
  background: transparent;
  color: #0d7377;
  border-color: #0d7377;
}
.btn--outline:hover { background: #e6f4f4; color: #095456; }
.btn--ghost {
  background: #fff;
  color: #333;
  border-color: #d1d5db;
}
.btn--ghost:hover { background: #f3f4f6; color: #111; }
.btn--lg { padding: 0.85rem 1.5rem; font-size: 1rem; }
.btn--sm { padding: 0.4rem 0.85rem; font-size: 0.85rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.25rem; }

/* ===== Hero (compact V1.1) ===== */
.hero {
  background: linear-gradient(160deg, #0d7377 0%, #14919b 45%, #1a1a2e 100%);
  color: #fff;
  padding: 3.5rem 0 3rem;
}
.hero--compact {
  padding: 2rem 0 1.75rem;
}
.hero h1 {
  color: #fff;
  font-size: clamp(1.5rem, 3.5vw, 2.1rem);
  margin-bottom: 0.5rem;
  max-width: 720px;
}
.hero .hero-sub {
  font-size: 1rem;
  opacity: 0.95;
  max-width: 560px;
  margin-bottom: 0;
}
.hero-search-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  background: rgba(255,255,255,0.12);
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.2);
  max-width: 640px;
}
.hero .btn--primary {
  background: #fff;
  color: #0d7377;
  border-color: #fff;
}
.hero .btn--primary:hover { background: #e6f4f4; color: #095456; }
.hero .btn--outline {
  color: #fff;
  border-color: rgba(255,255,255,0.7);
}
.hero .btn--outline:hover { background: rgba(255,255,255,0.15); color: #fff; }
.trust-strip {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.25);
  font-size: 0.9rem;
  opacity: 0.9;
}

/* ===== Cards & grids (legacy) ===== */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
}
.grid-5 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}
.card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 1.5rem;
  transition: box-shadow 0.15s, border-color 0.15s;
}
.card:hover {
  border-color: #0d7377;
  box-shadow: 0 4px 16px rgba(13,115,119,0.12);
}
.card a.card-link {
  color: inherit;
  text-decoration: none;
  display: block;
}
.card a.card-link:hover { text-decoration: none; }
.card h3 { margin-bottom: 0.5rem; font-size: 1.05rem; }
.card p { color: #555; font-size: 0.9rem; margin-bottom: 0; }
.card .card-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: #e6f4f4;
  color: #0d7377;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}
.cat-card .card-icon { background: #f0f9f9; }
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #0d7377;
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

/* ===== V1.1 Product catalog ===== */
.catalog-section {
  margin-bottom: 2.25rem;
}
.catalog-section:last-child { margin-bottom: 0; }
.catalog-section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #0d7377;
}
.catalog-section__title {
  font-size: 1.15rem;
  margin: 0;
  color: #111;
}
.catalog-section__link {
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.product-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.15s, border-color 0.15s;
}
.product-card:hover {
  border-color: #0d7377;
  box-shadow: 0 4px 18px rgba(13,115,119,0.14);
}
.product-card__img {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #f0f2f5;
  overflow: hidden;
}
.product-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.badge-placeholder {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.62);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 0.3rem 0.45rem;
  line-height: 1.3;
  text-align: center;
}
.product-card__body {
  padding: 0.75rem 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.product-card__title {
  font-size: 0.95rem;
  margin: 0 0 0.35rem;
  line-height: 1.3;
}
.product-card__meta {
  font-size: 0.8rem;
  color: #666;
  margin: 0 0 0.75rem;
  flex: 1;
  line-height: 1.4;
}
.product-card__cta {
  align-self: flex-start;
  margin-top: auto;
}

/* ===== Category page rail ===== */
.page-with-rail {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 1.75rem;
  align-items: start;
}
.cat-rail {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1rem;
  position: sticky;
  top: 72px;
}
.cat-rail__title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #666;
  margin: 0 0 0.65rem;
}
.cat-rail__list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}
.cat-rail__list li { margin: 0; }
.cat-rail__list a {
  display: block;
  padding: 0.45rem 0.5rem;
  border-radius: 6px;
  font-size: 0.875rem;
  color: #333;
  text-decoration: none;
}
.cat-rail__list a:hover,
.cat-rail__list a.is-active {
  background: #e6f4f4;
  color: #0d7377;
  font-weight: 600;
  text-decoration: none;
}
.cat-rail__cta { margin: 0; }
.page-main-col .product-grid {
  margin: 1.25rem 0;
}

/* ===== Intent / shipping blocks ===== */
.intent-card { text-align: left; }
.shipping-box {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 10px;
  padding: 1.5rem;
  max-width: 720px;
  margin: 0 auto;
}
.shipping-box h2 { font-size: 1.25rem; }
.cta-final {
  text-align: center;
  background: #0d7377;
  color: #fff;
  padding: 2.5rem 0;
}
.cta-final h2 { color: #fff; }
.cta-final p { opacity: 0.95; max-width: 520px; margin: 0 auto 1.25rem; }
.cta-final .btn--primary {
  background: #fff;
  color: #0d7377;
  border-color: #fff;
}
.cta-final .btn--outline {
  color: #fff;
  border-color: rgba(255,255,255,0.7);
}

/* ===== Page content ===== */
.page-hero {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  padding: 1.75rem 0 1.25rem;
}
.page-hero h1 { margin-bottom: 0.5rem; }
.page-hero .lede { color: #555; max-width: 640px; margin: 0; }
.content-block {
  background: #fff;
  padding: 1.75rem 0 2.5rem;
}
.item-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}
.item-list li {
  padding: 0.85rem 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  background: #fafafa;
  font-weight: 500;
}
.note {
  font-size: 0.9rem;
  color: #555;
  background: #f5f6f8;
  border-left: 3px solid #0d7377;
  padding: 0.75rem 1rem;
  margin: 1.25rem 0;
}
.note--warn {
  background: #fffbeb;
  border-left-color: #d97706;
}

/* ===== Forms ===== */
.rfq-form, .contact-form {
  max-width: 640px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 1.5rem;
}
.form-row { margin-bottom: 1rem; }
.form-row label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
  color: #333;
}
.form-row .optional { font-weight: 400; color: #888; }
.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
}
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border-color: #0d7377;
  box-shadow: 0 0 0 3px rgba(13,115,119,0.15);
}
.form-row textarea { min-height: 100px; resize: vertical; }
.hp-field {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  overflow: hidden;
}
.form-success {
  display: none;
  background: #ecfdf5;
  border: 1px solid #6ee7b7;
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.form-success.is-visible { display: block; }
.email-links {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid #e5e7eb;
  font-size: 0.95rem;
}
.email-links a { font-weight: 600; }

/* ===== FAQ ===== */
.faq-list { max-width: 720px; margin: 0 auto; }
.faq-item {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  margin-bottom: 0.75rem;
  background: #fff;
  overflow: hidden;
}
.faq-item summary {
  padding: 1rem 1.25rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before {
  content: "+ ";
  color: #0d7377;
  font-weight: 700;
}
.faq-item[open] summary::before { content: "− "; }
.faq-item .faq-body {
  padding: 0 1.25rem 1.25rem;
  color: #444;
}

/* ===== Footer ===== */
.site-footer {
  background: #1a1a2e;
  color: #c8c8d0;
  padding: 2.5rem 0 1.5rem;
  font-size: 0.9rem;
}
.site-footer a { color: #9ee0e2; }
.site-footer a:hover { color: #fff; }
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.footer-grid h4 {
  color: #fff;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.75rem;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 0.4rem; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 1.25rem;
  font-size: 0.85rem;
  color: #999;
}
.footer-shipping {
  margin-bottom: 0.75rem;
  color: #bbb;
}

/* ===== Floating contact bar ===== */
.float-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid #e5e7eb;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
  z-index: 90;
  padding: 0.65rem 1rem;
}
.float-bar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.float-bar .btn { padding: 0.5rem 1rem; font-size: 0.875rem; }
body.has-float-bar { padding-bottom: 70px; }

/* ===== Utility ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 768px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .page-with-rail {
    grid-template-columns: 1fr;
  }
  .cat-rail {
    position: static;
  }
}
@media (max-width: 640px) {
  .hero, .hero--compact { padding: 1.75rem 0 1.5rem; }
  .section { padding: 1.75rem 0; }
  .header-inner { flex-direction: column; align-items: flex-start; }
  .primary-nav > ul { gap: 0.35rem 0.75rem; }
  .primary-nav .sub-menu {
    position: static;
    box-shadow: none;
    border: none;
    display: none;
    padding-left: 0.75rem;
  }
  .primary-nav .menu-item-has-children:hover > .sub-menu,
  .primary-nav .menu-item-has-children:focus-within > .sub-menu {
    display: block;
  }
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem;
  }
  .badge-placeholder { font-size: 0.58rem; }
}
