/* ==========================================================================
   Piramal Tools — Product Specification Tables (Additional CSS)
   Paste this WHOLE file into Appearance > Customize > Additional CSS
   (or your child theme's style.css). Add once — every product's spec
   tables (Jobber, QSD, Stub, Long Series, etc.) will reuse this.

   NOTE: tabs and the search box use !important throughout because your
   theme / WooCommerce ships its own default styles for <button> and
   <input type="text"> that otherwise override these (that's what caused
   the oversized navy tab blocks and pill-shaped search box).
   ========================================================================== */

:root {
  --pt-navy-dark: #0e1e3d;
  --pt-navy: #142c5c;
  --pt-navy-soft: #1c3a73;
  --pt-gold: #f5a623;
  --pt-gold-dark: #d98e0f;
  --pt-gold-light: #fdf1dc;
  --pt-ink: #1c2534;
  --pt-muted: #64708a;
  --pt-line: #dde3ee;
  --pt-row-alt: #f4f7fc;
  --pt-bg: #ffffff;
  --pt-radius: 10px;
  --pt-shadow: 0 8px 24px rgba(14, 30, 61, 0.08);
}

.spec-section {
  font-family: "Segoe UI", "Inter", Roboto, Arial, sans-serif;
  color: var(--pt-ink);
  max-width: 1250px;
  margin: 0px;
  padding: 0px;
}

/* ---------- Section heading ---------- */

.spec-section__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 18.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pt-gold-dark);
  margin-bottom: 8px;
}

.spec-section__eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--pt-gold);
  display: inline-block;
}

.spec-section__title {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 700;
  color: var(--pt-navy-dark);
  margin: 0 0 6px;
}

.spec-section__subtitle {
  color: var(--pt-muted);
  font-size: 15px;
  margin: 0 0 24px;
  max-width: 640px;
  line-height: 1.55;
}


/* =========================================================
   PIRAMAL TOOLS — GOLD SEGMENTED TABS
   FIXED: TABS WRAP WITHIN AVAILABLE WIDTH
   ========================================================= */

.spec-tabs {
  display: flex !important;
  align-items: stretch !important;
  flex-wrap: wrap !important;

  gap: 5px !important;

  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;

  margin: 0 0 18px !important;
  padding: 5px !important;

  background: #F5A900 !important;
  border: 1px solid #F5A900 !important;
  border-radius: 12px !important;

  overflow: visible !important;

  box-shadow: 0 3px 8px rgba(14, 30, 61, 0.12) !important;
}

.spec-tabs::-webkit-scrollbar {
  display: none !important;
}

/* INDIVIDUAL TABS */
button.spec-tabs__btn {
  all: unset !important;

  box-sizing: border-box !important;
  position: relative !important;

  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  flex: 0 1 auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
  min-height: 38px !important;

  padding: 8px 13px !important;
  margin: 0 !important;

  cursor: pointer !important;

  background: transparent !important;
  border: none !important;
  border-radius: 9px !important;

  color: #142C5C !important;

  font-family: inherit !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;

  white-space: normal !important;
  overflow-wrap: break-word !important;
  text-align: center !important;

  transition:
    background-color 0.18s ease,
    color 0.18s ease !important;
}

/* HIDE EXISTING LINE BREAKS */
button.spec-tabs__btn br {
  display: none !important;
}

/* TAB COUNTS */
button.spec-tabs__btn .count {
  display: inline !important;
  margin-left: 4px !important;
  color: inherit !important;
  font-size: 10.5px !important;
  font-weight: 500 !important;
}

/* TAB SEPARATORS */
button.spec-tabs__btn + button.spec-tabs__btn {
  border-left: none !important;
}

/* HOVER */
button.spec-tabs__btn:hover {
  color: #ffffff !important;
  background: #142C5C !important;
  box-shadow: 0 2px 5px rgba(14, 30, 61, 0.16) !important;
}

/* ACTIVE */
button.spec-tabs__btn.is-active {
  color: #ffffff !important;
  background: #142C5C !important;
  box-shadow: 0 2px 5px rgba(14, 30, 61, 0.18) !important;
}

/* REMOVE OLD UNDERLINE */
button.spec-tabs__btn::after {
  display: none !important;
}

/* MOBILE */
@media (max-width: 720px) {
  .spec-tabs {
    display: flex !important;
    width: 100% !important;
    flex-wrap: wrap !important;
    gap: 4px !important;
    padding: 4px !important;
    margin-bottom: 15px !important;
    border-radius: 10px !important;
  }

  button.spec-tabs__btn {
    flex: 0 1 auto !important;
    min-height: 36px !important;
    padding: 8px 10px !important;
    font-size: 12px !important;
  }

  button.spec-tabs__btn .count {
    font-size: 10px !important;
  }
}


.spec-panel {
  display: none;
}

.spec-panel.is-active {
  display: block;
}

.spec-standard-note {
  font-size: 12.5px;
  color: var(--pt-muted);
  margin: -10px 0 18px;
}

/* ---------- Toolbar (search) ---------- */

.spec-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.spec-toolbar__search {
  position: relative;
  flex: 1 1 260px;
  max-width: 320px;
}

/* High-specificity + !important: overrides theme/WooCommerce default
   text input styling (padding, border-radius, box-shadow, font-size) */
input.spec-search-input[type="text"] {
  all: unset !important;
  box-sizing: border-box !important;
  display: block !important;
  width: 100% !important;
  padding: 10px 14px 10px 38px !important;
  border: 1.5px solid var(--pt-line) !important;
  border-radius: 8px !important;
  font-family: inherit !important;
  font-size: 14px !important;
  line-height: 1.4 !important;
  color: var(--pt-ink) !important;
  background: var(--pt-bg) !important;
  outline: none !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
}

input.spec-search-input[type="text"]::placeholder {
  color: var(--pt-muted) !important;
  opacity: 1 !important;
}

input.spec-search-input[type="text"]:focus {
  border-color: var(--pt-gold) !important;
  box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.18) !important;
}

.spec-toolbar__search svg {
  position: absolute;
  left: 12px;
  top: 65%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  stroke: var(--pt-muted);
  pointer-events: none;
}

.spec-toolbar__count {
  margin-left: auto;
  font-size: 13px;
  color: var(--pt-muted);
  white-space: nowrap;
}

.spec-toolbar__count strong {
  color: var(--pt-navy);
}

/* ---------- Table shell ---------- */

.spec-table-wrap {
  background: var(--pt-bg);
  border: 1px solid var(--pt-line);
  border-radius: var(--pt-radius);
  box-shadow: var(--pt-shadow);
  overflow: hidden;
}

.spec-table-wrap__band {
  height: 4px;
  background: linear-gradient(90deg, var(--pt-gold-dark), var(--pt-gold) 45%, var(--pt-gold-dark));
}

/* Fixed-height scroll box: all rows live here, page height stays constant
   no matter how many sizes are listed (169 for Metric, etc.) */
.spec-table-scroll {
  overflow-x: auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  max-height: 520px;
}

table.spec-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
  font-size: 14.5px;
}

.spec-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--pt-navy);
  color: #fff;
  text-align: left;
  font-weight: 600;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 14px 18px;
  white-space: nowrap;
  border-bottom: 3px solid var(--pt-gold);
}

.spec-table thead th .unit {
  display: block;
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: none;
  color: #cfd9ee;
  margin-top: 2px;
}

.spec-table tbody td {
  padding: 11px 18px;
  border-bottom: 1px solid var(--pt-line);
  color: var(--pt-ink);
  white-space: nowrap;
}

.spec-table tbody tr {
  transition: background-color 0.12s ease;
}

.spec-table tbody tr:nth-child(even) {
  background: var(--pt-row-alt);
}

.spec-table tbody tr:hover {
  background: var(--pt-gold-light);
}

.spec-table tbody tr:last-child td {
  border-bottom: none;
}

.spec-table td.dia-col {
  font-weight: 700;
  color: var(--pt-navy);
}

.spec-table td.frac {
  color: var(--pt-gold-dark);
  font-weight: 600;
  font-size: 12.5px;
  margin-left: 4px;
}

.spec-table td .qty-pill {
  display: inline-block;
  min-width: 30px;
  text-align: center;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--pt-navy-dark);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
}

.spec-table__empty {
  display: none;
  padding: 40px 20px;
  text-align: center;
  color: var(--pt-muted);
  font-size: 14px;
}

.spec-table__empty.is-visible {
  display: block;
}

/* ---------- PREMIUM / HIGH-VISIBILITY TECHNICAL NOTICE ---------- */

.spec-note {
  position: relative;

  display: flex;
  align-items: center;
  gap: 13px;

  width: 100%;
  box-sizing: border-box;

  margin-top: 18px;
  padding: 15px 20px 15px 54px;

  background:
    linear-gradient(
      135deg,
      #fff9e9 0%,
      #fff2c9 50%,
      #fff9e9 100%
    );

  border: 1px solid #F5A900;
  border-left: 5px solid #F5A900;

  border-radius: 8px;

  color: #183563;

  font-size: 13px;
  font-weight: 600;
  line-height: 1.55;

  box-shadow:
    0 4px 14px rgba(245, 169, 0, 0.16),
    0 2px 5px rgba(20, 44, 92, 0.08);

  overflow: hidden;

  animation: specNoteFadeIn 0.6s ease-out both;
}


/* =========================================================
   LARGE INFORMATION ICON
   ========================================================= */

.spec-note::before {
  content: "i";

  position: absolute;

  left: 17px;
  top: 50%;

  transform: translateY(-50%);

  width: 25px;
  height: 25px;

  display: flex;
  align-items: center;
  justify-content: center;

  box-sizing: border-box;

  background: #F5A900;

  border: 2px solid #ffffff;
  border-radius: 50%;

  color: #ffffff;

  font-family: Georgia, serif;
  font-size: 16px;
  font-weight: 700;

  box-shadow:
    0 2px 6px rgba(245, 169, 0, 0.35);

  z-index: 2;

  animation: specIconPulse 2.2s ease-in-out infinite;
}


/* Hide existing SVG */

.spec-note svg {
  display: none;
}


/* =========================================================
   ANIMATED GOLD LIGHT SWEEP
   ========================================================= */

.spec-note::after {
  content: "";

  position: absolute;

  top: 0;
  left: -80%;

  width: 45%;
  height: 100%;

 background: linear-gradient(
  90deg,
  transparent 0%,
  rgba(245, 169, 0, 0.15) 25%,
  rgba(255, 255, 255, 0.95) 45%,
  rgba(245, 169, 0, 0.35) 55%,
  transparent 100%
);

  transform: skewX(-20deg);

  animation: specNoteSweep 4.5s linear infinite;

  pointer-events: none;
}


/* =========================================================
   FADE IN
   ========================================================= */

@keyframes specNoteFadeIn {

  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }

}


/* =========================================================
   ICON PULSE
   ========================================================= */

@keyframes specIconPulse {

  0%,
  100% {
    box-shadow:
      0 2px 6px rgba(245, 169, 0, 0.30);
  }

  50% {
    box-shadow:
      0 3px 12px rgba(245, 169, 0, 0.60);
  }

}


/* =========================================================
   LIGHT SWEEP
   ========================================================= */

@keyframes specNoteSweep {

  0% {
    left: -80%;
  }

  35% {
    left: 140%;
  }

  50% {
    left: -80%;
  }

  85% {
    left: 140%;
  }

  100% {
    left: 140%;
  }

}


/* =========================================================
   HOVER
   ========================================================= */

.spec-note:hover {

  border-color: #F5A900;

  box-shadow:
    0 7px 20px rgba(245, 169, 0, 0.22),
    0 3px 8px rgba(20, 44, 92, 0.10);

  transform: translateY(-2px);

  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 560px) {

  .spec-note {
    margin-top: 15px;

    padding: 13px 14px 13px 47px;

    font-size: 11px;
    line-height: 1.5;

    border-left-width: 4px;
  }

  .spec-note::before {
    left: 13px;

    width: 23px;
    height: 23px;

    font-size: 14px;
  }

}

/* ==========================================================================
   Responsive behaviour
   ========================================================================== */

@media (max-width: 720px) {
  .spec-table thead th,
  .spec-table tbody td {
    padding: 10px 14px;
  }
  .spec-toolbar__count {
    margin-left: 0;
    width: 100%;
  }
  button.spec-tabs__btn {
    padding: 10px 14px !important;
    font-size: 13.5px !important;
  }
  .spec-table-scroll {
    max-height: 420px;
  }
}

/* Mobile: convert rows into stacked cards inside the same fixed-height
   scroll box, so it still scrolls within a bounded area, not the full page */
   

/* =========================================================
   MOBILE CATALOGUE TABLES
   Full-width images, stacked labels, preserved vertical scroll
========================================================= */
@media (max-width: 560px) {

  .search-wrap input {
    max-width: 100%;
  }

  .table-container {
    border: none;
    overflow: visible;
    background: transparent;
  }

  /* Convert table elements to mobile cards */
  table.spec-table,
  .spec-table thead,
  .spec-table tbody,
  .spec-table tr,
  .spec-table td {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  .spec-table {
    border-collapse: separate;
    table-layout: auto;
  }

  .spec-table thead {
    position: static;
  }

  .spec-table thead tr {
    display: none;
  }

  .spec-table tbody tr {
    padding: 0;
    margin: 0 0 14px;
    border: 1px solid var(--pt-line);
    border-radius: 8px;
    overflow: visible;
    background: var(--pt-bg);
  }

  .spec-table tbody tr:nth-child(even),
  .spec-table tbody tr:hover {
    background: var(--pt-bg);
  }

  /* Standard specification cells */
  .spec-table tbody td {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--pt-line);
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
    overflow: visible;
    text-align: right;
    box-sizing: border-box;
  }

  .spec-table tbody td:last-child {
    border-bottom: none;
  }

  .spec-table tbody td::before {
    content: attr(data-label);
    display: block;
    flex: 0 0 38%;
    max-width: 38%;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--pt-muted);
    text-align: left;
    overflow-wrap: anywhere;
  }

  /* TOOL DRAWING, SHANK SECTION and other image cells:
     stack the label above the image instead of beside it */
  .spec-table tbody td:has(img) {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 8px;
    width: 100%;
    height: auto;
    min-height: 0;
    max-height: none;
    padding: 12px;
    overflow: visible;
    text-align: left;
  }

  .spec-table tbody td:has(img)::before {
    content: attr(data-label);
    display: block;
    flex: none;
    width: 100%;
    max-width: 100%;
    margin: 0;
    text-align: left;
  }

  /* Display the entire image without fixed height or cropping */
  .spec-table tbody td img {
    display: block;
    float: none;
    position: static;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
    object-position: center;
    margin: 0 auto;
  }

  .spec-table td.dia-col {
    background: var(--pt-navy);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
  }

  .spec-table td.dia-col::before {
    color: #cfd9ee;
  }

  /* Preserve the existing bounded vertical scroll */
  .spec-table-scroll {
    display: block;
    width: 100%;
    max-width: 100%;
    max-height: 700px;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }
}

/*@media (max-width: 560px) {*/
/*  table.spec-table,*/
/*  .spec-table thead,*/
/*  .spec-table tbody,*/
/*  .spec-table tr,*/
/*  .spec-table td {*/
/*    display: block;*/
/*    width: 100%;*/
/*  }*/

/*  .spec-table {*/
/*    min-width: 0;*/
/*  }*/

/*  .spec-table thead {*/
/*    position: static;*/
/*  }*/

/*  .spec-table thead tr {*/
/*    display: none;*/
/*  }*/

/*  .spec-table tbody tr {*/
/*    margin: 12px;*/
/*    border: 1px solid var(--pt-line);*/
/*    border-radius: 8px;*/
/*    overflow: hidden;*/
/*    background: var(--pt-bg);*/
/*  }*/

/*  .spec-table tbody tr:nth-child(even) {*/
/*    background: var(--pt-bg);*/
/*  }*/

/*  .spec-table td {*/
/*    display: flex;*/
/*    justify-content: space-between;*/
/*    align-items: center;*/
/*    white-space: normal;*/
/*    border-bottom: 1px solid var(--pt-line);*/
/*    padding: 10px 14px;*/
/*  }*/

/*  .spec-table td:last-child {*/
/*    border-bottom: none;*/
/*  }*/

/*  .spec-table td::before {*/
/*    content: attr(data-label);*/
/*    font-size: 11px;*/
/*    font-weight: 700;*/
/*    letter-spacing: 0.05em;*/
/*    text-transform: uppercase;*/
/*    color: var(--pt-muted);*/
/*  }*/

/*  .spec-table td.dia-col {*/
/*    background: var(--pt-navy);*/
/*    color: #fff;*/
/*    font-size: 15px;*/
/*  }*/

/*  .spec-table td.dia-col::before {*/
/*    color: #cfd9ee;*/
/*  }*/
/*}*/

@media (max-width: 767px) {
/* Remove unwanted Elementor product-tabs padding */
  .elementor-widget-woocommerce-product-data-tabs
  .woocommerce-tabs .panel,
  .elementor-widget-woocommerce-product-data-tabs
  .woocommerce-Tabs-panel {
    padding: 0 !important;
  }
  }