/* ==========================================================================
   Golf Cart Battery Source v1.0.8: responsive pass (loaded last).
   Live audit at 320/360/390/414/768/820/1024/1280/1440 (see RESPONSIVE-AUDIT.md).
   ========================================================================== */

/* ---------- 1. Global overflow safety ---------- */
/* 100vw includes the scrollbar width on desktop; 100% never does. */
body { max-width: 100%; }
img, svg, video, canvas, iframe, embed, object { max-width: 100%; }
img, video { height: auto; }
.gcbs-main, .gcbs-container, .site-main { min-width: 0; }
pre, code { white-space: pre-wrap; word-break: break-word; }
.gcbs-prose, .gcbs-page-content, .woocommerce-Tabs-panel, .woocommerce-product-details__short-description {
  overflow-wrap: anywhere;
}
.gcbs-prose a, .gcbs-page-content a { overflow-wrap: anywhere; }

/* ---------- 2. Single product page grid (was overflowing below 800px and at 820) ---------- */
/* An implicit "auto" track (and 1fr = minmax(auto,1fr)) grew to the gallery / tabs min-content width. */
.woocommerce div.product { grid-template-columns: minmax(0, 1fr) !important; }
@media (min-width: 800px) {
  .woocommerce div.product { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important; }
}
.woocommerce div.product > * { min-width: 0; max-width: 100%; }
.woocommerce div.product div.images,
.woocommerce div.product div.summary,
.woocommerce div.product .woocommerce-tabs,
.woocommerce div.product .related,
.woocommerce div.product .upsells { min-width: 0; max-width: 100%; }
.woocommerce div.product div.images img { max-width: 100%; height: auto; }
.woocommerce div.product .flex-viewport { max-width: 100%; }
.woocommerce div.product .flex-control-thumbs { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; }
.woocommerce div.product .flex-control-thumbs li { flex: 0 0 calc(25% - .375rem); max-width: calc(25% - .375rem); }

/* ---------- 3. Tables: horizontal scroll containers ---------- */
.gcbs-table-scroll {
  display: block; width: 100%; max-width: 100%;
  overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
  margin: 0 0 1.25rem;
  background:
    linear-gradient(90deg, #fff 30%, rgba(255,255,255,0)) left center / 24px 100% no-repeat local,
    linear-gradient(270deg, #fff 30%, rgba(255,255,255,0)) right center / 24px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgba(24,33,42,.18), rgba(24,33,42,0)) left center / 10px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, rgba(24,33,42,.18), rgba(24,33,42,0)) right center / 10px 100% no-repeat scroll;
}
.gcbs-table-scroll:focus-visible { outline: 3px solid var(--gcbs-green, #1E8C48); outline-offset: 2px; }
.gcbs-table-scroll > table { margin: 0; min-width: 100%; }
@media (max-width: 767px) {
  .gcbs-table-scroll > table { width: max-content; min-width: 100%; max-width: none; }
  .gcbs-table-scroll > table th, .gcbs-table-scroll > table td { min-width: 6.5rem; max-width: 18rem; white-space: normal; }
}
.wp-block-table { overflow-x: auto; max-width: 100%; }
.woocommerce-product-attributes { max-width: 100%; }
.woocommerce-product-attributes td, .woocommerce-product-attributes th { overflow-wrap: anywhere; }

/* ---------- 4. Contact form: honeypot hidden, fluid fields ---------- */
.gcbs-contact-form__hp {
  position: absolute !important; left: -9999px !important; top: auto !important;
  width: 1px !important; height: 1px !important; overflow: hidden !important;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.gcbs-contact-form { max-width: 44rem; margin: 2rem 0; position: relative; }
.gcbs-contact-form__row { display: flex; flex-direction: column; gap: .35rem; margin: 0 0 1rem; }
.gcbs-contact-form label { font-weight: 600; color: var(--gcbs-title, #18212A); font-size: 1rem; }
.gcbs-contact-form input[type="text"],
.gcbs-contact-form input[type="email"],
.gcbs-contact-form textarea {
  width: 100%; max-width: 100%; min-height: 48px; box-sizing: border-box;
  padding: .7rem .85rem; font: inherit; font-size: 1rem;
  border: 1px solid var(--gcbs-border, #d6dbe0); border-radius: var(--gcbs-radius-sm, 6px); background: #fff;
}
.gcbs-contact-form textarea { min-height: 9rem; resize: vertical; }
.gcbs-contact-form button[type="submit"] { min-height: 48px; min-width: 12rem; }
@media (max-width: 480px) { .gcbs-contact-form button[type="submit"] { width: 100%; } }

/* ---------- 5. Tap targets (>= 44px on touch layouts) ---------- */
@media (max-width: 1024px) {
  /* Footer link lists: 44px rows, two columns on phones/tablets so the footer stays compact. */
  .gcbs-footer__links li { margin: 0 !important; }
  .gcbs-footer__links a,
  .gcbs-footer__sublink a,
  .gcbs-footer__links .gcbs-footer__sublink a,
  .gcbs-footer__email a,
  .gcbs-footer__note a,
  .gcbs-footer__bottom a {
    display: inline-flex !important; align-items: center; min-height: 44px; padding-top: 0 !important; padding-bottom: 0 !important;
  }
  .gcbs-footer__bottom ul, .gcbs-footer__bottom .menu { display: flex; flex-wrap: wrap; column-gap: 1.25rem; list-style: none; padding: 0; }

  /* Breadcrumbs */
  .gcbs-breadcrumbs a { display: inline-flex; align-items: center; min-height: 44px; }
  .gcbs-breadcrumbs__item, .gcbs-breadcrumbs__list > li { align-items: center; }

  /* Product meta (categories / tags / brand) */
  .product_meta .posted_in a, .product_meta .tagged_as a {
    display: inline-flex; align-items: center; min-height: 44px; padding: 0 .15rem;
  }

  /* Links that are the whole text of a list item / paragraph / cell (marked by inc/responsive-108.php) */
  a.gcbs-tap-block { display: inline-flex; align-items: center; min-height: 44px; }
  td > a.gcbs-tap-block { min-width: 44px; }
  .gcbs-brand-links__all a, .gcbs-pdp-fit__help a { display: inline-flex; align-items: center; min-height: 44px; }

  /* Variation reset, filters summary + clear link */
  .woocommerce div.product form.cart .reset_variations,
  a.reset_variations { display: inline-flex !important; align-items: center; min-height: 44px; min-width: 44px; padding: 0 .5rem; }
  .gcbs-filters__kicker { min-height: 44px; display: flex; align-items: center; }
  .gcbs-filters__clear { display: inline-flex; align-items: center; min-height: 44px; }

  /* WooCommerce blocks: product button, checkout checkbox/terms links, account links */
  .wc-block-components-product-button__button,
  .wp-block-button.wc-block-components-product-button .wp-block-button__link { min-height: 44px; }
  .wc-block-components-checkbox__label a,
  .wc-block-checkout__terms a { display: inline-flex; align-items: center; min-height: 44px; }
  .wc-block-components-checkbox { min-height: 44px; display: flex; align-items: center; }
  .woocommerce-LostPassword a, .lost_password a, .woocommerce-form-login__rememberme { display: inline-flex; align-items: center; min-height: 44px; }
  .woocommerce form .form-row input.input-text, .woocommerce form .form-row select,
  .woocommerce form .form-row textarea { min-height: 44px; }
}

/* ---------- 6. Card buttons: long labels ("Select options") no longer clip at 1024 ---------- */
.gcbs-product-card__actions .button,
.gcbs-product-card .button {
  white-space: normal !important; overflow-wrap: anywhere; line-height: 1.2;
  min-height: 44px; display: inline-flex !important; align-items: center; justify-content: center; text-align: center;
}
.gcbs-product-card__actions { min-width: 0; }
.gcbs-product-card__actions > * { min-width: 0; }

/* ---------- 6b. Product tabs on phones: wrap instead of clipping long labels ---------- */
@media (max-width: 640px) {
  .woocommerce div.product .woocommerce-tabs ul.tabs, .woocommerce-tabs ul.tabs {
    display: flex !important; flex-wrap: wrap !important; gap: .4rem; overflow: visible;
  }
  .woocommerce-tabs ul.tabs li { flex: 1 1 auto; min-width: 0; }
  .woocommerce-tabs ul.tabs li a { letter-spacing: 0 !important; padding: .45rem .6rem !important; }
}

/* ---------- 6c. More touch targets: footer/tag links narrower than 44px, card titles, mega menu on touch ---------- */
@media (max-width: 1024px) {
  .gcbs-footer__links a, .gcbs-footer__sublink a, .product_meta .posted_in a, .product_meta .tagged_as a { min-width: 44px; justify-content: flex-start; }
  .product_meta .tagged_as a { justify-content: center; }
  .gcbs-product-card__title a, .woocommerce-loop-product__title a { display: flex; align-items: center; min-height: 44px; }
}
@media (max-width: 1199px), (pointer: coarse) {
  .gcbs-mega__link { min-height: 44px; align-items: center; }
  .gcbs-mega li > a:not(.gcbs-mega__link):not(.gcbs-btn) { display: inline-flex; align-items: center; min-height: 44px; }
}

@media (min-width: 861px) and (max-width: 1199px), (min-width: 861px) and (pointer: coarse) {
  .gcbs-util-nav__list > li > a { min-height: 44px !important; min-width: 44px; justify-content: center; }
  .gcbs-catbar__list a { min-width: 44px; justify-content: center; }
}

/* ---------- 6d. Round-2 fixes from the full live crawl ---------- */
@media (max-width: 767px) {
  /* Long cell text wraps inside the scroll container instead of being clipped. */
  .gcbs-fit-table td, .gcbs-table-scroll td, .gcbs-fit__scroll td { white-space: normal !important; overflow-wrap: break-word; max-width: none; }
  .gcbs-fit-table td:nth-child(2), .gcbs-fit-table td:nth-child(3) { min-width: 7.5rem; }
}
@media (max-width: 1024px) {
  .gcbs-breadcrumbs a { min-width: 44px; justify-content: center; }
  a.gcbs-tap-block { min-width: 44px; }
  .wc-block-components-checkbox label, .wc-block-checkout__add-note .wc-block-components-checkbox label { min-height: 44px; display: flex; align-items: center; }
}
@media (max-width: 480px) {
  .gcbs-yt__btn, .gcbs-fit__reset { font-size: 0.875rem; }
  input[type="checkbox"], input[type="radio"] { font-size: 0.875rem; }
  .wc-block-checkout__guest-checkout-notice,
  .wc-blocks-components-select__label,
  .wc-block-components-address-form__address_2-toggle,
  .wc-block-components-notice-banner__content,
  .wc-block-components-checkbox__label,
  .wc-block-components-checkbox__label a,
  .wc-block-components-panel__button,
  .wc-block-components-totals-item__label,
  .wc-block-components-checkout-place-order-button,
  .wc-block-components-checkout-place-order-button__text,
  .wc-block-components-checkout-order-summary__title-price,
  .wc-block-components-checkout-order-summary__title-text,
  .wc-block-components-order-summary-item__description,
  .wc-block-components-product-metadata,
  .wc-block-components-product-price,
  .wc-block-grid__product-price,
  .wc-block-grid__product-price .amount,
  .wc-block-grid__product-price bdi,
  .wc-block-components-product-button__button,
  .wc-block-components-product-button__button span,
  .wc-block-components-text-input label,
  .wc-block-components-combobox .wc-block-components-combobox-control label,
  .wc-block-components-validation-error,
  .wc-block-cart-item__prices { font-size: 0.875rem !important; }
}

/* ---------- 7. Phone font floor (>= 14px) ---------- */
@media (max-width: 480px) {
  body { font-size: 15px; }
  .gcbs-yt__time, .gcbs-yt__ch { font-size: 0.875rem; }
}
@media (max-width: 480px) {
  .gcbs-btn,
  .button,
  .woocommerce a.button,
  .woocommerce button.button,
  .woocommerce input.button,
  .woocommerce #respond input#submit,
  .woocommerce a.button.alt,
  .woocommerce button.button.alt,
  .gcbs-header__top,
  .gcbs-brand__badge,
  .gcbs-nav-toggle,
  .gcbs-search__btn,
  .gcbs-cart-link,
  .gcbs-cart-link__count,
  .gcbs-catbar__toggle,
  .gcbs-catbar__list a,
  .gcbs-pay-badges__note,
  .gcbs-product-card__sku,
  .gcbs-product-card .button,
  .onsale,
  .woocommerce span.onsale,
  .gcbs-call-price,
  .gcbs-call-price-btn,
  .gcbs-trust-strip,
  .gcbs-trust-strip__icon,
  .woocommerce-tabs ul.tabs li a,
  .gcbs-footer__heading,
  .gcbs-footer__note,
  .gcbs-footer__bottom,
  .gcbs-drawer__heading,
  .gcbs-empty-cart__eyebrow,
  .gcbs-filters__kicker,
  .gcbs-filters__label,
  .gcbs-filters__clear,
  .woocommerce-breadcrumb,
  .gcbs-breadcrumbs,
  .gcbs-product-card__title,
  .woocommerce-cart-form__contents,
  .shop_table_responsive,
  .gcbs-mega__heading,
  .gcbs-mega__icon,
  .gcbs-mega__sub,
  .gcbs-mega__promo-eyebrow,
  .gcbs-mega__promo-lead,
  .gcbs-btn--sm,
  .gcbs-product-card__badge,
  .gcbs-header__tagline,
  .gcbs-util-nav__list > li > a,
  .gcbs-util-nav__list .sub-menu a,
  .gcbs-nav__list .sub-menu a,
  .gcbs-drawer__links .sub-menu a,
  .gcbs-menu-btn__label,
  .gcbs-home-hero__eyebrow,
  .gcbs-home-hero__points,
  .gcbs-make-tile__models,
  .gcbs-make-tile__go,
  .gcbs-volt-card__go,
  .gcbs-trust-row__item,
  .gcbs-brand-strip__tag,
  .gcbs-spec-note,
  .gcbs-archive-seo__chips a,
  .gcbs-mega__col--leadacid .gcbs-mega__icon,
  .gcbs-type-group__note,
  .gcbs-type-chips a,
  .gcbs-footer__links .gcbs-footer__sublink a,
  .gcbs-fit__filters label,
  .gcbs-fit-table thead th,
  .gcbs-fit__note,
  .gcbs-fit__meta,
  .gcbs-fit__legend,
  .gcbs-yt__time,
  .gcbs-yt__ch,
  .woocommerce-message::before,
  .woocommerce-info::before,
  .woocommerce-error::before,
  .woocommerce-noreviews::before,
  .woocommerce-message .button,
  .woocommerce-info .button,
  .woocommerce-error .button,
  .woocommerce-message a.wc-forward,
  .woocommerce-info a.wc-forward,
  .woocommerce .price del,
  .woocommerce .price del .amount,
  .gcbs-footer__sublink a,
  .gcbs-mega__brands a,
  .gcbs-brand-index__desc,
  .gcbs-brand-index__count,
  .wc-block-components-order-summary-item__quantity,
  .wc-block-components-order-summary-item__description,
  .wc-block-components-order-summary-item__description p,
  .gcbs-trust-row__icon--bt::before,
  .gcbs-brand-grid__name {
    font-size: 0.875rem !important;
  }
}
@media (max-width: 360px) {
  .gcbs-menu-btn__label {
    font-size: 0.875rem !important;
  }
}
