/* ==========================================================================
   TankAndBarrel.com - Shipping estimators + shopping cart (tb_ship)
   2026-11-27

   CSS ONLY. This file does not touch form field names, form actions, JS,
   AJAX/iframe URLs, rate logic, the Commercial (No Dock) default, the
   Shiplify address-type lookup, or checkout.

   What it styles
     1. The two estimator pop-up frames on the PARENT page
        (#piShipEstModal on product pages, #cartShipEstModal on the cart).
     2. The two estimator pages that load INSIDE those pop-ups
        (product_ship_estimator.php and ship_estimator.php). Those pages
        are standalone: they do not load template_top.php. They do load
        user.css, so this file is pulled into them with one @import line
        at the top of user.css (see INSTALL.txt).
        Every rule for those pages starts with
            #load-shipEst ~ .contentContainer
        (#load-shipEst only exists on those two pages), so nothing here can
        match a normal store page.
     3. The shopping cart page. Product pages ALSO have
        form[name="cart_quantity"], so cart rules are scoped to
            #bodyContent:has(form[name="cart_quantity"][action*="shopping_cart.php"])
        The cart form posts to shopping_cart.php; the product form posts to
        the product URL. No product page matches this.

   Colors / sizes match tb_ask: #1f3a93 brand blue, #13253a navy text,
   white cards, 8-12px radii, 44px+ inputs and buttons.
   ========================================================================== */

/* ==========================================================================
   1. Pop-up frame on the parent page (product + cart)
   ========================================================================== */
#piShipEstModal .modal-content,
#cartShipEstModal .modal-content {
  border: 0 !important;
  border-radius: 12px !important;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(19, 37, 58, .28) !important;
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

#piShipEstModal .modal-header,
#cartShipEstModal .modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid #e6e8ec;
  background: #fff;
}

#piShipEstModal .modal-title,
#cartShipEstModal .modal-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: #13253a;
}

#piShipEstModal .modal-title b,
#cartShipEstModal .modal-title b {
  font-weight: 700;
}

#piShipEstModal .modal-title::before,
#cartShipEstModal .modal-title::before {
  content: "\f0d1"; /* Font Awesome 4 truck */
  font-family: FontAwesome;
  font-weight: 400;
  font-size: 18px;
  color: #1f3a93;
  margin-right: 10px;
  display: inline-block;
  transform: scaleX(-1);
}

#piShipEstModal .modal-header .close {
  margin-top: -2px !important;
  font-size: 30px !important;
  font-weight: 400;
  line-height: 1;
  color: #5b6b7c;
  opacity: 1;
  text-shadow: none;
}

#piShipEstModal .modal-header .close:hover,
#piShipEstModal .modal-header .close:focus {
  color: #13253a;
}

#piShipEstModal .modal-body,
#cartShipEstModal .modal-body {
  padding: 8px 12px 0;
}

#piShipEstModal .modal-footer,
#cartShipEstModal .modal-footer {
  padding: 12px 20px 16px;
  border-top: 1px solid #e6e8ec;
  background: #fff;
}

#piShipEstModal .modal-footer .btn,
#cartShipEstModal .modal-footer .btn {
  min-height: 44px;
  min-width: 120px;
  padding: 0 24px;
  background: #fff;
  border: 1.5px solid #c9d1dc;
  border-radius: 8px;
  color: #33475b;
  font-size: 16px;
  font-weight: 600;
  box-shadow: none;
}

#piShipEstModal .modal-footer .btn:hover,
#piShipEstModal .modal-footer .btn:focus,
#cartShipEstModal .modal-footer .btn:hover,
#cartShipEstModal .modal-footer .btn:focus {
  background: #f3f5f8;
  border-color: #9aa7b8;
  color: #13253a;
}

/* ==========================================================================
   2. Estimator pages inside the pop-ups
      (all rules start with #load-shipEst ~ .contentContainer)
   ========================================================================== */
body:has(#load-shipEst) {
  background: #fff !important;
  color: #1f2937;
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

#load-shipEst {
  color: #13253a;
  font-weight: 600;
}

#load-shipEst ~ .contentContainer {
  padding: 4px 6px 12px;
}

#load-shipEst ~ .contentContainer .contentText {
  padding-right: 0;
  padding-left: 0;
}

/* ---- tables become plain blocks (layout tables only; styled below) ---- */
#load-shipEst ~ .contentContainer table,
#load-shipEst ~ .contentContainer tbody,
#load-shipEst ~ .contentContainer tr,
#load-shipEst ~ .contentContainer td {
  display: block;
  width: auto !important;
  max-width: none !important;
  border: 0;
  padding: 0;
}

/* ---- form: intro line ---- */
#load-shipEst ~ .contentContainer form[name="shipping_dest"] > div::before,
#load-shipEst ~ .contentContainer form[name="est_shipping_id"]::before {
  content: "Enter the delivery ZIP code and location type to see freight rates. Location type can change which services and fees apply.";
  display: block;
  grid-column: 1 / -1;
  margin: 0 0 14px;
  padding: 0;
  font-size: 15px;
  line-height: 1.5;
  color: #33475b;
}

/* ---- form: layout (product + cart) ---- */
#load-shipEst ~ .contentContainer form[name="shipping_dest"] > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  width: 100% !important;
  max-width: none !important;
  overflow: visible !important;
}

#load-shipEst ~ .contentContainer form[name="est_shipping_id"] {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

#load-shipEst ~ .contentContainer form[name="est_shipping_id"] > .contentText {
  display: contents;
}

#load-shipEst ~ .contentContainer form[name="est_shipping_id"] > .clearfix {
  display: none;
}

#load-shipEst ~ .contentContainer form[name="est_shipping_id"] > .buttonSet,
#load-shipEst ~ .contentContainer form[name="shipping_dest"] .buttonSet {
  margin: 0;
}

/* hide the "Required information" line and the red asterisk icons
   (every field is required and the browser still enforces it) */
#load-shipEst ~ .contentContainer .req-adj,
#load-shipEst ~ .contentContainer .form-control-feedback,
#load-shipEst ~ .contentContainer .required-asterisk {
  display: none !important;
}

#load-shipEst ~ .contentContainer .form-horizontal .form-group {
  margin: 0 !important;
}

#load-shipEst ~ .contentContainer .form-horizontal .form-group > div,
#load-shipEst ~ .contentContainer .form-horizontal .form-group > label,
#load-shipEst ~ .contentContainer .form-horizontal .buttonSet > div {
  float: none;
  width: 100% !important;
  padding: 0 !important;
}

/* labels: always visible (the old phone rule hid them) */
#load-shipEst ~ .contentContainer .form-horizontal .control-label {
  display: block !important;
  margin: 0 0 6px;
  padding: 0 !important;
  text-align: left;
  font-size: 14px;
  font-weight: 600;
  color: #13253a;
}

/* inputs */
#load-shipEst ~ .contentContainer .form-control {
  display: block;
  margin: 0;
  height: 44px;
  padding: 0 12px !important;
  background-color: #fff;
  border: 1px solid #c9d1dc;
  border-radius: 8px;
  box-shadow: none;
  font-size: 16px;
  color: #13253a;
}

#load-shipEst ~ .contentContainer .form-control::placeholder {
  color: #8593a3;
}

#load-shipEst ~ .contentContainer .form-control:focus {
  border-color: #1f3a93;
  box-shadow: 0 0 0 3px rgba(31, 58, 147, .18);
  outline: 0;
}

/* grid placement: ZIP | location type, then country | button */
#load-shipEst ~ .contentContainer .form-group:has(#inputZip) {
  grid-column: 1;
}
#load-shipEst ~ .contentContainer .form-group:has(#inputAddrType) {
  grid-column: 2;
}
#load-shipEst ~ .contentContainer .form-group:has(#inputCountry) {
  grid-column: 1;
}
#load-shipEst ~ .contentContainer form[name="shipping_dest"] > div > .buttonSet,
#load-shipEst ~ .contentContainer form[name="est_shipping_id"] > .buttonSet {
  align-self: end;
}

/* Get Quote button: big brand blue, full width */
#load-shipEst ~ .contentContainer form .buttonSet .btn-success {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 52px;
  padding: 0 20px;
  background: #1f3a93;
  border: 1px solid #1f3a93;
  border-radius: 8px;
  box-shadow: none;
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .01em;
  text-shadow: none;
}

#load-shipEst ~ .contentContainer form .buttonSet .btn-success:hover,
#load-shipEst ~ .contentContainer form .buttonSet .btn-success:focus {
  background: #172c70;
  border-color: #172c70;
}

/* product page: the red single-item NOTE becomes a calm callout */
#load-shipEst ~ .contentContainer form[name="shipping_dest"] > div > div[style*="color: red"] {
  grid-column: 1 / -1;
  margin-top: 4px;
  padding: 12px 14px !important;
  background: #f6f9fc;
  border: 1px solid #e3e8ee;
  border-left: 4px solid #1f3a93;
  border-radius: 8px;
  color: #33475b !important;
  font-size: 14px;
  line-height: 1.5;
}

#load-shipEst ~ .contentContainer form[name="shipping_dest"] > div > div[style*="color: red"] u {
  text-decoration: none;
}

/* error message (bad ZIP, etc.) */
#load-shipEst ~ .contentContainer .alert {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 14px;
}

/* ---- results: "Shipping To" / product ---- */
#load-shipEst ~ .contentContainer .contentText[style*="margin-bottom"] {
  margin-bottom: 14px !important;
  padding: 14px 16px;
  background: #f6f9fc;
  border: 1px solid #e3e8ee;
  border-radius: 10px;
}

#load-shipEst ~ .contentContainer .contentText[style*="margin-bottom"] > div:first-child > div {
  padding: 0 !important;
  font-size: 16px;
  font-weight: 600;
  color: #13253a;
}

#load-shipEst ~ .contentContainer .contentText[style*="margin-bottom"] > div:nth-child(2) {
  padding: 12px 0 2px !important;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #5b6b7c;
}

#load-shipEst ~ .contentContainer .contentText[style*="margin-bottom"] > div:nth-child(3) {
  padding: 0 !important;
  font-size: 15px;
  color: #1f2937;
}

/* cart estimator: shipping-to row with the small Change Address button */
#load-shipEst ~ .contentContainer .contentText:has(> div > .pull-right) {
  margin-bottom: 14px;
  padding: 14px 16px;
  background: #f6f9fc;
  border: 1px solid #e3e8ee;
  border-radius: 10px;
}

#load-shipEst ~ .contentContainer .contentText:has(> div > .pull-right) > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

#load-shipEst ~ .contentContainer .contentText:has(> div > .pull-right) > div > div:first-child {
  font-size: 16px;
  font-weight: 600;
  color: #13253a;
}

#load-shipEst ~ .contentContainer .pull-right > .btn-xs,
#load-shipEst ~ .contentContainer a.btn-xs {
  float: none !important;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 14px;
  background: #fff;
  border: 1.5px solid #1f3a93;
  border-radius: 8px;
  color: #1f3a93;
  font-size: 14px;
  font-weight: 600;
  box-shadow: none;
}

#load-shipEst ~ .contentContainer .pull-right > .btn-xs:hover,
#load-shipEst ~ .contentContainer a.btn-xs:hover {
  background: #eef3ff;
}

/* cart estimator: product list */
#load-shipEst ~ .contentContainer .prod_title {
  padding: 4px 2px 6px !important;
  font-size: 12px !important;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #5b6b7c;
}

#load-shipEst ~ .contentContainer .prod-name-pos {
  padding: 0 2px 12px !important;
  font-size: 15px !important;
  color: #1f2937;
}

/* ---- results: rate cards ---- */
#load-shipEst ~ .contentContainer .ship-modules-container {
  margin: 0 0 14px !important;
  border: 0 !important;
  border-radius: 0 !important;
  overflow: visible !important;
  background: none;
}

#load-shipEst ~ .contentContainer .ship-modules-container .table,
#load-shipEst ~ .contentContainer .ship-modules-container .table > tbody > tr {
  margin: 0 !important;
  background: transparent !important;
}

/* "Available Shipping Methods" label */
#load-shipEst ~ .contentContainer .ship-modules-container .table > tbody > tr > td:not(:has(> table)) {
  padding: 0 2px 8px !important;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #5b6b7c;
}

#load-shipEst ~ .contentContainer .ship-modules-container .table > tbody > tr > td:not(:has(> table)) strong {
  font-weight: 600;
}

/* one card per carrier / module */
#load-shipEst ~ .contentContainer .ship-modules-container .table > tbody > tr > td:has(> table) {
  margin: 0 0 10px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #dfe5ee;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(19, 37, 58, .05);
}

/* carrier / service heading */
#load-shipEst ~ .contentContainer .ship-opt-heading {
  padding: 10px 14px !important;
  background: #f6f9fc;
  border-bottom: 1px solid #e8edf3;
  font-size: 14px;
  color: #13253a;
}

/* rate row: service on the left, price on the right */
#load-shipEst ~ .contentContainer .ship-modules-container tr:has(> td:nth-child(2)) {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
}

#load-shipEst ~ .contentContainer .ship-modules-container tr:has(> td:nth-child(2)) + tr:has(> td:nth-child(2)) {
  border-top: 1px solid #eef1f5;
}

#load-shipEst ~ .contentContainer .ship-modules-container tr:has(> td:nth-child(2)) > td:first-child {
  flex: 1 1 auto;
  padding: 0 !important;
  font-size: 15px;
  color: #1f2937;
}

#load-shipEst ~ .contentContainer .ship-modules-container tr:has(> td:nth-child(2)) > td:nth-child(2) {
  flex: 0 0 auto;
  padding: 0 !important;
  text-align: right !important;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  color: #1f3a93;
}

/* free-shipping rows stay green */
#load-shipEst ~ .contentContainer .freeship-method,
#load-shipEst ~ .contentContainer .ship-modules-container td.red {
  color: #1a7f37 !important;
}

/* errors inside a card */
#load-shipEst ~ .contentContainer .ship-modules-container .help-block,
#load-shipEst ~ .contentContainer .ship-modules-container font {
  display: block;
  margin: 0;
  padding: 10px 14px;
  font-size: 14px;
  color: #b42318 !important;
}

/* "spend $X more for free shipping" style notes */
#load-shipEst ~ .contentContainer .freeship-error {
  margin: 4px 0 8px;
  padding: 10px 14px !important;
  background: #fff8e6;
  border: 1px solid #f3dfa2;
  border-radius: 8px;
  font-size: 14px;
  text-align: left !important;
  color: #7a5b00 !important;
}

/* ---- results: buttons ---- */
#load-shipEst ~ .contentContainer .buttonSet {
  margin: 0;
}

#load-shipEst ~ .contentContainer .buttonSet > .col-xs-12 {
  float: none;
  width: 100% !important;
  padding: 0 0 10px !important;
}

#load-shipEst ~ .contentContainer .buttonSet a.btn-block {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 18px;
  background: #fff;
  border: 1.5px solid #1f3a93;
  border-radius: 8px;
  box-shadow: none;
  color: #1f3a93;
  font-size: 16px;
  font-weight: 600;
  text-shadow: none;
}

#load-shipEst ~ .contentContainer .buttonSet a.btn-block:hover,
#load-shipEst ~ .contentContainer .buttonSet a.btn-block:focus {
  background: #eef3ff;
}

#load-shipEst ~ .contentContainer .buttonSet a[href*="freight_quote_request"] {
  background: #1f3a93;
  color: #fff;
}

#load-shipEst ~ .contentContainer .buttonSet a[href*="freight_quote_request"]:hover,
#load-shipEst ~ .contentContainer .buttonSet a[href*="freight_quote_request"]:focus {
  background: #172c70;
  border-color: #172c70;
  color: #fff;
}

/* phones (the estimator frame is narrower than 480px) */
@media screen and (max-width: 480px) {
  #load-shipEst ~ .contentContainer form[name="shipping_dest"] > div,
  #load-shipEst ~ .contentContainer form[name="est_shipping_id"] {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  #load-shipEst ~ .contentContainer .form-group:has(#inputZip),
  #load-shipEst ~ .contentContainer .form-group:has(#inputAddrType),
  #load-shipEst ~ .contentContainer .form-group:has(#inputCountry) {
    grid-column: 1;
  }
  #load-shipEst ~ .contentContainer .ship-modules-container tr:has(> td:nth-child(2)) > td:nth-child(2) {
    font-size: 18px;
  }
}

/* ==========================================================================
   3. Shopping cart page
      Scope: #bodyContent:has(form[name="cart_quantity"][action*="shopping_cart.php"])
   ========================================================================== */
#bodyContent:has(form[name="cart_quantity"][action*="shopping_cart.php"]) {
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* heading */
#bodyContent:has(form[name="cart_quantity"][action*="shopping_cart.php"]) .page-header {
  margin: 4px 0 20px;
  padding: 0 0 14px;
  border-bottom: 1px solid #e6e8ec;
}

#bodyContent:has(form[name="cart_quantity"][action*="shopping_cart.php"]) .page-header h1 {
  margin: 0 0 6px;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: #13253a;
}

#bodyContent:has(form[name="cart_quantity"][action*="shopping_cart.php"]) .page-header::after {
  content: "Questions about freight or fit? Call 1-866-312-0533, Mon-Fri 9AM-5PM CST.";
  display: block;
  font-size: 15px;
  line-height: 1.5;
  color: #4a5b6c;
}

/* put the pieces in a sensible order whatever order the modules load in:
   items, sub-total, checkout, shipping estimate. The discount code card
   is hidden on this page (coupon entry stays on checkout). */
#bodyContent:has(form[name="cart_quantity"][action*="shopping_cart.php"]) > .row {
  display: flex;
  flex-direction: column;
}

#bodyContent:has(form[name="cart_quantity"][action*="shopping_cart.php"]) > .row > * {
  order: 50;
}
#bodyContent:has(form[name="cart_quantity"][action*="shopping_cart.php"]) > .row > :has(> form[name="cart_quantity"]) {
  order: 10;
}
#bodyContent:has(form[name="cart_quantity"][action*="shopping_cart.php"]) > .row > :has(> p.text-right):has(> hr) {
  order: 20;
}
#bodyContent:has(form[name="cart_quantity"][action*="shopping_cart.php"]) > .row > .buttonSet:has(.btn-success) {
  order: 30;
}
#bodyContent:has(form[name="cart_quantity"][action*="shopping_cart.php"]) > .row > .buttonSet:has(.btn-primary):not(:has(.btn-success)) {
  order: 40;
}
#bodyContent:has(form[name="cart_quantity"][action*="shopping_cart.php"]) > .row > .continue {
  order: 45;
}
#bodyContent:has(form[name="cart_quantity"][action*="shopping_cart.php"]) > .row > br {
  display: none;
}

/* ---- item cards ---- */
#bodyContent:has(form[name="cart_quantity"][action*="shopping_cart.php"]) form[name="cart_quantity"] .table {
  margin: 0;
  background: none;
}

#bodyContent:has(form[name="cart_quantity"][action*="shopping_cart.php"]) form[name="cart_quantity"] .table > tbody {
  display: block;
}

#bodyContent:has(form[name="cart_quantity"][action*="shopping_cart.php"]) form[name="cart_quantity"] .table > tbody > tr {
  display: grid;
  grid-template-columns: 160px 1fr auto;
  gap: 8px 22px;
  align-items: start;
  margin: 0 0 14px;
  padding: 18px;
  background: #fff !important;
  border: 1px solid #dfe5ee;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(19, 37, 58, .05);
}

#bodyContent:has(form[name="cart_quantity"][action*="shopping_cart.php"]) form[name="cart_quantity"] .table > tbody > tr > td {
  display: block;
  padding: 0 !important;
  border: 0 !important;
  width: auto !important;
}

/* photo */
#bodyContent:has(form[name="cart_quantity"][action*="shopping_cart.php"]) form[name="cart_quantity"] .table > tbody > tr > td:first-child img {
  display: block;
  width: 160px;
  height: 120px;
  object-fit: contain;
  background: #fff;
  border: 1px solid #eef1f5;
  border-radius: 8px;
}

/* name, model, chosen options */
#bodyContent:has(form[name="cart_quantity"][action*="shopping_cart.php"]) form[name="cart_quantity"] .table > tbody > tr > td:nth-child(2) > a {
  display: block;
  margin-bottom: 2px;
  font-size: 18px;
  line-height: 1.3;
  text-decoration: none;
  color: #1f3a93;
}

#bodyContent:has(form[name="cart_quantity"][action*="shopping_cart.php"]) form[name="cart_quantity"] .table > tbody > tr > td:nth-child(2) > a:hover {
  text-decoration: underline;
}

#bodyContent:has(form[name="cart_quantity"][action*="shopping_cart.php"]) form[name="cart_quantity"] .table > tbody > tr > td:nth-child(2) > br {
  display: none;
}

#bodyContent:has(form[name="cart_quantity"][action*="shopping_cart.php"]) form[name="cart_quantity"] .table > tbody > tr > td:nth-child(2) > small {
  display: block;
  font-size: 14px;
  line-height: 1.5;
  color: #4a5b6c;
}

#bodyContent:has(form[name="cart_quantity"][action*="shopping_cart.php"]) form[name="cart_quantity"] .table > tbody > tr > td:nth-child(2) > small i {
  font-style: normal;
}

#bodyContent:has(form[name="cart_quantity"][action*="shopping_cart.php"]) form[name="cart_quantity"] .table > tbody > tr > td:nth-child(2) > span,
#bodyContent:has(form[name="cart_quantity"][action*="shopping_cart.php"]) form[name="cart_quantity"] .table > tbody > tr > td:nth-child(2) > font {
  display: block;
  margin-top: 6px;
  font-size: 14px;
}

/* quantity stepper (the +/- buttons and the number box keep their names/JS) */
#bodyContent:has(form[name="cart_quantity"][action*="shopping_cart.php"]) form[name="cart_quantity"] .table > tbody > tr > td:nth-child(2) > div {
  margin-top: 14px;
  vertical-align: middle !important;
}

#bodyContent:has(form[name="cart_quantity"][action*="shopping_cart.php"]) form[name="cart_quantity"] .table > tbody > tr > td:nth-child(2) > div + div {
  margin-left: 14px;
  padding-top: 0 !important;
}

#bodyContent:has(form[name="cart_quantity"][action*="shopping_cart.php"]) .quantity.plus-minus_btns {
  display: inline-flex !important;
  align-items: stretch;
  width: auto !important;
}

#bodyContent:has(form[name="cart_quantity"][action*="shopping_cart.php"]) .quantity.plus-minus_btns .input-group-btn {
  display: flex;
  width: auto;
}

#bodyContent:has(form[name="cart_quantity"][action*="shopping_cart.php"]) .quantity.plus-minus_btns .minus,
#bodyContent:has(form[name="cart_quantity"][action*="shopping_cart.php"]) .quantity.plus-minus_btns .plus {
  width: 44px;
  min-height: 44px !important;
  max-height: 44px !important;
  height: 44px;
  padding: 0;
  background: #f6f9fc;
  border: 1px solid #c9d1dc;
  color: #1f3a93;
  font-size: 22px;
  font-weight: 600;
  line-height: 1;
}

#bodyContent:has(form[name="cart_quantity"][action*="shopping_cart.php"]) .quantity.plus-minus_btns .minus {
  border-right: 0;
  border-radius: 8px 0 0 8px;
}

#bodyContent:has(form[name="cart_quantity"][action*="shopping_cart.php"]) .quantity.plus-minus_btns .plus {
  margin-left: 0;
  border-left: 0;
  border-radius: 0 8px 8px 0;
}

#bodyContent:has(form[name="cart_quantity"][action*="shopping_cart.php"]) .quantity.plus-minus_btns .minus:hover,
#bodyContent:has(form[name="cart_quantity"][action*="shopping_cart.php"]) .quantity.plus-minus_btns .plus:hover {
  background: #eef3ff;
}

#bodyContent:has(form[name="cart_quantity"][action*="shopping_cart.php"]) .quantity.plus-minus_btns .qty {
  float: none;
  width: 60px !important;
  height: 44px;
  padding: 0 4px;
  border: 1px solid #c9d1dc;
  border-radius: 0;
  box-shadow: none;
  text-align: center;
  font-size: 17px;
  font-weight: 600;
  color: #13253a;
}

/* remove button: same link, now with a word next to the icon */
#bodyContent:has(form[name="cart_quantity"][action*="shopping_cart.php"]) form[name="cart_quantity"] a.btn-danger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 14px;
  background: #fff;
  border: 1px solid #e3b9b4;
  border-radius: 8px;
  box-shadow: none;
  color: #b42318;
  font-size: 14px;
  font-weight: 600;
}

#bodyContent:has(form[name="cart_quantity"][action*="shopping_cart.php"]) form[name="cart_quantity"] a.btn-danger::after {
  content: "Remove";
}

#bodyContent:has(form[name="cart_quantity"][action*="shopping_cart.php"]) form[name="cart_quantity"] a.btn-danger:hover,
#bodyContent:has(form[name="cart_quantity"][action*="shopping_cart.php"]) form[name="cart_quantity"] a.btn-danger:focus {
  background: #fef3f2;
  border-color: #b42318;
}

/* line total */
#bodyContent:has(form[name="cart_quantity"][action*="shopping_cart.php"]) form[name="cart_quantity"] .table > tbody > tr > td:last-child {
  text-align: right;
  font-size: 20px;
  line-height: 1.3;
  color: #13253a;
}

/* ---- sub-total box ---- */
#bodyContent:has(form[name="cart_quantity"][action*="shopping_cart.php"]) > .row > :has(> p.text-right):has(> hr) {
  margin: 2px 0 20px;
}

#bodyContent:has(form[name="cart_quantity"][action*="shopping_cart.php"]) > .row > :has(> p.text-right):has(> hr) > p {
  margin: 0;
  padding: 16px 20px;
  background: #f6f9fc;
  border: 1px solid #e3e8ee;
  border-radius: 12px;
  font-size: 22px;
  color: #13253a;
}

#bodyContent:has(form[name="cart_quantity"][action*="shopping_cart.php"]) > .row > :has(> p.text-right):has(> hr) > hr {
  display: none;
}

#bodyContent:has(form[name="cart_quantity"][action*="shopping_cart.php"]) > .row > :has(> p.text-right):has(> hr)::after {
  content: "Shipping is calculated at checkout. Use Shipping Estimate below to preview freight for your ZIP code.";
  display: block;
  margin-top: 8px;
  text-align: right;
  font-size: 14px;
  line-height: 1.5;
  color: #4a5b6c;
}

/* ---- action buttons ---- */
#bodyContent:has(form[name="cart_quantity"][action*="shopping_cart.php"]) > .row > .buttonSet,
#bodyContent:has(form[name="cart_quantity"][action*="shopping_cart.php"]) > .row > .continue {
  margin: 0 0 12px !important;
  padding: 0 !important;
}

#bodyContent:has(form[name="cart_quantity"][action*="shopping_cart.php"]) > .row > .buttonSet > div,
#bodyContent:has(form[name="cart_quantity"][action*="shopping_cart.php"]) > .row > .continue > div {
  float: none;
  width: 100%;
  padding: 0 15px;
  text-align: right;
}

#bodyContent:has(form[name="cart_quantity"][action*="shopping_cart.php"]) .btn-block2 {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100% !important;
  max-width: 420px;
  min-height: 54px;
  padding: 0 24px;
  border-radius: 10px;
  box-shadow: none;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .01em;
  text-shadow: none;
}

#bodyContent:has(form[name="cart_quantity"][action*="shopping_cart.php"]) .btn-block2.btn-success {
  background: #1a7f37;
  border: 1px solid #1a7f37;
  color: #fff;
}

#bodyContent:has(form[name="cart_quantity"][action*="shopping_cart.php"]) .btn-block2.btn-success:hover,
#bodyContent:has(form[name="cart_quantity"][action*="shopping_cart.php"]) .btn-block2.btn-success:focus {
  background: #146c2e;
  border-color: #146c2e;
}

#bodyContent:has(form[name="cart_quantity"][action*="shopping_cart.php"]) .btn-block2.btn-primary {
  background: #fff;
  border: 2px solid #1f3a93;
  color: #1f3a93;
}

#bodyContent:has(form[name="cart_quantity"][action*="shopping_cart.php"]) .btn-block2.btn-primary:hover,
#bodyContent:has(form[name="cart_quantity"][action*="shopping_cart.php"]) .btn-block2.btn-primary:focus {
  background: #eef3ff;
}

/* alternate checkout (PayPal etc., when enabled) */
#bodyContent:has(form[name="cart_quantity"][action*="shopping_cart.php"]) > .row > .text-right:has(.buttonSet) {
  order: 35;
  text-align: right;
}

#bodyContent:has(form[name="cart_quantity"][action*="shopping_cart.php"]) > .row > .text-right .buttonSet p {
  margin: 0 0 8px;
  color: #4a5b6c;
}

/* ---- discount code card: hidden on the cart page only.
   Checkout pages are not matched by this scope, so coupon entry there
   is unchanged. ---- */
#bodyContent:has(form[name="cart_quantity"][action*="shopping_cart.php"]) > .row > :has(> .panel) {
  display: none;
}

/* ---- phones ---- */
@media screen and (max-width: 767px) {
  #bodyContent:has(form[name="cart_quantity"][action*="shopping_cart.php"]) .page-header h1 {
    font-size: 26px;
  }

  #bodyContent:has(form[name="cart_quantity"][action*="shopping_cart.php"]) form[name="cart_quantity"] .table > tbody > tr {
    grid-template-columns: 92px 1fr;
    gap: 10px 14px;
    padding: 14px;
  }

  #bodyContent:has(form[name="cart_quantity"][action*="shopping_cart.php"]) form[name="cart_quantity"] .table > tbody > tr > td:first-child img {
    width: 92px;
    height: 80px;
  }

  #bodyContent:has(form[name="cart_quantity"][action*="shopping_cart.php"]) form[name="cart_quantity"] .table > tbody > tr > td:nth-child(2) > a {
    font-size: 16px;
  }

  #bodyContent:has(form[name="cart_quantity"][action*="shopping_cart.php"]) form[name="cart_quantity"] .table > tbody > tr > td:last-child {
    grid-column: 1 / -1;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding-top: 10px !important;
    border-top: 1px solid #eef1f5 !important;
    font-size: 19px;
  }

  #bodyContent:has(form[name="cart_quantity"][action*="shopping_cart.php"]) form[name="cart_quantity"] .table > tbody > tr > td:last-child::before {
    content: "Item total";
    font-size: 14px;
    font-weight: 400;
    color: #4a5b6c;
  }

  #bodyContent:has(form[name="cart_quantity"][action*="shopping_cart.php"]) > .row > :has(> p.text-right):has(> hr) > p {
    font-size: 19px;
    padding: 14px 16px;
  }

  #bodyContent:has(form[name="cart_quantity"][action*="shopping_cart.php"]) > .row > :has(> p.text-right):has(> hr)::after {
    text-align: left;
  }

  #bodyContent:has(form[name="cart_quantity"][action*="shopping_cart.php"]) > .row > .buttonSet > div,
  #bodyContent:has(form[name="cart_quantity"][action*="shopping_cart.php"]) > .row > .continue > div {
    text-align: center;
  }

  #bodyContent:has(form[name="cart_quantity"][action*="shopping_cart.php"]) .btn-block2 {
    max-width: none;
  }

}
