/*
Theme Name: NSG Blocks
Theme URI: https://localhost/nsg/
Description: Gutenberg + ACF Blocks theme for National Safety Gear.
Author: NSG
Version: 0.2.0
Text Domain: nsg-blocks
*/

:root {
  --nsg-bg: #f6f3ed;
  --nsg-surface: #ffffff;
  --nsg-surface-alt: #f0eadf;
  --nsg-text: #1f2430;
  --nsg-muted: #5f6677;
  --nsg-accent: #b34c26;
  --nsg-accent-dark: #8f3d20;
  --nsg-border: rgba(31, 36, 48, 0.12);
  --nsg-shadow: 0 18px 40px rgba(31, 36, 48, 0.08);
  --nsg-radius: 22px;
  --nsg-container: min(1200px, calc(100vw - 2rem));
  --nsg-gutter: clamp(1rem, 2vw, 2rem);
  --nsg-section-space: clamp(2.5rem, 6vw, 5rem);
  --nsg-font-body: "Source Sans 3", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --nsg-font-display: "Montserrat", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

html {
  background: var(--nsg-bg);
}

body,
button,
input,
select,
textarea {
  font-family: var(--nsg-font-body);
}

h1, h2, h3, h4, h5, h6,
.site-title,
.nsg-display {
  font-family: var(--nsg-font-display);
  letter-spacing: -0.02em;
}

a {
  color: var(--nsg-accent);
}

a:hover,
a:focus {
  color: var(--nsg-accent-dark);
}

.nsg-shell,
.nsg-block,
.entry-content,
.site-content {
  color: var(--nsg-text);
}

.nsg-container {
  width: var(--nsg-container);
  margin: 0 auto;
}

#content-wrap {
  padding: 2rem 2.5rem;
}

/* ── Multi-section page layout (shortcode product grids in post_content) ── */

#content-wrap h2.wp-block-heading {
  font-family: var(--nsg-font-display);
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-weight: 700;
  color: #111;
  margin: 2.5rem 0 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

#content-wrap h2.wp-block-heading:first-child {
  margin-top: 0.5rem;
}

#content-wrap p {
  font-size: 0.9375rem;
  line-height: 1.75;
  color: #444;
  margin: 0 0 0.75em;
}

#content-wrap .wp-block-separator {
  border: none;
  border-top: 1px solid #e5e5e5;
  margin: 2.5rem 0;
}

/* Card borders on shortcode product grids (matches product-category block) */
#content-wrap .woocommerce ul.products li.product {
  border: 1px solid #e8e8e8;
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
  transition: box-shadow 0.2s ease;
}

#content-wrap .woocommerce ul.products li.product:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

#content-wrap .woocommerce ul.products li.product a.woocommerce-LoopProduct-link {
  flex: 1;
  display: flex;
  flex-direction: column;
}

#content-wrap .woocommerce ul.products li.product img {
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: #f5f5f5;
  padding: 0.5rem;
}

#content-wrap .woocommerce ul.products li.product .woocommerce-loop-product__title {
  padding: 0.75rem 0.75rem 0.25rem !important;
  margin: 0 !important;
}

#content-wrap .woocommerce ul.products li.product .price {
  padding: 0 0.75rem 0.75rem !important;
}

#content-wrap .woocommerce ul.products li.product .button,
#content-wrap .woocommerce ul.products li.product a.button {
  margin: 0 0.75rem 0.75rem !important;
  width: calc(100% - 1.5rem) !important;
  background: #333;
  color: #fff;
  font-family: var(--nsg-font-display);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 2px;
}

#content-wrap .woocommerce ul.products li.product .button:hover,
#content-wrap .woocommerce ul.products li.product a.button:hover {
  background: var(--nsg-accent);
}

#content-wrap .woocommerce ul.products {
  margin-top: 1.25rem !important;
  margin-bottom: 0 !important;
}

.nsg-surface {
  background: var(--nsg-surface);
  border: 1px solid var(--nsg-border);
  border-radius: var(--nsg-radius);
  box-shadow: var(--nsg-shadow);
}

.nsg-eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.75rem;
  color: var(--nsg-accent);
  margin-bottom: 0.5rem;
}

.nsg-button,
button,
input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.4rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--nsg-accent);
  color: #fff;
  text-decoration: none;
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.wp-block-button__link:hover,
input[type="submit"]:hover {
  background: var(--nsg-accent-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(179, 76, 38, 0.18);
  border-color: currentColor;
}

.nsg-section,
.nsg-rich-text,
.nsg-spacer,
.nsg-image,
.nsg-button-block {
  padding-block: var(--nsg-section-space);
}

/* ============================================================
   NSG HEADER
   ============================================================ */

.nsg-header {
  background: #fff;
  font-family: Montserrat, "Helvetica Neue", Helvetica, Arial, sans-serif;
  position: relative;
  z-index: 1000;
}

/* ---------- Shared container ---------- */
.nsg-header__top-inner,
.nsg-header__nav-inner,
.nsg-header__mobile-bar-inner {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ============================================================
   TOP BAR (logo + contact + search)
   ============================================================ */
.nsg-header__top {
  background: #fff;
  border-bottom: 1px solid #e8e8e8;
}

.nsg-header__top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 15px;
  padding-bottom: 5px;
  gap: 1rem;
}

/* Logo */
.nsg-header__logo .custom-logo-link,
.nsg-header__logo-text {
  display: block;
  text-decoration: none;
  color: #111;
  font-weight: 700;
  font-size: 1.25rem;
}

.nsg-header__logo .custom-logo {
  max-width: 200px;
  height: auto;
  display: block;
}

/* Aside: contact + search */
.nsg-header__aside {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Contact row */
.nsg-header__contact {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 12px;
  font-weight: 400;
  color: #000;
}

.nsg-header__contact-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.nsg-header__contact-item a {
  color: #000;
  text-decoration: none;
  font-size: 12px;
}

.nsg-header__contact-item a:hover {
  text-decoration: underline;
}

.nsg-header__contact-icon {
  width: 12px;
  height: 12px;
  fill: #000;
  flex-shrink: 0;
}

/* Search form */
.nsg-header__searchform {
  display: flex;
  align-items: stretch;
}

.nsg-header__search-input {
  border: 1px solid #ccc;
  border-right: none;
  padding: 6px 10px;
  font-size: 13px;
  font-family: Montserrat, sans-serif;
  outline: none;
  width: 160px;
  border-radius: 0;
  background: #fff;
  color: #111;
}

.nsg-header__search-input:focus {
  border-color: #999;
}

.nsg-header__search-btn {
  background: #333;
  border: 1px solid #333;
  color: #fff;
  padding: 6px 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  transition: background 0.15s ease;
}

.nsg-header__search-btn:hover {
  background: #555;
  border-color: #555;
}

.nsg-header__search-btn svg {
  width: 13px;
  height: 13px;
  fill: #fff;
  display: block;
}

/* ============================================================
   DESKTOP NAV BAR
   ============================================================ */
.nsg-header__nav-wrap {
  background: #333333;
}

.nsg-header__nav-inner {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
}

/* Nav list */
.nsg-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: stretch;
}

.nsg-nav__list > .menu-item > a {
  display: flex;
  align-items: center;
  height: 50px;
  padding: 0 14px;
  color: #fff;
  font-family: Montserrat, sans-serif;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0;
  white-space: nowrap;
  transition: color 0.15s ease, background 0.15s ease;
  position: relative;
}

.nsg-nav__list > .menu-item > a:hover,
.nsg-nav__list > .menu-item:hover > a {
  color: #d3d3d3;
  background: #333;
}

.nsg-nav__list > .current-menu-item > a,
.nsg-nav__list > .current-menu-ancestor > a {
  color: #eeea00;
}

/* Dropdown caret */
.nsg-nav__list > .menu-item-has-children > a::after {
  content: '';
  display: inline-block;
  margin-left: 6px;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  vertical-align: middle;
  flex-shrink: 0;
}

/* Sub-menu (dropdown) */
.nsg-nav__list .menu-item-has-children {
  position: relative;
}

.nsg-nav__list .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #0a0a0a;
  min-width: 220px;
  list-style: none;
  margin: 0;
  padding: 0;
  z-index: 9999;
  border-top: 3px solid #e88235;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.nsg-nav__list .menu-item-has-children:hover > .sub-menu {
  display: block;
}

.nsg-nav__list .sub-menu .menu-item a {
  display: block;
  padding: 10px 16px;
  color: #fff;
  font-family: Montserrat, sans-serif;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s ease;
  white-space: nowrap;
}

.nsg-nav__list .sub-menu .menu-item a:hover {
  background: #6d6d6d;
}

/* Cart */
.nsg-nav__cart {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 50px;
  padding: 0 14px;
  color: #fff;
  text-decoration: none;
  font-family: Montserrat, sans-serif;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  transition: color 0.15s ease;
  flex-shrink: 0;
}

.nsg-nav__cart:hover {
  color: #d3d3d3;
}

.nsg-nav__cart-icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex-shrink: 0;
}

.nsg-nav__cart-count {
  background: #e88235;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
}

/* ============================================================
   MOBILE BAR
   ============================================================ */
.nsg-header__mobile-bar {
  display: none;
  background: #fff;
  border-bottom: 1px solid #e8e8e8;
}

.nsg-header__mobile-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  padding-bottom: 10px;
  position: relative;
}

.nsg-header__mobile-logo .custom-logo {
  max-width: 150px;
  height: auto;
  display: block;
}

/* Checkbox toggle (off-screen) */
.nsg-mobile__toggle-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

/* Hamburger button */
.nsg-mobile__toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  cursor: pointer;
  flex-shrink: 0;
}

.nsg-mobile__hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 24px;
}

.nsg-mobile__hamburger span {
  display: block;
  height: 2px;
  background: #333;
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Animate hamburger to X when checked */
.nsg-mobile__toggle-input:checked ~ .nsg-mobile__toggle-btn .nsg-mobile__hamburger span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nsg-mobile__toggle-input:checked ~ .nsg-mobile__toggle-btn .nsg-mobile__hamburger span:nth-child(2) {
  opacity: 0;
}
.nsg-mobile__toggle-input:checked ~ .nsg-mobile__toggle-btn .nsg-mobile__hamburger span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile panel */
.nsg-mobile__panel {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #333;
  z-index: 9999;
  padding: 0 0 1rem;
}

.nsg-mobile__toggle-input:checked ~ .nsg-mobile__panel {
  display: block;
}

.nsg-mobile__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nsg-mobile__list .menu-item a {
  display: block;
  padding: 12px 20px;
  color: #fff;
  font-family: Montserrat, sans-serif;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nsg-mobile__list .menu-item a:hover {
  background: rgba(255, 255, 255, 0.08);
}

.nsg-mobile__list .sub-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  background: #222;
}

.nsg-mobile__list .sub-menu .menu-item a {
  padding-left: 36px;
  font-size: 14px;
  font-weight: 500;
}

.nsg-mobile__contact {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.nsg-mobile__contact a {
  color: rgba(255, 255, 255, 0.74);
  font-family: Montserrat, sans-serif;
  font-size: 13px;
  text-decoration: none;
}

.nsg-mobile__contact a:hover {
  color: #fff;
}

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */

/* Show desktop header, hide mobile bar */
@media (min-width: 960px) {
  .nsg-header__top {
    display: block;
  }
  .nsg-header__nav-wrap {
    display: block;
  }
  .nsg-header__mobile-bar {
    display: none;
  }
}

/* Show mobile bar, hide desktop top + nav */
@media (max-width: 959px) {
  .nsg-header__top {
    display: none;
  }
  .nsg-header__nav-wrap {
    display: none;
  }
  .nsg-header__mobile-bar {
    display: block;
  }
}

/* ============================================================
   FOOTER
   ============================================================ */

.nsg-footer {
  font-family: Montserrat, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --nsg-accent: rgb(251, 252, 62);
}

/* ---------- Email signup band ---------- */
.nsg-footer__signup {
  background: #1a1a1a;
  padding: 28px 0;
  text-align: center;
}
.nsg-footer__signup .mc4wp-form {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.nsg-footer__signup .mc4wp-form-fields {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: rgb(251, 252, 62);
  font-family: Oswald, sans-serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.nsg-footer__signup .mc4wp-form input[type="email"] {
  height: 38px;
  padding: 0 14px;
  border: 1px solid #555;
  border-radius: 3px;
  background: #2b2b2b;
  color: #fff;
  font-size: 0.8rem;
  width: 240px;
}
.nsg-footer__signup .mc4wp-form input[type="email"]::placeholder {
  color: #999;
}
.nsg-footer__signup .mc4wp-form input[type="submit"] {
  height: 38px;
  padding: 0 20px;
  background: rgb(251, 252, 62) !important;
  color: #111 !important;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: none !important;
  border-radius: 3px;
  cursor: pointer;
  box-shadow: none !important;
}
.nsg-footer__signup .mc4wp-form input[type="submit"]:hover {
  background: rgb(230, 231, 40) !important;
}
.nsg-footer__signup .mc4wp-response {
  color: #adf0b0;
  font-size: 0.8rem;
  width: 100%;
  margin-top: 6px;
}

/* ---------- Main area ---------- */
.nsg-footer__main {
  background: #2b2b2b;
  padding: 52px 0 44px;
}

.nsg-footer__grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 2.5rem;
  align-items: start;
}

/* ---------- Columns ---------- */
.nsg-footer__heading {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--nsg-accent);
  margin: 0 0 1.1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nsg-footer__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.nsg-footer__links a {
  color: #fff;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 400;
  transition: color 0.15s ease;
}

.nsg-footer__links a:hover {
  color: #fff;
}

/* ---------- Contact list ---------- */
.nsg-footer__contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.nsg-footer__contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  color: #fff;
  font-size: 0.875rem;
  line-height: 1.5;
}

.nsg-footer__contact-icon {
  width: 14px;
  height: 14px;
  fill: var(--nsg-accent);
  flex-shrink: 0;
  margin-top: 0.2em;
}

.nsg-footer__contact-item a {
  color: #fff;
  text-decoration: none;
  transition: color 0.15s ease;
}

.nsg-footer__contact-item a:hover {
  color: #fff;
}

.nsg-footer__contact-item address {
  font-style: normal;
}

/* ---------- BBB badge ---------- */
.nsg-footer__col--bbb {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 0.25rem;
}

.nsg-footer__bbb-link {
  display: inline-block;
  opacity: 0.85;
  transition: opacity 0.15s ease;
}

.nsg-footer__bbb-link:hover {
  opacity: 1;
}

.nsg-footer__bbb-link img {
  display: block;
  height: auto;
  max-width: 100%;
}

/* ---------- Bottom bar ---------- */
.nsg-footer__bottom {
  background: #111;
  padding: 14px 0;
}

.nsg-footer__copyright {
  margin: 0;
  font-size: 0.8125rem;
  color: #fff;
  text-align: center;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .nsg-footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .nsg-footer__col--bbb {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .nsg-footer__grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
}

/* ==========================================================================
   Single Post
   ========================================================================== */

.nsg-single-post {
  margin-bottom: 3rem;
}

/* ── Featured image ─────────────────────────────────────────── */

.nsg-single-post__media {
  width: 100%;
  max-height: 500px;
  overflow: hidden;
  margin-bottom: 2rem;
}

.nsg-single-post__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── Header ─────────────────────────────────────────────────── */

.nsg-single-post__wrap {
  max-width: 860px;
}

.nsg-single-post__cats {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.nsg-single-post__cat {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--nsg-accent);
  text-decoration: none;
}

.nsg-single-post__cat:hover {
  text-decoration: underline;
}

.nsg-single-post__title {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
  color: #111;
  margin: 0 0 0.75rem;
}

.nsg-single-post__meta {
  font-size: 0.875rem;
  color: #777;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #e5e5e5;
}

/* ── Content ─────────────────────────────────────────────────── */

.nsg-single-post__content {
  font-size: 1rem;
  line-height: 1.75;
  color: #222;
}

.nsg-single-post__content h2 {
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  font-weight: 700;
  margin: 2rem 0 0.75rem;
  color: #111;
}

.nsg-single-post__content h3 {
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  font-weight: 700;
  margin: 1.75rem 0 0.6rem;
  color: #111;
}

.nsg-single-post__content p {
  margin: 0 0 1.25rem;
}

.nsg-single-post__content ul,
.nsg-single-post__content ol {
  margin: 0 0 1.25rem 1.5rem;
}

.nsg-single-post__content li {
  margin-bottom: 0.4rem;
}

.nsg-single-post__content img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
  margin: 1.5rem 0;
}

.nsg-single-post__content a {
  color: var(--nsg-accent);
  text-decoration: underline;
}

.nsg-single-post__content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}

.nsg-single-post__content th,
.nsg-single-post__content td {
  padding: 0.6rem 0.85rem;
  border: 1px solid #ddd;
  text-align: left;
}

.nsg-single-post__content th {
  background: #f5f5f5;
  font-weight: 700;
}

/* ── Footer ─────────────────────────────────────────────────── */

.nsg-single-post__footer {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e5e5;
}

.nsg-single-post__back {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--nsg-accent);
  text-decoration: none;
}

.nsg-single-post__back:hover {
  text-decoration: underline;
}

@media (max-width: 700px) {
  .nsg-single-post__media {
    max-height: 280px;
  }

  .nsg-single-post__wrap {
    padding: 0 1rem;
  }
}

/* ==========================================================================
   WooCommerce
   ========================================================================== */

/* ── Layout ─────────────────────────────────────────────────── */

body.woocommerce,
body.woocommerce-page,
body.single-product {
  background: #fff;
}

body.woocommerce #main,
body.woocommerce-page #main,
body.single-product #main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 2.5rem;
  background: #fff;
}

.woocommerce div.product {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
  margin-bottom: 3rem;
}

.woocommerce div.product .woocommerce-product-gallery {
  float: none !important;
  width: 100% !important;
  max-width: none !important;
}

.woocommerce div.product .woocommerce-product-gallery__wrapper {
  display: block;
  width: 100%;
}

.woocommerce div.product .woocommerce-product-gallery .woocommerce-product-gallery__image a,
.woocommerce div.product .woocommerce-product-gallery .woocommerce-product-gallery__image img {
  display: block;
  width: 100% !important;
  height: auto;
}

.woocommerce div.product .summary {
  float: none !important;
  width: 100% !important;
  max-width: none !important;
}

/* ── Product title & price ───────────────────────────────────── */

.woocommerce div.product h1.product_title {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 700;
  color: #111;
  margin: 0 0 0.5rem;
  line-height: 1.25;
}

.woocommerce div.product .woocommerce-review-link {
  font-size: 0.85rem;
  color: #777;
}

.woocommerce div.product p.price,
.woocommerce div.product span.price {
  font-size: 1.375rem;
  font-weight: 700;
  color: #111;
  margin: 0.75rem 0 1rem;
}

/* ── Add to cart ─────────────────────────────────────────────── */

.woocommerce div.product form.cart {
  margin: 1.25rem 0;
}

.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce div.product form.cart .button,
.woocommerce #respond input#submit {
  background: #f5d800 !important;
  color: #111 !important;
  font-weight: 700;
  font-size: 0.9375rem;
  padding: 0.75rem 1.75rem;
  border-radius: 3px;
  border: none;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: background 0.15s ease;
  text-decoration: none;
  display: inline-block;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce div.product form.cart .button:hover {
  background: #e6ca00 !important;
  color: #111 !important;
}

/* ── Variations ──────────────────────────────────────────────── */

.woocommerce div.product .variations {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
}

.woocommerce div.product .variations td,
.woocommerce div.product .variations th {
  padding: 0.4rem 0;
  vertical-align: middle;
}

.woocommerce div.product .variations .label {
  font-weight: 600;
  font-size: 0.875rem;
  padding-right: 1rem;
  white-space: nowrap;
}

.woocommerce div.product .variations select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #ccc;
  border-radius: 3px;
  font-size: 0.9rem;
  background: #fff;
}

/* ── Tabs ────────────────────────────────────────────────────── */

.woocommerce div.product .woocommerce-tabs {
  grid-column: 1 / -1;
  clear: both;
}

.woocommerce div.product .woocommerce-tabs ul.tabs {
  list-style: none;
  margin: 0 0 -1px;
  padding: 0;
  display: flex;
  gap: 0;
  border-bottom: 2px solid #ddd;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li {
  margin: 0;
  padding: 0;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li a {
  display: block;
  padding: 0.7rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #555;
  text-decoration: none;
  border: 2px solid transparent;
  border-bottom: none;
  border-radius: 3px 3px 0 0;
  transition: color 0.15s ease;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li.active a,
.woocommerce div.product .woocommerce-tabs ul.tabs li a:hover {
  color: #111;
  border-color: #ddd;
  background: #fff;
}

.woocommerce div.product .woocommerce-tabs .panel {
  padding: 1.75rem 0;
  border-top: none;
  font-size: 0.9375rem;
  line-height: 1.7;
  color: #333;
}

.woocommerce div.product .woocommerce-tabs .panel h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 1.5rem 0 0.6rem;
}

/* ── Related products ────────────────────────────────────────── */

.woocommerce div.product section.related,
.woocommerce div.product .upsells {
  grid-column: 1 / -1;
  width: 100%;
  clear: both;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #e5e5e5;
}

.woocommerce div.product section.related h2,
.woocommerce div.product .upsells h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: #111;
}

.woocommerce div.product section.related ul.products,
.woocommerce div.product .upsells ul.products,
.woocommerce ul.products {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 1.25rem !important;
  float: none !important;
  width: 100% !important;
}

/* WooCommerce's clearfix ::before/::after become ghost grid items — suppress them */
.woocommerce ul.products::before,
.woocommerce ul.products::after {
  display: none !important;
}

.woocommerce div.product section.related ul.products li.product,
.woocommerce div.product .upsells ul.products li.product,
.woocommerce ul.products li.product {
  display: flex !important;
  flex-direction: column !important;
  float: none !important;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
}

.woocommerce ul.products li.product a img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 3px;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #111;
  margin: 0.6rem 0 0.3rem;
  line-height: 1.35;
}

.woocommerce ul.products li.product .star-rating {
  margin-left: 12px;
}

.woocommerce ul.products li.product .price {
  font-size: 1.4rem !important;
  font-weight: 700;
  color: #111 !important;
  margin-top: auto;
}

.woocommerce ul.products li.product .price * {
  color: #111 !important;
}

.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product a.button {
  display: block !important;
  width: 100% !important;
  margin: 0.75rem 0 0 !important;
  text-align: center !important;
  box-sizing: border-box !important;
}

/* ── Quantity ────────────────────────────────────────────────── */

.woocommerce div.product form.cart .quantity {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.woocommerce div.product form.cart .quantity::before {
  content: 'Quantity:';
  font-size: 0.875rem;
  font-weight: 600;
  color: #111;
  white-space: nowrap;
}

.woocommerce div.product form.cart .qty {
  width: 64px;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 3px;
  font-size: 1rem;
  text-align: center;
  margin-right: 0;
}

/* ── Description read-more ───────────────────────────────────── */

.nsg-desc--collapsed {
  max-height: 320px;
  overflow: hidden;
  position: relative;
}

.nsg-desc--collapsed::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(to bottom, transparent, #fff);
  pointer-events: none;
}

.nsg-desc__read-more {
  display: block;
  margin: 1rem 0 0;
  padding: 0.6rem 1.5rem;
  background: #f5d800;
  color: #111;
  font-weight: 700;
  font-size: 0.875rem;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ── SKU / meta ──────────────────────────────────────────────── */

.woocommerce div.product .product_meta {
  font-size: 0.85rem;
  color: #777;
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.woocommerce div.product .product_meta .sku_wrapper,
.woocommerce div.product .product_meta .product_brand_wrapper,
.woocommerce div.product .product_meta .tagged_as {
  display: block;
}

.woocommerce div.product .product_meta a {
  color: var(--nsg-accent);
}

/* ── Responsive ──────────────────────────────────────────────── */

@media (max-width: 768px) {
  .woocommerce div.product {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* ── Blog pagination ─────────────────────────────────────────── */

.wp-block-query-pagination {
  margin-top: 2.5rem;
  margin-bottom: 3rem;
  gap: 0.375rem;
}

.wp-block-query-pagination-numbers {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.wp-block-query-pagination .page-numbers,
.wp-block-query-pagination-previous,
.wp-block-query-pagination-next {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.625rem;
  border: 1px solid #ddd;
  border-radius: 3px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #111;
  text-decoration: none;
  background: #fff;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.wp-block-query-pagination .page-numbers:hover,
.wp-block-query-pagination-previous:hover,
.wp-block-query-pagination-next:hover {
  background: #f5f5f5;
  border-color: #bbb;
}

.wp-block-query-pagination .page-numbers.current {
  background: #f5d800;
  border-color: #f5d800;
  color: #111;
  cursor: default;
}

.wp-block-query-pagination .page-numbers.dots {
  border: none;
  background: none;
  cursor: default;
}
