/* ==========================================================================
   Langsen Theme - Products List Page Styles
   Strictly aligned with Design Reference (media_1790666737132.jpg)
   Square Product Images
   ========================================================================== */

.langsen-products {
  color: #132d54;
  background-color: #ffffff;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  overflow-x: hidden;
}

/* Container width is unified by common.css .container */

/* --------------------------------------------------------------------------
   1. Hero Banner
   -------------------------------------------------------------------------- */
.ls-prod-hero {
  position: relative;
  width: 100%;
  background-position: center 36%;
  background-size: cover;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  box-sizing: border-box;
}

.ls-prod-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(6, 26, 61, 0.85) 0%, rgba(6, 26, 61, 0.55) 45%, rgba(6, 26, 61, 0.15) 100%);
  pointer-events: none;
}

.ls-prod-hero__inner {
  position: relative;
  z-index: 2;
  padding: 50px 0;
}

.ls-prod-hero__title {
  color: #ffffff;
  font-family: Outfit, 'Plus Jakarta Sans', sans-serif;
  font-size: 42px;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.1;
  margin: 0;
  text-transform: uppercase;
}

.ls-prod-hero__bar {
  width: 36px;
  height: 3px;
  background-color: #ee141d;
  margin: 14px 0 12px;
  border-radius: 1px;
}

.ls-prod-hero__subtitle {
  color: rgba(255, 255, 255, 0.95);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
  margin: 0 0 16px;
}

.ls-prod-hero__breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
  font-weight: 600;
}

.ls-prod-hero__breadcrumb a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  transition: color 0.2s ease;
}

.ls-prod-hero__breadcrumb a:hover {
  color: #ffffff;
}

.ls-bc-sep {
  opacity: 0.6;
  font-size: 11px;
}

/* --------------------------------------------------------------------------
   2. Main Layout (Sidebar + Products Grid)
   -------------------------------------------------------------------------- */
.ls-prod-layout {
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 32px;
  align-items: start;
  padding: 48px 0 64px;
}

/* Left Sidebar */
.ls-prod-sidebar {
  position: sticky;
  top: 90px;
}

.ls-sidebar-header {
  background: linear-gradient(135deg, #052454 0%, #073274 100%);
  display: flex;
  align-items: center;
  padding: 15px 20px;
  border-radius: 6px;
  margin-bottom: 10px;
  box-shadow: 0 4px 16px rgba(6, 42, 99, 0.12);
}

.ls-sidebar-header-bar {
  width: 4px;
  height: 18px;
  background-color: #ee141d;
  border-radius: 2px;
  margin-right: 12px;
  flex-shrink: 0;
}

.ls-sidebar-header-title {
  color: #ffffff;
  font-family: Outfit, 'Plus Jakarta Sans', sans-serif;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.06em;
  margin: 0;
  text-transform: uppercase;
}

.ls-category-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ls-category-item {
  margin: 0;
  padding: 0;
  position: relative;
}

/* 一级分类卡片头部 */
.ls-category-head {
  position: relative;
  display: flex;
  align-items: center;
  border-radius: 6px;
}

.ls-category-head .ls-category-link {
  flex: 1 1 auto;
  min-width: 0;
}

.has-sublist > .ls-category-head .ls-category-link {
  padding-right: 44px;
}

.ls-category-link {
  display: flex;
  align-items: center;
  padding: 13px 18px;
  border-radius: 6px;
  background-color: #f4f6fa;
  border: 1px solid #edf1f7;
  color: #0b2e5b;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  text-decoration: none;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.ls-category-text {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ls-category-link:hover {
  background-color: #edf2f9;
  color: #ee141d;
  border-color: #e2e8f0;
  transform: translateX(3px);
}

.ls-category-link.is-ancestor {
  background-color: #fef2f2;
  color: #ee141d;
  border-color: #fecaca;
  font-weight: 800;
}

.ls-category-link.active {
  background-color: #ee141d;
  color: #ffffff;
  border-color: #ee141d;
  font-weight: 800;
  box-shadow: 0 4px 16px rgba(238, 20, 29, 0.28);
  transform: none;
}

/* 二级导航折叠展开按钮 */
.ls-category-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  border-radius: 4px;
  padding: 0;
  transition: all 0.22s ease;
  z-index: 2;
}

.ls-category-toggle:hover {
  background-color: rgba(6, 42, 99, 0.08);
  color: #ee141d;
}

.ls-category-head:has(.active) .ls-category-toggle,
.ls-category-item.active > .ls-category-head .ls-category-toggle {
  color: #ffffff;
}

.ls-category-head:has(.active) .ls-category-toggle:hover {
  background-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.ls-category-toggle-arrow {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.ls-category-item.is-expanded > .ls-category-head .ls-category-toggle-arrow {
  transform: rotate(180deg);
}

/* 二级导航子列表：默认收起（收齐）隐藏 */
.ls-category-sublist {
  list-style: none;
  margin: 6px 0 8px 10px;
  padding: 6px 4px 6px 12px;
  border-left: 2px solid #cbd5e1;
  display: none; /* 默认收起！ */
  flex-direction: column;
  gap: 3px;
  background: #f8fafc;
  border-radius: 0 6px 6px 0;
  border-top: 1px solid #edf2f7;
  border-right: 1px solid #edf2f7;
  border-bottom: 1px solid #edf2f7;
  animation: lsSublistSlideDown 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes lsSublistSlideDown {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ls-category-item.is-expanded > .ls-category-sublist {
  display: flex !important;
}

/* 二级导航链接样式 */
.ls-category-sublist .ls-category-item {
  margin: 0;
}

.ls-category-sublist .ls-category-head {
  border-radius: 4px;
}

.ls-category-sublist .ls-category-link {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  font-size: 13.5px;
  font-weight: 600;
  color: #475569;
  background-color: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.ls-category-sublist .ls-category-link:hover {
  background-color: #edf2f9;
  color: #ee141d;
  padding-left: 15px;
  transform: none;
}

.ls-category-sublist .ls-category-link.active {
  background-color: #fef2f2;
  color: #ee141d;
  font-weight: 700;
  padding-left: 14px;
  border-left: 3px solid #ee141d;
  border-radius: 0 4px 4px 0;
  box-shadow: none;
  transform: none;
}

/* Right Main Products Grid */
.ls-prod-main {
  min-width: 0;
}

.ls-prod-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

/* Product Card */
.ls-prod-card {
  background-color: #ffffff;
  border-radius: 6px;
  border: 1px solid #edf2f7;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 16px rgba(6, 42, 99, 0.04);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.ls-prod-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(6, 42, 99, 0.1);
  border-color: #dbe4f0;
}

/* Product Image: STRICT SQUARE (1:1) */
.ls-prod-card__image-box {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background-color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  box-sizing: border-box;
  overflow: hidden;
  text-decoration: none;
}

.ls-prod-card__img {
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  display: block;
  transition: transform 0.35s ease;
}

.ls-prod-card:hover .ls-prod-card__img {
  transform: scale(1.05);
}

/* Product Info */
.ls-prod-card__info {
  padding: 0 16px 16px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.ls-prod-card__title {
  font-family: Outfit, 'Plus Jakarta Sans', sans-serif;
  font-size: 15.5px;
  font-weight: 800;
  line-height: 1.35;
  margin: 0 0 8px;
}

.ls-prod-card__title a {
  color: #062a63;
  text-decoration: none;
  transition: color 0.2s ease;
}

.ls-prod-card:hover .ls-prod-card__title a,
.ls-prod-card__title a:hover {
  color: #ee141d;
}

.ls-prod-card__desc {
  color: #64748b;
  font-size: 13.5px;
  line-height: 1.55;
  margin: 0 0 16px;
  white-space: pre-line;
  overflow-wrap: anywhere;
  min-height: 42px;
}

.ls-prod-card__action {
  margin-top: auto;
}

.ls-prod-card__more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #062a63;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: color 0.2s ease;
}

.ls-prod-arrow {
  color: #ee141d;
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

.ls-prod-card__more:hover,
.ls-prod-card:hover .ls-prod-card__more {
  color: #ee141d;
}

.ls-prod-card:hover .ls-prod-arrow {
  transform: translateX(4px);
}

/* --------------------------------------------------------------------------
   4. Call To Action (Bottom Banner)
   -------------------------------------------------------------------------- */
.ls-prod-cta {
  position: relative;
  background-position: center 48%;
  background-size: cover;
  background-repeat: no-repeat;
  padding: 34px 0;
  color: #ffffff;
}

.ls-prod-cta__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(6, 26, 61, 0.88) 0%, rgba(6, 26, 61, 0.65) 50%, rgba(6, 26, 61, 0.4) 100%);
  pointer-events: none;
}

.ls-prod-cta__inner {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
}

.ls-prod-cta__title {
  color: #ffffff;
  font-family: Outfit, 'Plus Jakarta Sans', sans-serif;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.25;
  margin: 0 0 8px;
}

.ls-prod-cta__desc {
  color: rgba(255, 255, 255, 0.92);
  font-size: 15px;
  margin: 0;
}

.ls-btn-cta-blue {
  padding: 13px 28px;
  font-size: 14.5px;
  font-weight: 700;
  border-radius: 4px;
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  background-color: rgba(6, 42, 99, 0.7);
  color: #ffffff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  transition: all 0.25s ease;
}

.ls-btn-cta-blue:hover {
  background-color: #ee141d;
  border-color: #ee141d;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(238, 20, 29, 0.35);
  transform: translateY(-2px);
}

.ls-btn-arrow {
  transition: transform 0.25s ease;
}

.ls-btn-cta-blue:hover .ls-btn-arrow {
  transform: translateX(4px);
}

/* --------------------------------------------------------------------------
   Responsive Design
   -------------------------------------------------------------------------- */
@media (max-width: 1100px) {
  .ls-prod-layout {
    grid-template-columns: 210px 1fr;
    gap: 20px;
  }

  .ls-prod-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 860px) {
  .ls-prod-layout {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 32px 0 48px;
  }

  .ls-prod-sidebar {
    position: static;
  }

  .ls-category-list {
    flex-direction: column;
    gap: 6px;
  }

  .ls-category-link {
    padding: 11px 16px;
    font-size: 13.5px;
  }

  .ls-prod-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .ls-prod-cta__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }
}

@media (max-width: 540px) {
  .ls-prod-hero__title {
    font-size: 30px;
  }

  .ls-prod-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .ls-prod-card__image-box {
    padding: 10px;
  }

  .ls-prod-card__info {
    padding: 0 10px 12px;
  }

  .ls-prod-card__title {
    font-size: 12.5px;
  }

  .ls-prod-card__desc {
    font-size: 11px;
    min-height: 32px;
  }

  .ls-prod-cta__title {
    font-size: 20px;
  }
}
