/*
Theme Name: Yamaken2026
Theme URI: 
Author: Yamaken
Author URI: 
Description: Yamaken WordPress theme scaffold.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 5.6
Text Domain: yamaken
*/

/* Generic editor/frontend typography for posts and pages */
.entry-content {
  color: #333333;
  line-height: 1.9;
}

.entry-content > * + * {
  margin-top: 1.5rem;
}

.entry-content h1:not([class]),
.entry-content h2:not([class]),
.entry-content h3:not([class]),
.entry-content h4:not([class]),
.entry-content h5:not([class]) {
  margin: 2rem 0 1rem;
  line-height: 1.4;
  font-weight: 700;
  color: #222222;
}

.entry-content h1:not([class]) {
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
}

.entry-content h2:not([class]) {
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  border-left: 0.3rem solid #1e5cb0;
  padding-left: 0.8rem;
}

.page-template-page-product-detail .entry-content h2:not([class]),
.page-template-page-product-detail .entry-content h2.wp-block-heading {
  margin: 2.5rem 0 1.25rem;
  padding: 0 0 0.5rem;
  border-left: 0;
  border-bottom: 1px solid #dfe3e8;
  font-size: 1.125rem;
  font-weight: 700;
  color: #333333;
}

.entry-content h3:not([class]) {
  font-size: clamp(1.2rem, 1.4vw, 1.4rem);
  border-bottom: 1px solid #cfd6df;
  padding-bottom: 0.5rem;
}

.entry-content h4:not([class]) {
  font-size: 1.05rem;
  background: #eef4f9;
  padding: 0.5rem 0.9rem;
}

.entry-content h5:not([class]) {
  font-size: 1rem;
  color: #1e5cb0;
}

.entry-content ul:not([class]),
.entry-content ol:not([class]) {
  margin: 1rem 0;
  padding-left: 1.4rem;
}

.entry-content ul:not([class]) li,
.entry-content ol:not([class]) li {
  margin-top: 0.45rem;
}

.entry-content ul:not([class]) li:first-child,
.entry-content ol:not([class]) li:first-child {
  margin-top: 0;
}

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}

.entry-content th,
.entry-content td {
  border: 1px solid #dce2ea;
  padding: 0.65rem 0.8rem;
  vertical-align: top;
}

.entry-content th {
  background: #f2f6fb;
  font-weight: 700;
}

/* Product spec table (left-side heading style) */
.entry-content table.spec-table-sidehead,
.entry-content figure.wp-block-table.spec-table-sidehead table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #d9d9d9;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}

.entry-content table.spec-table-sidehead th,
.entry-content table.spec-table-sidehead td,
.entry-content figure.wp-block-table.spec-table-sidehead table th,
.entry-content figure.wp-block-table.spec-table-sidehead table td {
  border: 1px solid #d9d9d9;
  padding: 1rem 1.1rem;
  vertical-align: top;
  background: #ffffff;
}

.entry-content table.spec-table-sidehead th[scope="row"],
.entry-content figure.wp-block-table.spec-table-sidehead table th[scope="row"] {
  width: 10.5rem;
  min-width: 8rem;
  background: #f3f3f3;
  font-weight: 700;
  vertical-align: middle;
  text-align: center;
  white-space: nowrap;
}

.entry-content table.spec-table-sidehead tbody tr > :first-child,
.entry-content figure.wp-block-table.spec-table-sidehead table tbody tr > :first-child {
  width: 10.5rem;
  min-width: 8rem;
  background: #f3f3f3;
  font-weight: 700;
  vertical-align: middle;
  text-align: center;
  white-space: nowrap;
}

@media (max-width: 767.98px) {
  .entry-content table.spec-table-sidehead th[scope="row"],
  .entry-content figure.wp-block-table.spec-table-sidehead table th[scope="row"] {
    width: 7rem;
    min-width: 6rem;
    padding: 0.75rem 0.6rem;
  }

  .entry-content table.spec-table-sidehead tbody tr > :first-child,
  .entry-content figure.wp-block-table.spec-table-sidehead table tbody tr > :first-child {
    width: 7rem;
    min-width: 6rem;
    padding: 0.75rem 0.6rem;
  }
}

/* Keep gallery items equal width (no stretched last row) */
.entry-content .wp-block-gallery.has-nested-images figure.wp-block-image:not(#individual-image),
.entry-content .wp-block-gallery:not(.has-nested-images) .blocks-gallery-item,
.entry-content .blocks-gallery-grid .blocks-gallery-item {
  flex-grow: 0;
}

.entry-content .wp-block-gallery {
  --yamaken-gallery-ratio: 4 / 3;
}

.entry-content .wp-block-gallery.has-nested-images figure.wp-block-image:not(#individual-image) img,
.entry-content .wp-block-gallery:not(.has-nested-images) .blocks-gallery-item img,
.entry-content .blocks-gallery-grid .blocks-gallery-item img {
  width: 100%;
  aspect-ratio: var(--yamaken-gallery-ratio);
  object-fit: cover;
  object-position: center;
}

.entry-content a {
  color: #1e5cb0;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.entry-content a:hover {
  color: #1a5199;
}

.entry-content .btn,
.entry-content .btn:visited,
.entry-content .btn:hover,
.entry-content .btn:focus {
  color: #ffffff;
  text-decoration: none;
}

.entry-content .features-detail__btn-wide {
  width: auto;
  max-width: none;
}

.oem-intro {
  max-width: none;
}

.page-oem .entry-content ul:not([class]) {
  list-style: none;
  padding-left: 0;
}

.page-oem .entry-content ul:not([class]) li {
  position: relative;
  padding-left: 1.2rem;
}

.page-oem .entry-content ul:not([class]) li::before {
  content: "●";
  position: absolute;
  left: 0;
  top: 0.35rem;
  font-size: 0.5rem;
  color: #1e5cb0;
}

/* Legacy float alignment support (classic editor) */
.entry-content::after {
  content: "";
  display: block;
  clear: both;
}

.entry-content .alignleft {
  float: left;
  margin: 0 1.25rem 1rem 0;
}

.entry-content .alignright {
  float: right;
  margin: 0 0 1rem 1.25rem;
}

.entry-content .aligncenter {
  display: block;
  margin: 0 auto 1rem;
}

/* Class based float box utilities (instead of inline style) */
.entry-content .float-box {
  max-width: 100%;
}

.entry-content .float-box.alignleft {
  float: left;
}

.entry-content .float-box.alignright {
  float: right;
}

.entry-content .w-170 {
  width: 170px;
}

.entry-content .w-360 {
  width: 360px;
}

.entry-content .text-center {
  text-align: center;
}

@media (max-width: 767.98px) {
  .entry-content .alignleft,
  .entry-content .alignright {
    float: none;
    display: block;
    width: 100% !important;
    max-width: 100%;
    margin: 0 0 1rem;
  }

  .entry-content .float-box.alignleft,
  .entry-content .float-box.alignright {
    float: none;
    width: 100% !important;
  }
}

.yamaken-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.88);
  padding: 1rem;
}

.yamaken-lightbox[hidden] {
  display: none !important;
}

.yamaken-lightbox__image {
  max-width: min(92vw, 1100px);
  max-height: 86vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 0.25rem;
}

.yamaken-lightbox__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
}

.yamaken-lightbox__caption {
  margin: 0;
  max-width: min(92vw, 1100px);
  color: #ffffff;
  font-size: 0.95rem;
  line-height: 1.7;
  text-align: center;
}

.yamaken-lightbox__close,
.yamaken-lightbox__nav {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.95);
  color: #1e5cb0;
  cursor: pointer;
}

.yamaken-lightbox__close {
  top: 1rem;
  right: 1rem;
  font-size: 1.5rem;
  line-height: 1;
}

.yamaken-lightbox__nav {
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.6rem;
  line-height: 1;
}

.yamaken-lightbox__nav--prev {
  left: 1rem;
}

.yamaken-lightbox__nav--next {
  right: 1rem;
}

/* Retail wholesale form width tuning */
.entry-content .retail-page .form-card,
.page-retail-wholesale .entry-content .form-card {
  width: 100%;
  max-width: 92%;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 767.98px) {
  .entry-content .retail-page .form-card,
  .page-retail-wholesale .entry-content .form-card {
    max-width: 100%;
  }
}

/* Retail wholesale: widen specific CF7 fields */
.entry-content .retail-page .wpcf7-form-control-wrap[data-name="email"],
.entry-content .retail-page .wpcf7-form-control-wrap[data-name="company"],
.entry-content .retail-page .wpcf7-form-control-wrap[data-name="street"] {
  display: block;
  width: 100%;
  max-width: 36rem;
}

.entry-content .retail-page .wpcf7-form-control-wrap.email,
.entry-content .retail-page .wpcf7-form-control-wrap.company,
.entry-content .retail-page .wpcf7-form-control-wrap.street {
  display: block;
  width: 100%;
  max-width: 36rem;
}

.entry-content .retail-page .wpcf7-form-control-wrap[data-name="body"] {
  display: block;
  width: 100%;
  max-width: none;
}

.entry-content .retail-page .wpcf7-form-control-wrap.body {
  display: block;
  width: 100%;
  max-width: 48rem;
}

.entry-content .retail-page .wpcf7-form-control-wrap[data-name="your-message"],
.entry-content .retail-page .wpcf7-form-control-wrap[data-name="message"],
.entry-content .retail-page .wpcf7-form-control-wrap[data-name="inquiry"] {
  display: block;
  width: 100%;
  max-width: none;
}

.entry-content .retail-page input[name="email"],
.entry-content .retail-page input[name="company"],
.entry-content .retail-page input[name="street"] {
  max-width: 36rem;
}

.entry-content .retail-page textarea[name="body"] {
  width: 100%;
  max-width: none;
}

.entry-content .retail-page textarea[name="your-message"],
.entry-content .retail-page textarea[name="message"],
.entry-content .retail-page textarea[name="inquiry"],
.entry-content .retail-page .form-textarea {
  width: 100%;
  max-width: none;
}

.entry-content .retail-page .form-row__label .badge-required {
  margin-left: auto;
}

/* Contact form width tuning */
.entry-content .contact-page .form-card,
.page-contact .entry-content .form-card {
  width: 100%;
  max-width: 92%;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 767.98px) {
  .entry-content .contact-page .form-card,
  .page-contact .entry-content .form-card {
    max-width: 100%;
  }
}

/* Contact: widen specific CF7 fields */
.entry-content .contact-page .wpcf7-form-control-wrap.email,
.entry-content .contact-page .wpcf7-form-control-wrap.company,
.entry-content .contact-page .wpcf7-form-control-wrap.street {
  display: block;
  width: 100%;
  max-width: 36rem;
}

.entry-content .contact-page input[name="email"],
.entry-content .contact-page input[name="company"],
.entry-content .contact-page input[name="street"] {
  max-width: 36rem;
}

.entry-content .contact-page .wpcf7-form-control-wrap.body,
.entry-content .contact-page .wpcf7-form-control-wrap.your-message,
.entry-content .contact-page .wpcf7-form-control-wrap.message,
.entry-content .contact-page .wpcf7-form-control-wrap.inquiry {
  display: block;
  width: 100%;
  max-width: 48rem;
}

.entry-content .contact-page textarea[name="body"],
.entry-content .contact-page textarea[name="your-message"],
.entry-content .contact-page textarea[name="message"],
.entry-content .contact-page textarea[name="inquiry"],
.entry-content .contact-page .form-textarea {
  width: 100%;
  max-width: none;
}

.entry-content .contact-page .form-row__label .badge-required {
  margin-left: auto;
}

.entry-content .retail-page .form-row__label,
.entry-content .contact-page .form-row__label {
  justify-content: space-between;
  flex-wrap: nowrap;
}

.entry-content .retail-page .form-row__label .badge-required,
.entry-content .contact-page .form-row__label .badge-required {
  margin-left: 0;
  flex-shrink: 0;
}

/* Global layout width */
:root {
  --container-max: 1000px;
}

/* Front page about-region map background tuning */
.about-region--map .about-region__bg {
  opacity: 1;
  background-image: url("original/images/bg_niigata.png");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: auto 100%;
}

.about-region--map {
  background-color: transparent;
}

.about-region--map .about-region__right {
  align-self: end;
}

@media (max-width: 62rem) {
  .about-region--map .about-region__right {
    align-self: auto;
  }
}

@media (max-width: 62rem) {
  .home .about-region--map .about-region__bg {
    display: none;
  }
}

.oem-example-card {
  margin-bottom: 50px;
}

/* Archive pager */
.navigation.pagination {
  margin-top: 2rem;
  text-align: center;
}

.navigation.pagination .nav-links {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0;
}

.navigation.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.5rem;
  border-radius: 9999px;
  color: #1c3f73;
  font-size: 1rem;
  line-height: 1;
  text-decoration: none;
}

.navigation.pagination .page-numbers.current {
  color: #1e5cb0;
  font-weight: 700;
}

.navigation.pagination a.page-numbers:hover {
  color: #1e5cb0;
  background: rgba(30, 92, 176, 0.1);
}

.navigation.pagination .page-numbers.next,
.navigation.pagination .page-numbers.prev {
  width: 3rem;
  min-width: 3rem;
  height: 3rem;
  padding: 0;
  background: #1e5cb0;
  color: #ffffff;
  font-size: 0;
}

.navigation.pagination .page-numbers.next::before {
  content: "\2192";
  font-size: 1rem;
}

.navigation.pagination .page-numbers.prev::before {
  content: "\2190";
  font-size: 1rem;
}

.navigation.pagination .page-numbers.next:hover,
.navigation.pagination .page-numbers.prev:hover {
  background: #1a5199;
  color: #ffffff;
}

/* Single post spacing: date block to content */
.single-post .article-head--staff-entry {
  margin-bottom: 1.25rem;
}

