/*
Theme Name: Shinwe Industrial
Template: twentytwentyfive
Version: 1.2.0
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;
}

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 {
  color: var(--shinwe-ink);
  font-weight: 800;
  letter-spacing: -.02em;
  text-decoration: none;
}

.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;
}

.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-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-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 {
  aspect-ratio: 1 / 1;
  object-fit: contain;
  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 {
  border: 1px solid var(--shinwe-border);
  border-radius: .8rem;
  background: #fff;
  padding: 1rem;
  box-shadow: 0 8px 24px rgba(16, 42, 67, .05);
}

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

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

@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)); }
}

@media (max-width: 782px) {
  .admin-bar .shinwe-header { top: 46px; }
  .shinwe-header { position: relative; top: 0; }
  .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; }
}
