/**
 * KeXinMaterials WooCommerce - Enhanced Styles
 * Matches local static site design
 */

/* ============================================
   Variables
   ============================================ */
:root {
  --color-accent: #fc3f1e;
  --color-primary: #0d0d0d;
  --color-dark: #1a1a1a;
  --color-white: #ffffff;
  --color-off-white: #f4f1ec;
  --color-gray-100: #f5f5f5;
  --color-gray-200: #e5e5e5;
  --color-gray-300: #d4d4d4;
  --color-gray-400: #a3a3a3;
  --color-gray-500: #737373;
  --color-gray-700: #404040;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);

  --transition-fast: 0.15s ease;
  --transition-base: 0.25s ease;
  --transition-slow: 0.4s ease;

  --header-height: 72px;
}

/* ============================================
   Page Hero
   ============================================ */
.page-hero {
  position: relative;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: var(--space-8);
}

.page-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.page-hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(13, 13, 13, 0.85) 0%, rgba(26, 26, 26, 0.7) 100%);
  z-index: 1;
}

.page-hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--color-white);
}

.page-hero__content h1 {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: var(--space-3);
}

.breadcrumb {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
}

.breadcrumb a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--color-white);
}

.breadcrumb .separator {
  margin: 0 var(--space-2);
}

.breadcrumb .current {
  color: var(--color-white);
}

/* ============================================
   Series / Category Navigation (scrollable filter)
   ============================================ */
.series-nav {
  position: sticky;
  top: var(--header-height);
  z-index: 100;
  background-color: rgba(13, 13, 13, 0.97);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: var(--space-3) 0;
  margin-bottom: var(--space-8);
}

.series-nav .container {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* scroll buttons (desktop affordance) */
.series-nav__btn {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  display: none;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  transition: all var(--transition-fast);
  user-select: none;
}
.series-nav__btn:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
}
.series-nav__btn--prev { margin-right: 2px; }
.series-nav__btn--next { margin-left: 2px; }
@media (min-width: 769px) {
  .series-nav__btn { display: inline-flex; }
}

.series-nav__track {
  flex: 1 1 auto;
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 2px 0;
}
.series-nav__track::-webkit-scrollbar {
  display: none;
}

.series-nav__item {
  flex: 0 0 auto;
  padding: 8px 18px;
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: all var(--transition-fast);
}
.series-nav__item:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}
.series-nav__item.active {
  color: #fff;
  background-color: var(--color-accent);
  border-color: var(--color-accent);
}
.series-nav__item--all {
  font-weight: 700;
}

/* edge fade on desktop for scroll hint */
.series-nav .container::before,
.series-nav .container::after {
  content: "";
  position: absolute;
  top: 0;
  width: 34px;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}
.series-nav .container::before {
  left: 38px;
  background: linear-gradient(to right, rgba(13, 13, 13, 0.97), transparent);
}
.series-nav .container::after {
  right: 38px;
  background: linear-gradient(to left, rgba(13, 13, 13, 0.97), transparent);
}
@media (max-width: 768px) {
  .series-nav .container::before,
  .series-nav .container::after { display: none; }
}

/* ============================================
   Product Grid
   ============================================ */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
}

@media (max-width: 1200px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 540px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   Product Card (pcard)
   ============================================ */
.pcard {
  position: relative;
  display: flex;
  flex-direction: column;
  background-color: var(--color-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.06);
  transition: all var(--transition-slow);
}

.pcard:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
  border-color: var(--color-accent);
}

.pcard__media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #f2efea 0%, #e6e1d9 100%);
}

.pcard__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.pcard:hover .pcard__media img {
  transform: scale(1.07);
}

.pcard__media--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a1a1a 0%, #333 100%);
}

.pcard__media--placeholder .ph-model {
  font-size: 1.5rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.14);
  letter-spacing: 0.1em;
  text-align: center;
  padding: var(--space-4);
  line-height: 1.1;
}

.pcard__badge {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  padding: 4px 12px;
  background-color: var(--color-accent);
  color: var(--color-white);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  z-index: 2;
}

.pcard__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: var(--space-5);
}

.pcard__cat {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-2);
}

.pcard__title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-dark);
  margin-bottom: var(--space-1);
  line-height: 1.3;
}

.pcard__title a {
  color: inherit;
  text-decoration: none;
}

.pcard__title a:hover {
  color: var(--color-accent);
}

.pcard__model {
  font-family: 'Courier New', monospace;
  font-size: 0.875rem;
  color: var(--color-gray-500);
  margin-bottom: var(--space-3);
}

.pcard__desc {
  font-size: 0.875rem;
  color: var(--color-gray-700);
  line-height: 1.6;
  margin-bottom: var(--space-4);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pcard__specs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.pcard__spec {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  color: var(--color-gray-700);
  background-color: var(--color-off-white);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
}

.pcard__spec svg {
  width: 13px;
  height: 13px;
  color: var(--color-accent);
  flex-shrink: 0;
}

.pcard__colors {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: var(--space-4);
}

.pcard__colors .label {
  font-size: 0.75rem;
  color: var(--color-gray-500);
  margin-right: 2px;
}

.pcard__color {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 2px solid var(--color-white);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.pcard__price {
  font-family: 'Courier New', monospace;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: var(--space-3);
}

.pcard__footer {
  margin-top: auto;
  display: flex;
  gap: var(--space-2);
  align-items: center;
  position: relative;
  z-index: 2;
}

/* Whole-card clickable overlay (image/title/model/desc all open product) */
.pcard__link {
  position: absolute;
  inset: 0;
  z-index: 1;
  text-decoration: none;
  outline: none;
}

.pcard__title a {
  position: relative;
  z-index: 2;
}

/* ============================================
   WooCommerce Button Styles
   ============================================ */
.woocommerce ul.products li.product .button {
  display: inline-block;
  padding: 12px 20px;
  background-color: var(--color-primary);
  color: var(--color-white);
  border-radius: var(--radius-md);
  font-weight: 500;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.woocommerce ul.products li.product .button:hover {
  background-color: var(--color-accent);
}

/* Add to Cart button */
.woocommerce a.button.add_to_cart_button,
.woocommerce a.button.product_type_simple {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  background-color: var(--color-accent);
  color: var(--color-white);
  border-radius: var(--radius-md);
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.woocommerce a.button.add_to_cart_button:hover,
.woocommerce a.button.product_type_simple:hover {
  background-color: #e03618;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ============================================
   Cart Page
   ============================================ */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: var(--space-10);
  align-items: start;
}

@media (max-width: 860px) {
  .cart-layout {
    grid-template-columns: 1fr;
  }
}

/* Cart Table */
.woocommerce-cart-form__contents {
  width: 100%;
  border-collapse: collapse;
}

.woocommerce-cart-form__contents thead {
  background-color: var(--color-off-white);
}

.woocommerce-cart-form__contents th {
  padding: var(--space-4);
  text-align: left;
  font-weight: 600;
  color: var(--color-dark);
  border-bottom: 2px solid rgba(0, 0, 0, 0.1);
}

.woocommerce-cart-form__contents td {
  padding: var(--space-4);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  vertical-align: middle;
}

.woocommerce-cart-form__contents .product-thumbnail img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.woocommerce-cart-form__contents .product-name a {
  color: var(--color-dark);
  font-weight: 600;
  text-decoration: none;
}

.woocommerce-cart-form__contents .product-name a:hover {
  color: var(--color-accent);
}

.woocommerce-cart-form__contents .product-remove .remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background-color: transparent;
  color: var(--color-gray-400) !important;
  font-size: 20px;
  border-radius: 50%;
  transition: all var(--transition-fast);
}

.woocommerce-cart-form__contents .product-remove .remove:hover {
  background-color: var(--color-accent);
  color: var(--color-white) !important;
}

/* Quantity Input */
.woocommerce .quantity input.qty {
  width: 60px;
  height: 38px;
  padding: 0 var(--space-2);
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: var(--radius-sm);
  text-align: center;
  font-family: 'Courier New', monospace;
  font-weight: 600;
}

/* Cart Summary Sidebar */
.cart-summary {
  background-color: var(--color-white);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  position: sticky;
  top: calc(var(--header-height) + var(--space-4));
}

.cart-summary h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-dark);
  margin-bottom: var(--space-4);
}

.cart-summary__totals {
  margin-bottom: var(--space-5);
}

.cart-totals__row {
  display: flex;
  justify-content: space-between;
  padding: var(--space-2) 0;
  font-size: 0.9375rem;
  color: var(--color-gray-700);
}

.cart-summary__total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--color-dark);
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 2px solid rgba(0, 0, 0, 0.1);
}

/* Cart Buttons */
.cart-summary__actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 24px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: all var(--transition-fast);
  cursor: pointer;
  border: none;
}

.btn--primary {
  background-color: var(--color-accent);
  color: var(--color-white);
}

.btn--primary:hover {
  background-color: #e03618;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn--outline {
  background-color: transparent;
  color: var(--color-dark);
  border: 2px solid rgba(0, 0, 0, 0.15);
}

.btn--outline:hover {
  border-color: var(--color-dark);
}

.btn--block {
  display: flex;
  width: 100%;
}

/* Coupon */
.coupon {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.coupon label {
  display: none;
}

.coupon input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
}

.coupon .button {
  padding: 10px 16px;
  background-color: var(--color-gray-200);
  color: var(--color-dark);
  border-radius: var(--radius-md);
  font-weight: 500;
}

.coupon .button:hover {
  background-color: var(--color-gray-300);
}

.actions .button {
  padding: 12px 24px;
  background-color: var(--color-primary);
  color: var(--color-white);
  border-radius: var(--radius-md);
}

.actions .button:hover {
  background-color: var(--color-accent);
}

/* ============================================
   Single Product Page (.psp)
   ============================================ */
.psp {
  margin-bottom: var(--space-10);
}

/* Layout: gallery + summary */
.psp__main {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: var(--space-10);
  align-items: start;
  margin-bottom: var(--space-10);
}

@media (max-width: 900px) {
  .psp__main {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
}

/* Gallery */
.psp__gallery {
  position: sticky;
  top: calc(var(--header-height) + var(--space-4));
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-gray-100);
}
@media (max-width: 900px) {
  .psp__gallery { position: static; }
}
.psp__gallery .woocommerce-product-gallery {
  position: relative;
}
.psp__gallery .woocommerce-product-gallery__wrapper {
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.psp__gallery .woocommerce-product-gallery__image img,
.psp__gallery .flex-viewport img {
  width: 100%;
  height: auto;
  display: block;
}

/* Summary */
.psp__summary {
  padding: var(--space-2) 0;
}

.psp__cats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}
.psp__cat {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-accent);
  background: rgba(252, 63, 30, 0.08);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: all var(--transition-fast);
}
.psp__cat:hover {
  background: var(--color-accent);
  color: #fff;
}

.psp__title {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--color-dark);
  line-height: 1.2;
  margin-bottom: var(--space-4);
}

.psp__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
  font-size: 0.9rem;
  color: var(--color-gray-500);
}
.psp__sku strong {
  color: var(--color-dark);
  font-family: 'Courier New', monospace;
}
.psp__stock {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
  padding: 3px 12px;
  border-radius: var(--radius-full);
}
.psp__stock::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.psp__stock--in { color: #1a9e4b; background: rgba(26, 158, 75, 0.1); }
.psp__stock--out { color: #c0392b; background: rgba(192, 57, 43, 0.1); }

.psp__price {
  font-family: 'Courier New', monospace;
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: var(--space-5);
}
.psp__price del {
  color: var(--color-gray-400);
  font-size: 1.25rem;
  margin-right: var(--space-3);
}

.psp__shortdesc {
  color: var(--color-gray-700);
  line-height: 1.8;
  font-size: 0.95rem;
  margin-bottom: var(--space-6);
}

/* Specs table */
.psp__specs {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin-bottom: var(--space-6);
  background: var(--color-gray-100);
}
.psp__specs-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-dark);
  margin-bottom: var(--space-3);
}
.psp__spec-table {
  width: 100%;
  border-collapse: collapse;
}
.psp__spec-table th,
.psp__spec-table td {
  text-align: left;
  padding: 10px 0;
  font-size: 0.9rem;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.08);
}
.psp__spec-table tr:last-child th,
.psp__spec-table tr:last-child td { border-bottom: none; }
.psp__spec-table th {
  font-weight: 600;
  color: var(--color-gray-500);
  width: 40%;
}
.psp__spec-table td {
  color: var(--color-dark);
  font-weight: 500;
}

/* Add to cart */
.psp__cart {
  margin-bottom: var(--space-5);
}
.psp__cart form.cart {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
}
.psp__cart .quantity {
  margin-right: var(--space-2);
}
/* Compact quantity stepper (− [n] +) */
.psp__cart .qty-stepper {
  display: inline-flex;
  align-items: stretch;
  height: 44px;
  border: 1px solid rgba(0, 0, 0, 0.18);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.psp__cart .qty-stepper__btn {
  width: 34px;
  min-width: 34px;
  height: 100%;
  padding: 0;
  border: none;
  background: #f4f4f4;
  color: var(--color-dark);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast);
}
.psp__cart .qty-stepper__btn:hover {
  background: #e9e9e9;
  color: var(--color-accent);
}
.psp__cart .quantity input.qty,
.psp__cart .qty-stepper input.qty {
  width: 46px;
  height: 44px;
  padding: 0 2px;
  border: none;
  border-left: 1px solid rgba(0, 0, 0, 0.12);
  border-right: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 0;
  text-align: center;
  font-family: 'Courier New', monospace;
  font-size: 1rem;
  font-weight: 600;
  -moz-appearance: textfield;
  appearance: textfield;
}
.psp__cart .qty-stepper input.qty::-webkit-outer-spin-button,
.psp__cart .qty-stepper input.qty::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.psp__cart button.single_add_to_cart_button {
  flex: 0 0 auto;
  min-width: 0;
  white-space: nowrap;
  padding: 12px 30px;
  background-color: var(--color-accent);
  color: var(--color-white);
  border: none;
  border-radius: var(--radius-md);
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.psp__cart button.single_add_to_cart_button:hover {
  background-color: #e03618;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Extra actions */
.psp__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}
.psp__action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 20px;
  border: 2px solid rgba(0, 0, 0, 0.12);
  border-radius: var(--radius-md);
  color: var(--color-dark);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all var(--transition-fast);
}
.psp__action:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

/* Sections (tabs / related) */
.psp__section {
  margin-top: var(--space-10);
}
.psp__related-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-dark);
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-3);
  border-bottom: 2px solid rgba(0, 0, 0, 0.08);
}

/* Restyled WC tabs */
.psp .woocommerce-tabs {
  margin-top: 0;
}
.psp .woocommerce-tabs .tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border-bottom: 2px solid rgba(0, 0, 0, 0.1);
  margin-bottom: var(--space-6);
}
.psp .woocommerce-tabs .tabs li {
  padding: var(--space-3) var(--space-6);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  font-weight: 600;
  color: var(--color-gray-500);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.psp .woocommerce-tabs .tabs li.active {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}
.psp .woocommerce-tabs .tabs li a {
  color: inherit;
  text-decoration: none;
}
.psp .woocommerce-tabs .panel {
  padding: var(--space-2) 0;
  color: var(--color-gray-700);
  line-height: 1.9;
  font-size: 0.95rem;
}

/* ============================================
   Empty Cart
   ============================================ */
.cart-empty {
  text-align: center;
  padding: var(--space-16) 0;
}

.cart-empty p {
  font-size: 1.125rem;
  color: var(--color-gray-500);
  margin-bottom: var(--space-5);
}

.cart-empty .return-to-shop {
  display: inline-block;
  padding: 14px 28px;
  background-color: var(--color-accent);
  color: var(--color-white);
  border-radius: var(--radius-md);
  font-weight: 600;
  text-decoration: none;
}

.cart-empty .return-to-shop:hover {
  background-color: #e03618;
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 768px) {
  .page-hero {
    height: 150px;
  }

  .page-hero__content h1 {
    font-size: 1.6rem;
  }

  /* 问题2：移动端让全部分类标签以"云标签"换行完全显示（不再隐藏滚动） */
  .series-nav {
    margin-bottom: var(--space-5);
  }
  .series-nav__btn {
    display: none !important;
  }
  .series-nav__track {
    flex-wrap: wrap;
    justify-content: center;
    overflow-x: visible;
    gap: 7px;
    padding: 4px 0;
  }
  .series-nav__item {
    font-size: 0.78rem;
    padding: 6px 13px;
  }

  /* 问题1：产品网格移动端收口 */
  .product-grid {
    gap: var(--space-4);
    grid-template-columns: repeat(2, 1fr);
  }

  .pcard__body {
    padding: var(--space-4);
  }
  .pcard__title {
    font-size: 1rem;
  }
  .pcard__desc {
    -webkit-line-clamp: 3;
  }
  .pcard__price {
    font-size: 1.1rem;
  }

  /* 详情页移动端堆叠 */
  .psp__main {
    gap: var(--space-5);
  }
  .psp__title {
    font-size: 1.6rem;
  }
  .psp__price {
    font-size: 1.75rem;
  }
  .psp__cart form.cart {
    flex-direction: row;
    align-items: stretch;
    flex-wrap: nowrap;
  }
  .psp__cart .quantity {
    flex: 0 0 auto;
    width: auto;
    margin-right: var(--space-3);
  }
  .psp__cart button.single_add_to_cart_button {
    flex: 1 1 auto;
    width: auto;
  }
  .psp__actions {
    flex-direction: column;
  }
  .psp__action {
    justify-content: center;
  }

  .cart-summary {
    position: static;
  }
}

@media (max-width: 480px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
  .pcard__media {
    aspect-ratio: 1 / 1;
  }
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.pcard {
  animation: fadeInUp 0.5s ease forwards;
}

.pcard:nth-child(1) { animation-delay: 0.05s; }
.pcard:nth-child(2) { animation-delay: 0.1s; }
.pcard:nth-child(3) { animation-delay: 0.15s; }
.pcard:nth-child(4) { animation-delay: 0.2s; }
.pcard:nth-child(5) { animation-delay: 0.25s; }
.pcard:nth-child(6) { animation-delay: 0.3s; }
.pcard:nth-child(7) { animation-delay: 0.35s; }
.pcard:nth-child(8) { animation-delay: 0.4s; }

/* ============================================================
   产品详情页 — 科技 / 高端 / 动态 重设计 (问题3)
   ============================================================ */
img { max-width: 100%; height: auto; }
.pcard__title, .pcard__model, .psp__title, .psp__sku, .psp__meta {
  overflow-wrap: break-word;
  word-break: break-word;
}

/* 详情页背后的微弱科技光晕 */
.psp { position: relative; }
.psp::before {
  content: "";
  position: absolute;
  top: -40px; left: 0; right: 0;
  height: 440px;
  background:
    radial-gradient(900px 320px at 82% -12%, rgba(252,63,30,0.12), transparent 60%),
    radial-gradient(720px 300px at 8% 0%, rgba(56,189,248,0.10), transparent 60%);
  pointer-events: none;
  z-index: 0;
}
.psp > * { position: relative; z-index: 1; }

/* 入场动画（动态，无隐藏内容风险） */
@keyframes pspIn {
  from { opacity: 0; transform: translateY(22px) scale(0.985); }
  to   { opacity: 1; transform: none; }
}
@keyframes pspRise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}
.psp__gallery { animation: pspIn 0.7s cubic-bezier(.2,.7,.2,1) both; }
.psp__summary { animation: pspRise 0.7s cubic-bezier(.2,.7,.2,1) both; }
.psp__section { animation: pspRise 0.7s cubic-bezier(.2,.7,.2,1) both; }
.psp__section:nth-of-type(2) { animation-delay: .08s; }

/* ---- 画廊：暗色"展台" ---- */
.psp__gallery {
  background: linear-gradient(160deg, #11141b 0%, #1a2030 100%);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  box-shadow: 0 22px 55px rgba(0,0,0,0.28), inset 0 1px 0 rgba(255,255,255,0.05);
  padding: var(--space-5);
}
.psp-gallery__stage {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #0c0f16;
  aspect-ratio: 4 / 3;
  display: flex; align-items: center; justify-content: center;
}
.psp-gallery__img {
  max-width: 100%; max-height: 100%;
  width: auto; height: auto;
  object-fit: contain;
  cursor: zoom-in;
  transition: transform var(--transition-slow);
}
.psp-gallery__stage:hover .psp-gallery__img { transform: scale(1.05); }
.psp-gallery__zoom {
  position: absolute; right: 12px; bottom: 12px;
  width: 38px; height: 38px;
  border: none; border-radius: 50%;
  background: rgba(255,255,255,0.12);
  color: #fff; font-size: 18px; cursor: pointer;
  backdrop-filter: blur(4px);
  transition: all var(--transition-fast);
}
.psp-gallery__zoom:hover { background: var(--color-accent); }
.psp-gallery__thumbs {
  display: flex; gap: 10px; margin-top: var(--space-4);
  overflow-x: auto; scrollbar-width: none;
}
.psp-gallery__thumbs::-webkit-scrollbar { display: none; }
.psp-gallery__thumb {
  flex: 0 0 auto; width: 72px; height: 72px;
  padding: 0; border: 2px solid transparent; border-radius: var(--radius-sm);
  overflow: hidden; background: #0c0f16; cursor: pointer;
  transition: all var(--transition-fast);
}
.psp-gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }
.psp-gallery__thumb.is-active { border-color: var(--color-accent); box-shadow: 0 0 0 3px rgba(252,63,30,0.25); }
.psp-gallery__thumb:hover { border-color: rgba(255,255,255,0.45); }

/* ---- 概要区科技高光 ---- */
.psp__title { position: relative; padding-bottom: var(--space-3); }
.psp__title::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 64px; height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, var(--color-accent), transparent);
}
.psp__price {
  background: linear-gradient(90deg, var(--color-accent), #ff8a3d);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.psp__specs {
  background: linear-gradient(160deg, #fafafa, #f0f0f3);
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: var(--shadow-sm);
}
.psp__spec-table td { font-family: 'Courier New', monospace; }
.psp__cart button.single_add_to_cart_button {
  background: linear-gradient(135deg, var(--color-accent), #ff7a3d);
  box-shadow: 0 8px 20px rgba(252,63,30,0.30);
}
.psp__cart button.single_add_to_cart_button:hover {
  box-shadow: 0 12px 28px rgba(252,63,30,0.45);
}

/* ---- 点击放大灯箱 ---- */
.psp-lightbox {
  position: fixed; inset: 0; z-index: 9999;
  display: none; align-items: center; justify-content: center;
  background: rgba(8,10,15,0.92); backdrop-filter: blur(8px);
  opacity: 0; transition: opacity 0.25s ease;
}
.psp-lightbox.is-open { display: flex; opacity: 1; }
.psp-lightbox__img {
  max-width: 90vw; max-height: 86vh; border-radius: 8px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
  animation: lbZoom 0.3s ease;
}
@keyframes lbZoom { from { transform: scale(0.94); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.psp-lightbox__close, .psp-lightbox__nav {
  position: absolute; border: none; border-radius: 50%;
  background: rgba(255,255,255,0.12); color: #fff; cursor: pointer;
  transition: all var(--transition-fast);
}
.psp-lightbox__close { top: 20px; right: 20px; width: 44px; height: 44px; font-size: 24px; }
.psp-lightbox__nav { top: 50%; transform: translateY(-50%); width: 50px; height: 50px; font-size: 28px; }
.psp-lightbox__prev { left: 20px; }
.psp-lightbox__next { right: 20px; }
.psp-lightbox__close:hover, .psp-lightbox__nav:hover { background: var(--color-accent); }
.psp-lightbox__counter {
  position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,0.85); font-size: 0.85rem; font-family: 'Courier New', monospace;
}

/* 分类标签：平板及更窄一律换行完全显示（不再依赖横向滑动） */
@media (max-width: 1024px) {
  .series-nav__btn {
    display: none !important;
  }
  .series-nav__track {
    flex-wrap: wrap;
    justify-content: center;
    overflow-x: visible;
    gap: 7px;
    padding: 4px 0;
  }
  .series-nav__item {
    font-size: 0.8rem;
    padding: 6px 14px;
  }
}
