/* BUYMA JP authorized-style mobile-first optimization
   Added by ChatGPT: clean Japanese marketplace layout, mobile conversion, speed-friendly CSS. */
:root {
  --buyma-jp-black: #111111;
  --buyma-jp-text: #222222;
  --buyma-jp-muted: #666666;
  --buyma-jp-line: #e8e8e8;
  --buyma-jp-bg: #ffffff;
  --buyma-jp-soft: #f6f6f6;
  --buyma-jp-gold: #b59a6a;
}

html { scroll-behavior: smooth; }
body {
  font-family: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", "YuGothic", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--buyma-jp-text);
  background: var(--buyma-jp-bg);
}

/* Header: cleaner marketplace feel */
.header-section { border-bottom: 1px solid rgba(0,0,0,.06); box-shadow: 0 2px 18px rgba(0,0,0,.03); }
.header__container-top-wrap { min-height: 58px; }
.header__logo-image { object-fit: contain; }
.header-action-bar .button--icon { border-radius: 999px; }
.header-search-bar__form,
.header-action-bar__search-bar { border-radius: 999px; background: #f5f5f5; border: 1px solid #e8e8e8; }
.header-action-bar__search-bar-input,
.header-search-bar .field__input { font-size: 14px; }
.mobile-slider-navbar { border-top: 1px solid #f0f0f0; border-bottom: 1px solid #f0f0f0; background: #fff; }
.mobile-slider-navbar__list { display: flex; gap: 6px; padding: 8px 12px; overflow-x: auto; scrollbar-width: none; }
.mobile-slider-navbar__list::-webkit-scrollbar { display: none; }
.mobile-slider-navbar__link { display: inline-flex; align-items: center; min-height: 34px; padding: 0 14px; color: #222; white-space: nowrap; background: #f6f6f6; border: 1px solid #ededed; border-radius: 999px; font-size: 12px; }

/* Product cards: BUYMA-like compact grid */
.block-product-card { transition: transform .18s ease, box-shadow .18s ease; }
.block-product-card a { text-decoration: none; }
.block-product-card__image-wrapper { background: #f7f7f7; border-radius: 10px; }
.block-product-card__image { mix-blend-mode: multiply; }
.block-product-title, .block-product-card .block-product-title { color: #222; letter-spacing: .01em; }
.block-product-price, .product-detail__price { color: #111; font-weight: 700; }
.block-product-card-info__content { gap: 5px !important; }

/* Collection page controls */
.main-collection-products, .section-main-collection-products { background: #fff; }
.facets, .collection-filters, .filter-drawer { border-color: var(--buyma-jp-line); }
select, input, textarea { border-radius: 8px; }

/* Product detail: trust-first Japanese marketplace presentation */
.product-detail-wrapper { background: #fff; }
.product-detail { max-width: 1280px; margin: 0 auto; }
.product-detail__media-gallery .media-gallery__media { background: #f7f7f7; border-radius: 12px; }
.product-detail__additional, .product-detail__sell-info { border-color: rgba(0,0,0,.08); }
.product-detail__sell-info .sell-info { background: #f7f7f7; border-radius: 10px; padding: 10px 12px; }
.product-detail__buy-buttons .form__buttons { gap: 10px; }
.product-detail__buy-buttons .button, .shopline-element-buy-now { min-height: 48px; border-radius: 6px; font-weight: 700; }

/* Static BUYMA JP homepage modules */
.buyma-jp-home { background: #fff; color: #111; }
.buyma-jp-home .page-width { max-width: 1240px; }
.buyma-jp-hero { padding: 42px 0 24px; }
.buyma-jp-hero__box { display: grid; grid-template-columns: 1.1fr .9fr; gap: 28px; align-items: stretch; min-height: 340px; padding: 42px; background: linear-gradient(135deg,#f6f6f6 0%,#ffffff 56%,#f1eee8 100%); border: 1px solid #ececec; border-radius: 24px; overflow: hidden; }
.buyma-jp-hero__label { margin: 0 0 12px; color: #777; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; }
.buyma-jp-hero__title { margin: 0; font-size: clamp(32px, 4.5vw, 58px); line-height: 1.05; letter-spacing: -.04em; }
.buyma-jp-hero__lead { max-width: 520px; margin: 18px 0 0; color: #555; font-size: 15px; line-height: 1.9; }
.buyma-jp-hero__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.buyma-jp-button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px; border: 1px solid #111; border-radius: 999px; font-size: 13px; font-weight: 700; color: #111 !important; background: #fff; }
.buyma-jp-button--primary { color: #fff !important; background: #111; }
.buyma-jp-hero__visual { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-content: center; }
.buyma-jp-hero__tile { min-height: 120px; padding: 18px; background: rgba(255,255,255,.72); border: 1px solid #ebebeb; border-radius: 18px; box-shadow: 0 10px 30px rgba(0,0,0,.04); }
.buyma-jp-hero__tile strong { display: block; font-size: 20px; }
.buyma-jp-hero__tile span { display: block; margin-top: 8px; color: #666; font-size: 12px; line-height: 1.7; }
.buyma-jp-quicknav { display: flex; gap: 10px; padding: 0 0 20px; overflow-x: auto; scrollbar-width: none; }
.buyma-jp-quicknav::-webkit-scrollbar { display: none; }
.buyma-jp-quicknav a { flex: 0 0 auto; padding: 11px 16px; color: #222 !important; font-size: 13px; font-weight: 700; background: #f7f7f7; border: 1px solid #ebebeb; border-radius: 999px; }
.buyma-jp-section { padding: 26px 0; }
.buyma-jp-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.buyma-jp-heading h2 { margin: 0; font-size: 24px; letter-spacing: -.02em; }
.buyma-jp-heading p { margin: 4px 0 0; color: #777; font-size: 13px; }
.buyma-jp-heading a { color: #111 !important; font-size: 13px; text-decoration: underline; }
.buyma-jp-category-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.buyma-jp-category-card { min-height: 112px; padding: 16px; color: #111 !important; background: #f6f6f6; border: 1px solid #e9e9e9; border-radius: 16px; }
.buyma-jp-category-card strong { display: block; font-size: 15px; }
.buyma-jp-category-card span { display: block; margin-top: 28px; color: #777; font-size: 11px; }
.buyma-jp-trust { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.buyma-jp-trust__item { padding: 20px; background: #fff; border: 1px solid #eaeaea; border-radius: 18px; }
.buyma-jp-trust__item strong { display: block; font-size: 15px; }
.buyma-jp-trust__item p { margin: 8px 0 0; color: #666; font-size: 13px; line-height: 1.8; }
.buyma-jp-note { margin: 0; padding: 16px 18px; color: #666; font-size: 12px; line-height: 1.8; background: #f7f7f7; border-radius: 12px; }

/* Mobile bottom navigation */
.buyma-mobile-nav { display: none; }

@media (max-width: 959px) {
  body { padding-bottom: 68px; }
  .page-width { padding-inline: 14px; }
  .header-section { position: sticky; top: 0; z-index: var(--z-index-sticky); }
  .header__container-top-wrap { min-height: 50px; padding-inline: 12px !important; }
  .header__logo-image { max-width: 104px; }
  .header-action-bar.left { gap: 4px; }
  .header-action-bar.right { gap: 2px; }
  .header-action-bar .button--icon { width: 36px; height: 36px; }
  .header-search-bar { position: fixed; top: 0; left: 0; right: 0; z-index: var(--z-index-modal); padding: 10px 12px; background: #fff; box-shadow: 0 8px 28px rgba(0,0,0,.12); }
  .header-search-bar__form { min-height: 44px; padding-inline: 10px; }
  .header-search-bar .field__input { font-size: 16px; }
  .mobile-slider-navbar__list { padding: 8px 12px 10px; }
  .mobile-slider-navbar__link { min-height: 32px; padding: 0 12px; font-size: 12px; }

  .buyma-jp-hero { padding: 18px 0 12px; }
  .buyma-jp-hero__box { display: block; min-height: auto; padding: 24px 18px; border-radius: 18px; }
  .buyma-jp-hero__label { font-size: 10px; }
  .buyma-jp-hero__title { font-size: 30px; line-height: 1.15; }
  .buyma-jp-hero__lead { margin-top: 12px; font-size: 13px; line-height: 1.75; }
  .buyma-jp-hero__actions { margin-top: 18px; }
  .buyma-jp-button { flex: 1 1 130px; min-height: 42px; padding: 0 12px; font-size: 12px; }
  .buyma-jp-hero__visual { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 18px; gap: 8px; }
  .buyma-jp-hero__tile { min-height: 86px; padding: 12px; border-radius: 14px; }
  .buyma-jp-hero__tile strong { font-size: 15px; }
  .buyma-jp-hero__tile span { font-size: 10px; line-height: 1.5; }
  .buyma-jp-quicknav { margin-inline: -14px; padding-inline: 14px; }
  .buyma-jp-section { padding: 18px 0; }
  .buyma-jp-heading { align-items: flex-start; margin-bottom: 12px; }
  .buyma-jp-heading h2 { font-size: 19px; }
  .buyma-jp-heading p { font-size: 11px; }
  .buyma-jp-category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .buyma-jp-category-card { min-height: 78px; padding: 12px 10px; border-radius: 12px; }
  .buyma-jp-category-card strong { font-size: 12px; }
  .buyma-jp-category-card span { margin-top: 16px; font-size: 9px; }
  .buyma-jp-trust { grid-template-columns: 1fr; gap: 10px; }
  .buyma-jp-trust__item { padding: 14px; border-radius: 14px; }
  .buyma-jp-trust__item p { font-size: 12px; }

  /* 2-column mobile product grid and compact text */
  .grid { --grid-horizontal-spacing: 10px; --grid-vertical-spacing: 18px; }
  .block-product-card { min-width: 0; }
  .block-product-card__image-wrapper { aspect-ratio: 3 / 4 !important; border-radius: 8px; }
  .block-product-title { font-size: 12px !important; line-height: 1.5 !important; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .block-product-price { font-size: 13px !important; }
  .block-product-card-info__content { gap: 3px !important; }

  /* Product detail mobile conversion */
  .product-detail-wrapper .page-width { padding-inline: 12px; }
  .product-detail { row-gap: 12px !important; }
  .product-detail__media-gallery { border-radius: 0; }
  .product-detail__media-gallery .media-gallery__media { border-radius: 0; }
  .product-detail__price { font-size: 20px !important; }
  .product-detail__variant-picker .variant-picker__options { gap: 8px; }
  .product-detail__variant-picker .variant-picker__button { min-height: 38px; padding: 8px 14px; border-radius: 6px; }
  .product-detail__quantity-selector { display: none; }
  .product-detail__buy-buttons { margin-top: 8px; }
  .product-detail__buy-buttons .form__buttons {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: var(--z-index-fixed);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255,255,255,.97);
    border-top: 1px solid #e5e5e5;
    box-shadow: 0 -8px 30px rgba(0,0,0,.08);
    backdrop-filter: blur(10px);
  }
  .product-detail__buy-buttons .button,
  .product-detail__buy-buttons .shopline-element-buy-now { min-height: 48px; border-radius: 6px; font-size: 14px; }
  .product-detail__sell-info { display: grid; gap: 8px; }
  .product-detail__sell-info .sell-info { padding: 10px; font-size: 12px; }

  .buyma-mobile-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: calc(var(--z-index-fixed) - 1);
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    background: rgba(255,255,255,.98);
    border-top: 1px solid #e5e5e5;
    box-shadow: 0 -8px 28px rgba(0,0,0,.06);
    backdrop-filter: blur(10px);
  }
  body[data-page-type="product"] .buyma-mobile-nav { display: none; }
  .buyma-mobile-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 48px; color: #111 !important; font-size: 10px; font-weight: 600; }
  .buyma-mobile-nav .buyma-mobile-nav__icon { font-size: 18px; line-height: 1; }
}

@media (min-width: 960px) {
  .block-product-card:hover { transform: translateY(-2px); }
  .buyma-jp-hero__tile:nth-child(2), .buyma-jp-hero__tile:nth-child(3) { transform: translateY(24px); }
}

/* Collection pagination refinement: make mobile page arrows visible and premium */
.pagination-simple-container {
  margin-block: 28px 48px;
  gap: 10px;
}

.pagination-simple {
  gap: 14px;
}

.pagination-simple__pager {
  min-width: 72px;
  text-align: center;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #111111 !important;
}

.pagination-simple__offset {
  color: #666666 !important;
  font-size: 12px;
  line-height: 1.5;
}

.pagination-simple__button {
  width: 38px !important;
  height: 38px !important;
  color: #111111 !important;
  background: #ffffff !important;
  border: 1px solid #d8d8d8;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: border-color 0.2s ease, background-color 0.2s ease, opacity 0.2s ease;
}

.pagination-simple__button svg,
.pagination-simple__button .icon {
  width: 14px !important;
  height: 14px !important;
  color: #111111 !important;
}

.pagination-simple__button svg path {
  stroke: currentColor !important;
}

.pagination-simple__button:not(.disabled):active {
  background: #f4f4f4 !important;
  border-color: #111111;
}

.pagination-simple__button.disabled {
  opacity: 0.28;
  pointer-events: none;
}

@media screen and (max-width: 768px) {
  .pagination-simple-container {
    margin-block: 24px 40px;
  }

  .pagination-simple__button {
    width: 40px !important;
    height: 40px !important;
  }
}

/* Also normalize standard pagination if selected in SHOPLINE editor */
.pagination-standard__button {
  color: #111111 !important;
  background: #ffffff !important;
  border: 1px solid #d8d8d8;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.pagination-standard__button svg,
.pagination-standard__button .icon {
  color: #111111 !important;
}

.pagination-standard__button svg path {
  stroke: currentColor !important;
}
