/*
 * R DOLL storefront theme.
 *
 * Design language ported from the reference storefront (EC-CUBE 3):
 *   page background #f2f2f2, white content blocks, text #525263,
 *   links #0092c4, primary CTA #de5d50, brand accent #cb335b,
 *   borders #d7dadd, flat product cards, 16px / 1.4 body text.
 */

:root {
  --page-bg: #f2f2f2;
  --surface: #fff;
  --text: #525263;
  --text-strong: #3a3737;
  --text-muted: #7d8289;
  --link: #0092c4;
  --brand: #cb335b;
  --brand-dark: #a82348;
  --primary: #de5d50;
  --primary-dark: #cf3f34;
  --accent: #5cb1b1;
  --line: #d7dadd;
  --line-light: #e8e8e8;
  --soft: #f5f7f8;
  --soft-warm: #f7f6f3;
  --radius: 2px;
  --font-jp: Roboto, "游ゴシック", YuGothic, "Yu Gothic",
    "ヒラギノ角ゴ ProN W3", "Hiragino Kaku Gothic ProN", Arial,
    "メイリオ", Meiryo, sans-serif;
}

body {
  font-family: var(--font-jp);
  font-size: 16px;
  line-height: 1.4;
  background: var(--page-bg);
  color: var(--text);
}

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link); text-decoration: underline; }

h1, h2, h3, h4, h5, h6 { color: var(--text-strong); }

.container, .container-fluid.inner { max-width: 1180px; }

/* Page content sits on white blocks over the grey page, like the reference. */
main.container {
  background: var(--surface);
  padding: 20px 15px 30px;
  margin-top: 0;
  margin-bottom: 0;
}

/* --- Buttons ------------------------------------------------------------ */
.btn { font-size: 16px; font-weight: bold; border-radius: var(--radius); }

.btn-brand,
.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.btn-brand:hover, .btn-brand:focus,
.btn-primary:hover, .btn-primary:focus {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: #fff;
}
.btn-outline-secondary {
  color: var(--text);
  background: var(--soft);
  border-color: var(--line);
}
.btn-outline-secondary:hover {
  color: var(--text);
  background: #eef1f3;
  border-color: var(--line);
}
.bg-brand { background-color: var(--brand) !important; }
.btn-brand-badge { background: var(--soft); }

/* --- Adult notice ------------------------------------------------------- */
.adult-bar {
  background: var(--text-strong);
  color: #ddd;
  font-size: 12px;
  padding: 5px 15px;
  text-align: center;
}

/* --- Header ------------------------------------------------------------- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.site-logo { display: flex; align-items: center; gap: 10px; color: var(--text-strong); }
.site-logo:hover { color: var(--text-strong); text-decoration: none; }
.site-logo__mark {
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-weight: bold;
  font-size: 22px;
}
.site-logo__text strong { display: block; font-size: 20px; letter-spacing: .04em; }
.site-logo__text small { color: var(--text-muted); font-size: 11px; }

/* Horizontal nav bar: grey strip with divider-separated links. */
/* Global nav: horizontal strip with hover mega-menu panels, mirroring the
   reference storefront's 4-column dropdown. */
.site-nav {
  background: var(--soft-warm);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.global-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
}
.global-nav > li { position: relative; }
.global-nav > li > a {
  display: block;
  padding: 7px 15px;
  font-size: 14px;
  color: var(--text);
  border-right: 1px solid var(--line);
}
.global-nav > li:first-child > a { border-left: 1px solid var(--line); }
.global-nav > li > a:hover,
.global-nav > li.has-dropdown:hover > a {
  color: var(--brand);
  background: #fff;
  text-decoration: none;
}

.global-nav__panel {
  display: none;
  position: absolute;
  left: 0;
  top: 100%;
  z-index: 60;
  min-width: 230px;
  max-width: 92vw;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 4px 10px rgba(0, 0, 0, .12);
}
.global-nav > li.has-dropdown:hover .global-nav__panel,
.global-nav > li.has-dropdown:focus-within .global-nav__panel { display: block; }

.global-nav__panel a {
  display: block;
  padding: 4px 6px;
  font-size: 13px;
  color: var(--text);
  border-right: 0;
}
.global-nav__panel a:hover { background: var(--soft); color: var(--brand); text-decoration: none; }
.global-nav__panel .global-nav__all {
  font-weight: bold;
  color: var(--brand);
  margin-bottom: 6px;
}
/* The brand list is long: lay it out in four columns like the reference. */
.global-nav__panel--cols {
  column-count: 4;
  column-gap: 18px;
  min-width: 760px;
}
.global-nav__panel--cols .global-nav__all { column-span: all; }

/* --- Section headings (reference uses small bold headings) -------------- */
.section-title {
  font-size: 18px;
  font-weight: bold;
  color: var(--text-strong);
  margin: 0 0 14px;
  padding: 0 0 8px;
  border-bottom: 2px solid var(--line-light);
  border-left: 0;
}
.section-title::before {
  content: "";
  display: inline-block;
  width: 6px; height: 18px;
  background: var(--brand);
  margin-right: 8px;
  vertical-align: -3px;
}

/* --- Hero / main visual ------------------------------------------------- */
.hero {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft-warm);
  color: var(--text);
}
.hero__text { flex: 1 1 380px; }
.hero__lead { font-size: 14px; letter-spacing: .04em; color: var(--brand); margin-bottom: 6px; }
.hero h2 { font-size: 26px; font-weight: bold; margin-bottom: 10px; }
.hero__stats { flex: 0 0 auto; display: grid; grid-template-columns: repeat(2, minmax(92px, 1fr)); gap: 8px; }
.hero__stats > div {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 12px;
  text-align: center;
}
.hero__stats strong { display: block; font-size: 20px; color: var(--brand); }
.hero__stats span { font-size: 11px; color: var(--text-muted); }

/* --- Category grid ----------------------------------------------------- */
.cat-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  text-align: center;
}
.cat-tile:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }
.cat-tile i { font-size: 22px; color: var(--brand); }

.brand-chip {
  display: inline-block;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft);
  font-size: 13px;
  color: var(--text);
}
.brand-chip:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }

.info-block {
  background: var(--soft-warm);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}

/* --- Product cards (flat, image-forward, like .product_item) ------------ */
.product-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid var(--line-light);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
.product-card:hover { border-color: var(--brand); }
.product-card__media { display: block; position: relative; background: #fafafa; }
.product-card__media img { width: 100%; aspect-ratio: 3 / 4.5; object-fit: cover; display: block; }
.product-card__media:hover img { opacity: .8; }
.product-card__body { padding: 10px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-card__brand { font-size: 12px; color: var(--text-muted); }
.product-card__name {
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 4.5em;
}
.product-card__name:hover { color: var(--brand); }
.product-card__spec { font-size: 12px; color: var(--text-muted); }
.product-card__price { margin-top: auto; }
.price-normal { display: block; font-size: 12px; color: var(--text-muted); text-decoration: line-through; }
.price-sale { display: block; font-size: 18px; font-weight: bold; color: var(--primary); }
.price-sale small { font-size: 11px; font-weight: normal; color: var(--text-muted); }
.price-member { display: block; font-size: 13px; font-weight: bold; color: #0b6b3a; }
.price-nudge { display: block; font-size: 12px; color: var(--text-muted); }

.badge-condition { background: #343a40; }
.badge-condition.badge-new { background: #0d6efd; }
.badge-condition.badge-shinko { background: #6f42c1; }
.badge-condition.badge-used_excellent { background: #198754; }
.badge-condition.badge-used { background: #6c757d; }
.product-card__media .badge-condition { position: absolute; top: 6px; left: 6px; border-radius: var(--radius); }
.badge-beginner { position: absolute; bottom: 6px; left: 6px; background: #fff3cd; color: #7a5b00; border-radius: var(--radius); }
.badge-sale { position: absolute; bottom: 6px; right: 6px; background: var(--primary); border-radius: var(--radius); }

/* --- Filters / list ---------------------------------------------------- */
.filter-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: var(--soft-warm);
}
.filter-panel__title { font-size: 15px; font-weight: bold; margin-bottom: 12px; }
.form-control, .form-select { border-radius: var(--radius); font-size: 14px; }
.list-head {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line-light);
  padding-bottom: 10px;
  margin-bottom: 14px;
}
.list-head__sort { min-width: 190px; }

/* --- Detail ------------------------------------------------------------ */
.gallery__thumbs { display: flex; gap: 6px; overflow-x: auto; margin-top: 8px; padding-bottom: 4px; }
.gallery__thumb { border: 2px solid transparent; padding: 0; background: none; border-radius: var(--radius); }
.gallery__thumb.active { border-color: var(--brand); }
.gallery__thumb img { width: 64px; height: 64px; object-fit: cover; display: block; }
.gallery__badge { margin-top: 8px; font-size: 13px; color: #0b6b3a; }

.product-title { font-size: 20px; font-weight: bold; line-height: 1.5; margin-bottom: 14px; }
.price-block {
  background: var(--soft-warm);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 14px;
}
.price-block__normal { margin-bottom: 4px; font-size: 13px; color: var(--text-muted); }
.price-block__sale { font-size: 28px; font-weight: bold; color: var(--primary); margin-bottom: 6px; }
.price-block__member { font-size: 14px; margin-bottom: 4px; }
.price-block__nudge { font-size: 13px; color: var(--text-muted); margin-bottom: 0; }

.add-cart { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 14px; }
.assurance { list-style: none; padding-left: 0; font-size: 13px; }
.assurance li { padding: 6px 0; border-bottom: 1px dashed var(--line); }
.assurance i { color: var(--brand); margin-right: 6px; }

.selling-points { list-style: none; padding-left: 0; }
.selling-points li { padding: 8px 0; border-bottom: 1px dashed var(--line); }
.selling-points i { color: #198754; margin-right: 8px; }
.spec-table th { width: 34%; background: var(--soft); font-weight: bold; }
.spec-table td, .spec-table th { font-size: 14px; }
.product-description { line-height: 1.8; font-size: 14px; }

/* --- Promotions -------------------------------------------------------- */
.promo-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  height: 100%;
  background: var(--surface);
}
.promo-card__percent { font-size: 24px; font-weight: bold; color: var(--primary); }
.promo-card__name { font-weight: bold; margin: 2px 0; font-size: 15px; }
.promo-card__cond { font-size: 13px; color: var(--text-muted); }
.promo-card__code { font-size: 13px; margin-top: 6px; }

/* --- Cart / checkout --------------------------------------------------- */
.checkout-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  padding-left: 0;
  margin-bottom: 20px;
}
.checkout-steps li {
  flex: 1 1 auto;
  text-align: center;
  font-size: 13px;
  padding: 8px 10px;
  border-radius: var(--radius);
  background: var(--soft);
  color: var(--text-muted);
}
.checkout-steps li.is-active { background: var(--primary); color: #fff; font-weight: bold; }

.cart-table { font-size: 14px; }
.cart-table__thumb img { width: 84px; height: 112px; object-fit: cover; border-radius: var(--radius); }

.discount-box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  margin-top: 14px;
  background: var(--surface);
}
.discount-box__row { display: flex; justify-content: space-between; padding: 5px 0; font-size: 14px; }
.discount-box__row--line { color: #b02a37; }
.discount-box__row--line.is-adjustment { color: #8a6d00; }
.discount-box__row--total {
  border-top: 2px solid var(--text-strong);
  margin-top: 6px;
  padding-top: 8px;
  font-size: 18px;
  font-weight: bold;
}
.discount-box__note { font-size: 12px; color: var(--text-muted); margin: 8px 0 0; }

.complete-icon { font-size: 56px; color: #198754; }
.preparing-icon { font-size: 48px; color: #b0b6bd; line-height: 1; }

/* --- Payment methods --------------------------------------------------- */
.payment-methods .form-check { margin-bottom: 6px; }
.payment-methods .form-check-input:disabled { cursor: default; }


/* Reserved payment methods: identical row layout to the selectable radios, but
   the whole row links to its 準備中 page. Bootstrap greys a disabled input and
   its sibling label (opacity .5), so restore full opacity - otherwise these
   two rows look visibly different from the two above them. */
a.payment-method-row--link {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}
a.payment-method-row--link .form-check-input {
  pointer-events: none;
  opacity: 1;
}
a.payment-method-row--link .form-check-input:disabled ~ .form-check-label,
a.payment-method-row--link .form-check-label {
  opacity: 1;
  cursor: pointer;
}
a.payment-method-row--link:hover .form-check-label,
a.payment-method-row--link:focus-visible .form-check-label { text-decoration: underline; }

.rank-card { border-top: 3px solid var(--brand); }
.rank-card__meta { display: grid; grid-template-columns: auto 1fr; gap: 3px 14px; font-size: 14px; }
.rank-card__meta dt { color: var(--text-muted); font-weight: normal; }
.rank-card__meta dd { margin: 0; font-weight: bold; }

.required {
  background: #dc3545;
  color: #fff;
  font-size: 10px;
  padding: 1px 5px;
  border-radius: var(--radius);
  margin-left: 5px;
  vertical-align: middle;
}

.card { border-radius: var(--radius); }
.table { font-size: 14px; }
.alert { border-radius: var(--radius); }

/* --- Trust strip / footer --------------------------------------------- */
.trust-strip {
  background: var(--text-strong);
  color: #f1f1f1;
  padding: 16px 0;
  margin-top: 20px;
  font-size: 13px;
}
.trust-strip i { color: var(--brand); margin-right: 5px; }

.site-footer {
  background: var(--soft-warm);
  border-top: 1px solid var(--line);
  padding: 26px 0 12px;
  font-size: 13px;
  color: #444;
}
.site-footer h3 {
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}
.site-footer__bottom {
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}

.faq details { border-bottom: 1px solid var(--line-light); padding: 10px 0; }
.faq summary { cursor: pointer; font-weight: bold; font-size: 15px; }
.faq p { margin: 8px 0 0; font-size: 14px; color: #444; }

.links-bar a { font-size: 13px; }
.news-list { list-style: none; padding-left: 0; margin: 0; }
.news-list li { border-bottom: 1px solid var(--line-light); padding: 10px 0; font-size: 14px; }
.news-list time { color: var(--text-muted); margin-right: 10px; font-size: 13px; }

@media (max-width: 767.98px) {
  body { font-size: 15px; }
  .hero { padding: 16px; }
  .hero h2 { font-size: 20px; }
  main.container { padding: 14px 10px 24px; }
  .product-card__name { min-height: auto; }
  .price-block__sale { font-size: 22px; }
}

/* Mega-menu panels need room; on smaller screens fall back to a scrollable
   strip of top-level links (the product list page carries the full filter UI). */
@media (max-width: 991.98px) {
  .global-nav { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .global-nav > li > a { white-space: nowrap; }
  .global-nav__panel { display: none !important; }
}
