/*
 * Thomas Products Enterprise (v7.0)
 * Main layout + product grid.
 */

:root{
  --tp-border:#d0d5dd;
  --tp-border-soft:#e4e7ec;
  --tp-text:#101828;
  --tp-muted:#667085;
  --tp-bg:#ffffff;
  --tp-panel:#f2f4f7;
  --tp-red:#d91f2a;
}

#tp-app, #tp-app *{ box-sizing:border-box; }

.thomas-page{
  max-width: 100%;
  margin: 0 auto;
  padding: 14px 12px 50px;
  color: var(--tp-text);
}

.thomas-topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding: 8px 0 18px;
}

.thomas-search{
  display:flex;
  align-items:center;
  width:100%;
  max-width: 560px;
  border:1px solid var(--tp-border-soft);
  background: var(--tp-bg);
  border-radius: 2px;
  overflow:hidden;
  height: 44px;
}

.thomas-search input{
  flex:1;
  border:0;
  outline:none;
  padding: 0 14px;
  font-size: 14px;
  background: transparent;
}

.thomas-search button{
  width: 48px;
  height: 44px;
  border:0;
  background: var(--tp-bg);
  border-left: 1px solid var(--tp-border-soft);
  cursor:pointer;
  font-size: 16px;
}

.thomas-view-icons{ display:flex; gap:10px; }
.thomas-icon-btn{
  width: 40px;
  height: 40px;
  border: 1px solid var(--tp-border-soft);
  border-radius: 2px;
  background: var(--tp-bg);
  cursor:pointer;
  font-size: 16px;
  line-height: 1;
}
.thomas-icon-btn.is-active{ border-color: var(--tp-border); }

.thomas-body{
  display:grid;
  grid-template-columns: 280px 1fr;
  gap: 34px;
  align-items:start;
}

/* Main results */
.thomas-results-head{ margin: 0 0 16px; }
.thomas-results-title{
  font-size: 22px;
  font-weight: 600;
  color: var(--tp-text);
}

.thomas-grid{ display:grid; gap: 18px; }
.thomas-grid.cols-4{ grid-template-columns: repeat(4, 1fr); }
.thomas-grid.cols-3{ grid-template-columns: repeat(3, 1fr); }
.thomas-grid.cols-2{ grid-template-columns: repeat(2, 1fr); }

.thomas-card{
  background: var(--tp-bg);
  border: 1px solid var(--tp-border-soft);
  border-radius: 2px;
  padding: 14px 14px 16px;
  text-align:center;
  transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
  min-height: 260px;
}
.thomas-card:hover{
  box-shadow: 0 12px 28px rgba(16, 24, 40, .10);
  transform: translateY(-2px);
  border-color: var(--tp-border);
}
.thomas-card-link{ text-decoration:none; color:inherit; display:block; }
.thomas-img{
  height: 155px;
  display:flex;
  align-items:center;
  justify-content:center;
  margin-bottom: 10px;
}
.thomas-img img{ max-height: 155px; width:auto; object-fit:contain; }
.thomas-name{
  font-size: 14px;
  font-weight: 700;
  margin: 10px 0 10px;
  color: var(--tp-text);
}
.thomas-bullets{
  list-style:none;
  margin: 0;
  padding: 0 10px;
  font-size: 12px;
  color: #475467;
  line-height: 1.45;
}
.thomas-bullets li{ position:relative; padding-left: 14px; margin: 6px 0; text-align: left; font-size: 16px;}
.thomas-bullets li:before{ content:"•"; position:absolute; left:0; top:0; color:#101828; opacity:.6; }

.thomas-empty{
  padding: 40px;
  border: 1px dashed var(--tp-border);
  border-radius: 2px;
  color: var(--tp-muted);
  text-align:center;
}

/* Pagination */
.thomas-pagination{ display:flex; justify-content:center; gap:6px; margin-top: 26px; }
.thomas-pagination .page-numbers{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width: 45px;
  height: 45px;
  border: 1px solid var(--tp-border-soft);
  border-radius: 2px;
  text-decoration:none;
  color: var(--tp-text);
  background: var(--tp-bg);
  font-size: 18px;
}
.thomas-pagination .page-numbers.current{
  background: #111827;
  color:#fff;
  border-color:#111827;
}
.thomas-pagination .page-numbers.dots{ border:0; width:auto; }

/* Loading */
#tp-app.is-loading{ position:relative; }
#tp-app.is-loading:after{
  content:"";
  position:absolute;
  inset:0;
  background: rgba(255,255,255,.72);
  backdrop-filter: blur(1px);
  z-index: 20;
}

@media (max-width: 1120px){
  .thomas-body{ grid-template-columns: 260px 1fr; gap: 26px; }
  .thomas-grid.cols-4{ grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 860px){
  .thomas-body{ grid-template-columns: 1fr; }
  .thomas-grid.cols-4,.thomas-grid.cols-3{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px){
  .thomas-grid.cols-4,.thomas-grid.cols-3,.thomas-grid.cols-2{ grid-template-columns: 1fr; }
  .thomas-results-title{ font-size: 18px; }
}


/* AJAX loading state */
#tp-results-wrap.is-loading{opacity:.5;pointer-events:none;position:relative;}
#tp-results-wrap.is-loading:after{content:'';position:absolute;top:12px;right:12px;width:18px;height:18px;border:2px solid rgba(0,0,0,.2);border-top-color:rgba(0,0,0,.6);border-radius:50%;animation:tpSpin .8s linear infinite;}
@keyframes tpSpin{to{transform:rotate(360deg);}}


/* v11 series-first cards */
.tp-series-count{font-size:13px;opacity:.85;margin-top:6px;}
.tp-series-ph{width:100%;height:100%;min-height:140px;background:#f1f1f1;}


.tp-page {
    display: inline-block;
    margin: 0 6px;
    padding: 8px 14px;
    border: 1px solid #ddd;
    text-decoration: none;
    border-radius: 4px;
}
.tp-page.active {
    background: #1e2a38;
    color: #fff;
    border-color: #1e2a38;
}


.tp-page{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:38px;
  height:38px;
  padding:0 12px;
  border:1px solid var(--tp-border-soft);
  background: var(--tp-bg);
  color: var(--tp-text);
  text-decoration:none !important;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  transition: transform .08s ease, border-color .12s ease, background-color .12s ease, color .12s ease;
}
.tp-page:hover{
  border-color: var(--tp-border);
  transform: translateY(-1px);
}
.tp-page:focus{
  outline: none;
  box-shadow: 0 0 0 3px rgba(217,31,42,.18);
  border-color: var(--tp-red);
}
.tp-page.active{
  border-color: var(--tp-red);
  background: rgba(217,31,42,.08);
  color: var(--tp-red);
}



.tp-page{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid #e4e7ec;
  background: #ffffff;
  color: #111827;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none !important;
  transition: all .15s ease;
}

.tp-page:hover{
  background: #f2f4f7;
}

.tp-page.active{
  background: #111827;
  color: #ffffff;
  border-color: #111827;
}



/* v11.2.0 Shared Pagination Component (Series + Product) */

.tp-pagination,
.woocommerce-pagination{
  margin: 40px 0 0;
  display: flex;
  justify-content: center;
  gap: 6px;
}

.tp-page,
.woocommerce-pagination .page-numbers{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid #e4e7ec;
  background: #ffffff;
  color: #111827;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none !important;
  transition: all .15s ease;
}

.tp-page:hover,
.woocommerce-pagination .page-numbers:hover{
  background: #f2f4f7;
}

.tp-page.active,
.woocommerce-pagination .page-numbers.current{
  background: #111827;
  color: #ffffff;
  border-color: #111827;
}


/* v11.2.1 Centered Pagination + Arrows */
.tp-pagination{
  margin: 50px 0 20px;
  display: flex;
  justify-content: center !important;
  align-items: center;
  gap: 8px;
}

.tp-page{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid #e4e7ec;
  background: #ffffff;
  color: #111827;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none !important;
  transition: all .15s ease;
}

.tp-page:hover{
  background: #f2f4f7;
}

.tp-page.active{
  background: #111827;
  color: #ffffff;
  border-color: #111827;
}

.tp-page.tp-arrow{
  font-size: 18px;
  font-weight: 600;
}

/* v11.3.0 Advanced Pagination */
.tp-page.disabled{
  opacity:.4;
  pointer-events:none;
}
.tp-ellipsis{
  display:inline-flex;
  align-items:center;
  padding:0 8px;
  color:#98a2b3;
}

/* v11.3.1 Unified Pagination Styling */
.tp-pagination,
.woocommerce nav.woocommerce-pagination {
    display: flex !important;
    justify-content: center !important;
    align-items: center;
    gap: 10px;
    margin: 40px 0 20px 0;
}

.tp-pagination a,
.tp-pagination span,
.woocommerce nav.woocommerce-pagination a,
.woocommerce nav.woocommerce-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid #d0d5dd;
    background: #ffffff;
    color: #1f2937;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.25s ease;
}

.tp-pagination a:hover,
.woocommerce nav.woocommerce-pagination a:hover {
    background: #111827;
    color: #ffffff;
    border-color: #111827;
}

.tp-pagination .active,
.woocommerce nav.woocommerce-pagination .current {
    background: #111827;
    color: #ffffff;
    border-color: #111827;
}

.tp-pagination .disabled {
    opacity: 0.4;
    pointer-events: none;
}

/* v11.3.2 Hard-center pagination (series + product) */
.tp-pagination{
  width: 100% !important;
  grid-column: 1 / -1;
  justify-content: center !important;
  text-align: center;
}
.tp-pagination::before,
.tp-pagination::after{ content:none !important; }

/* Woo product pagination hard-center */
.woocommerce nav.woocommerce-pagination{
  width: 100% !important;
  justify-content: center !important;
}

/* v11.5.0 Back Link */
.tp-back-link { margin: 15px 0 25px; }
.tp-back-series { text-decoration: none; font-weight: 500; color: #111827; }
.tp-back-series:hover { text-decoration: underline; }

/* Fade Transition */
#tp-results-wrap { transition: opacity .25s ease, transform .25s ease; }
#tp-results-wrap.is-loading { opacity: .4; transform: translateY(6px); }

/* Skeleton Loader */
.tp-skeleton {
    background: linear-gradient(90deg,#f0f2f5 25%,#e4e7ec 37%,#f0f2f5 63%);
    background-size: 400% 100%;
    animation: tpShimmer 1.4s ease infinite;
    border-radius: 4px;
}
@keyframes tpShimmer {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

/* ===================================
   Premium Hero Panel Search
=================================== */

.tp-hero-panel {
    background: linear-gradient(180deg,#f8f9fb 0%,#ffffff 100%);
    padding: 70px 20px 60px;
    border-bottom: 1px solid #eef1f4;
}

.tp-hero-panel__inner {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
    background: #ffffff;
    padding: 50px 40px;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.04);
}

.tp-hero-title {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 30px;
    color: #1a1a1a;
}

.tp-hero-search {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 860px;
    margin: 0 auto;
}

.tp-hero-search input[type="text"] {
    width: 100%;
    height: 72px;
    padding: 0 150px 0 60px;
    font-size: 18px;
    font-weight: 500;
    border-radius: 14px;
    border: 1px solid #e4e7eb;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    color: #1a1a1a;
}

.tp-hero-search input:focus {
    border-color: #ff6600;
    box-shadow: 0 0 0 4px rgba(255,102,0,0.12);
    outline: none;
}

.tp-hero-search__icon {
    position: absolute;
    left: 22px;
    pointer-events: none;
}

.tp-hero-search__btn {
    position: absolute;
    right: 8px;
    height: 56px;
    padding: 0 32px;
    border-radius: 12px;
    background: #ff6600;
    color: #ffffff;
    font-weight: 600;
    font-size: 15px;
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
}

.tp-hero-search__btn:hover {
    background: #e65c00;
    transform: translateY(-1px);
}


/* =========================================
   FORCE PREMIUM HERO SEARCH OVERRIDE
========================================= */

.tp-hero-panel {
    background: linear-gradient(180deg,#f7f9fb 0%,#ffffff 100%) !important;
    padding: 70px 20px 60px !important;
    border-bottom: 1px solid #eef1f4 !important;
}

.tp-hero-panel__inner {
    max-width: 1000px !important;
    margin: 0 auto !important;
    text-align: center !important;
}

/* TITLE */
.tp-hero-title {
    font-size: 32px !important;
    font-weight: 600 !important;
    margin-bottom: 35px !important;
    color: #111 !important;
}

/* SEARCH WRAPPER */
.tp-hero-panel .tp-hero-search {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 880px !important;
    margin: 0 auto !important;
}

/* INPUT */
.tp-hero-panel .tp-hero-search input[type="text"] {
    width: 100% !important;
    height: 72px !important;
    padding: 0 160px 0 65px !important;
    font-size: 18px !important;
    font-weight: 500 !important;
    border-radius: 14px !important;
    border: 1px solid #e4e7eb !important;
    background: #ffffff !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05) !important;
    transition: all 0.3s ease !important;
    color: #1a1a1a !important;
}

/* PLACEHOLDER */
.tp-hero-panel .tp-hero-search input::placeholder {
    color: #9aa3ad !important;
    font-weight: 400 !important;
}

/* FOCUS */
.tp-hero-panel .tp-hero-search input:focus {
    border-color: #ff6600 !important;
    box-shadow: 0 0 0 4px rgba(255,102,0,0.15) !important;
    outline: none !important;
}

/* ICON */
.tp-hero-panel .tp-hero-search__icon {
    position: absolute !important;
    left: 22px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    pointer-events: none !important;
}

/* BUTTON */
.tp-hero-panel .tp-hero-search__btn {
    position: absolute !important;
    right: 8px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    height: 56px !important;
    padding: 0 32px !important;
    border-radius: 12px !important;
    background: #ff6600 !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    font-size: 15px !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.25s ease !important;
}

/* HOVER */
.tp-hero-panel .tp-hero-search__btn:hover {
    background: #e65c00 !important;
    transform: translateY(-50%) translateY(-2px) !important;
}

/* =====================================================
   v11.6.16 – PREMIUM UI PACK
===================================================== */

/* PREMIUM FILTER SIDEBAR */
.tp-sidebar {
    background: #ffffff;
    padding: 28px 22px;
    border-radius: 14px;
    box-shadow: 0 12px 35px rgba(0,0,0,0.05);
    border: 1px solid #eef1f4;
}

.tp-acc__btn {
    font-weight: 600;
    font-size: 15px;
    padding: 16px 0;
    border-bottom: 1px solid #f1f3f5;
    transition: all 0.25s ease;
}

.tp-acc__btn:hover {
    color: #ff6600;
}

.tp-acc__panel {
    padding: 14px 0 20px;
}

/* PREMIUM INDUSTRIAL SLIDER */
.tp-slider__bar {
    height: 6px;
    background: #e9edf1;
    border-radius: 6px;
}

.tp-slider__bar-range {
    background: linear-gradient(90deg,#ff6600,#ff8533);
    border-radius: 6px;
}

.tp-range::-webkit-slider-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffffff;
    border: 3px solid #ff6600;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.tp-range::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffffff;
    border: 3px solid #ff6600;
}

/* PREMIUM FILTER CHIPS */
.tp-chip {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    background: #f4f6f8;
    border-radius: 24px;
    font-size: 13px;
    font-weight: 500;
    margin: 6px 6px 0 0;
    border: 1px solid #e3e8ee;
    transition: all 0.25s ease;
}

.tp-chip:hover {
    background: #fff2e6;
    border-color: #ff6600;
}

.tp-chip__x {
    margin-left: 8px;
    font-size: 14px;
    color: #ff6600;
}

/* PREMIUM SERIES CARDS */
.thomas-series-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #eef1f4;
    padding: 24px;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(0,0,0,0.04);
}

.thomas-series-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 45px rgba(0,0,0,0.08);
    border-color: #ff6600;
}

.thomas-series-card__title {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1a1a1a;
}

.thomas-series-card__meta {
    font-size: 13px;
    color: #7a8691;
}

/* =====================================================
   v11.6.17 – REFINED INDUSTRIAL UI PACK
===================================================== */

/* REFINED SIDEBAR */
.tp-sidebar {
    background: #ffffff;
    padding: 28px 24px;
    border-radius: 18px;
    border: 1px solid #eef2f6;
    box-shadow: 0 20px 45px rgba(0,0,0,0.04);
}

/* Selected Header */
.tp-selected__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.tp-selected__header span {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
}

/* Clear All refined */
.tp-clear {
    font-size: 13px;
    font-weight: 500;
    color: #ff6600;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

.tp-clear:hover {
    text-decoration: underline;
}

/* REFINED CHIPS */
.tp-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    background: #f7f9fb;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid #e6ebf1;
    transition: all 0.2s ease;
}

.tp-chip:hover {
    border-color: #ff6600;
    background: #fff6ee;
}

.tp-chip__x {
    margin-left: 8px;
    font-size: 14px;
    color: #ff6600;
}

/* ACCORDION HEADERS */
.tp-acc__btn {
    font-size: 15px;
    font-weight: 600;
    padding: 18px 0;
    border-bottom: 1px solid #f2f4f7;
    background: transparent;
}

.tp-acc__btn:hover {
    color: #ff6600;
}

/* CLEAN ACCORDION PANELS */
.tp-acc__panel {
    padding: 12px 0 18px;
    background: transparent;
}


/* ===============================
   LOAD MORE BUTTON
================================ */

.thomas-load-more{display:flex;justify-content:center;margin-top:24px;}
.tp-load-more{min-width:220px;height:52px;padding:0 22px;border-radius:14px;border:1px solid #e6ebf1;background:#ffffff;font-weight:600;font-size:14px;cursor:pointer;box-shadow:0 10px 30px rgba(0,0,0,0.05);transition:transform .2s ease, box-shadow .2s ease, border-color .2s ease;}
.tp-load-more:hover{transform:translateY(-2px);border-color:rgba(255,102,0,0.4);box-shadow:0 18px 45px rgba(0,0,0,0.08);}
.tp-load-more.is-loading{opacity:.6;cursor:wait;}
.tp-load-more:disabled{opacity:.6;cursor:not-allowed;}


/* ===============================
   Load More Button + Spinner
================================ */
.tp-load-more{
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 40px;
    background: #0f172a;
    color: #fff;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
}
.tp-load-more:hover{ background:#ff6600; }
.tp-load-more.is-loading{ opacity: .9; }

.tp-load-more__spinner{
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.35);
    border-top: 2px solid #fff;
    border-radius: 50%;
    display: none;
    animation: tpSpin 0.8s linear infinite;
}
.tp-load-more.is-loading .tp-load-more__spinner{ display:inline-block; }
.tp-load-more.is-loading .tp-load-more__label{ opacity: .7; }

@keyframes tpSpin{ to{ transform: rotate(360deg);} }


/* =====================================================
   v11.6.22 – Compact Hero Search
===================================================== */

.tp-hero-panel {
    padding: 30px 20px 25px !important;
}

.tp-hero-panel__inner {
    padding: 24px 26px !important;
}

.tp-hero-search input[type="text"] {
    height: 52px !important;
    font-size: 15px !important;
    padding: 0 120px 0 48px !important;
    border-radius: 10px !important;
}

.tp-hero-search__icon {
    left: 16px !important;
}

.tp-hero-search__btn {
    height: 42px !important;
    padding: 0 20px !important;
    font-size: 14px !important;
    border-radius: 9px !important;
}


/* =====================================================
   v11.6.23 – Hero Search Smaller + Hide Title
===================================================== */

/* Safety: hide hero title if theme/plugin outputs it elsewhere */
.tp-hero-title { display:none !important; }

.tp-hero-panel { padding: 26px 20px 22px !important; }
.tp-hero-panel__inner { padding: 22px 24px !important; }

.tp-hero-search input[type="text"]{
    height: 50px !important;
    font-size: 15px !important;
    padding: 0 112px 0 46px !important;
    border-radius: 10px !important;
}

.tp-hero-search__btn{
    height: 40px !important;
    padding: 0 18px !important;
    font-size: 14px !important;
    border-radius: 9px !important;
}

.tp-hero-search__icon{ left: 15px !important; }
