:root {
  --stw-accent: #b91c1c;
  --stw-ink: #171717;
  --stw-muted: #666;
  --stw-line: #dedede;
  --stw-soft: #f6f6f6;
  --stw-radius: 6px;
}

.stw-product-main { background: #fff; color: var(--stw-ink); }
.stw-product-shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 24px 0 64px; }
.stw-product-breadcrumb { margin-bottom: 20px; font-size: .9rem; color: var(--stw-muted); }
.stw-product-breadcrumb .woocommerce-breadcrumb { margin: 0; }
.stw-product-hero { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(330px, .92fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.stw-product-gallery { min-width: 0; }
.stw-product-main-image { display: grid; place-items: center; min-height: 420px; border: 1px solid var(--stw-line); border-radius: var(--stw-radius); background: #fff; overflow: hidden; }
.stw-product-main-image img { display: block; width: 100%; height: auto; max-height: 620px; object-fit: contain; }
.stw-product-placeholder img { width: min(420px, 90%); }
.stw-product-thumbnails { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.stw-product-thumbnail { flex: 0 0 78px; width: 78px; height: 78px; padding: 4px; border: 1px solid var(--stw-line); border-radius: 4px; background: #fff; cursor: pointer; }
.stw-product-thumbnail:hover, .stw-product-thumbnail:focus-visible { border-color: var(--stw-accent); outline: none; }
.stw-product-thumbnail img { width: 100%; height: 100%; object-fit: contain; }
.stw-product-summary { position: sticky; top: 24px; padding-top: 4px; }
.stw-product-sale { display: inline-block; padding: 4px 9px; margin-bottom: 12px; border-radius: 999px; background: var(--stw-accent); color: #fff; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.stw-product-title { margin: 0 0 14px; font-size: clamp(2rem, 4vw, 3.4rem); line-height: 1.04; letter-spacing: -.03em; }
.stw-product-price { margin: 0 0 20px; font-size: clamp(1.7rem, 3vw, 2.35rem); font-weight: 750; color: var(--stw-accent); }
.stw-product-price del { color: var(--stw-muted); font-size: .7em; font-weight: 500; }
.stw-product-short-description { margin-bottom: 24px; font-size: 1.05rem; line-height: 1.65; }
.stw-product-short-description > :last-child, .stw-product-copy > :last-child { margin-bottom: 0; }
.stw-product-meta { margin: 0 0 22px; border-top: 1px solid var(--stw-line); }
.stw-product-meta div { display: grid; grid-template-columns: 132px 1fr; gap: 18px; padding: 10px 0; border-bottom: 1px solid var(--stw-line); }
.stw-product-meta dt { font-weight: 650; }
.stw-product-meta dd { margin: 0; }
.stw-product-cart form.cart { display: flex; align-items: stretch; gap: 10px; margin: 0; }
.stw-product-cart .quantity .qty { min-height: 48px; width: 78px; border: 1px solid #aaa; border-radius: 4px; }
.stw-product-cart .single_add_to_cart_button { min-height: 48px; padding: 0 24px; border: 0; border-radius: 4px; background: var(--stw-accent); color: #fff; font-weight: 750; cursor: pointer; }
.stw-product-cart .single_add_to_cart_button:hover { filter: brightness(.9); }
.stw-product-section { margin-top: clamp(42px, 7vw, 82px); }
.stw-product-section > h2 { margin: 0 0 20px; padding-bottom: 12px; border-bottom: 2px solid var(--stw-ink); font-size: clamp(1.55rem, 2.5vw, 2.1rem); }
.stw-product-copy { max-width: 880px; line-height: 1.75; }
.stw-product-table-wrap { overflow-x: auto; }
.stw-product-table { width: 100%; max-width: 760px; border-collapse: collapse; }
.stw-product-table th, .stw-product-table td { padding: 12px 14px; border-bottom: 1px solid var(--stw-line); text-align: left; vertical-align: top; }
.stw-product-table th { width: 260px; background: var(--stw-soft); }
.stw-document-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; }
.stw-document-group { padding: 18px; border: 1px solid var(--stw-line); border-radius: var(--stw-radius); background: var(--stw-soft); }
.stw-document-group h3 { margin: 0 0 12px; font-size: 1.1rem; }
.stw-document-group ul { list-style: none; margin: 0; padding: 0; }
.stw-document-group li + li { margin-top: 11px; padding-top: 11px; border-top: 1px solid var(--stw-line); }
.stw-document-group a { color: var(--stw-accent); font-weight: 700; text-decoration: none; }
.stw-document-group a:hover { text-decoration: underline; }
.stw-document-group span { display: block; margin-top: 3px; color: var(--stw-muted); font-size: .9rem; }
.stw-related-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stw-related-card { display: flex; flex-direction: column; gap: 8px; padding: 14px; border: 1px solid var(--stw-line); border-radius: var(--stw-radius); color: inherit; text-decoration: none; }
.stw-related-card:hover { border-color: var(--stw-accent); box-shadow: 0 8px 24px rgba(0,0,0,.08); }
.stw-related-image { aspect-ratio: 1 / 1; display: grid; place-items: center; }
.stw-related-image img { width: 100%; height: 100%; object-fit: contain; }

@media (max-width: 900px) {
  .stw-product-hero { grid-template-columns: 1fr; gap: 28px; }
  .stw-product-summary { position: static; }
  .stw-related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .stw-product-shell { width: min(100% - 22px, 1180px); padding-top: 14px; }
  .stw-product-main-image { min-height: 290px; }
  .stw-product-meta div { grid-template-columns: 1fr; gap: 2px; }
  .stw-product-cart form.cart { align-items: stretch; flex-wrap: wrap; }
  .stw-product-cart .single_add_to_cart_button { flex: 1 1 220px; }
  .stw-related-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
}
