/*
Theme Name: LiangdaJi
Theme URI: https://ldjicrane.com
Author: Shanghai Liangdaji Intelligent Equipment Co., Ltd.
Description: Professional B2B website for European crane spare parts supplier. Layout mirrors shqxcranes.com style.
Version: 1.0
*/

/* ─── Reset ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Open Sans', Arial, sans-serif; color: #333; background: #fff; font-size: 15px; line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ─── Variables ─── */
:root {
  --blue: #1A5BB5;
  --dark-blue: #1C2E45;
  --nav-blue: #1A5BB5;
  --light-blue: #64B5F6;
  --top-bar: #0D1B2A;
  --accent: #e8600a;
  --gray-bg: #f5f5f5;
  --border: #e0e0e0;
  --text-gray: #666;
  --white: #ffffff;
}

/* ─── TOP BAR ─── */
.top-bar {
  background: var(--top-bar);
  color: #aaa;
  font-size: 12px;
  padding: 6px 0;
  border-bottom: 1px solid #1a2e42;
}
.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.top-bar .top-welcome { color: #bbb; }
.top-bar .top-contacts a {
  color: #bbb;
  margin-left: 18px;
  transition: color .2s;
}
.top-bar .top-contacts a:hover { color: var(--light-blue); }

/* ─── HEADER (Logo + Phone) ─── */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}
.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.header-logo {
  display: flex;
  align-items: center;
  gap: 14px;
}
.header-logo img { height: 56px; width: auto; }
.logo-text-wrap .company-en {
  font-size: 18px;
  font-weight: 700;
  color: var(--dark-blue);
  letter-spacing: 1px;
}
.logo-text-wrap .company-tagline {
  font-size: 11px;
  color: var(--text-gray);
  margin-top: 2px;
}
.header-phone {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--blue);
}
.header-phone .phone-icon {
  width: 42px;
  height: 42px;
  background: var(--blue);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.header-phone .phone-icon svg { fill: #fff; width: 20px; height: 20px; }
.header-phone .phone-label { font-size: 11px; color: var(--text-gray); }
.header-phone .phone-number { font-size: 20px; font-weight: 700; color: var(--dark-blue); }

/* ─── NAVIGATION ─── */
.main-nav {
  background: var(--nav-blue);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.main-nav .container {
  display: flex;
  align-items: stretch;
}
.nav-menu {
  display: flex;
  align-items: stretch;
}
.nav-menu li a {
  display: block;
  padding: 14px 24px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .5px;
  transition: background .2s;
  white-space: nowrap;
}
.nav-menu li a:hover,
.nav-menu li.current-menu-item a,
.nav-menu li.active a {
  background: var(--accent);
}

/* ─── CONTAINER ─── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ─── CAROUSEL ─── */
.hero-carousel {
  position: relative;
  overflow: hidden;
  background: var(--dark-blue);
  line-height: 0;
}
.carousel-track {
  display: flex;
  transition: transform .6s cubic-bezier(.4,0,.2,1);
  will-change: transform;
}
.carousel-slide {
  min-width: 100%;
  position: relative;
}
.carousel-slide img {
  width: 100%;
  height: 500px;
  object-fit: cover;
  object-position: center;
  display: block;
}
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,.35);
  border: none;
  color: #fff;
  font-size: 28px;
  width: 46px;
  height: 46px;
  cursor: pointer;
  z-index: 10;
  transition: background .2s;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
}
.carousel-btn:hover { background: var(--blue); }
.carousel-btn.prev { left: 16px; }
.carousel-btn.next { right: 16px; }
.carousel-dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 7px;
  z-index: 10;
}
.carousel-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,.5);
  cursor: pointer;
  transition: background .2s;
}
.carousel-dots span.active { background: #fff; }

/* ─── SECTION HEADER ─── */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--border);
  padding-bottom: 12px;
}
.section-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--dark-blue);
  position: relative;
}
.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  margin-top: 6px;
  background: linear-gradient(90deg, var(--accent) 40%, var(--blue) 100%);
}
.section-en {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-gray);
  margin-left: 8px;
}

/* ─── PRODUCT SEARCH ─── */
.product-search {
  display: flex;
  gap: 0;
  height: 36px;
}
.product-search input {
  border: 1px solid var(--border);
  border-right: none;
  padding: 0 12px;
  font-size: 13px;
  width: 200px;
  outline: none;
  color: #999;
}
.product-search button {
  background: var(--blue);
  border: none;
  color: #fff;
  padding: 0 14px;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
}
.product-search button:hover { background: var(--dark-blue); }

/* ─── PRODUCTS SECTION ─── */
.products-section {
  padding: 40px 0 30px;
  background: #fff;
}
.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.product-card {
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
  transition: box-shadow .2s, transform .2s;
  overflow: hidden;
}
.product-card:hover {
  box-shadow: 0 4px 16px rgba(26,91,181,.15);
  transform: translateY(-2px);
}
.product-card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  object-position: center;
  display: block;
}
.product-card-body {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-top: 1px solid var(--border);
}
.product-card-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--dark-blue);
}
.product-card-arrow {
  width: 28px;
  height: 28px;
  background: var(--blue);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .2s;
}
.product-card:hover .product-card-arrow { background: var(--accent); }
.product-card-arrow svg { fill: #fff; width: 14px; height: 14px; }

.view-more-wrap { text-align: right; }
.btn-view-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--blue);
  color: #fff;
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 3px;
  transition: background .2s;
}
.btn-view-more:hover { background: var(--dark-blue); }

/* ─── ABOUT + CONTACT ─── */
.about-contact-section {
  background: var(--gray-bg);
  padding: 48px 0;
}
.about-contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}
.about-col, .contact-col {
  background: #fff;
  padding: 28px;
  border: 1px solid var(--border);
}
.about-inner {
  display: flex;
  gap: 20px;
}
.about-img {
  width: 160px;
  height: 120px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border);
}
.about-text h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--dark-blue);
  margin-bottom: 8px;
}
.about-text p {
  font-size: 13px;
  color: var(--text-gray);
  line-height: 1.7;
  margin-bottom: 10px;
}
.about-text ul li {
  font-size: 13px;
  color: #555;
  padding: 2px 0;
}
.about-text ul li::before {
  content: counter(li) '. ';
  counter-increment: li;
  font-weight: 600;
  color: var(--blue);
}
.about-text ul { counter-reset: li; }

.contact-info-list { margin-top: 16px; }
.contact-info-list li {
  display: flex;
  gap: 10px;
  font-size: 13px;
  color: #555;
  padding: 6px 0;
  border-bottom: 1px dotted #ddd;
}
.contact-info-list li:last-child { border-bottom: none; }
.contact-label { font-weight: 600; color: var(--dark-blue); min-width: 80px; flex-shrink: 0; }
.contact-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  background: #25D366;
  color: #fff;
  padding: 8px 18px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
}
.contact-whatsapp:hover { background: #1da851; }

/* ─── SERVICE ICONS ROW ─── */
.services-section {
  background: #fff;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 0;
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.service-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 24px 28px;
  border-right: 1px solid var(--border);
  cursor: pointer;
  transition: background .2s;
  text-decoration: none;
  color: inherit;
}
.service-item:last-child { border-right: none; }
.service-item:hover { background: #f0f6ff; }
.service-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  color: var(--blue);
}
.service-icon svg { width: 100%; height: 100%; fill: var(--blue); }
.service-text-en { font-size: 11px; color: var(--text-gray); }
.service-text-main { font-size: 15px; font-weight: 700; color: var(--dark-blue); }

/* ─── FOOTER ─── */
.site-footer {
  background: var(--nav-blue);
  padding: 22px 0;
}
.site-footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-logo img { height: 44px; filter: brightness(0) invert(1); }
.footer-phone {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
}
.footer-phone svg { fill: #fff; width: 22px; height: 22px; }
.footer-phone .phone-label-f { font-size: 12px; color: rgba(255,255,255,.7); }
.footer-phone .phone-num-f { font-size: 22px; font-weight: 700; letter-spacing: 1px; }
.footer-bottom {
  background: #0D1B2A;
  text-align: center;
  padding: 10px 0;
  font-size: 12px;
  color: #666;
}

/* ─── WOOCOMMERCE PRODUCT PAGE ─── */
.woo-page-wrap {
  padding: 40px 0 60px;
  background: #fff;
  min-height: 500px;
}

/* Breadcrumb */
.woocommerce-breadcrumb {
  font-size: 13px;
  color: #888;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eee;
}
.woocommerce-breadcrumb a { color: var(--blue); }

/* Category / shop title */
.woocommerce-products-header__title,
.woocommerce-loop-category__title,
h1.page-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--dark-blue);
  margin-bottom: 6px;
  padding-bottom: 10px;
  border-left: 4px solid var(--blue);
  padding-left: 12px;
}

/* Product count */
.woocommerce-result-count {
  font-size: 13px;
  color: #888;
  margin-bottom: 20px;
}

/* Product grid */
ul.products {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 16px !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}
ul.products li.product {
  border: 1px solid var(--border);
  background: #fff;
  transition: box-shadow .2s, transform .2s;
  overflow: hidden;
  margin: 0 !important;
  float: none !important;
  width: auto !important;
}
ul.products li.product:hover {
  box-shadow: 0 4px 18px rgba(26,91,181,.14);
  transform: translateY(-3px);
}
ul.products li.product img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}
ul.products li.product .woocommerce-loop-product__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--dark-blue);
  padding: 12px 14px 4px;
  line-height: 1.4;
}
ul.products li.product .price { display: none; }

/* Inquiry button replaces Add to Cart */
ul.products li.product a.button,
ul.products li.product a.add_to_cart_button {
  display: block;
  margin: 8px 14px 14px;
  padding: 8px 16px;
  background: var(--blue);
  color: #fff !important;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  border-radius: 3px;
  transition: background .2s;
  text-decoration: none;
}
ul.products li.product a.button:hover,
ul.products li.product a.add_to_cart_button:hover {
  background: var(--dark-blue) !important;
  color: #fff !important;
}

/* Single product page */
.woocommerce div.product {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}
.woocommerce div.product .woocommerce-product-gallery {
  border: 1px solid var(--border);
}
.woocommerce div.product .summary {
  padding: 0;
}
.woocommerce div.product .product_title {
  font-size: 22px;
  font-weight: 700;
  color: var(--dark-blue);
  margin-bottom: 16px;
  line-height: 1.4;
}
.woocommerce div.product .price { display: none; }
.woocommerce div.product .woocommerce-product-details__short-description {
  font-size: 14px;
  color: #555;
  line-height: 1.8;
  margin-bottom: 20px;
  border-left: 3px solid var(--blue);
  padding-left: 12px;
}
/* Replace add to cart with Inquiry button */
.woocommerce div.product form.cart { margin-bottom: 16px; }
.woocommerce div.product form.cart .single_add_to_cart_button,
.woocommerce div.product .cart button[type=submit] {
  background: var(--blue) !important;
  color: #fff !important;
  border: none !important;
  padding: 12px 32px !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  border-radius: 4px !important;
  cursor: pointer;
  transition: background .2s !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
}
.woocommerce div.product form.cart .single_add_to_cart_button:hover {
  background: var(--dark-blue) !important;
}
/* WhatsApp inquiry button */
.ld-inquire-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #25D366;
  color: #fff;
  padding: 12px 24px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  margin-top: 12px;
  text-decoration: none;
  transition: background .2s;
}
.ld-inquire-btn:hover { background: #1da851; color: #fff; }

/* Product meta / SKU */
.woocommerce div.product .product_meta {
  font-size: 13px;
  color: #888;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #eee;
}

/* Product tabs */
.woocommerce div.product .woocommerce-tabs {
  grid-column: 1 / -1;
  margin-top: 32px;
}
.woocommerce div.product .woocommerce-tabs ul.tabs {
  list-style: none;
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--blue);
  margin: 0;
  padding: 0;
}
.woocommerce div.product .woocommerce-tabs ul.tabs li {
  margin: 0;
  border: none;
}
.woocommerce div.product .woocommerce-tabs ul.tabs li a {
  display: block;
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 600;
  color: #555;
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-bottom: none;
}
.woocommerce div.product .woocommerce-tabs ul.tabs li.active a {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}
.woocommerce div.product .woocommerce-tabs .panel {
  padding: 24px;
  border: 1px solid #ddd;
  border-top: none;
  font-size: 14px;
  line-height: 1.8;
  color: #444;
}

/* Sidebar for category archive */
.woo-archive-wrap {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 30px;
  align-items: start;
}
.woo-sidebar {
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.woo-sidebar h3 {
  background: var(--dark-blue);
  color: #fff;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 700;
}
.woo-sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.woo-sidebar ul li a {
  display: flex;
  justify-content: space-between;
  padding: 10px 16px;
  font-size: 13px;
  color: #444;
  border-bottom: 1px solid #f0f0f0;
  transition: all .2s;
}
.woo-sidebar ul li a:hover,
.woo-sidebar ul li.current-cat > a {
  background: #f0f6ff;
  color: var(--blue);
  padding-left: 20px;
}
.woo-sidebar ul li a .count {
  background: var(--blue);
  color: #fff;
  border-radius: 10px;
  padding: 1px 8px;
  font-size: 11px;
}

/* Pagination */
.woocommerce-pagination ul {
  display: flex;
  gap: 6px;
  list-style: none;
  justify-content: center;
  margin-top: 32px;
}
.woocommerce-pagination ul li a,
.woocommerce-pagination ul li span {
  display: block;
  padding: 6px 14px;
  border: 1px solid var(--border);
  font-size: 13px;
  color: #555;
  transition: all .2s;
}
.woocommerce-pagination ul li a:hover,
.woocommerce-pagination ul li span.current {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}

/* ─── RESPONSIVE ─── */
@media (max-width: 1024px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .service-item:nth-child(2) { border-right: none; }
  .service-item:nth-child(3) { border-right: 1px solid var(--border); }
  .service-item:nth-child(4) { border-right: none; }
}
@media (max-width: 768px) {
  .top-bar .container { flex-direction: column; gap: 4px; text-align: center; }
  .site-header .container { flex-direction: column; gap: 12px; text-align: center; }
  .header-phone { justify-content: center; }
  .main-nav { position: relative; }
  .nav-menu { flex-wrap: wrap; }
  .nav-menu li a { padding: 10px 16px; font-size: 13px; }
  .carousel-slide img { height: 240px; }
  .section-header { flex-direction: column; align-items: flex-start; gap: 10px; }
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .about-contact-grid { grid-template-columns: 1fr; }
  .about-inner { flex-direction: column; }
  .about-img { width: 100%; height: 160px; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .site-footer .container { flex-direction: column; gap: 14px; }
}
@media (max-width: 480px) {
  .products-grid { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr; }
  .service-item { border-right: none; border-bottom: 1px solid var(--border); }
  .service-item:last-child { border-bottom: none; }
}
