/*
Theme Name: DTF Textiles B2B
Theme URI: https://dtftextiles.com
Author: Shantou Dingtai Feng Industrial Co., Ltd.
Description: A conversion-focused B2B fabric sourcing theme for DTF Textiles.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.0
Text Domain: dtf-textiles
*/

html { scroll-behavior: smooth; }
body.admin-bar .site-header { top: 32px; }
.main-nav ul,
.mobile-menu ul,
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.main-nav ul { display: contents; }
.main-nav li { display: contents; }
.mobile-menu li { display: block; }
.current-menu-item > a,
.current_page_item > a { color: var(--primary, #d80b2a); }

.dtf-wp-content > :first-child { margin-top: 0; }
.dtf-wp-content > :last-child { margin-bottom: 0; }
.dtf-admin-note { padding: 1rem; border-left: 4px solid #d80b2a; background: #fff3f5; }

.dtf-form-shell {
  background: var(--paper, #fff);
  border: 1px solid var(--theme-line, rgba(43, 32, 34, .14));
  border-radius: 1rem;
  box-shadow: 0 22px 70px rgba(43, 32, 34, .08);
  padding: clamp(1.25rem, 3vw, 2.5rem);
}
.dtf-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.dtf-field { display: grid; gap: .45rem; }
.dtf-field-full { grid-column: 1 / -1; }
.dtf-field label { color: var(--ink, #2b2022); font-size: .9rem; font-weight: 700; }
.dtf-field input,
.dtf-field select,
.dtf-field textarea {
  width: 100%;
  border: 1px solid var(--theme-line, rgba(43, 32, 34, .2));
  border-radius: .55rem;
  background: #fff;
  color: var(--ink, #2b2022);
  font: inherit;
  padding: .8rem .9rem;
}
.dtf-field input:focus,
.dtf-field select:focus,
.dtf-field textarea:focus { border-color: var(--primary, #d80b2a); outline: 3px solid rgba(216, 11, 42, .12); }
.dtf-field small { color: var(--muted-foreground, #6c6264); }
.dtf-consent { align-items: flex-start; display: flex; gap: .65rem; font-size: .88rem; }
.dtf-consent input { margin-top: .22rem; }
.dtf-honeypot { position: absolute !important; left: -9999px !important; }
.dtf-form-status { border-radius: .6rem; margin-bottom: 1rem; padding: .85rem 1rem; }
.dtf-form-status-success { background: #ecf8ef; border: 1px solid #a9d8b2; color: #165d24; }
.dtf-form-status-error { background: #fff1f3; border: 1px solid #efb8c0; color: #8a1425; }
.dtf-file-note { font-size: .8rem; }

.dtf-archive-hero,
.dtf-search-hero {
  background: var(--theme-deep-gradient, linear-gradient(135deg, #2b2022, #5a1f2a));
  color: #fff;
  padding: clamp(4.5rem, 9vw, 8rem) clamp(1.25rem, 6vw, 6rem) clamp(3rem, 7vw, 6rem);
}
.dtf-archive-hero .kicker,
.dtf-search-hero .kicker { color: rgba(255,255,255,.75); }
.dtf-archive-hero h1,
.dtf-search-hero h1 { color: #fff; max-width: 780px; }
.dtf-archive-grid,
.dtf-search-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 auto;
  max-width: 1240px;
  padding: clamp(2.5rem, 6vw, 5rem) 1.25rem;
}
.dtf-content-card {
  background: #fff;
  border: 1px solid var(--theme-line, rgba(43, 32, 34, .14));
  border-radius: .9rem;
  color: inherit;
  display: flex;
  flex-direction: column;
  min-height: 260px;
  padding: 1.5rem;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease;
}
.dtf-content-card:hover { box-shadow: 0 18px 50px rgba(43,32,34,.12); transform: translateY(-3px); }
.dtf-content-card h2 { font-size: clamp(1.45rem, 2vw, 2rem); margin: .5rem 0 .75rem; }
.dtf-content-card p { color: var(--muted-foreground, #6c6264); }
.dtf-content-card .inline-link { margin-top: auto; }
.dtf-search-form { display: flex; gap: .65rem; margin-top: 1.5rem; max-width: 620px; }
.dtf-search-form input { flex: 1; min-width: 0; padding: .8rem 1rem; border-radius: .5rem; border: 1px solid rgba(255,255,255,.4); }
.dtf-pagination { grid-column: 1 / -1; }
.dtf-empty { grid-column: 1 / -1; padding: 3rem 0; }

.dtf-floating-inquiry {
  align-items: center;
  background: var(--primary, #d80b2a);
  border-radius: 999px;
  bottom: 1.25rem;
  box-shadow: 0 14px 40px rgba(43,32,34,.28);
  color: #fff;
  display: flex;
  font-size: .88rem;
  font-weight: 800;
  gap: .45rem;
  padding: .8rem 1rem;
  position: fixed;
  right: 1.25rem;
  text-decoration: none;
  z-index: 100;
}

@media (max-width: 900px) {
  body.admin-bar .site-header { top: 46px; }
  .dtf-archive-grid, .dtf-search-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .dtf-form-grid, .dtf-archive-grid, .dtf-search-grid { grid-template-columns: 1fr; }
  .dtf-search-form { align-items: stretch; flex-direction: column; }
  .dtf-floating-inquiry { bottom: .8rem; right: .8rem; }
}
