/* ALAIDEE FACTORY DIRECTORY V4 */
/* Preview only */

body.factory-directory-page .search-zone {
    display: none !important;
}

/* HERO */
body.factory-directory-page .fd-hero {
    background:
        radial-gradient(ellipse at 85% 30%, #28618b 0%, transparent 50%),
        linear-gradient(110deg, #102a48 0%, #174e7a 100%);
    padding: 38px 0 55px !important;
    color: #fff;
}

body.factory-directory-page .fd-hero .fd-container {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    column-gap: 45px;
    align-items: center;
}

body.factory-directory-page .fd-eyebrow {
    grid-column: 1;
    color: #a9d7fa;
    font-size: 11px;
    letter-spacing: 2px;
}

body.factory-directory-page .fd-hero h1 {
    grid-column: 1;
    font-size: clamp(28px, 2.7vw, 40px) !important;
    line-height: 1.2 !important;
    margin: 10px 0 !important;
}

body.factory-directory-page .fd-hero p {
    grid-column: 1;
    max-width: 680px;
    margin: 8px 0 !important;
    font-size: 14px !important;
    line-height: 1.7 !important;
}

/* WHITE STATISTICS PANEL */
body.factory-directory-page .fd-stats {
    grid-column: 2;
    grid-row: 1 / span 3;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0 !important;
    margin: 0 !important;
    padding: 24px 14px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 12px 35px #061c3640;
}

body.factory-directory-page .fd-stats > div {
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 7px;
    padding: 5px;
}

body.factory-directory-page .fd-stats > div + div {
    border-left: 1px solid #e3eaf2;
}

body.factory-directory-page .fd-stats strong {
    color: #175b95;
    font-size: 25px !important;
    font-weight: 800;
}

body.factory-directory-page .fd-stats span {
    color: #60748a !important;
    font-size: 11px !important;
    line-height: 1.5;
}

/* SEARCH BAR */
body.factory-directory-page .fd-search-section {
    margin-top: -25px !important;
    position: relative;
    z-index: 2;
}

body.factory-directory-page .fd-search {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1.2fr) auto auto;
    align-items: end;
    gap: 12px;
    padding: 18px 22px;
    background: #fff;
    border: 1px solid #e3ebf4;
    border-radius: 14px;
    box-shadow: 0 10px 28px #123a641a;
}

body.factory-directory-page .fd-field label {
    font-size: 12px;
    font-weight: 700;
    color: #344b65;
}

body.factory-directory-page .fd-field input,
body.factory-directory-page .fd-field select {
    height: 43px;
    border-radius: 8px;
    background: #fbfcfe;
}

body.factory-directory-page .fd-search button {
    height: 43px;
    border-radius: 8px;
    background: #155f9e;
}

/* RESULTS HEADER */
body.factory-directory-page .fd-results {
    padding-top: 26px;
}

body.factory-directory-page .fd-results-head {
    margin-bottom: 18px;
}

body.factory-directory-page .fd-results h2 {
    font-size: 22px;
}

/* RESPONSIVE */
@media (max-width: 1050px) {
    body.factory-directory-page .fd-hero .fd-container {
        grid-template-columns: minmax(0, 1fr) 320px;
        gap: 22px;
    }

    body.factory-directory-page .fd-stats {
        padding: 18px 8px;
    }

    body.factory-directory-page .fd-stats strong {
        font-size: 20px !important;
    }

    body.factory-directory-page .fd-search {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    body.factory-directory-page .fd-hero {
        padding: 28px 0 52px !important;
    }

    body.factory-directory-page .fd-hero .fd-container {
        display: block;
    }

    body.factory-directory-page .fd-hero h1 {
        font-size: 28px !important;
    }

    body.factory-directory-page .fd-stats {
        margin-top: 20px !important;
    }

    body.factory-directory-page .fd-search {
        grid-template-columns: 1fr;
        padding: 16px;
    }

    body.factory-directory-page .fd-search button {
        width: 100%;
    }
}

/* V4 GRID FIX */
@media(min-width:1201px){body.factory-directory-page .fd-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}

/* FACTORY V4.1 CARD DESIGN */
body.factory-directory-page .fd-grid {
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 15px;
}

body.factory-directory-page .fd-card {
    border: 1px solid #e4ebf4;
    border-top: 6px solid #f3c843;
    border-radius: 12px;
    background: #fff;
    padding: 15px 17px 12px;
    box-shadow: 0 5px 18px rgba(22,52,90,.06);
    min-width: 0;
}

body.factory-directory-page .fd-card-top {
    display: flex;
    align-items: center;
    gap: 9px;
}

body.factory-directory-page .fd-card-icon {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    display: grid;
    place-items: center;
    background: #fff0ba;
    border-radius: 10px;
    font-size: 25px;
}

body.factory-directory-page .fd-card-category {
    font-size: 11px;
    padding: 7px 9px;
    border-radius: 8px;
    background: #fff8e8;
    color: #926100;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.factory-directory-page .fd-card-type {
    margin-left: auto;
    font-size: 11px;
    background: #eef4fc;
    color: #24518b;
    padding: 7px;
    border-radius: 7px;
}

body.factory-directory-page .fd-card h3 {
    font-size: 17px;
    line-height: 1.45;
    margin: 12px 0 6px;
    min-height: 49px;
    color: #09265a;
}

body.factory-directory-page .fd-location {
    font-size: 12px;
    margin-bottom: 5px;
}

body.factory-directory-page .fd-activity {
    font-size: 12px;
    line-height: 1.55;
    min-height: 54px;
    margin: 7px 0 10px;
}

body.factory-directory-page .fd-metrics {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
}

body.factory-directory-page .fd-metric {
    display: flex;
    align-items: center;
    gap: 5px;
    text-align: left;
    padding: 7px 4px;
    min-width: 0;
}

body.factory-directory-page .fd-metric-icon {
    font-size: 16px;
    color: #d69a00;
}

body.factory-directory-page .fd-metric small {
    display: block;
    font-size: 10px;
}

body.factory-directory-page .fd-metric strong {
    display: block;
    font-size: 11px;
    color: #102b5e;
    overflow-wrap: anywhere;
}

body.factory-directory-page .fd-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 8px;
}

body.factory-directory-page .fd-fid {
    font-size: 10px;
    overflow-wrap: anywhere;
}

body.factory-directory-page .fd-view-label {
    background: #092d70;
    color: #fff;
    border-radius: 7px;
    padding: 9px 11px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

@media(max-width:1200px) {
    body.factory-directory-page .fd-grid {
        grid-template-columns: repeat(3,minmax(0,1fr));
    }
}

@media(max-width:900px) {
    body.factory-directory-page .fd-grid {
        grid-template-columns: repeat(2,minmax(0,1fr));
    }
}

@media(max-width:600px) {
    body.factory-directory-page .fd-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== FACTORY DIRECTORY V4.2 ===== */

/* Desktop full-width layout */
@media (min-width:1201px) {
  body.factory-directory-page .fd .fd-container {
    width:calc(100% - 56px);
    max-width:1500px;
  }
}

/* Compact hero */
body.factory-directory-page .fd-hero {
  padding:24px 0 43px !important;
  background:
    linear-gradient(100deg,#10285e 0%,#234c98 55%,#153575 100%);
}

body.factory-directory-page .fd-hero .fd-container {
  grid-template-columns:minmax(0,1fr) minmax(350px,520px);
  gap:28px;
}

body.factory-directory-page .fd-eyebrow {
  font-size:11px;
  letter-spacing:1px;
  margin-bottom:5px;
}

body.factory-directory-page .fd-hero h1 {
  font-size:clamp(26px,2.4vw,37px) !important;
  line-height:1.2 !important;
  margin:5px 0 8px !important;
}

body.factory-directory-page .fd-hero p {
  max-width:850px;
  font-size:13px !important;
  margin:0 !important;
  line-height:1.5 !important;
}

@media(min-width:1201px) {
  body.factory-directory-page .fd-hero h1 br {
    display:none;
  }
  body.factory-directory-page .fd-hero h1 span {
    margin-left:.2em;
  }
}

/* Statistics panel */
body.factory-directory-page .fd-stats {
  padding:16px 10px;
  border-radius:14px;
  background:#f9fbff;
}

body.factory-directory-page .fd-stats strong {
  font-size:24px !important;
  color:#092d73;
}

body.factory-directory-page .fd-stats span {
  font-size:12px !important;
}

/* Compact search */
body.factory-directory-page .fd-search-section {
  margin-top:-19px !important;
}

body.factory-directory-page .fd-search {
  padding:12px 16px;
  gap:10px;
  border-radius:12px;
}

body.factory-directory-page .fd-field label {
  font-size:11px;
  margin-bottom:4px;
}

body.factory-directory-page .fd-field input,
body.factory-directory-page .fd-field select,
body.factory-directory-page .fd-search button {
  height:40px;
}

/* Results */
body.factory-directory-page .fd-results {
  padding-top:21px;
}

body.factory-directory-page .fd-results-head {
  margin-bottom:14px;
}

body.factory-directory-page .fd-results-head .fd-kicker,
body.factory-directory-page .fd-results-head h2 {
  display:none;
}

body.factory-directory-page .fd-results-head p {
  font-size:18px;
  font-weight:800;
  color:#244c94;
}

/* Four-column cards */
@media(min-width:1201px) {
  body.factory-directory-page .fd-grid {
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:14px;
  }
}

body.factory-directory-page .fd-card {
  padding:13px 15px 11px;
  border-top:6px solid #f3c945;
  border-radius:11px;
  box-shadow:0 5px 18px rgba(24,52,90,.065);
}

body.factory-directory-page .fd-card-icon {
  width:45px;
  height:45px;
  flex-basis:45px;
  background:#fff0b9;
  font-size:23px;
}

body.factory-directory-page .fd-card h3 {
  font-size:17px;
  min-height:0;
  margin:10px 0 5px;
  line-height:1.4;
}

body.factory-directory-page .fd-location {
  font-size:12px;
  margin:3px 0;
}

body.factory-directory-page .fd-activity {
  font-size:12px;
  line-height:1.5;
  min-height:43px;
  margin:5px 0 8px;
}

body.factory-directory-page .fd-metric {
  padding:5px 3px;
}

body.factory-directory-page .fd-metric-icon {
  font-size:17px;
  color:#dfa400;
}

body.factory-directory-page .fd-metric small {
  font-size:10px;
}

body.factory-directory-page .fd-metric strong {
  font-size:11px;
}

body.factory-directory-page .fd-card-footer {
  margin-top:6px;
}

body.factory-directory-page .fd-view-label {
  padding:8px 10px;
  background:#092d73;
  border-radius:7px;
}

/* Responsive */
@media(max-width:1050px) {
  body.factory-directory-page .fd-hero .fd-container {
    grid-template-columns:minmax(0,1fr) 320px;
  }
}

@media(max-width:700px) {
  body.factory-directory-page .fd-hero .fd-container {
    display:block;
  }
  body.factory-directory-page .fd-hero {
    padding:24px 0 43px !important;
  }
  body.factory-directory-page .fd-hero h1 br {
    display:block;
  }
  body.factory-directory-page .fd-grid {
    grid-template-columns:1fr;
  }
}

/* =====================================
   ALAIDEE FACTORY FONT V4.3
   LINE Seed Sans TH
   ===================================== */

@import url('https://cdn.jsdelivr.net/gh/line/seed-sans-th@main/webfont/LINESeedSansTH.css');

/* Main factory page */
body.factory-directory-page .fd {
    font-family: 'LINE Seed Sans TH',
                 'Noto Sans Thai',
                 sans-serif !important;
    font-weight: 400;
    letter-spacing: 0;
}

/* Hero title */
body.factory-directory-page .fd-hero h1 {
    font-family: inherit !important;
    font-weight: 800 !important;
    letter-spacing: -0.5px;
}

/* Factory names */
body.factory-directory-page .fd-card h3 {
    font-family: inherit !important;
    font-weight: 700 !important;
    font-size: 17px;
    line-height: 1.5;
}

/* Factory description */
body.factory-directory-page .fd-location,
body.factory-directory-page .fd-activity {
    font-weight: 400;
    line-height: 1.6;
}

/* Industry labels */
body.factory-directory-page .fd-card-category {
    font-weight: 600;
}

/* Statistics */
body.factory-directory-page .fd-stats strong,
body.factory-directory-page .fd-metric strong {
    font-weight: 700;
}

/* Search fields */
body.factory-directory-page .fd-search input,
body.factory-directory-page .fd-search select,
body.factory-directory-page .fd-search button {
    font-family: inherit !important;
}

/* Buttons */
body.factory-directory-page .fd-view-label {
    font-family: inherit !important;
    font-weight: 700;
}


/* FACTORY RESPONSIVE GRID + PAGINATION V5 */

@media (min-width:1201px) {
  body.factory-directory-page .fd-grid {
    grid-template-columns:repeat(4,minmax(0,1fr)) !important;
  }
}

@media (min-width:701px) and (max-width:1200px) {
  body.factory-directory-page .fd-grid {
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  }
}

@media (max-width:700px) {
  body.factory-directory-page .fd-grid {
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:9px !important;
  }

  body.factory-directory-page .fd-card {
    padding:10px 9px !important;
    min-width:0;
  }

  body.factory-directory-page .fd-card h3 {
    font-size:13px !important;
    overflow-wrap:anywhere;
  }

  body.factory-directory-page .fd-card-icon {
    width:32px;
    height:32px;
    flex-basis:32px;
    font-size:17px;
  }

  body.factory-directory-page .fd-card .fd-metrics {
    display:none;
  }
}

body.factory-directory-page .fd-pagination-v5 {
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:16px;
  padding:20px;
  margin-top:24px;
  border:1px solid #e3ebf5;
  border-radius:15px;
  background:#f8fbff;
}

body.factory-directory-page .fd-page-summary {
  color:#63758e;
  font-size:13px;
}

body.factory-directory-page .fd-page-controls {
  display:flex;
  align-items:center;
  gap:10px;
}

body.factory-directory-page .fd-page-arrow {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 16px;
  min-height:42px;
  border:1px solid #dbe5f2;
  border-radius:9px;
  background:white;
  color:#173f7d;
  text-decoration:none;
  font-weight:700;
  font-size:13px;
}

body.factory-directory-page .fd-page-next {
  background:#174c98;
  border-color:#174c98;
  color:white;
}

body.factory-directory-page .fd-page-current {
  color:#183c73;
  font-weight:700;
  font-size:13px;
  white-space:nowrap;
}

body.factory-directory-page .fd-page-arrow.is-disabled {
  opacity:.4;
  cursor:default;
}

@media(max-width:700px) {
  body.factory-directory-page .fd-pagination-v5 {
    padding:14px 10px;
    flex-direction:column;
    gap:12px;
  }

  body.factory-directory-page .fd-page-controls {
    width:100%;
    gap:6px;
    justify-content:space-between;
  }

  body.factory-directory-page .fd-page-arrow {
    padding:9px 10px;
    font-size:12px;
  }

  body.factory-directory-page .fd-page-current {
    font-size:11px;
  }
}


/* FACTORY VIEW COUNTER V1 */
body.factory-directory-page .fd-view-stats {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 9px 0 11px;
    font-size: 11px;
    line-height: 1.5;
    color: #718096;
}

body.factory-directory-page .fd-view-stats > span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

body.factory-directory-page .fd-view-stats strong {
    color: #334a79;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

body.factory-directory-page .fd-view-icon {
    color: #c09a48;
    font-size: 11px;
}

body.factory-directory-page .fd-view-separator {
    width: 1px;
    height: 11px;
    background: #d9e0ea;
}

@media(max-width:767px) {
    body.factory-directory-page .fd-view-stats {
        font-size: 10.5px;
        gap: 7px;
    }
}
