/*
Theme Name: Shinwe Industrial
Template: twentytwentyfive
Version: 1.6.1
Description: Update-safe industrial catalog child theme for Shinwe.
Text Domain: shinwe-industrial
*/

:root {
  --shinwe-blue: #0b5cab;
  --shinwe-blue-dark: #08467f;
  --shinwe-green: #1f8a5b;
  --shinwe-ink: #102a43;
  --shinwe-muted: #52697d;
  --shinwe-surface: #f3f8fc;
  --shinwe-border: #dce7ef;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  color: var(--shinwe-ink);
  background: #fff;
}

a {
  text-underline-offset: .18em;
}

.wp-site-blocks > header {
  border-bottom: 1px solid var(--shinwe-border);
  box-shadow: 0 5px 22px rgba(16, 42, 67, .06);
}

.shinwe-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(12px);
}

.admin-bar .shinwe-header { top: 32px; }

.shinwe-header__inner {
  min-height: 78px;
  padding-block: .8rem;
}

.shinwe-brand a {
  display: inline-flex;
  gap: .72rem;
  align-items: center;
  color: var(--shinwe-ink);
  font-weight: 800;
  letter-spacing: -.02em;
  text-decoration: none;
}

.shinwe-brand a::before {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  background: url("assets/brand/shinwe-site-icon.png") center / contain no-repeat;
  content: "";
}

.shinwe-nav a { text-decoration: none; }

/* Catalog-only site: WooCommerce injects account/cart blocks into block-theme
   headers even when products are not purchasable. Keep them out of the UI. */
.wp-block-woocommerce-customer-account,
.wp-block-woocommerce-mini-cart {
  display: none !important;
}

/* Technical support archive and long-form articles. */
.shinwe-page-shell { min-height: 55vh; }

.shinwe-support { padding-block: clamp(3.5rem, 7vw, 7rem); }
.shinwe-support__hero {
  width: min(1200px, calc(100% - 3rem));
  margin-inline: auto;
  padding: clamp(2.25rem, 6vw, 5rem);
  color: #fff;
  border-radius: 28px;
  background:
    linear-gradient(112deg, rgba(5, 43, 78, .97), rgba(11, 92, 171, .9) 57%, rgba(31, 138, 91, .88)),
    radial-gradient(circle at 82% 24%, rgba(126, 225, 172, .35), transparent 25%);
  box-shadow: 0 24px 70px rgba(11, 92, 171, .18);
}
.shinwe-support__hero .shinwe-eyebrow { margin: 0; color: #8ff0bc; }
.shinwe-support__hero h1 {
  margin-block: .5rem 1rem;
  color: #fff;
  font-size: clamp(2.3rem, 5vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: -.045em;
}
.shinwe-support__hero > p:last-child { max-width: 46rem; margin: 0; color: rgba(255,255,255,.86); font-size: 1.12rem; }
.shinwe-support__filters {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  width: min(1200px, calc(100% - 3rem));
  margin: 2rem auto;
}
.shinwe-support__filters a {
  display: inline-flex;
  gap: .5rem;
  align-items: center;
  padding: .68rem 1rem;
  color: var(--shinwe-ink);
  border: 1px solid var(--shinwe-border);
  border-radius: 999px;
  background: #fff;
  text-decoration: none;
}
.shinwe-support__filters a:hover,
.shinwe-support__filters a.is-active { color: #fff; border-color: var(--shinwe-blue); background: var(--shinwe-blue); }
.shinwe-support__filters small { opacity: .75; }
.shinwe-support__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.35rem;
  width: min(1200px, calc(100% - 3rem));
  margin-inline: auto;
}
.shinwe-support-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--shinwe-border);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 12px 35px rgba(16, 42, 67, .07);
  transition: transform .2s ease, box-shadow .2s ease;
}
.shinwe-support-card:hover { transform: translateY(-4px); box-shadow: 0 19px 45px rgba(16, 42, 67, .12); }
.shinwe-support-card__media {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 10;
  padding: 1rem;
  overflow: hidden;
  background: #f4f8fb;
}
.shinwe-support-card__media img { width: 100%; height: 100%; object-fit: contain; }
.shinwe-support-card__media.is-placeholder {
  color: rgba(255,255,255,.8);
  font-weight: 800;
  letter-spacing: .12em;
  background: linear-gradient(145deg, var(--shinwe-blue-dark), var(--shinwe-green));
  text-decoration: none;
}
.shinwe-support-card__body { padding: 1.35rem; }
.shinwe-support-card__topic { color: var(--shinwe-green); font-size: .78rem; font-weight: 800; letter-spacing: .06em; }
.shinwe-support-card h2 { margin-block: .5rem .65rem; font-size: 1.3rem; line-height: 1.35; }
.shinwe-support-card h2 a { color: var(--shinwe-ink); text-decoration: none; }
.shinwe-support-card__body > p { min-height: 4.5em; color: var(--shinwe-muted); font-size: .93rem; }
.shinwe-support-card__body > div { display: flex; justify-content: space-between; gap: 1rem; color: var(--shinwe-muted); font-size: .84rem; }
.shinwe-support-card__body > div a { color: var(--shinwe-blue); font-weight: 700; text-decoration: none; }
.shinwe-support__pagination { width: min(1200px, calc(100% - 3rem)); margin: 2.5rem auto 0; }
.shinwe-support__pagination ul { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; padding: 0; list-style: none; }
.shinwe-support__pagination a,
.shinwe-support__pagination span { display: grid; min-width: 2.6rem; min-height: 2.6rem; place-items: center; padding: .45rem .7rem; border: 1px solid var(--shinwe-border); border-radius: 8px; text-decoration: none; }
.shinwe-support__pagination .current { color: #fff; border-color: var(--shinwe-blue); background: var(--shinwe-blue); }

.shinwe-article-shell { padding-bottom: clamp(4rem, 8vw, 8rem); }
.shinwe-article-header {
  margin-bottom: clamp(2rem, 5vw, 4rem);
  padding: clamp(3rem, 7vw, 6.5rem) 1.5rem clamp(2.5rem, 6vw, 5rem);
  text-align: center;
  background: linear-gradient(180deg, #edf7ff, #fff);
}
.shinwe-article-header h1 { margin-block: .6rem 1.1rem; font-size: clamp(2.15rem, 4.7vw, 4rem); line-height: 1.12; letter-spacing: -.04em; }
.shinwe-article-meta { justify-content: center; color: var(--shinwe-muted); font-size: .9rem; }
.shinwe-article-meta a { color: var(--shinwe-blue); text-decoration: none; }
.shinwe-article-layout { padding-inline: 1.5rem; }
.shinwe-article-layout .wp-block-post-content { font-size: 1.05rem; line-height: 1.85; }
.shinwe-article-layout .wp-block-post-content > * { max-width: 900px; }
.shinwe-article-layout .wp-block-post-content h2 { margin-top: 2.4em; font-size: clamp(1.55rem, 3vw, 2.15rem); line-height: 1.3; }
.shinwe-article-layout .wp-block-post-content h3 { margin-top: 2em; font-size: clamp(1.25rem, 2.3vw, 1.6rem); }
.shinwe-article-layout .wp-block-post-content img {
  display: block;
  max-width: 100% !important;
  height: auto !important;
  margin-inline: auto;
  object-fit: contain;
}
.shinwe-article-layout figure,
.shinwe-article-layout .wp-caption { max-width: 100% !important; margin-inline: auto; }
.shinwe-article-layout .wp-caption-text { color: var(--shinwe-muted); font-size: .86rem; text-align: center; }
.shinwe-article-layout table { width: 100%; border-collapse: collapse; }
.shinwe-article-layout th,
.shinwe-article-layout td { padding: .75rem; border: 1px solid var(--shinwe-border); vertical-align: top; }
.shinwe-article-layout a { overflow-wrap: anywhere; }
.shinwe-related { margin-top: 4rem; padding: clamp(1.5rem, 4vw, 2.5rem); border-radius: 20px; background: var(--shinwe-surface); }
.shinwe-related > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.shinwe-related article { padding: 1rem; border: 1px solid var(--shinwe-border); border-radius: 12px; background: #fff; }
.shinwe-related time { color: var(--shinwe-muted); font-size: .8rem; }
.shinwe-related h3 { margin-block: .45rem 0; font-size: 1rem; line-height: 1.45; }
.shinwe-related a { color: var(--shinwe-ink); text-decoration: none; }
.shinwe-article-back { margin-top: 2rem; }
.shinwe-article-back a { color: var(--shinwe-blue); font-weight: 700; text-decoration: none; }

@media (max-width: 900px) {
  .shinwe-support__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shinwe-related > div { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .shinwe-support { padding-block: 1.5rem 3.5rem; }
  .shinwe-support__hero,
  .shinwe-support__filters,
  .shinwe-support__grid,
  .shinwe-support__pagination { width: min(100% - 2rem, 1200px); }
  .shinwe-support__hero {
    padding: 1.8rem 1.25rem;
    border-radius: 20px;
  }
  .shinwe-support__hero h1 { font-size: 2rem; }
  .shinwe-support__hero > p:last-child { font-size: 1rem; line-height: 1.7; }
  .shinwe-support__filters { gap: .55rem; margin-block: 1.25rem 1.5rem; }
  .shinwe-support__filters a {
    flex: 1 1 calc(50% - .55rem);
    min-width: 0;
    justify-content: center;
    padding: .65rem .7rem;
    font-size: .92rem;
    white-space: nowrap;
  }
  .shinwe-support__grid { grid-template-columns: 1fr; }
  .shinwe-support-card__body > p { min-height: 0; }
}

.shinwe-carousel {
  position: relative;
  overflow: hidden;
  min-height: clamp(35rem, 69vw, 48rem);
  color: #fff;
  background: var(--shinwe-ink);
}

.shinwe-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  visibility: hidden;
  opacity: 0;
  transition: opacity .7s ease, visibility .7s ease;
}

.shinwe-slide.is-active {
  position: relative;
  visibility: visible;
  opacity: 1;
}

.shinwe-slide__media,
.shinwe-slide__shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.shinwe-slide__media {
  object-fit: cover;
  object-position: center;
}

.shinwe-slide__shade {
  background: linear-gradient(90deg, rgba(7, 30, 49, .93) 0%, rgba(7, 42, 61, .82) 34%, rgba(7, 42, 61, .2) 66%, rgba(7, 42, 61, .06) 100%);
}

.shinwe-slide__content {
  position: relative;
  z-index: 2;
  width: min(1200px, calc(100% - 3rem));
  margin-inline: auto;
  padding-block: clamp(5rem, 10vw, 8rem);
}

.shinwe-slide__content > * { max-width: 43rem; }

.shinwe-slide__content .shinwe-eyebrow { color: #7ee1ac; }

.shinwe-slide__title {
  max-width: 13ch;
  margin-block: .65rem 1rem;
  color: #fff;
  font-size: clamp(2.35rem, 5.5vw, 5rem);
  line-height: 1.08;
  letter-spacing: -.045em;
}

.shinwe-slide__copy {
  max-width: 38rem;
  color: rgba(255, 255, 255, .88);
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
}

.shinwe-slide .wp-block-button__link { background: var(--shinwe-green); }
.shinwe-slide .is-style-outline .wp-block-button__link {
  color: #fff;
  border-color: rgba(255, 255, 255, .8);
  background: rgba(255, 255, 255, .06);
}

.shinwe-carousel__controls {
  position: absolute;
  z-index: 4;
  right: max(1.5rem, calc((100% - 1200px) / 2));
  bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: .55rem;
}

.shinwe-carousel button.shinwe-carousel__button {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  place-items: center;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 50%;
  background: rgba(7, 30, 49, .58);
  cursor: pointer;
}

.shinwe-carousel__dots { display: flex; gap: .45rem; margin-inline: .35rem; }
.shinwe-carousel button.shinwe-carousel__dot {
  width: .7rem;
  height: .7rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .5);
  cursor: pointer;
}
.shinwe-carousel button.shinwe-carousel__dot[aria-current="true"] { background: #7ee1ac; transform: scale(1.25); }

.shinwe-category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.shinwe-category-card {
  overflow: hidden;
  border: 1px solid var(--shinwe-border);
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 12px 30px rgba(16, 42, 67, .07);
  transition: transform .2s ease, box-shadow .2s ease;
}

.shinwe-category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 38px rgba(16, 42, 67, .13);
}

.shinwe-category-card__media {
  display: grid;
  margin: 0;
  aspect-ratio: 4 / 3;
  place-items: center;
  background: linear-gradient(145deg, #f7fbff, #eef8f2);
}

.shinwe-category-card__media img {
  width: 100%;
  height: 100%;
  padding: 1.25rem;
  object-fit: contain;
}

.shinwe-category-card__body { padding: 1.25rem 1.35rem 1.5rem; }
.shinwe-category-card__body h3 { margin: 0 0 .45rem; font-size: 1.25rem; }
.shinwe-category-card__body p { margin: 0 0 .8rem; color: var(--shinwe-muted); }
.shinwe-category-card__body a { color: var(--shinwe-blue); font-weight: 800; text-decoration: none; }

.shinwe-eyebrow {
  color: var(--shinwe-green);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .14em;
}

.shinwe-section { padding-block: clamp(3.5rem, 7vw, 6rem); }

.shinwe-section--surface {
  background: var(--shinwe-surface);
}

.shinwe-feature {
  position: relative;
  isolation: isolate;
  min-height: 42rem;
  padding-block: clamp(4.5rem, 8vw, 7rem);
  color: #fff;
  background-position: center;
  background-size: cover;
}

.shinwe-feature::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, rgba(6, 27, 48, .96) 0%, rgba(6, 36, 60, .88) 34%, rgba(6, 36, 60, .6) 68%, rgba(6, 36, 60, .42) 100%);
}

.shinwe-feature--reverse::before {
  background: linear-gradient(270deg, rgba(6, 27, 48, .96) 0%, rgba(6, 36, 60, .88) 34%, rgba(6, 36, 60, .6) 68%, rgba(6, 36, 60, .42) 100%);
}

.shinwe-feature--gearbox { background-image: url('/wp-content/themes/shinwe-industrial/assets/images/section-gearbox.jpg'); }
.shinwe-feature--planetary { background-image: url('/wp-content/themes/shinwe-industrial/assets/images/section-planetary.jpg'); }
.shinwe-feature--hollow { background-image: url('/wp-content/themes/shinwe-industrial/assets/images/section-hollow-shaft.jpg'); }
.shinwe-feature--servo { background-image: url('/wp-content/themes/shinwe-industrial/assets/images/section-servo.jpg'); }
.shinwe-feature--recommended { background-image: url('/wp-content/themes/shinwe-industrial/assets/images/section-recommended.jpg'); }

.shinwe-feature__inner {
  display: grid;
  width: min(1280px, calc(100% - 3rem));
  margin-inline: auto;
  grid-template-columns: minmax(17rem, .72fr) minmax(0, 1.55fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}

.shinwe-feature--reverse .shinwe-feature__heading { grid-column: 2; grid-row: 1; }
.shinwe-feature--reverse .shinwe-product-grid { grid-column: 1; grid-row: 1; }
.shinwe-feature--reverse .shinwe-feature__inner {
  grid-template-columns: minmax(0, 1.55fr) minmax(17rem, .72fr);
}

.shinwe-feature__heading h2 {
  margin-block: .45rem .8rem;
  color: #fff;
  font-size: clamp(2.3rem, 4.2vw, 4.25rem);
  line-height: 1.08;
  letter-spacing: -.035em;
}

.shinwe-feature__heading > p:not(.shinwe-eyebrow) {
  margin-bottom: 1.5rem;
  color: rgba(255, 255, 255, .82);
  font-size: 1.08rem;
  line-height: 1.85;
}

.shinwe-feature__heading .shinwe-eyebrow { color: #79e2aa; }

.shinwe-feature__more {
  display: inline-flex;
  padding: .8rem 1.05rem;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: .55rem;
  background: rgba(255, 255, 255, .08);
  font-weight: 800;
  text-decoration: none;
}

.shinwe-product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  align-items: stretch;
}

.shinwe-feature__inner--wide { grid-template-columns: 1fr; }
.shinwe-feature__inner--wide .shinwe-feature__heading { max-width: 45rem; }
.shinwe-product-grid--four { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.shinwe-product-card {
  display: flex;
  overflow: hidden;
  min-width: 0;
  height: 100%;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, .32);
  border-radius: 1rem;
  background: rgba(255, 255, 255, .95);
  box-shadow: 0 18px 44px rgba(2, 16, 29, .24);
  backdrop-filter: blur(10px);
  transition: transform .2s ease, box-shadow .2s ease;
}

.shinwe-product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 52px rgba(2, 16, 29, .34);
}

.shinwe-product-card__media {
  display: grid;
  width: 100%;
  aspect-ratio: 1 / 1;
  place-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--shinwe-border);
  background: linear-gradient(145deg, #fff, #f2f7fa);
}

.shinwe-product-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  padding: clamp(.8rem, 1.8vw, 1.35rem);
  box-sizing: border-box;
  object-fit: contain;
  object-position: center;
}

.shinwe-product-card__body {
  display: flex;
  padding: 1.05rem 1.15rem 1.25rem;
  flex: 1;
  flex-direction: column;
}

.shinwe-product-card__body span {
  color: var(--shinwe-green);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .12em;
}

.shinwe-product-card__body h3 {
  min-height: 2.8em;
  margin-block: .35rem .9rem;
  color: var(--shinwe-ink);
  font-size: clamp(1rem, 1.4vw, 1.18rem);
  line-height: 1.4;
}

.shinwe-product-card__body a {
  margin-top: auto;
  color: var(--shinwe-blue);
  font-weight: 800;
  text-decoration: none;
}

.shinwe-contact {
  margin-block: clamp(3rem, 7vw, 6rem);
  padding: clamp(2rem, 5vw, 4rem);
  color: #fff;
  border-radius: 1.25rem;
  background: linear-gradient(125deg, var(--shinwe-blue-dark), var(--shinwe-blue));
  box-shadow: 0 18px 44px rgba(11, 92, 171, .2);
}

.shinwe-contact h2,
.shinwe-contact a { color: #fff; }

.shinwe-contact .is-style-outline .wp-block-button__link { border-color: #fff; }

.shinwe-contact__layout {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(22rem, 1.15fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.shinwe-contact__intro h2 {
  margin-block: .35rem 1rem;
  font-size: clamp(1.8rem, 3vw, 2.65rem);
  line-height: 1.2;
}

.shinwe-contact__eyebrow {
  margin: 0;
  color: #8ee5b5;
  font-size: .74rem;
  font-weight: 900;
  letter-spacing: .14em;
}

.shinwe-contact__quick-links {
  display: flex;
  margin-top: 1.5rem;
  gap: .6rem 1.25rem;
  flex-wrap: wrap;
  font-weight: 750;
}

.shinwe-contact__form-panel {
  padding: clamp(1.25rem, 3vw, 2rem);
  color: var(--shinwe-ink);
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 16px 38px rgba(4, 31, 56, .22);
}

.shinwe-contact-form p { margin-block: 0 1rem; }

.shinwe-contact-form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 1rem;
}

.shinwe-contact-form label {
  display: block;
  margin-bottom: .4rem;
  color: var(--shinwe-ink);
  font-size: .9rem;
  font-weight: 750;
}

.shinwe-contact-form input,
.shinwe-contact-form textarea {
  width: 100%;
  padding: .72rem .8rem;
  color: var(--shinwe-ink);
  border: 1px solid #b9cad7;
  border-radius: .45rem;
  background: #fff;
  font: inherit;
}

.shinwe-contact-form input:focus,
.shinwe-contact-form textarea:focus {
  outline: 3px solid rgba(31, 138, 91, .2);
  border-color: var(--shinwe-green);
}

.shinwe-contact-form textarea { resize: vertical; }

.shinwe-contact-form__submit {
  width: 100%;
  padding: .85rem 1.25rem;
  color: #fff;
  border: 0;
  background: var(--shinwe-green);
  cursor: pointer;
  font-size: 1rem;
}

.shinwe-contact-form__privacy {
  margin: .7rem 0 0 !important;
  color: var(--shinwe-muted);
  font-size: .78rem;
  text-align: center;
}

.shinwe-contact-form__website {
  position: absolute !important;
  left: -10000px !important;
  overflow: hidden !important;
  width: 1px !important;
  height: 1px !important;
}

.shinwe-contact__notice {
  margin: 0 0 1rem;
  padding: .75rem .9rem;
  border-radius: .45rem;
  font-weight: 750;
}

.shinwe-contact__notice--success {
  color: #125c3c;
  background: #e6f7ee;
}

.shinwe-contact__notice--error {
  color: #8a2730;
  background: #fdecef;
}

@media (max-width: 760px) {
  .shinwe-contact { padding: 1.4rem; }
  .shinwe-contact__layout { grid-template-columns: minmax(0, 1fr); }
  .shinwe-contact-form__grid { grid-template-columns: minmax(0, 1fr); }
  .shinwe-contact__form-panel { padding: 1.15rem; }
}

.shinwe-footer {
  padding-block: 3rem 1.5rem;
  color: #d8e7f4;
  background: var(--shinwe-ink);
}

.shinwe-footer h2,
.shinwe-footer h3,
.shinwe-footer a { color: #fff; }

.woocommerce ul.products li.product img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  object-position: center;
  padding: clamp(.75rem, 2vw, 1.35rem);
  box-sizing: border-box;
  background: #fff;
}

.wp-block-button__link,
.button,
button:not(.components-button) {
  border-radius: .45rem;
  font-weight: 700;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.wp-block-button__link:hover,
.button:hover,
button:not(.components-button):hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(11, 92, 171, .18);
}

.woocommerce ul.products li.product,
.wc-block-product {
  display: flex;
  height: 100%;
  flex-direction: column;
  border: 1px solid var(--shinwe-border);
  border-radius: .8rem;
  background: #fff;
  padding: 1rem;
  box-shadow: 0 8px 24px rgba(16, 42, 67, .05);
}

.woocommerce ul.products li.product .woocommerce-loop-product__title { min-height: 3.15em; }
.woocommerce ul.products li.product .button { margin-top: auto; }

.woocommerce div.product div.images img {
  border-radius: .75rem;
  border: 1px solid var(--shinwe-border);
}

.woocommerce-product-details__short-description {
  color: var(--shinwe-muted);
}

/* Large catalog: persistent category index on desktop, compact scrollable
   index on small screens. The content column remains the reading priority. */
.shinwe-catalog-shell {
  width: 100%;
  padding: clamp(2rem, 5vw, 4rem) max(1.25rem, calc((100% - 1280px) / 2));
  box-sizing: border-box;
}

.shinwe-catalog-shell > .woocommerce-breadcrumb {
  max-width: 1280px;
  margin: 0 auto 1.5rem;
  color: var(--shinwe-muted);
}

.shinwe-catalog-layout {
  display: grid;
  max-width: 1280px !important;
  grid-template-columns: minmax(14rem, 17rem) minmax(0, 1fr);
  gap: clamp(1.5rem, 3.5vw, 3.25rem);
  align-items: start;
}

.shinwe-catalog-sidebar {
  position: static;
}

.shinwe-category-nav {
  overflow: hidden;
  border: 1px solid var(--shinwe-border);
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 12px 32px rgba(16, 42, 67, .08);
}

.shinwe-category-nav__details,
.shinwe-category-nav__body { margin: 0; }

.shinwe-category-nav__summary { display: none; }

.shinwe-category-nav__heading {
  display: flex;
  padding: 1.15rem 1.2rem;
  color: #fff;
  flex-direction: column;
  background: linear-gradient(135deg, var(--shinwe-blue-dark), var(--shinwe-blue));
}

.shinwe-category-nav__heading span {
  color: #8ee5b5;
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .12em;
}

.shinwe-category-nav__heading strong { font-size: 1.25rem; }
.shinwe-category-nav__list { margin: 0; padding: 0; list-style: none; }
.shinwe-category-nav__list .shinwe-category-nav__list { padding-left: .75rem; }

.shinwe-category-nav a {
  display: flex;
  gap: .75rem;
  align-items: center;
  justify-content: space-between;
  padding: .72rem 1rem;
  color: var(--shinwe-ink);
  border-bottom: 1px solid #edf3f7;
  text-decoration: none;
  transition: color .18s ease, background-color .18s ease;
}

.shinwe-category-nav a:hover,
.shinwe-category-nav a.is-active,
.shinwe-category-nav__item.is-active > a {
  color: var(--shinwe-blue-dark);
  background: #eaf6ef;
}

.shinwe-category-nav__all { font-weight: 850; }
.shinwe-category-nav small {
  min-width: 1.7rem;
  padding: .1rem .4rem;
  color: var(--shinwe-muted);
  border-radius: 2rem;
  background: var(--shinwe-surface);
  font-size: .7rem;
  text-align: center;
}

.shinwe-catalog-results { min-width: 0; }
.shinwe-catalog-results .woocommerce-products-header__title { margin-top: 0; }
.shinwe-catalog-results ul.products { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; }
.shinwe-catalog-results ul.products::before,
.shinwe-catalog-results ul.products::after { display: none !important; }
.shinwe-catalog-results ul.products li.product { width: auto !important; min-width: 0; margin: 0 !important; }

.shinwe-catalog-results section.related.products {
  display: block !important;
  width: 100%;
  min-width: 0;
  margin-top: clamp(2.5rem, 5vw, 4.5rem);
}

.shinwe-catalog-results section.related.products > ul.products {
  width: 100%;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.woocommerce ul.products li.product .woocommerce-loop-product__link {
  display: flex;
  width: 100%;
  min-width: 0;
  flex-direction: column;
}

.woocommerce ul.products li.product .woocommerce-loop-product__link img {
  max-width: 100%;
  max-height: 100%;
}

/* Only the primary product gallery is normalized into a square canvas. Detail
   diagrams retain their natural proportions and are never cropped. */
.woocommerce div.product div.images .woocommerce-product-gallery__image {
  display: grid;
  aspect-ratio: 1 / 1;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--shinwe-border);
  border-radius: .85rem;
  background: linear-gradient(145deg, #fff, #f3f8fb);
}

.woocommerce div.product div.images .woocommerce-product-gallery__image img {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 1 / 1;
  padding: clamp(.8rem, 2.5vw, 2rem);
  box-sizing: border-box;
  border: 0;
  object-fit: contain;
  object-position: center;
}

.shinwe-spec-sheet {
  width: 100%;
  max-width: 100%;
  margin: 1.5rem 0 .75rem;
  padding: clamp(.5rem, 1.5vw, 1rem);
  box-sizing: border-box;
  overflow: hidden;
  border: 1px solid var(--shinwe-border);
  border-radius: .8rem;
  background: #fff;
  box-shadow: 0 10px 24px rgba(16, 42, 67, .06);
}

.shinwe-spec-sheet > a {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.woocommerce-Tabs-panel--description .shinwe-spec-sheet img {
  display: block;
  width: 100% !important;
  max-width: 100%;
  height: auto !important;
  margin: 0;
  padding: 0;
  object-fit: contain;
}

.shinwe-spec-sheet figcaption {
  margin-top: .65rem;
  color: var(--shinwe-muted);
  font-size: .88rem;
  text-align: center;
}

.shinwe-spec-source {
  margin: 0 0 1.5rem;
  border: 1px solid var(--shinwe-border);
  border-radius: .6rem;
  background: var(--shinwe-surface);
}

.shinwe-spec-source > summary {
  padding: .75rem 1rem;
  color: var(--shinwe-blue);
  cursor: pointer;
  font-weight: 750;
}

.shinwe-spec-source__table {
  padding: 0 1rem 1rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Legacy descriptions often used border tables as layout wrappers. Once their
   actual specification tables become image sheets, flatten those wrappers so
   every sheet gets a full-width section instead of a narrow table cell. */
.woocommerce-Tabs-panel--description table:has(.shinwe-spec-sheet),
.woocommerce-Tabs-panel--description table:has(.shinwe-spec-sheet) > tbody,
.woocommerce-Tabs-panel--description table:has(.shinwe-spec-sheet) > tbody > tr,
.woocommerce-Tabs-panel--description table:has(.shinwe-spec-sheet) > tbody > tr > td {
  display: block;
  width: 100% !important;
  max-width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
}

.woocommerce-product-details__short-description img,
.woocommerce-Tabs-panel--description img,
.woocommerce-product-details__short-description figure,
.woocommerce-Tabs-panel--description figure {
  width: auto;
  max-width: 100%;
  height: auto;
}

.woocommerce-Tabs-panel--description {
  overflow-wrap: anywhere;
  color: var(--shinwe-ink);
  line-height: 1.75;
}

.woocommerce-Tabs-panel--description table {
  display: table;
  width: 100% !important;
  max-width: 100%;
  margin-block: 1.25rem;
  border-collapse: collapse;
}

.woocommerce-Tabs-panel--description td,
.woocommerce-Tabs-panel--description th {
  padding: .8rem;
  border: 1px solid var(--shinwe-border);
  vertical-align: top;
}

.woocommerce-Tabs-panel--description a[href$=".pdf" i] {
  display: inline-flex;
  margin: .2rem;
  padding: .65rem .85rem;
  color: #fff;
  border-radius: .45rem;
  background: var(--shinwe-blue);
  font-weight: 750;
  text-decoration: none;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

@media (max-width: 900px) {
  .shinwe-category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shinwe-slide__shade { background: linear-gradient(90deg, rgba(7, 30, 49, .94), rgba(7, 42, 61, .58)); }
  .shinwe-feature__inner,
  .shinwe-feature__inner--wide,
  .shinwe-feature--reverse .shinwe-feature__inner { grid-template-columns: 1fr; }
  .shinwe-feature--reverse .shinwe-feature__heading,
  .shinwe-feature--reverse .shinwe-product-grid { grid-column: 1; grid-row: auto; }
  .shinwe-feature--reverse .shinwe-feature__heading { order: -1; }
  .shinwe-product-grid--four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shinwe-feature::before,
  .shinwe-feature--reverse::before { background: rgba(6, 30, 51, .86); }
  .shinwe-catalog-layout { grid-template-columns: 1fr; }
  .shinwe-category-nav__summary {
    display: grid;
    position: relative;
    min-height: 5.6rem;
    padding: .9rem 3.2rem .9rem 1.1rem;
    box-sizing: border-box;
    color: #fff;
    cursor: pointer;
    grid-template-columns: minmax(0, 1fr);
    gap: .15rem;
    background: linear-gradient(135deg, var(--shinwe-blue-dark), var(--shinwe-blue));
    list-style: none;
  }
  .shinwe-category-nav__summary::-webkit-details-marker { display: none; }
  .shinwe-category-nav__summary::marker { content: ""; }
  .shinwe-category-nav__summary > span:first-child {
    display: flex;
    flex-direction: column;
  }
  .shinwe-category-nav__summary small {
    min-width: 0;
    padding: 0;
    color: #8ee5b5;
    background: transparent;
    font-size: .65rem;
    font-weight: 900;
    letter-spacing: .12em;
    text-align: left;
  }
  .shinwe-category-nav__summary strong { font-size: 1.15rem; }
  .shinwe-category-nav__current {
    overflow: hidden;
    color: rgba(255, 255, 255, .82);
    font-size: .82rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .shinwe-category-nav__toggle {
    position: absolute;
    top: 50%;
    right: 1.1rem;
    width: 1.55rem;
    height: 1.55rem;
    border: 1px solid rgba(255, 255, 255, .55);
    border-radius: 50%;
    transform: translateY(-50%);
  }
  .shinwe-category-nav__toggle::before,
  .shinwe-category-nav__toggle::after {
    position: absolute;
    top: 50%;
    left: 50%;
    width: .7rem;
    height: 2px;
    content: "";
    background: #fff;
    transform: translate(-50%, -50%);
  }
  .shinwe-category-nav__toggle::after {
    transform: translate(-50%, -50%) rotate(90deg);
    transition: transform .18s ease;
  }
  .shinwe-category-nav__details[open] .shinwe-category-nav__toggle::after {
    transform: translate(-50%, -50%) rotate(0);
  }
  .shinwe-category-nav__body > .shinwe-category-nav__heading { display: none; }
  .shinwe-category-nav__list { columns: 2; column-gap: 0; }
  .shinwe-category-nav__item { break-inside: avoid; }
  .shinwe-catalog-results ul.products,
  .shinwe-catalog-results section.related.products > ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 901px) {
  .shinwe-category-nav__details:not([open]) > .shinwe-category-nav__body {
    display: block;
  }
}

@media (max-width: 782px) {
  .admin-bar .shinwe-header { top: 46px; }
  /* backdrop-filter creates a containing block for fixed descendants in
     mobile browsers. It was trapping WordPress' full-screen navigation
     overlay inside the header and leaving only the first "首頁" item visible. */
  .shinwe-header { position: relative; top: 0; backdrop-filter: none; }
  .shinwe-header__inner { min-height: 72px; padding: .65rem 1rem; }
  .shinwe-brand { font-size: 1rem; }
  .shinwe-brand a { gap: .55rem; }
  .shinwe-brand a::before { width: 40px; height: 40px; flex-basis: 40px; }
  .shinwe-nav .wp-block-navigation__responsive-container.is-menu-open {
    position: fixed;
    inset: 0;
    box-sizing: border-box;
    width: 100%;
    max-width: 100vw;
    min-height: 100vh;
    min-height: 100dvh;
    padding:
      calc(5.4rem + env(safe-area-inset-top, 0px))
      1.25rem
      calc(2rem + env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    color: var(--shinwe-ink) !important;
    background: #fff !important;
    animation: none !important;
    transform: none !important;
    z-index: 100000;
  }
  .shinwe-nav .wp-block-navigation__responsive-container.is-menu-open::before {
    position: absolute;
    top: calc(.9rem + env(safe-area-inset-top, 0px));
    right: 4.75rem;
    left: 1.25rem;
    display: flex;
    min-height: 3.25rem;
    padding-left: 3.65rem;
    align-items: center;
    border-bottom: 1px solid var(--shinwe-border);
    background: url("assets/brand/shinwe-site-icon.png") left center / 2.65rem 2.65rem no-repeat;
    color: var(--shinwe-ink);
    content: "翔暐企業有限公司";
    font-size: 1.02rem;
    font-weight: 800;
    letter-spacing: -.02em;
  }
  .shinwe-nav .wp-block-navigation__responsive-dialog { position: static; }
  .shinwe-nav .wp-block-navigation__responsive-container-close {
    top: calc(1.25rem + env(safe-area-inset-top, 0px));
    right: 1.25rem;
    display: grid;
    width: 2.75rem;
    height: 2.75rem;
    place-items: center;
    border-radius: 50%;
    background: var(--shinwe-surface);
  }
  .shinwe-nav .wp-block-navigation__responsive-container-close:focus-visible {
    outline: 3px solid rgba(11, 92, 171, .35);
    outline-offset: 2px;
  }
  .shinwe-nav .wp-block-navigation__responsive-container-content {
    padding-top: 0 !important;
  }
  .shinwe-nav .wp-block-navigation__responsive-container-content,
  .shinwe-nav .wp-block-navigation__responsive-container-content .wp-block-navigation__container {
    width: 100%;
    gap: 0;
    align-items: stretch !important;
  }
  .shinwe-nav .wp-block-navigation__responsive-container-content .wp-block-navigation-item {
    width: 100%;
    border-bottom: 1px solid var(--shinwe-border);
  }
  .shinwe-nav .wp-block-navigation__responsive-container-content .wp-block-navigation-item__content {
    box-sizing: border-box;
    width: 100%;
    padding: 1.05rem .8rem !important;
    border-radius: .6rem;
    font-size: 1.15rem;
    font-weight: 750;
  }
  .shinwe-nav .wp-block-navigation__responsive-container-content .wp-block-navigation-item__content:focus,
  .shinwe-nav .wp-block-navigation__responsive-container-content .wp-block-navigation-item__content:focus-visible {
    outline: none !important;
    box-shadow: inset 0 0 0 2px var(--shinwe-blue);
    background: var(--shinwe-surface);
  }
  .shinwe-carousel { min-height: 38rem; }
  .shinwe-slide__media { object-position: 68% center; }
  .shinwe-slide__shade { background: linear-gradient(90deg, rgba(7, 30, 49, .94) 0%, rgba(7, 42, 61, .72) 70%, rgba(7, 42, 61, .5) 100%); }
  .shinwe-carousel__controls { right: 1rem; bottom: 1rem; }
  .shinwe-category-grid { grid-template-columns: 1fr; }
  .shinwe-feature { min-height: auto; padding-block: 4rem; }
  .shinwe-feature__inner { width: min(100% - 2rem, 40rem); gap: 2rem; }
  .shinwe-product-grid,
  .shinwe-product-grid--four { grid-template-columns: 1fr; }
  .shinwe-product-card { display: grid; grid-template-columns: 9.5rem 1fr; }
  .shinwe-product-card__media { height: 100%; min-height: 10.5rem; aspect-ratio: auto; border-right: 1px solid var(--shinwe-border); border-bottom: 0; }
  .shinwe-product-card__body h3 { min-height: 0; }
  .shinwe-catalog-shell { padding-inline: 1rem; }
  .shinwe-category-nav__list { columns: 1; }
  .shinwe-catalog-results ul.products,
  .shinwe-catalog-results section.related.products > ul.products { grid-template-columns: 1fr; }
  .woocommerce-Tabs-panel--description {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-inline: contain;
  }
  .woocommerce-Tabs-panel--description table {
    display: table;
    width: max-content !important;
    min-width: 100%;
    max-width: none !important;
    table-layout: auto !important;
    font-size: .72rem;
    line-height: 1.25;
  }
  .woocommerce-Tabs-panel--description table th,
  .woocommerce-Tabs-panel--description table td {
    padding: .35rem .42rem !important;
    overflow-wrap: normal !important;
    word-break: keep-all !important;
    white-space: nowrap;
  }
}

/* Full-site specification sheets. These final overrides intentionally come
   after the legacy mobile table rules so a disclosed source table can never
   collapse, inherit transparent text, or stack characters on top of itself. */
.woocommerce-product-details__short-description .shinwe-spec-sheet,
.woocommerce-Tabs-panel--description .shinwe-spec-sheet {
  display: block;
  width: 100%;
  max-width: 100%;
}

.woocommerce-product-details__short-description .shinwe-spec-sheet img,
.woocommerce-Tabs-panel--description .shinwe-spec-sheet img {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  object-fit: contain;
}

.woocommerce .shinwe-spec-source[open] > .shinwe-spec-source__table {
  display: block !important;
  min-height: 2rem;
  visibility: visible !important;
  opacity: 1 !important;
}

.woocommerce .shinwe-spec-source__table {
  max-width: 100%;
  color: var(--shinwe-ink) !important;
  background: #fff;
}

.woocommerce .shinwe-spec-source__table table {
  display: table !important;
  width: max-content !important;
  min-width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  border-collapse: collapse !important;
  table-layout: auto !important;
  color: var(--shinwe-ink) !important;
  background: #fff !important;
  font-size: .78rem !important;
  line-height: 1.5 !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.woocommerce .shinwe-spec-source__table thead,
.woocommerce .shinwe-spec-source__table tbody,
.woocommerce .shinwe-spec-source__table tfoot {
  display: table-row-group !important;
  visibility: visible !important;
}

.woocommerce .shinwe-spec-source__table tr {
  display: table-row !important;
  visibility: visible !important;
}

.woocommerce .shinwe-spec-source__table th,
.woocommerce .shinwe-spec-source__table td {
  display: table-cell !important;
  min-width: 5.5rem;
  padding: .55rem .65rem !important;
  color: var(--shinwe-ink) !important;
  border: 1px solid var(--shinwe-border) !important;
  background: #fff !important;
  line-height: 1.5 !important;
  vertical-align: middle !important;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: break-word !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.woocommerce .shinwe-spec-source__table tr:nth-child(even) > td {
  background: var(--shinwe-surface) !important;
}

.woocommerce .shinwe-spec-source__table img {
  display: block !important;
  width: auto !important;
  max-width: min(100%, 56rem) !important;
  height: auto !important;
  margin: .25rem auto !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.woocommerce-product-details__short-description,
.woocommerce-Tabs-panel--description {
  word-break: normal;
  overflow-wrap: break-word;
}

.woocommerce-product-details__short-description p,
.woocommerce-Tabs-panel--description p,
.woocommerce-product-details__short-description li,
.woocommerce-Tabs-panel--description li {
  line-height: 1.75;
}
