/*
Theme Name: HeavyEquipmentDocs
Theme URI: https://heavyequipmentdocs.com
Author: HeavyEquipmentDocs
Author URI: https://heavyequipmentdocs.com
Description: Clean, fast WooCommerce theme for selling heavy equipment service manuals. Ecommerce-first with SEO-ready structure. No bloat, no unnecessary dependencies.
Version: 2.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: heavyequipmentdocs
Tags: e-commerce, custom-menu, featured-images, theme-options, one-column, two-columns
WC requires at least: 7.0
WC tested up to: 9.0
*/

/* ═══════════════════════════════════════
   DESIGN TOKENS
   ═══════════════════════════════════════ */
:root {
  /* Colors */
  --c-primary: #0F2B4C;
  --c-primary-mid: #1A4270;
  --c-primary-light: #EBF1F8;
  --c-accent: #E8630A;
  --c-accent-hover: #CF5700;
  --c-accent-light: #FFF4EC;
  --c-green: #0E8A4F;
  --c-green-light: #ECFDF3;
  --c-red: #D93025;
  --c-white: #FFFFFF;
  --c-bg: #F5F6F8;
  --c-g50: #F9FAFB;
  --c-g100: #F2F4F7;
  --c-g200: #E4E7EC;
  --c-g300: #D0D5DD;
  --c-g400: #98A2B3;
  --c-g500: #667085;
  --c-g600: #475467;
  --c-g700: #344054;
  --c-g900: #101828;

  /* Type */
  --f-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --f-heading: 'Inter', var(--f-body);
  --f-mono: 'JetBrains Mono', 'SF Mono', monospace;

  /* Spacing & Radius */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;
  --container: 1220px;

  /* Shadows */
  --sh-xs: 0 1px 2px rgba(16,24,40,.05);
  --sh-sm: 0 1px 3px rgba(16,24,40,.1), 0 1px 2px rgba(16,24,40,.06);
  --sh-md: 0 4px 8px -2px rgba(16,24,40,.1), 0 2px 4px -2px rgba(16,24,40,.06);
  --sh-lg: 0 12px 16px -4px rgba(16,24,40,.08), 0 4px 6px -2px rgba(16,24,40,.03);
  --sh-xl: 0 20px 24px -4px rgba(16,24,40,.08), 0 8px 8px -4px rgba(16,24,40,.03);

  --transition: .18s ease;
}

/* ═══════════════════════════════════════
   RESET
   ═══════════════════════════════════════ */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{font-size:16px;scroll-behavior:smooth;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}
body{font-family:var(--f-body);color:var(--c-g900);background:var(--c-bg);line-height:1.6}
img{max-width:100%;height:auto;display:block}
a{color:var(--c-primary-mid);text-decoration:none;transition:color var(--transition)}
a:hover{color:var(--c-accent)}
h1,h2,h3,h4,h5,h6{font-family:var(--f-heading);font-weight:700;line-height:1.25;color:var(--c-g900)}
h1{font-size:2rem}h2{font-size:1.5rem}h3{font-size:1.2rem}
ul,ol{list-style:none}
button,input,select,textarea{font-family:inherit;font-size:inherit}

/* ═══════════════════════════════════════
   LAYOUT
   ═══════════════════════════════════════ */
.wrap{max-width:var(--container);margin:0 auto;padding:0 20px}
.section{padding:56px 0}
.section--white{background:var(--c-white)}
.section--gray{background:var(--c-bg)}
.grid{display:grid;gap:20px}
.grid-2{grid-template-columns:repeat(2,1fr)}
.grid-3{grid-template-columns:repeat(3,1fr)}
.grid-4{grid-template-columns:repeat(4,1fr)}
.grid-5{grid-template-columns:repeat(5,1fr)}
@media(max-width:1024px){.grid-4,.grid-5{grid-template-columns:repeat(3,1fr)}}
@media(max-width:768px){.grid-2,.grid-3{grid-template-columns:repeat(2,1fr)}.grid-4,.grid-5{grid-template-columns:repeat(2,1fr)}}
@media(max-width:480px){.grid-2,.grid-3,.grid-4,.grid-5{grid-template-columns:1fr}}

/* ═══════════════════════════════════════
   HEADER
   ═══════════════════════════════════════ */
.site-header{
  background:var(--c-white);
  border-bottom:1px solid var(--c-g200);
  position:sticky;top:0;z-index:1000;
}
.site-header__inner{
  display:flex;align-items:center;justify-content:space-between;
  padding:0 20px;height:64px;max-width:var(--container);margin:0 auto;
}
.site-logo{
  font-weight:800;font-size:1.15rem;color:var(--c-primary);
  display:flex;align-items:center;gap:10px;white-space:nowrap;
}
.site-logo img{height:32px;width:auto}
.site-logo span.logo-accent{color:var(--c-accent)}

/* Nav */
.site-nav{display:flex;align-items:center;gap:8px}
.site-nav a{
  font-size:.875rem;font-weight:500;color:var(--c-g600);
  padding:8px 14px;border-radius:var(--r-sm);transition:all var(--transition);
}
.site-nav a:hover{color:var(--c-g900);background:var(--c-g50)}

/* Header Actions */
.header-actions{display:flex;align-items:center;gap:12px}
.header-search{position:relative}
.header-search input{
  width:220px;padding:8px 12px 8px 36px;border:1px solid var(--c-g200);
  border-radius:var(--r-md);font-size:.875rem;background:var(--c-g50);
  transition:all var(--transition);
}
.header-search input:focus{outline:none;border-color:var(--c-accent);background:var(--c-white);width:280px;box-shadow:0 0 0 3px rgba(232,99,10,.12)}
.header-search svg{position:absolute;left:10px;top:50%;transform:translateY(-50%);width:16px;height:16px;color:var(--c-g400);pointer-events:none}

.cart-btn{
  display:flex;align-items:center;gap:6px;
  padding:8px 16px;border-radius:var(--r-md);font-weight:600;font-size:.875rem;
  background:var(--c-accent);color:var(--c-white);border:none;cursor:pointer;
  transition:all var(--transition);
}
.cart-btn:hover{background:var(--c-accent-hover);color:var(--c-white)}
.cart-btn svg{width:18px;height:18px}
.cart-count{
  background:var(--c-white);color:var(--c-accent);
  font-size:.7rem;font-weight:700;border-radius:50%;
  width:20px;height:20px;display:flex;align-items:center;justify-content:center;
}

/* Mobile */
.mobile-toggle{display:none;background:none;border:none;cursor:pointer;padding:8px}
.mobile-toggle svg{width:24px;height:24px;color:var(--c-g700)}
@media(max-width:768px){
  .site-nav{
    display:none;position:absolute;top:64px;left:0;right:0;
    flex-direction:column;background:var(--c-white);
    padding:16px 20px;border-bottom:1px solid var(--c-g200);
    box-shadow:var(--sh-lg);gap:4px;
  }
  .site-nav.open{display:flex}
  .site-nav a{padding:12px 16px;width:100%;border-radius:var(--r-sm)}
  .mobile-toggle{display:block}
  .header-search input{width:160px}
  .header-search input:focus{width:180px}
}

/* ═══════════════════════════════════════
   HERO
   ═══════════════════════════════════════ */
.hero{
  background:var(--c-primary);
  color:var(--c-white);
  padding:72px 0 56px;
  position:relative;overflow:hidden;
}
.hero::before{
  content:'';position:absolute;top:-40%;right:-10%;
  width:600px;height:600px;border-radius:50%;
  background:radial-gradient(circle,rgba(232,99,10,.15) 0%,transparent 70%);
  pointer-events:none;
}
.hero h1{font-size:2.5rem;max-width:700px;line-height:1.15;color:var(--c-white)}
.hero p{font-size:1.1rem;opacity:.8;max-width:540px;margin:16px 0 32px}
.hero-search{
  max-width:560px;position:relative;
}
.hero-search input{
  width:100%;padding:16px 130px 16px 20px;
  border:none;border-radius:var(--r-lg);font-size:1rem;
  box-shadow:var(--sh-xl);
}
.hero-search input::placeholder{color:var(--c-g400)}
.hero-search button{
  position:absolute;right:5px;top:5px;bottom:5px;
  padding:0 24px;background:var(--c-accent);color:var(--c-white);
  border:none;border-radius:var(--r-md);font-weight:600;font-size:.95rem;
  cursor:pointer;transition:background var(--transition);
}
.hero-search button:hover{background:var(--c-accent-hover)}
.hero-search__results{
  display:none;position:absolute;top:calc(100% + 4px);left:0;right:0;
  background:var(--c-white);border-radius:var(--r-lg);
  box-shadow:var(--sh-xl);max-height:380px;overflow-y:auto;z-index:50;
}
.search-item{
  display:flex;align-items:center;gap:12px;
  padding:12px 16px;border-bottom:1px solid var(--c-g100);
  color:var(--c-g900);transition:background var(--transition);
}
.search-item:hover{background:var(--c-g50)}
.search-item__type{
  font-size:.7rem;text-transform:uppercase;letter-spacing:.04em;
  font-weight:600;color:var(--c-g400);
}
.search-item__title{font-weight:500;font-size:.95rem}
@media(max-width:600px){.hero h1{font-size:1.75rem}.hero{padding:48px 0 40px}}

/* ═══════════════════════════════════════
   SECTION HEADERS
   ═══════════════════════════════════════ */
.section-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:28px;gap:16px;flex-wrap:wrap}
.section-head h2{margin:0}
.section-head a{font-size:.875rem;font-weight:600;color:var(--c-accent)}

/* ═══════════════════════════════════════
   BRAND CARD
   ═══════════════════════════════════════ */
.brand-card{
  background:var(--c-white);border-radius:var(--r-lg);
  padding:24px 16px;text-align:center;
  box-shadow:var(--sh-xs);border:1px solid var(--c-g200);
  transition:all var(--transition);display:block;
}
.brand-card:hover{box-shadow:var(--sh-md);border-color:var(--c-accent);transform:translateY(-2px)}
.brand-card__logo{
  width:64px;height:64px;border-radius:var(--r-md);
  background:var(--c-g50);margin:0 auto 12px;
  display:flex;align-items:center;justify-content:center;
  font-size:1.5rem;font-weight:800;color:var(--c-primary);
  overflow:hidden;
}
.brand-card__logo img{width:100%;height:100%;object-fit:contain;padding:8px}
.brand-card__name{font-weight:700;font-size:.95rem;color:var(--c-g900)}
.brand-card__count{font-size:.8rem;color:var(--c-g400);margin-top:2px}

/* ═══════════════════════════════════════
   PRODUCT CARD
   ═══════════════════════════════════════ */
.product-card{
  background:var(--c-white);border-radius:var(--r-lg);
  box-shadow:var(--sh-xs);border:1px solid var(--c-g200);
  overflow:hidden;display:flex;flex-direction:column;
  transition:all var(--transition);
}
.product-card:hover{box-shadow:var(--sh-md);transform:translateY(-2px)}
.product-card__img{
  aspect-ratio:4/3;background:var(--c-g50);overflow:hidden;
  display:flex;align-items:center;justify-content:center;
  border-bottom:1px solid var(--c-g100);
}
.product-card__img img{width:100%;height:100%;object-fit:cover}
.product-card__img .placeholder-icon{font-size:3rem;opacity:.4}
.product-card__body{padding:16px;flex:1;display:flex;flex-direction:column}
.product-card__brand{
  font-size:.7rem;text-transform:uppercase;letter-spacing:.04em;
  font-weight:700;color:var(--c-accent);margin-bottom:6px;
}
.product-card__title{
  font-size:.95rem;font-weight:600;line-height:1.35;
  color:var(--c-g900);margin-bottom:8px;flex:1;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
}
.product-card__title a{color:inherit}
.product-card__title a:hover{color:var(--c-accent)}
.product-card__footer{display:flex;align-items:center;justify-content:space-between;margin-top:auto;padding-top:12px;border-top:1px solid var(--c-g100)}
.product-card__price{font-size:1.1rem;font-weight:800;color:var(--c-primary)}
.product-card__price del{font-size:.85rem;color:var(--c-g400);font-weight:400}
.product-card__price ins{text-decoration:none}
.btn-add{
  padding:7px 14px;border-radius:var(--r-sm);font-size:.8rem;font-weight:600;
  background:var(--c-accent);color:var(--c-white);border:none;cursor:pointer;
  transition:all var(--transition);white-space:nowrap;
}
.btn-add:hover{background:var(--c-accent-hover)}

/* ═══════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════ */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  padding:12px 24px;border-radius:var(--r-md);font-weight:600;
  font-size:.95rem;transition:all var(--transition);cursor:pointer;border:none;
}
.btn--primary{background:var(--c-accent);color:var(--c-white)}
.btn--primary:hover{background:var(--c-accent-hover);color:var(--c-white);transform:translateY(-1px);box-shadow:var(--sh-md)}
.btn--outline{background:transparent;border:2px solid var(--c-g300);color:var(--c-g700)}
.btn--outline:hover{border-color:var(--c-primary);color:var(--c-primary)}
.btn--white{background:var(--c-white);color:var(--c-primary)}
.btn--white:hover{background:var(--c-g50);color:var(--c-primary)}
.btn--lg{padding:14px 32px;font-size:1.05rem;border-radius:var(--r-lg)}
.btn--full{width:100%}
.btn--sm{padding:8px 16px;font-size:.85rem}

/* ═══════════════════════════════════════
   BREADCRUMBS
   ═══════════════════════════════════════ */
.breadcrumbs{
  padding:12px 0;font-size:.8rem;color:var(--c-g400);
  border-bottom:1px solid var(--c-g200);background:var(--c-white);
}
.breadcrumbs a{color:var(--c-g500)}
.breadcrumbs a:hover{color:var(--c-accent)}
.breadcrumbs .sep{margin:0 6px}

/* ═══════════════════════════════════════
   SHOP PAGE (WOO OVERRIDES)
   ═══════════════════════════════════════ */
.shop-layout{display:grid;grid-template-columns:240px 1fr;gap:32px}
@media(max-width:768px){.shop-layout{grid-template-columns:1fr}}

.shop-sidebar{position:sticky;top:80px;align-self:start}
.filter-group{margin-bottom:24px}
.filter-group h4{font-size:.8rem;text-transform:uppercase;letter-spacing:.05em;color:var(--c-g500);margin-bottom:10px;font-weight:600}
.filter-group ul{list-style:none}
.filter-group li{margin-bottom:2px}
.filter-group a{
  display:block;padding:7px 12px;font-size:.875rem;color:var(--c-g600);
  border-radius:var(--r-sm);transition:all var(--transition);
}
.filter-group a:hover,.filter-group a.active{background:var(--c-accent-light);color:var(--c-accent);font-weight:500}
.filter-group .count{float:right;color:var(--c-g400);font-size:.8rem}

/* ═══════════════════════════════════════
   SINGLE PRODUCT
   ═══════════════════════════════════════ */
.product-single{display:grid;grid-template-columns:1fr 1fr;gap:48px;align-items:start}
@media(max-width:768px){.product-single{grid-template-columns:1fr;gap:24px}}

.product-gallery{
  border-radius:var(--r-xl);overflow:hidden;
  box-shadow:var(--sh-sm);background:var(--c-white);
}
.product-gallery__main{aspect-ratio:1;background:var(--c-g50);display:flex;align-items:center;justify-content:center}
.product-gallery__main img{width:100%;height:100%;object-fit:contain;padding:20px}
.product-gallery__thumbs{display:flex;gap:8px;padding:12px}
.product-gallery__thumbs img{
  width:60px;height:60px;object-fit:cover;border-radius:var(--r-sm);
  cursor:pointer;border:2px solid transparent;transition:border var(--transition);
}
.product-gallery__thumbs img:hover{border-color:var(--c-accent)}

.product-info{}
.product-info__badge{
  display:inline-block;padding:4px 10px;border-radius:20px;
  font-size:.7rem;font-weight:700;text-transform:uppercase;letter-spacing:.04em;
  margin-bottom:12px;
}
.badge--brand{background:var(--c-primary-light);color:var(--c-primary)}
.badge--type{background:var(--c-accent-light);color:var(--c-accent)}
.badge--instant{background:var(--c-green-light);color:var(--c-green)}

.product-info h1{font-size:1.75rem;margin-bottom:12px}
.product-price{font-size:2.25rem;font-weight:800;color:var(--c-primary);margin:16px 0}
.product-price del{font-size:1.25rem;color:var(--c-g400);font-weight:400;margin-right:8px}
.product-price ins{text-decoration:none}

.product-meta-table{width:100%;border-collapse:collapse;margin:20px 0}
.product-meta-table td{padding:10px 0;border-bottom:1px solid var(--c-g100);font-size:.9rem}
.product-meta-table td:first-child{color:var(--c-g500);width:140px}
.product-meta-table td:last-child{font-weight:500}

.feature-list{margin:20px 0}
.feature-list li{
  display:flex;align-items:center;gap:10px;
  padding:10px 0;border-bottom:1px solid var(--c-g100);font-size:.9rem;
}
.feature-list li::before{
  content:'✓';display:flex;align-items:center;justify-content:center;
  width:22px;height:22px;border-radius:50%;flex-shrink:0;
  background:var(--c-green-light);color:var(--c-green);font-weight:700;font-size:.75rem;
}

.product-tab-nav{display:flex;gap:4px;border-bottom:2px solid var(--c-g200);margin-bottom:24px}
.product-tab-nav button{
  padding:10px 20px;font-size:.9rem;font-weight:500;
  background:none;border:none;border-bottom:2px solid transparent;
  margin-bottom:-2px;cursor:pointer;color:var(--c-g500);transition:all var(--transition);
}
.product-tab-nav button.active{border-color:var(--c-accent);color:var(--c-g900);font-weight:600}
.product-tab-content{display:none}
.product-tab-content.active{display:block}

/* ═══════════════════════════════════════
   CATEGORY PAGE
   ═══════════════════════════════════════ */
.cat-header{
  background:var(--c-white);padding:40px 0;border-bottom:1px solid var(--c-g200);
}
.cat-header h1{margin-bottom:8px}
.cat-header p{color:var(--c-g500);max-width:600px}

/* ═══════════════════════════════════════
   CTA BANNER
   ═══════════════════════════════════════ */
.cta-banner{
  background:var(--c-primary);color:var(--c-white);
  border-radius:var(--r-xl);padding:48px;text-align:center;
}
.cta-banner h2{color:var(--c-white);font-size:1.75rem;margin-bottom:12px}
.cta-banner p{opacity:.8;margin-bottom:24px;max-width:500px;margin-left:auto;margin-right:auto}

/* ═══════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════ */
.site-footer{background:var(--c-g900);color:var(--c-g400);padding:56px 0 24px}
.footer-grid{display:grid;grid-template-columns:1.5fr 1fr 1fr 1fr;gap:40px;margin-bottom:40px}
@media(max-width:768px){.footer-grid{grid-template-columns:1fr 1fr;gap:24px}}
@media(max-width:480px){.footer-grid{grid-template-columns:1fr}}
.site-footer h4{color:var(--c-white);font-size:.8rem;text-transform:uppercase;letter-spacing:.06em;margin-bottom:16px}
.site-footer ul{list-style:none}
.site-footer li{margin-bottom:8px}
.site-footer a{color:var(--c-g400);font-size:.875rem}
.site-footer a:hover{color:var(--c-white)}
.footer-bottom{
  border-top:1px solid rgba(255,255,255,.08);
  padding-top:20px;font-size:.8rem;text-align:center;
}
.footer-desc{font-size:.875rem;line-height:1.7;margin-bottom:16px;max-width:300px}

/* ═══════════════════════════════════════
   PAGINATION
   ═══════════════════════════════════════ */
.pagination{display:flex;justify-content:center;gap:6px;padding:40px 0}
.pagination a,.pagination span{
  width:38px;height:38px;display:flex;align-items:center;justify-content:center;
  border-radius:var(--r-sm);font-size:.875rem;font-weight:500;
  background:var(--c-white);border:1px solid var(--c-g200);color:var(--c-g600);
  transition:all var(--transition);
}
.pagination a:hover{border-color:var(--c-accent);color:var(--c-accent)}
.pagination .current{background:var(--c-primary);color:var(--c-white);border-color:var(--c-primary)}

/* ═══════════════════════════════════════
   404 / STATIC
   ═══════════════════════════════════════ */
.page-content{background:var(--c-white);padding:40px;border-radius:var(--r-xl);box-shadow:var(--sh-sm);max-width:800px;margin:0 auto}
.page-content h1{margin-bottom:20px}
.page-content p{margin-bottom:16px;color:var(--c-g600);line-height:1.8}
.page-content ul,.page-content ol{margin:16px 0;padding-left:24px}
.page-content li{margin-bottom:8px}
.page-content img{border-radius:var(--r-md);margin:20px 0}

/* ═══════════════════════════════════════
   WOO OVERRIDES
   ═══════════════════════════════════════ */
.woocommerce-message,.woocommerce-info,.woocommerce-error{
  padding:14px 20px;border-radius:var(--r-md);margin-bottom:20px;font-size:.9rem;
}
.woocommerce-message{background:var(--c-green-light);color:var(--c-green);border:1px solid #B8E6CC}
.woocommerce-info{background:var(--c-primary-light);color:var(--c-primary);border:1px solid #C5D9F0}
.woocommerce-error{background:#FFF0F0;color:var(--c-red);border:1px solid #FECACA}
.woocommerce .quantity .qty{
  width:60px;padding:8px;border:1px solid var(--c-g200);border-radius:var(--r-sm);
  text-align:center;font-weight:600;
}
.single_add_to_cart_button{
  background:var(--c-accent)!important;color:var(--c-white)!important;
  padding:14px 32px!important;border-radius:var(--r-md)!important;
  font-weight:700!important;font-size:1rem!important;
  border:none!important;cursor:pointer;transition:all var(--transition)!important;
}
.single_add_to_cart_button:hover{background:var(--c-accent-hover)!important;transform:translateY(-1px)}

/* ═══════════════════════════════════════
   UTILITIES
   ═══════════════════════════════════════ */
.mt-1{margin-top:8px}.mt-2{margin-top:16px}.mt-3{margin-top:24px}.mt-4{margin-top:32px}.mt-5{margin-top:48px}
.mb-1{margin-bottom:8px}.mb-2{margin-bottom:16px}.mb-3{margin-bottom:24px}.mb-4{margin-bottom:32px}
.text-center{text-align:center}
.text-muted{color:var(--c-g500)}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
