/*
Theme Name: Petropec Industrial v2
Theme URI: https://www.petropec.pk
Author: Petropec Lubricant Private Limited
Description: Bold industrial redesign. Fully customisable via WordPress Customizer: colours, fonts, hero text and layout. All page content kept intact. SEO-clean heading hierarchy on all templates.
Version: 2.0.0
Requires at least: 5.8
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: petropec
*/

/* =============================================
   CUSTOMIZER CSS VARIABLES (overridden live)
   ============================================= */
:root {
  --bg:       #0A1118;
  --bg2:      #0F1923;
  --line:     #1E2D3D;
  --ink:      #EDEAE2;
  --muted:    #8A99A8;
  --amber:    #D68910;
  --amber-hi: #F0A22A;
  --navy:     #0D2B4E;
  --blue:     #1155A5;
  --light:    #F3F1EC;
  --light2:   #E9E5DA;
  --dark-txt: #1A2028;
  --font-head: 'Bebas Neue', 'Arial Narrow', Impact, sans-serif;
  --font-body: 'IBM Plex Sans', Arial, sans-serif;
  --radius:   0px;
}

/* =============================================
   RESET / BASE
   ============================================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 4px; background: var(--amber); color: #0A1118; padding: 10px 18px; font-weight: 700; z-index: 9999; }
.skip-link:focus { left: 4px; }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  font-weight: 400;
  letter-spacing: .02em;
  line-height: 1.05;
  text-transform: uppercase;
  margin: 0 0 .5em;
}

/* =============================================
   BUTTONS
   ============================================= */
.btn, .woocommerce a.button, .woocommerce button.button, .woocommerce input.button, .woocommerce #respond input#submit {
  display: inline-block;
  background: var(--amber);
  color: #0A1118 !important;
  padding: 13px 26px;
  font: 700 14px/1 var(--font-body);
  letter-spacing: .04em;
  text-transform: uppercase;
  text-decoration: none;
  border: 2px solid var(--amber);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background .18s, border-color .18s;
}
.btn:hover, .woocommerce a.button:hover { background: var(--amber-hi); border-color: var(--amber-hi); color: #0A1118 !important; }
.btn-ghost { background: transparent; color: var(--ink) !important; border-color: var(--line); }
.btn-ghost:hover { border-color: var(--amber); color: var(--amber-hi) !important; background: transparent; }
.btn-sm { padding: 8px 16px; font-size: 12px; }

/* =============================================
   HEADER
   ============================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,17,24,.97);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 72px;
}
.site-branding a { text-decoration: none; }
.site-title-text {
  font: 400 34px var(--font-head);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink);
}
.site-title-text span { color: var(--amber); }
.custom-logo { max-height: 54px; width: auto; background: #fff; padding: 5px 10px; }
.main-nav { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.nav-menu { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 2px; }
.nav-menu li { position: relative; }
.nav-menu > li > a {
  display: block;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color .15s;
}
.nav-menu > li:hover > a,
.nav-menu > li.current-menu-item > a,
.nav-menu > li.current-menu-parent > a { color: var(--ink); }
.nav-menu > li.menu-item-has-children > a::after { content: " ▾"; color: var(--amber); font-size: 10px; }
/* Dropdown */
.sub-menu {
  display: none;
  position: absolute;
  left: 0; top: 100%;
  min-width: 260px;
  background: var(--bg2);
  border: 1px solid var(--line);
  border-top: 3px solid var(--amber);
  box-shadow: 0 20px 50px rgba(0,0,0,.55);
  z-index: 200;
  list-style: none;
  margin: 0; padding: 8px 0;
}
.sub-menu.wide { min-width: 520px; columns: 2; gap: 0; }
.sub-menu li { break-inside: avoid; }
.sub-menu a {
  display: block;
  padding: 9px 18px;
  font-size: 13.5px;
  color: var(--ink);
  text-decoration: none;
  transition: background .12s, color .12s;
}
.sub-menu a:hover { background: rgba(214,137,16,.12); color: var(--amber-hi); }
.nav-menu li:hover > .sub-menu,
.nav-menu li.focus > .sub-menu { display: block; }
/* Mobile toggle */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  width: 44px; height: 40px;
  padding: 0;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-left: auto;
}
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--ink); transition: .2s; }
.sub-toggle {
  display: none;
  position: absolute;
  right: 0; top: 0;
  width: 44px; height: 40px;
  background: none;
  border: 0;
  color: var(--amber);
  font-size: 20px;
  cursor: pointer;
  z-index: 2;
}

/* =============================================
   AMBER STRIPE
   ============================================= */
.amber-stripe { height: 6px; background: repeating-linear-gradient(90deg, var(--amber) 0 42px, #1c2b38 42px 84px); }

/* =============================================
   HERO — HOMEPAGE
   ============================================= */
.hero-section { padding: 88px 0 70px; }
.hero-grid { display: grid; grid-template-columns: 1.3fr .9fr; gap: 56px; align-items: end; }
.hero-eyebrow { display: block; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--amber); margin-bottom: 14px; }
.hero-title { font-size: clamp(50px,8.5vw,100px); line-height: .95; }
.hero-title em { font-style: normal; color: var(--amber); }
.hero-lead { color: var(--muted); font-size: 17px; max-width: 50ch; margin: 20px 0 0; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }
.hero-panel {
  border: 1px solid var(--line);
  background: var(--bg2);
}
.hero-panel h2 { font-size: 20px; padding: 14px 20px; border-bottom: 1px solid var(--line); color: var(--amber); }
.hero-panel a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 20px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  font-size: 14px;
  color: var(--ink);
  transition: background .12s, color .12s;
}
.hero-panel a:last-child { border-bottom: 0; }
.hero-panel a:hover { background: #16222e; color: var(--amber-hi); }
.hero-panel a span { color: var(--amber); }

/* =============================================
   FACTS STRIP
   ============================================= */
.facts-strip { display: grid; grid-template-columns: repeat(4,1fr); gap: 1px; background: var(--line); border-bottom: 1px solid var(--line); }
.facts-strip div { background: var(--bg2); padding: 24px 22px; }
.facts-strip strong { display: block; font: 400 32px var(--font-head); color: var(--amber); letter-spacing: .03em; }
.facts-strip span { color: var(--muted); font-size: 13px; }

/* =============================================
   GENERAL SECTION
   ============================================= */
.pp-section { padding: 72px 0; border-bottom: 1px solid var(--line); }
.pp-section.light-bg { background: var(--light); color: var(--dark-txt); border-color: var(--light2); }
.pp-section.light-bg .muted { color: #5a6472; }
.section-eyebrow { display: block; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--amber); margin-bottom: 10px; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 32px; }
.section-head h2 { font-size: clamp(32px,4.5vw,52px); margin: 0; }
.section-desc { color: var(--muted); max-width: 44ch; margin: 0; font-size: 15px; }

/* =============================================
   TILES GRID (categories, products, services)
   ============================================= */
.tiles-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.tile {
  background: var(--bg2);
  padding: 26px 24px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: background .15s;
}
.tile:hover { background: #14202c; }
.tile-num { font: 400 28px var(--font-head); color: var(--amber); }
.tile h3 { font-size: 22px; margin: 4px 0; }
.tile p { margin: 0; color: var(--muted); font-size: 13.5px; }
.tile .tile-arrow { margin-top: auto; padding-top: 14px; color: var(--amber); font-size: 20px; }

/* =============================================
   SPLIT (two-col feature)
   ============================================= */
.split-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.split-grid.reverse { direction: rtl; }
.split-grid.reverse > * { direction: ltr; }
.split-content p { color: var(--muted); margin: 0 0 16px; font-size: 15.5px; }
.split-content ul { padding: 0; margin: 16px 0 0; list-style: none; }
.split-content li { padding: 11px 0; border-top: 1px solid var(--line); font-size: 14.5px; display: flex; gap: 10px; }
.split-content li:last-child { border-bottom: 1px solid var(--line); }
.list-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--amber); flex-shrink: 0; margin-top: 7px; }
.feat-image-placeholder { aspect-ratio: 4/3; background: linear-gradient(155deg, var(--bg2), #0a1520); border: 1px solid var(--line); overflow: hidden; }
.feat-image-placeholder img { width: 100%; height: 100%; object-fit: cover; }

/* =============================================
   BRANDS / LOGOS
   ============================================= */
.logos-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px,1fr)); gap: 10px; }
.logos-grid li { background: #fff; display: flex; align-items: center; justify-content: center; padding: 16px; aspect-ratio: 3/2; }
.logos-grid img { max-height: 52px; width: auto; object-fit: contain; }

/* =============================================
   SERVICES BAR
   ============================================= */
.services-bar { display: grid; grid-template-columns: repeat(4,1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.services-bar div { background: var(--bg2); padding: 28px 24px; }
.services-bar h3 { font-size: 22px; margin-bottom: 10px; }
.services-bar p { color: var(--muted); font-size: 14px; margin: 0; }

/* =============================================
   CTA BAND
   ============================================= */
.cta-band { background: var(--amber); color: #0A1118; padding: 56px 0; }
.cta-band-inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { font-size: clamp(28px,4vw,46px); margin: 0; }
.cta-band p { margin: 8px 0 0; max-width: 56ch; }
.cta-band .btn { background: #0A1118; color: var(--ink) !important; border-color: #0A1118; }
.cta-band .btn:hover { background: #1a2a3a; border-color: #1a2a3a; }

/* =============================================
   BLOG POSTS GRID
   ============================================= */
.posts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px,1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.post-card { background: var(--bg2); padding: 26px 24px; text-decoration: none; display: flex; flex-direction: column; gap: 8px; transition: background .15s; }
.post-card:hover { background: #14202c; }
.post-card time { font-size: 11px; color: var(--amber); letter-spacing: .12em; text-transform: uppercase; }
.post-card h3 { font-size: 24px; margin: 0; line-height: 1.1; }
.post-card p { color: var(--muted); font-size: 14px; margin: 0; }

/* =============================================
   PAGE HERO (inner pages)
   ============================================= */
.page-hero-bar { background: var(--bg2); border-bottom: 1px solid var(--line); padding: 48px 0 38px; }
.breadcrumbs { font-size: 12px; color: var(--muted); margin-bottom: 14px; }
.breadcrumbs a { text-decoration: none; color: var(--muted); }
.breadcrumbs a:hover { color: var(--amber-hi); }
.breadcrumbs .sep { margin: 0 6px; }
.page-title { font-size: clamp(38px,6vw,70px); margin: 0; }

/* =============================================
   PAGE CONTENT — LIGHT PANEL
   ============================================= */
.page-content-wrap { background: var(--light); color: var(--dark-txt); padding: 60px 0 80px; }
.content-inner { max-width: 920px; }

/* Prose overrides — fix builder/Elementor content in light panel */
.page-content-wrap h1,
.page-content-wrap h2,
.page-content-wrap h3,
.page-content-wrap h4 {
  font-family: var(--font-head);
  text-transform: uppercase;
  color: var(--navy);
}
.page-content-wrap h2 { font-size: clamp(28px,4vw,44px); margin: 1.4em 0 .4em; }
.page-content-wrap h3 { font-size: clamp(20px,2.5vw,28px); margin: 1.2em 0 .3em; }
.page-content-wrap p { margin: 0 0 1.1em; line-height: 1.7; }
.page-content-wrap a { color: var(--blue); }
.page-content-wrap a:hover { color: var(--amber); }
.page-content-wrap img {
  max-width: 100%;
  height: auto !important;   /* fix out-of-frame images */
  border-radius: var(--radius);
}
.page-content-wrap ul, .page-content-wrap ol { padding-left: 1.4em; margin: 0 0 1.1em; }
.page-content-wrap table { border-collapse: collapse; width: 100%; margin: 1.4em 0; }
.page-content-wrap th, .page-content-wrap td { border: 1px solid var(--light2); padding: 10px 14px; text-align: left; font-size: 14.5px; }
.page-content-wrap th { background: var(--light2); font-weight: 700; }
.page-content-wrap blockquote { border-left: 4px solid var(--amber); margin: 1.4em 0; padding: 12px 20px; background: var(--light2); }

/* =============================================
   PRODUCT PAGE (WooCommerce)
   ============================================= */
.woocommerce-page .page-content-wrap { padding: 48px 0 72px; }
.woocommerce ul.products { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(240px,1fr)) !important; gap: 1px !important; background: var(--line) !important; border: 1px solid var(--line) !important; margin: 0 !important; padding: 0 !important; }
.woocommerce ul.products li.product { background: var(--bg2) !important; padding: 24px !important; margin: 0 !important; color: var(--ink) !important; }
.woocommerce ul.products li.product:hover { background: #14202c !important; }
.woocommerce ul.products li.product .woocommerce-loop-product__title { font: 400 22px var(--font-head) !important; color: var(--ink) !important; text-transform: uppercase !important; padding: 0 !important; }
.woocommerce span.price, .woocommerce div.product p.price { color: var(--amber) !important; }
.woocommerce a.button, .woocommerce button.button { border-radius: 0 !important; }
.pp-filter-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; }
.pp-chip { border: 1px solid var(--line); padding: 7px 16px; border-radius: 20px; font-size: 13px; color: var(--muted); background: none; cursor: pointer; text-decoration: none; }
.pp-chip.active, .pp-chip:hover { background: var(--ink); color: #0A1118; border-color: var(--ink); }

/* =============================================
   ABOUT PAGE EXTRAS
   ============================================= */
.timeline { border-left: 2px solid var(--amber); margin: 0 0 0 8px; }
.timeline-item { padding: 0 0 32px 28px; position: relative; }
.timeline-item::before { content: ''; width: 12px; height: 12px; border-radius: 50%; background: var(--amber); border: 2px solid var(--bg); position: absolute; left: -7px; top: 4px; }
.timeline-item .tl-year { font: 400 14px var(--font-head); color: var(--amber); letter-spacing: .06em; }
.timeline-item h3 { font-size: 24px; margin: 6px 0; }
.timeline-item p { color: var(--muted); font-size: 14.5px; margin: 0; }
.stat-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); margin: 32px 0; }
.stat-row div { background: var(--bg2); padding: 24px 20px; }
.stat-row strong { display: block; font: 400 32px var(--font-head); color: var(--amber); }
.stat-row span { font-size: 13px; color: var(--muted); }

/* =============================================
   CONTACT PAGE
   ============================================= */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin-top: 32px; }
.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; letter-spacing: .04em; text-transform: uppercase; }
.form-row input,
.form-row textarea,
.form-row select {
  width: 100%;
  background: var(--bg2);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 12px 14px;
  font: 400 14px var(--font-body);
  border-radius: var(--radius);
  outline: none;
  transition: border-color .15s;
}
.form-row input:focus,
.form-row textarea:focus { border-color: var(--amber); }
.info-block { border: 1px solid var(--line); padding: 22px 24px; margin-bottom: 14px; }
.info-block h3 { font-size: 16px; color: var(--amber); margin: 0 0 8px; }
.info-block p, .info-block a { color: var(--muted); font-size: 14.5px; margin: 0; text-decoration: none; }
.info-block a:hover { color: var(--amber-hi); }

/* =============================================
   PAGINATION
   ============================================= */
.pp-pagination { margin-top: 32px; display: flex; gap: 8px; flex-wrap: wrap; }
.pp-pagination a, .pp-pagination span { padding: 8px 14px; border: 1px solid var(--line); font-size: 14px; text-decoration: none; color: var(--ink); }
.pp-pagination .current { background: var(--amber); color: #0A1118; border-color: var(--amber); }
.pp-pagination a:hover { border-color: var(--amber); }

/* =============================================
   404
   ============================================= */
.pp-404 { padding: 100px 0; text-align: center; }
.pp-404 .big-num { font: 400 160px var(--font-head); color: var(--amber); line-height: 1; display: block; }

/* =============================================
   FOOTER
   ============================================= */
.site-footer { background: #060C10; border-top: 1px solid var(--line); padding: 64px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 44px; }
.footer-brand { font: 400 28px var(--font-head); color: var(--ink); letter-spacing: .05em; margin-bottom: 14px; display: block; text-decoration: none; }
.footer-brand span { color: var(--amber); }
.footer-desc { color: var(--muted); font-size: 14.5px; margin: 0 0 10px; max-width: 36ch; }
.footer-col h4 { font: 400 20px var(--font-head); color: var(--amber); margin: 0 0 14px; letter-spacing: .05em; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 8px; font-size: 14.5px; }
.footer-col a { color: var(--muted); text-decoration: none; }
.footer-col a:hover { color: var(--amber-hi); }
.footer-legal { margin-top: 44px; padding-top: 20px; border-top: 1px solid var(--line); color: #5a6672; font-size: 12.5px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-panel { display: none; }
}
@media (max-width: 900px) {
  .split-grid { grid-template-columns: 1fr; gap: 32px; }
  .split-grid.reverse { direction: ltr; }
  .facts-strip, .services-bar, .stat-row { grid-template-columns: repeat(2,1fr); }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .sub-toggle { display: flex; align-items: center; justify-content: center; }
  .main-nav {
    display: none;
    position: absolute;
    top: 72px; left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 24px 24px;
    max-height: calc(100vh - 72px);
    overflow-y: auto;
    margin-left: 0;
  }
  .main-nav.open { display: flex; }
  .nav-menu { flex-direction: column; gap: 0; width: 100%; }
  .nav-menu > li > a { padding: 12px 0; font-size: 14px; }
  .nav-menu > li.menu-item-has-children > a::after { display: none; }
  .sub-menu, .sub-menu.wide { position: static; min-width: 0; columns: 1; box-shadow: none; border: 0; border-left: 2px solid var(--amber); margin: 0 0 8px 8px; display: none; padding: 4px 0; }
  .nav-menu li.open > .sub-menu { display: block; }
  .nav-menu li:hover > .sub-menu { display: none; }
  .cta-btn-nav { width: 100%; text-align: center; margin-top: 12px; }
}
@media (max-width: 520px) {
  .facts-strip, .services-bar, .stat-row { grid-template-columns: 1fr; }
  .hero-title { font-size: 52px; }
}
