:root {
  --shop-color-base-100: var(--paper-strong, #fafafb);
  --shop-color-base-200: var(--paper, #f1f2f4);
  --shop-color-base-300: var(--paper-warm, #e4e7ed);
  --shop-color-base-content: var(--ink, #182130);
  --shop-color-primary: var(--blue, #304ed0);
  --shop-color-primary-content: #fff;
  --shop-color-secondary: var(--paper-warm, #e4e7ed);
  --shop-color-secondary-content: var(--ink, #182130);
  --shop-color-accent: var(--blue-dark, #233cab);
  --shop-color-accent-content: #fff;
  --shop-color-neutral: var(--ink-soft, #4b5668);
  --shop-color-neutral-content: #fff;
  --shop-color-info: var(--blue, #304ed0);
  --shop-color-info-content: #fff;
  --shop-color-success: #276c50;
  --shop-color-success-content: #fff;
  --shop-color-warning: #8a5b08;
  --shop-color-warning-content: #fff;
  --shop-color-error: #963f4b;
  --shop-color-error-content: #fff;
  --shop-gray-50: var(--paper-strong, #fafafb);
  --shop-gray-100: var(--paper, #f1f2f4);
  --shop-gray-200: var(--line, #ccd1da);
  --shop-gray-300: var(--line, #ccd1da);
  --shop-gray-400: var(--ink-faint, #596576);
  --shop-gray-500: var(--ink-faint, #596576);
  --shop-gray-600: var(--ink-soft, #4b5668);
  --shop-gray-700: var(--ink-soft, #4b5668);
  --shop-gray-800: var(--ink, #182130);
  --shop-gray-900: var(--ink, #182130);
  --shop-border-radius: 12px;
  --shop-border-radius-sm: 8px;
  --shop-border-radius-lg: 16px;
  --shop-font-family: var(--font-sans, "SF Pro Text", "PingFang SC", "Microsoft YaHei", sans-serif);
  --shop-shadow-sm: none;
  --shop-shadow: none;
  --shop-shadow-md: none;
  --shop-shadow-lg: 0 14px 34px rgb(24 33 48 / .08);
}

.mk-shop { width: min(1240px, calc(100% - 48px)); max-width: 1240px; min-height: 65vh; margin-inline: auto; padding: clamp(44px, 6vw, 72px) 0 96px; }
.shop-entry { color: var(--shop-color-base-content); font-family: var(--shop-font-family); }
.shop-entry__title { font-family: var(--font-sans, sans-serif); font-weight: 650; letter-spacing: -.04em; }
.shop-product-card, .shop-card, .buy-box, .shop-cart-summary { border-color: var(--shop-gray-200); background: var(--shop-color-base-100); box-shadow: none; }
.shop-product-card { min-width: 0; transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.shop-product-card:hover { border-color: var(--shop-color-primary); box-shadow: var(--shop-shadow-lg); transform: translateY(-2px); }
.shop-btn { min-height: 44px; border-radius: var(--shop-border-radius); font-weight: 600; }
.shop-btn-primary:hover:not(:disabled):not(.shop-btn--disabled) { box-shadow: var(--shop-shadow-sm); transform: translateY(-1px); }
.shop-input, .shop-select, .shop-quantity__input { border-color: var(--shop-gray-300); border-radius: var(--shop-border-radius); background: var(--shop-color-base-100); color: var(--shop-color-base-content); }
.shop-input:focus, .shop-select:focus { outline: 3px solid var(--shop-color-primary); outline-offset: 2px; }
.mk-shop-badges { width: 100%; max-width: none; margin: 0 0 28px; border-block: 1px solid var(--shop-gray-200); padding: 14px 0; color: var(--shop-gray-600); font-size: 12px; letter-spacing: .08em; }

@media (max-width: 760px) {
  .mk-shop { padding-top: 34px; }
  .mk-shop-badges { width: calc(100vw - 36px); }
}

@media (prefers-reduced-motion: reduce) {
  .shop-product-card, .shop-btn, .shop-product-card__image img { transition: none !important; transform: none !important; }
}

/* v252 shop layout: keep the real Shop DOM airy, bounded, and image-safe. */
.mk-shop > .shop-entry,
.mk-shop > .shop-product-detail,
.mk-shop > .shop-product-content { min-width: 0; }

.cq-shop-breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; color: var(--shop-gray-600); font-size: 13px; line-height: 1.5; }
.cq-shop-breadcrumb a { color: var(--shop-color-primary); text-decoration: none; }
.cq-shop-breadcrumb a:hover { text-decoration: underline; text-underline-offset: 3px; }
.cq-shop-breadcrumb span[aria-hidden="true"] { color: var(--shop-gray-400); }

.mk-shop .shop-entry__header { max-width: 680px; margin-bottom: 32px; }
.mk-shop .shop-entry__title { margin-bottom: 10px; color: var(--shop-gray-900); font-size: clamp(32px, 4vw, 44px); line-height: 1.16; }
.mk-shop .shop-entry__subtitle { color: var(--shop-gray-600); line-height: 1.7; }

.shop-product-detail { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 64px; align-items: start; margin-bottom: clamp(56px, 8vw, 96px); }
.shop-product-gallery { min-width: 0; align-self: start; }
.shop-product-gallery swiper-container { display: block; width: 100%; }
.shop-product-gallery .product-gallery-swiper { width: 100%; max-width: 600px; max-height: none; margin: 0 0 16px; border: 1px solid var(--shop-gray-200); border-radius: var(--shop-border-radius-lg); background: var(--shop-color-base-300); }
.shop-product-gallery .product-gallery-swiper swiper-slide { background: var(--shop-color-base-300); }
.shop-product-gallery .product-gallery-swiper swiper-slide img { width: 100%; height: 100%; object-fit: contain; object-position: center; }
.shop-product-gallery .product-gallery-nav-swiper { display: block; width: 100%; max-width: 600px; }
.shop-product-gallery .product-gallery-nav-swiper swiper-slide { box-sizing: border-box; width: 64px; height: 64px; border: 1px solid transparent; border-radius: var(--shop-border-radius-sm); background: var(--shop-color-base-300); }
.shop-product-gallery .product-gallery-nav-swiper swiper-slide img { width: 100%; height: 100%; padding: 4px; object-fit: contain; object-position: center; }
.shop-product-gallery .product-gallery-nav-swiper .swiper-slide-thumb-active { border-color: var(--shop-color-primary); }

.shop-product-info { min-width: 0; gap: 24px; }
.shop-product-info__title { color: var(--shop-gray-900); margin: 0; font-size: clamp(40px, 4vw, 48px); font-weight: 650; line-height: 1.14; letter-spacing: -.05em; }
.shop-product-info__desc { max-width: 38em; color: var(--shop-gray-600); font-size: 17px; line-height: 1.75; }

.buy-box { gap: 28px; padding: 0; border: 0; background: transparent; }
.buy-box__price { padding-bottom: 20px; border-bottom-color: var(--shop-gray-200); }
.buy-box__price-label { margin-bottom: 6px; color: var(--shop-gray-600); font-size: 12px; letter-spacing: .08em; }
.buy-box__price-value { color: var(--shop-gray-900); font-size: clamp(32px, 3vw, 40px); line-height: 1.1; letter-spacing: -.04em; }
.buy-box__stock { color: var(--shop-gray-600); }
.buy-box__stock-value { color: var(--shop-color-success); font-weight: 600; }
.buy-box__quantity { gap: 16px; }
.buy-box__quantity-label { color: var(--shop-gray-900); font-size: 14px; font-weight: 600; }
.shop-quantity { border-color: var(--shop-gray-300); border-radius: var(--shop-border-radius-sm); }
.shop-quantity__btn { width: 44px; height: 44px; background: var(--shop-color-base-100); color: var(--shop-gray-700); }
.shop-quantity__input { width: 60px; height: 44px; background: var(--shop-color-base-100); color: var(--shop-gray-900); }
.buy-box__actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding-top: 20px; border-top-color: var(--shop-gray-200); }
.buy-box__actions form { min-width: 0; }
.buy-box__actions .shop-btn { width: 100%; min-height: 48px; }

.shop-product-content { max-width: 900px; padding: 56px 0 0; border-top-color: var(--shop-gray-200); }
.shop-product-content__description { max-width: 780px; margin-bottom: 56px; color: var(--shop-gray-700); font-size: 16px; line-height: 1.9; }
.shop-product-content__description h2 { margin: 44px 0 12px; color: var(--shop-gray-900); font-size: 24px; line-height: 1.3; letter-spacing: -.025em; }
.shop-product-content__description h2:first-child { margin-top: 0; }
.shop-product-content__description aside { margin: 0 0 40px; padding: 20px 22px; border-left: 3px solid var(--shop-color-primary); background: var(--shop-color-base-200); color: var(--shop-gray-700); }
.shop-product-content__description aside p { margin: 8px 0 0; }
.shop-product-content__description img { width: auto; max-width: 100%; height: auto; object-fit: contain; }

.shop-product-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.shop-product-card { border: 1px solid var(--shop-gray-200); border-radius: var(--shop-border-radius-lg); background: var(--shop-color-base-100); }
.shop-product-card__image { width: 100%; height: auto; min-height: 0; aspect-ratio: 1 / 1; background: var(--shop-color-base-300); }
.shop-product-card__image img { width: 100%; height: 100%; object-fit: contain; object-position: center; }
.shop-product-card:hover .shop-product-card__image img { transform: scale(1.02); }
.shop-product-card__info { gap: 10px; padding: 20px 22px 22px; }
.shop-product-card__name { color: var(--shop-gray-900); font-size: 18px; line-height: 1.35; }
.shop-product-card__description { color: var(--shop-gray-600); line-height: 1.6; }
.shop-product-card__footer { padding-top: 14px; border-top-color: var(--shop-gray-200); }
.shop-product-card__price-current { color: var(--shop-gray-900); font-size: 22px; }

.shop-filter { align-items: end; gap: 24px; margin-bottom: 32px; }
.shop-filter__left { width: min(100%, 680px); max-width: none; gap: 12px; }
.shop-filter__right { width: 200px; }
.shop-filter__left .shop-select { width: 180px; }
.shop-filter__right .shop-select { width: 100%; }
.shop-filter .shop-select, .shop-filter .shop-input { min-height: 44px; }
.shop-pagination { gap: 12px; margin-top: 32px; }

.shop-card, .shop-cart-summary, .shop-checkout__summary, .shop-payments__right { border: 1px solid var(--shop-gray-200); border-radius: var(--shop-border-radius-lg); background: var(--shop-color-base-100); box-shadow: none; }
.shop-card { padding: 24px; }
.shop-cart-summary, .shop-checkout__summary, .shop-payments__right { position: static; top: auto; padding: 24px; }
.shop-cart-item, .shop-order-item { min-width: 0; }
.shop-cart-item__image, .shop-order-item__image { object-fit: contain; background: var(--shop-color-base-300); }
.shop-cart-item__info, .shop-order-item__info { min-width: 0; }
.shop-cart-item__name, .shop-order-item__name { color: var(--shop-gray-900); }
.shop-cart-item__variant, .shop-cart-item__price, .shop-order-item__variant, .shop-order-item__quantity { color: var(--shop-gray-600); }
.shop-cart-item__total, .shop-order-item__price { color: var(--shop-gray-900); }
.shop-cart-item__remove { color: var(--shop-color-error); border-color: var(--shop-gray-300); }
.shop-checkout__form-row { min-width: 0; }

@media (max-width: 960px) {
  .shop-product-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shop-filter { align-items: stretch; flex-direction: column; }
  .shop-filter__left, .shop-filter__right { width: 100%; }
  .shop-filter__right .shop-select { width: min(100%, 320px); }
}

@media (max-width: 800px) {
  .mk-shop { width: calc(100% - 48px); padding-top: 40px; }
  .mk-shop-badges { width: 100%; }
  .shop-product-detail { display: grid; grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .shop-product-gallery .product-gallery-swiper, .shop-product-gallery .product-gallery-nav-swiper { max-width: 100%; }
  .shop-product-info { margin-top: 0; }
  .shop-product-info__title { font-size: clamp(32px, 8vw, 40px); }
  .shop-checkout, .shop-payments { grid-template-columns: minmax(0, 1fr); }
  .shop-checkout__summary, .shop-payments__right { position: static; }
  .shop-checkout__form-row { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 560px) {
  .mk-shop { width: calc(100% - 32px); padding-top: 32px; }
  .shop-product-list { grid-template-columns: minmax(0, 1fr); }
  .shop-filter__left { flex-direction: column; }
  .shop-filter__left .shop-select, .shop-filter__left .shop-input, .shop-filter__right .shop-select { width: 100%; }
  .buy-box__actions { grid-template-columns: minmax(0, 1fr); }
  .shop-card, .shop-cart-summary, .shop-checkout__summary, .shop-payments__right { padding: 20px; }
}

@media (prefers-color-scheme: dark) {
  :root { --shop-color-primary-content: var(--ink, #edf0f7); }
}

@media (prefers-reduced-motion: reduce) {
  .shop-product-card, .shop-product-card:hover, .shop-product-card__image img, .shop-product-card:hover .shop-product-card__image img, .shop-btn, .shop-btn:hover { transform: none !important; transition: none !important; box-shadow: none !important; }
}
