/* ============================================================
   ENERPAC — Global Stylesheet  (assets/style.css)
   Font sizes baseline: 1600px design
   Below 1500px → scale down smoothly
   Above 1700px → scale up smoothly
   ============================================================ */

/* ---------- Font Faces ---------- */
@font-face {
  font-family: 'SourceHanSansCN';
  src: url('fonts/SourceHanSansCN-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
}
@font-face {
  font-family: 'SourceHanSansCN';
  src: url('fonts/SourceHanSansCN-Medium.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
}
@font-face {
  font-family: 'SourceHanSansCN';
  src: url('fonts/SourceHanSansCN-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
}

/* ---------- CSS Variables ---------- */
:root {
  --color-yellow:      #FFCC01;
  --color-black:       #000000;
  --color-white:       #ffffff;
  --color-footer-gray: #AAAAAA;
  --color-optional:    #F5F5F5;
  --font-main:         'SourceHanSansCN';
  --fw-regular:        400;
  --fw-medium:         500;
  --fw-bold:           700;
  --fw-light:          200;

  /* ── Fluid font scale ──────────────────────────────────────
     Formula: clamp(min, preferred-vw, max)
     Baseline sizes are at 1600px.
     vw value = (target-px / 1600) * 100
     min  = ~75% of baseline (kicks in around 1200px)
     max  = ~125% of baseline (allows growth above 2000px)
  ─────────────────────────────────────────────────────────── */

  /* 13px baseline */
  --fs-xs:   clamp(10px,  0.8125vw, 16px);

  /* 14px baseline */
  --fs-sm:   clamp(11px,  0.875vw,  17px);

  /* 15px baseline */
  --fs-sm2:  clamp(12px,  0.9375vw, 18px);

  /* 16px baseline */
  --fs-base: clamp(13px,  1vw,      20px);

  /* 17px baseline */
  --fs-md:   clamp(14px,  1.0625vw, 21px);

  /* 18px baseline */
  --fs-md2:  clamp(14px,  1.125vw,  22px);

  /* 19px baseline */
  --fs-lg:   clamp(15px,  1.1875vw, 23px);

  /* 21px baseline */
  --fs-xl:   clamp(14px,  1.3125vw, 26px);

  /* 22px baseline */
  --fs-xl2:  clamp(17px,  1.375vw,  27px);

  /* 24px baseline */
  --fs-2xl:  clamp(18px,  1.5vw,    30px);

  /* 26px baseline */
  --fs-2xl2: clamp(19px,  1.625vw,  32px);

  /* 28px baseline */
  --fs-3xl:  clamp(20px,  1.75vw,   35px);

  /* 32px baseline */
  --fs-4xl:  clamp(22px,  2vw,      40px);

  /* 42px baseline */
  --fs-5xl:  clamp(26px,  2.625vw,  52px);
}

/* ---------- Reset / Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-main);
  font-weight: var(--fw-regular);
  font-size: var(--fs-base);
  color: var(--color-black);
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a   { text-decoration: none; color: inherit; }
ul  { list-style: none; }

/* ---------- Utility Classes ---------- */
.bg-primary    { background: var(--color-yellow); }
.bg-offwhite   { background: var(--color-optional); }
.text-primary  { color: var(--color-yellow); }
.text-secondary{ color: var(--color-footer-gray); }

.helvetica-regular { font-family: var(--font-main); font-weight: var(--fw-regular); }
.helvetica-light   { font-family: var(--font-main); font-weight: var(--fw-light); }
.helvetica-medium  { font-family: var(--font-main); font-weight: var(--fw-medium); }
.helvetica-bold    { font-family: var(--font-main); font-weight: var(--fw-bold); }
.btnhover:hover {
  background: #e6b800;
}

.custom-arrow img{
    width: 80%;
}

iframe{
    border-radius: 8px;
    width: 100%;
    height: 100%;
    min-height: 300px;
}

/* ============================================================
   HEADER
   ============================================================ */
header .search {
  background: var(--color-white);
  border-radius: 8px;
}

header .search input {
  background: #fff;
  font-family: var(--font-main);
  font-weight: var(--fw-light);
  font-size: var(--fs-base);
  color: #A4A4A4;
  margin: 0;
  line-height: 1;
  outline: none;
  width: 150px;
}

header .search input::placeholder {
  font-family: var(--font-main);
  font-weight: var(--fw-light);
  font-size: var(--fs-base);
  color: #A4A4A4;
}

header ul li {
  line-height: 1;
  text-transform: capitalize;
  /* nav link font size — fluid */
  font-size: var(--fs-base);
}

header ul li a {
  font-size: inherit;
}

header .search span {
  background: var(--color-yellow);
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
}

/* REQUEST A QUOTE — vertical pill on right edge */
.quoteTab {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 500;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  background: var(--color-yellow);
  color: var(--color-black);
  font-size: var(--fs-md2);           /* 18px baseline */
  font-family: var(--font-main);
  font-weight: var(--fw-medium);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: clamp(14px, 1.2vw, 22px) clamp(8px, 0.6vw, 12px);
  border-radius: 4px 0 0 4px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s;
  white-space: nowrap;
  padding-right: 10px;
  padding-left: 7px;
}
.quoteTab:hover {
  background: #e6b800;
}

/* ============================================================
   HOME BANNER
   ============================================================ */
.homeBanner {
  overflow: hidden;
}

.homeBanner .content {
  position: relative;
}

.homeBanner .content::before {
  content: '';
  position: absolute;
  bottom: 0px;
  left: -50px;
  width: 100%;
  height: 200%;
  background: #000;
  transform: skew(-16deg, -16deg);
  z-index: 1;
}

/* Banner text sizes — fluid */
.homeBanner h2 {
  font-size: var(--fs-md2);  /* 18px baseline */
}

.homeBanner h1 {
  font-size: var(--fs-5xl);  /* 42px baseline */
}

.homeBanner a {
  font-size: var(--fs-xl);   /* 21px baseline */
}

/* ============================================================
   HOME CATEGORY SLIDER
   ============================================================ */
.homeCategorySlider .slick-next::before,
.homeCategorySlider .slick-prev::before {
  display: none;
}

.homeCategorySlider .custom-arrow {
  width: auto;
  height: auto;
}

.homeCategorySlider .slick-next.custom-arrow {
  right: -50px;
}

.homeCategorySlider .slick-prev.custom-arrow {
  left: -50px;
}

.homeCategorySlider .slick-track {
  display: flex;
  gap: 12px;
}

/* Category slide caption */
.homeCategorySlider .slide p {
  font-size: var(--fs-base); /* 16px baseline */
}

/* ============================================================
   CATEGORY TAB SECTION
   ============================================================ */
.category_tab ul li {
  font-family: var(--font-main);
  font-weight: var(--fw-regular);
  font-size: var(--fs-xl);   /* 21px baseline */
  color: #000;
  text-transform: capitalize;
}

.category_tab ul li a {
  display: block;
}

.category_tab ul li:not(:last-child) a {
  border-bottom: 1px solid #ccc;
}

.category_tab ul li.active {
  clip-path: polygon(0% 0%, 95% 0%, 100% 50%, 95% 100%, 0% 100%);
  background: var(--color-yellow);
  font-weight: var(--fw-medium);
  font-size: var(--fs-xl2);  /* 22px baseline */
  width: 105%;
}

/* Popular categories heading */
.category_tab .tabs h2 {
  font-size: var(--fs-2xl2); /* 26px baseline */
}

/* Product cards inside tabs */
.tab-content .bg-offwhite h2 {
  font-size: var(--fs-xl);   /* 21px baseline */
}

.tab-content .bg-offwhite p {
  font-size: var(--fs-base); /* 16px baseline */
}

.tab-content .bg-offwhite a.block {
  font-size: var(--fs-md2);  /* 18px baseline */
}

/* ============================================================
   FIND THE RIGHT TOOL SECTION
   ============================================================ */
.homeFindTool h2 {
  font-size: var(--fs-4xl);  /* 32px baseline */
}

.homeFindTool p {
  font-size: var(--fs-md2);  /* 18px baseline */
}

.homeFindTool a {
  font-size: var(--fs-xl);   /* 21px baseline */
}

/* ============================================================
   BLOG & NEWS SECTION
   ============================================================ */
.homeBlog h2,
.homeNews h2 {
  font-size: var(--fs-4xl);  /* 32px baseline */
}

.homeBlog .main-post p {
  font-size: var(--fs-md2);  /* 18px baseline */
}

.homeBlog .sub-post p {
  font-size: var(--fs-base); /* 16px baseline */
}

.homeNews ul li a p {
  font-size: var(--fs-md2);  /* 18px baseline */
}

/* ============================================================
   FOOTER
   ============================================================ */
footer .col-heading {
  font-size: var(--fs-xl);   /* 21px baseline */
}

footer .col-link {
  font-size: var(--fs-md);   /* 17px baseline */
}

footer .footer-bottom-link {
  font-size: var(--fs-sm);   /* 14px baseline */
}

/* ============================================================
   MOBILE MENU OVERLAY — slide from right with backdrop
   ============================================================ */
#menuBackdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}
#menuBackdrop.open {
  display: block;
  opacity: 1;
}

#mobileMenu {
  position: fixed;
  top: 0;
  right: 0;
  width: min(320px, 85vw);
  height: 100%;
  background: #111;
  z-index: 1000;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}
#mobileMenu.open {
  transform: translateX(0);
}
#mobileMenu ul li a {
  font-size: 20px;
  font-weight: 500;
  color: #fff;
  text-transform: capitalize;
  display: block;
  padding: 14px 0;
  border-bottom: 1px solid #2a2a2a;
  transition: color 0.2s ease;
}
#mobileMenu ul li a:hover {
  color: #FFCC01;
}
#mobileMenu .close-btn {
  align-self: flex-end;
  background: none;
  border: none;
  color: #fff;
  font-size: 26px;
  cursor: pointer;
  margin-bottom: 6px;
  line-height: 1;
  transition: color 0.2s ease;
}
#mobileMenu .close-btn:hover {
  color: #FFCC01;
}

/* ============================================================
   CATEGORY SLIDER — responsive arrows
   ============================================================ */
@media (max-width: 1279px) {
  .homeCategorySlider .slick-next.custom-arrow { right: -36px; }
  .homeCategorySlider .slick-prev.custom-arrow { left: -36px; }
}
@media (max-width: 991px) {
  header .search span { padding: 6px; }
  header .search span img { width: 12px; }
}
@media (max-width: 767px) {
  .homeCategorySlider .slick-next.custom-arrow { right: -22px; }
  .homeCategorySlider .slick-prev.custom-arrow { left: -22px; }
  .blog-news-section h2, .find-tool-section h2{text-align: center;}
  .secHeading{text-align: center;}
}
@media(max-width: 600px){
    .custom-arrow img{
        width: 10px;
    }
}
/* ============================================================
   MOBILE CATEGORY SELECT DROPDOWN
   ============================================================ */
#categorySelect {
  display: none;
  width: 100%;
  padding: 12px 16px;
  font-size: 16px;
  font-family: inherit;
  font-weight: 500;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #f5f5f5;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  cursor: pointer;
  text-transform: capitalize;
}

/* ============================================================
   MOBILE CARDS SLIDER
   ============================================================ */
.mobileCardsSlider {
  display: none;
}

@media (max-width: 767px) {

  /* Banner fix */
  .homeBanner .content::before {
    display: none;
  }

  /* Show select, hide desktop tabs */
  #categorySelect { display: block; }
  .category_tab .tabs { display: none !important; }

  /* Category tab panel — full width */
  .category_tab {
    display: block !important;
    border: none !important;
    border-radius: 0 !important;
  }

  /* Hide all tab-content panels initially */
  .tab-content {
    display: none !important;
    padding: 12px 4px !important;
  }
  /* Show the active one */
  .tab-content.mobile-active {
    display: block !important;
  }

  /* Hide desktop card grid, show mobile slider */
  .desktopCardsGrid { display: none !important; }
  .mobileCardsSlider { display: block; }

  /* Slider card spacing */
  /*.mobileCardsSlider .slick-slide { padding: 0 6px; }*/
  .mobileCardsSlider .slick-next.custom-arrow { right: -20px; }
  .mobileCardsSlider .slick-prev.custom-arrow { left: -18px; }
  .mobileCardsSlider .slick-next::before,
  .mobileCardsSlider .slick-prev::before { display: none; }
}

/* ============================================================
   LARGE SCREENS (1500px – 1700px) = default baseline sizes
   Above 1700px → clamp() naturally scales up via vw
   Below 1500px → clamp() naturally scales down via vw
   No extra overrides needed — clamp handles the full range.

   Only override fixed Tailwind inline sizes for xl breakpoint
   using the CSS variables below where Tailwind can't use them.
   ============================================================ */

/* Keep Tailwind xl: sizes consistent with our fluid scale
   by overriding the computed xl values at that breakpoint.
   These replace any xl:text-[Npx] classes in the HTML.      */
.blog-news-section h2,
.find-tool-section h2{
    font-size: var(--fs-4xl);
}
@media (min-width: 1280px) {

  /* Header nav */
  header ul li a { font-size: var(--fs-base); }

  /* Banner */
  .homeBanner h2   { font-size: var(--fs-md2); }
  .homeBanner h1   { font-size: var(--fs-5xl); }
  .homeBanner a    { font-size: var(--fs-xl);  }

  /* Category slider captions */
  .homeCategorySlider .slide p { font-size: var(--fs-base); }

  /* Category tab headings & links */
  .category_tab .tabs h2       { font-size: var(--fs-2xl); }
  .category_tab ul li          { font-size: var(--fs-lg);   }
  .category_tab ul li.active   { font-size: var(--fs-xl);  }

  /* Product cards */
  .tab-content .bg-offwhite h2   { font-size: var(--fs-xl);   }
  .tab-content .bg-offwhite p    { font-size: var(--fs-base);min-height: 48px; }
  .tab-content .bg-offwhite a.block { font-size: var(--fs-md2); }

  /* Find tool section */
  .find-tool-section h2  { font-size: var(--fs-4xl); }
  .find-tool-section p   { font-size: var(--fs-md2); }
  .find-tool-section a   { font-size: var(--fs-xl);  }

  /* Blog/News */
  .blog-news-section h2              { font-size: var(--fs-4xl);  }
  .blog-news-section .main-post p    { font-size: var(--fs-md2);  }
  .blog-news-section .sub-post p     { font-size: var(--fs-base); }
  .blog-news-section .news-item p    { font-size: var(--fs-md2);  }

  /* Footer */
  footer ul li a   { font-size: var(--fs-lg);  }
  footer .col-sub a{ font-size: var(--fs-md);  }
  footer .bottom a,
  footer .bottom li{ font-size: var(--fs-sm);  }
}

/* ============================================================
   EXTRA LARGE SCREENS 1921px+
   clamp() already scales up — just adjust container padding
   ============================================================ */
@media (min-width: 1921px) {
  header {
    padding-left:  clamp(80px, 8vw, 200px);
    padding-right: clamp(80px, 8vw, 200px);
  }
}