/* ==========================================================================
   TankAndBarrel.com - product page layout (tb_product)
   2026-11-27b -  CSS only. Same copy, prices, options, quantity,
   add-to-cart, shipping estimator, Shopper Approved widgets, gallery
   links, and checkout. No new features or widgets.

   Scoped to form[name="cart_quantity"], which only exists on
   product_info.php. Does not change category listings, the cart,
   checkout, or the existing phone sticky buy bar (#tnb-sticky-buy).

   Why the page looks dated today
   - The buy area is three Bootstrap columns (image | options or a
     large manufacturer logo | a narrow buy column) that are also
     display:inline-block in user.css, with no wrapping .row. Options
     sit in the middle, away from Add to Cart. On products with no
     options the middle column is a logo with 80px of inline padding.
   - The title, SKU and price share a .row as col-sm-9 + col-sm-9 +
     col-sm-3, so the price lines up with the model number, not the
     title, and the first row leaves a gap.
   - Add to Cart is a 14px / 34px button, the same size as Ask A
     Question and Shipping Estimate. Quantity and the option menus
     are narrow and center-aligned. Long "Ships From" lists wrap
     awkwardly because the column is centered and only ~286px wide.
   - Under the photo, an hr with 45px of top margin and a 75px-tall
     "Optional Accessories" well leave a large gap.
   - The description tabs are usable but tight and visually dated.

   This sheet, on desktop (768px and up): a two-column layout with
   the gallery on the left and the options stacked above a wider buy
   panel on the right; the price aligned with the title; a larger
   Add to Cart; left-aligned, full-width option menus. On phones it
   keeps the live stacked order and the existing sticky bar, and
   only tightens spacing so options and the in-page buttons sit a
   little closer to the photo.
   ========================================================================== */

form[name="cart_quantity"] {
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* --------------------------------------------------------------------------
   Header: title + price on one row, SKU under the title
   -------------------------------------------------------------------------- */
form[name="cart_quantity"] > div > .page-header {
  padding-bottom: 12px;
  margin: 4px 0 16px;
  border-bottom: 1px solid #e6e8ec;
}

form[name="cart_quantity"] > div > .page-header > .row {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-wrap: wrap;
          flex-wrap: wrap;
  -webkit-align-items: flex-start;
          align-items: flex-start;
  margin-left: 0;
  margin-right: 0;
}

form[name="cart_quantity"] > div > .page-header h1.col-sm-9,
form[name="cart_quantity"] > div > .page-header .row > .col-sm-9,
form[name="cart_quantity"] > div > .page-header .row > .col-sm-3 {
  float: none;
  width: auto;
  padding-left: 0;
  padding-right: 0;
}

form[name="cart_quantity"] > div > .page-header h1.col-sm-9 {
  -webkit-flex: 1 1 auto;
          flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  font-size: 26px;
  font-weight: 600;
  line-height: 1.25;
  color: #1f3a93;
}

form[name="cart_quantity"] > div > .page-header h1 a,
form[name="cart_quantity"] > div > .page-header h1 a span {
  color: #1f3a93;
  font-weight: 600;
  text-decoration: none;
}

form[name="cart_quantity"] > div > .page-header h1 a:hover,
form[name="cart_quantity"] > div > .page-header h1 a:focus {
  color: #16307c;
  text-decoration: underline;
}

form[name="cart_quantity"] > div > .page-header h1 br {
  display: none;
}

form[name="cart_quantity"] > div > .page-header #product_just_stars {
  display: block;
  margin-top: 6px;
}

form[name="cart_quantity"] > div > .page-header #product_just_stars:not(:has(.SA__review_widget_item, svg, img, a)) {
  display: none;
  margin: 0;
}

form[name="cart_quantity"] > div > .page-header .row > .col-sm-3.text-right-not-xs,
form[name="cart_quantity"] > div > .page-header .row > .col-sm-3 {
  -webkit-flex: 0 0 auto;
          flex: 0 0 auto;
  text-align: right;
  font-size: 24px;
}

form[name="cart_quantity"] > div > .page-header .productPrice {
  font-size: 1.35em !important;
  font-weight: 700 !important;
  color: #1f3a93 !important;
  line-height: 1.15;
}

form[name="cart_quantity"] > div > .page-header .productSpecialPrice {
  font-weight: 700;
  color: #1f3a93;
}

form[name="cart_quantity"] > div > .page-header .row > .col-sm-9:not(h1) {
  -webkit-flex: 1 1 100%;
          flex: 1 1 100%;
  margin-top: 4px;
  color: #4b5563;
  font-size: 13px;
  line-height: 1.45;
}

@media (min-width: 768px) {
  /* Grid so the SKU sits under the title, not below the taller price+finance column */
  form[name="cart_quantity"] > div > .page-header > .row {
    display: -ms-grid;
    display: grid;
    -ms-grid-columns: minmax(0, 1fr) auto;
    grid-template-columns: minmax(0, 1fr) auto;
    -webkit-column-gap: 16px;
            column-gap: 16px;
    -webkit-align-items: start;
            align-items: start;
  }
  form[name="cart_quantity"] > div > .page-header h1.col-sm-9 {
    grid-column: 1;
    grid-row: 1;
    max-width: none;
  }
  form[name="cart_quantity"] > div > .page-header .row > .col-sm-3 {
    grid-column: 2;
    grid-row: 1 / span 2;
    margin-left: 0;
  }
  form[name="cart_quantity"] > div > .page-header .row > .col-sm-9:not(h1) {
    grid-column: 1;
    grid-row: 2;
    margin-top: 4px;
  }
}

@media (max-width: 767px) {
  form[name="cart_quantity"] > div > .page-header h1.col-sm-9 {
    font-size: 22px;
    -webkit-flex: 1 1 100%;
            flex: 1 1 100%;
  }
  form[name="cart_quantity"] > div > .page-header .row > .col-sm-9:not(h1) {
    -webkit-flex: 1 1 100%;
            flex: 1 1 100%;
    -webkit-order: 2;
            order: 2;
  }
  form[name="cart_quantity"] > div > .page-header .row > .col-sm-3 {
    -webkit-flex: 1 1 100%;
            flex: 1 1 100%;
    -webkit-order: 3;
            order: 3;
    text-align: left;
    margin-top: 8px;
  }
}

/* --------------------------------------------------------------------------
   Desktop: two columns — gallery | options + buy panel
   -------------------------------------------------------------------------- */
@media (min-width: 768px) {
  form[name="cart_quantity"] .contentText {
    display: -ms-grid;
    display: grid;
    -ms-grid-columns: minmax(0, 1.15fr) minmax(280px, 0.95fr);
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.95fr);
    -webkit-column-gap: 28px;
            column-gap: 28px;
    row-gap: 0;
    -webkit-align-items: start;
            align-items: start;
  }

  form[name="cart_quantity"] .contentText > .split-4-2-2-left,
  form[name="cart_quantity"] .contentText > .split-4-2-2-center,
  form[name="cart_quantity"] .contentText > .split-4-2-2-right {
    display: block;
    float: none !important;
    width: 100% !important;
    max-width: none !important;
    margin-bottom: 0;
    border-right: 0;
    border-left: 0;
    padding-left: 0;
    padding-right: 0;
    vertical-align: top;
  }

  form[name="cart_quantity"] .contentText > .split-4-2-2-left {
    grid-column: 1;
    grid-row: 1 / span 8;
    text-align: center !important;
  }

  form[name="cart_quantity"] .contentText > .split-4-2-2-center {
    grid-column: 2;
    grid-row: 1;
    text-align: left !important;
    padding: 0 0 12px;
    margin-bottom: 0;
  }

  form[name="cart_quantity"] .contentText > .split-4-2-2-right {
    grid-column: 2;
    grid-row: 2;
    text-align: left !important;
    margin-top: 0;
    margin-bottom: 16px;
    padding: 16px 18px 18px;
    border: 1px solid #e6e8ec;
    border-radius: 8px;
    background: #fafbfc;
  }

  /* clearfix is only there to wrap the old floats; hide it in the grid
     so it does not become a tall empty row */
  form[name="cart_quantity"] .contentText > .clearfix {
    display: none;
  }

  form[name="cart_quantity"] .contentText > *:not(.split-4-2-2-left):not(.split-4-2-2-center):not(.split-4-2-2-right):not(.clearfix) {
    grid-column: 1 / -1;
  }
}

/* Compact the manufacturer logo that fills the middle column today */
form[name="cart_quantity"] .split-4-2-2-center img {
  padding-top: 0 !important;
  margin: 0 auto 8px !important;
  max-height: 72px !important;
  max-width: 220px !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain;
}

/* --------------------------------------------------------------------------
   Options: left-aligned, full width of the buy column
   -------------------------------------------------------------------------- */
form[name="cart_quantity"] .split-4-2-2-center strong {
  display: block;
  margin: 10px 0 4px;
  font-size: 13px;
  font-weight: 600;
  color: #1f2937;
  text-align: left;
}

form[name="cart_quantity"] .split-4-2-2-center strong:first-child {
  margin-top: 0;
}

form[name="cart_quantity"] .split-4-2-2-center select,
form[name="cart_quantity"] .split-4-2-2-center .form-control,
form[name="cart_quantity"] .split-4-2-2-center input[type="text"],
form[name="cart_quantity"] .split-4-2-2-center input[type="number"]:not([name="quantity[]"]) {
  width: 100% !important;
  max-width: 100%;
  height: 38px;
  margin: 0 0 4px;
  text-align: left;
}

form[name="cart_quantity"] .split-4-2-2-center br {
  display: none;
}

/* Keep required options easy to scroll to above the phone sticky bar */
form[name="cart_quantity"] .split-4-2-2-center select,
form[name="cart_quantity"] .split-4-2-2-center input,
form[name="cart_quantity"] .split-4-2-2-center .form-control {
  scroll-margin-top: 72px;
  scroll-margin-bottom: 96px;
}

/* --------------------------------------------------------------------------
   Buy panel: tighter rhythm, clearer primary button
   -------------------------------------------------------------------------- */
form[name="cart_quantity"] .split-4-2-2-right {
  text-align: left;
}

form[name="cart_quantity"] .split-4-2-2-right > div[style*="padding-top"] {
  padding-top: 10px !important;
}

form[name="cart_quantity"] .split-4-2-2-right > div[style*="padding-top: 80px"],
form[name="cart_quantity"] .split-4-2-2-right > div[style*="padding-top:80px"],
form[name="cart_quantity"] .split-4-2-2-right > div[style*="padding-top: 60px"],
form[name="cart_quantity"] .split-4-2-2-right > div[style*="padding-top:60px"] {
  padding-top: 8px !important;
}

form[name="cart_quantity"] .split-4-2-2-right hr {
  margin: 12px 0;
  border-color: #e6e8ec;
}

form[name="cart_quantity"] .split-4-2-2-right .btn-block {
  margin-top: 0;
}

form[name="cart_quantity"] .split-4-2-2-right button.btn-success,
form[name="cart_quantity"] .split-4-2-2-right .btn-success {
  min-height: 44px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  padding: 10px 12px;
}

form[name="cart_quantity"] .split-4-2-2-right .btn-primary,
form[name="cart_quantity"] .split-4-2-2-right .btn-danger {
  min-height: 40px;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 12px;
}

form[name="cart_quantity"] .split-4-2-2-right input[name="quantity[]"] {
  width: 88px !important;
  height: 38px;
  font-size: 15px;
  display: inline-block;
  vertical-align: middle;
  margin: 0 0 0 6px;
}

/* --------------------------------------------------------------------------
   Gallery: less empty space under the photo, compact accessory thumbs
   -------------------------------------------------------------------------- */
form[name="cart_quantity"] .split-4-2-2-left > section,
form[name="cart_quantity"] .split-4-2-2-left section[data-featherlight-gallery] {
  display: block;
}

form[name="cart_quantity"] .split-4-2-2-left #piGalImg_1,
form[name="cart_quantity"] .split-4-2-2-left a:first-of-type img {
  padding-bottom: 0 !important;
  margin: 0 auto;
}

form[name="cart_quantity"] .split-4-2-2-left hr {
  margin: 16px 0 10px !important;
  border-color: #e6e8ec;
}

form[name="cart_quantity"] .split-4-2-2-left .cols-5.videoWrapper,
form[name="cart_quantity"] .split-4-2-2-left .videoWrapper {
  height: auto !important;
  margin: 0 0 8px;
}

form[name="cart_quantity"] .split-4-2-2-left .videoWrapper strong {
  display: block;
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: #1f2937;
}

form[name="cart_quantity"] .split-4-2-2-left .videoWrapper a,
form[name="cart_quantity"] .split-4-2-2-left .videoWrapper img {
  display: inline-block;
  vertical-align: top;
  margin: 0 6px 6px 0;
}

form[name="cart_quantity"] .split-4-2-2-left .videoWrapper img {
  border: 1px solid #ddd;
  border-radius: 4px;
}

/* --------------------------------------------------------------------------
   Description tabs
   -------------------------------------------------------------------------- */
form[name="cart_quantity"] #tab-container.tab-container,
form[name="cart_quantity"] .tab-container {
  margin-top: 8px;
}

form[name="cart_quantity"] ul.etabs {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-wrap: wrap;
          flex-wrap: wrap;
  gap: 0;
  margin: 0 0 0;
  padding: 0;
  border-bottom: 2px solid #e6e8ec;
  list-style: none;
}

form[name="cart_quantity"] ul.etabs li.tab {
  margin: 0 2px -2px 0;
}

form[name="cart_quantity"] ul.etabs li.tab a {
  display: block;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-bottom: 2px solid transparent;
  color: #374151;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  background: transparent;
}

form[name="cart_quantity"] ul.etabs li.tab a:hover,
form[name="cart_quantity"] ul.etabs li.tab a:focus {
  color: #1f3a93;
  text-decoration: none;
}

form[name="cart_quantity"] ul.etabs li.tab.active a,
form[name="cart_quantity"] ul.etabs li.tab a.active {
  color: #1f3a93;
  border-bottom-color: #1f3a93;
  background: #fff;
}

form[name="cart_quantity"] .easy-tabs {
  padding: 16px 4px 8px;
  line-height: 1.6;
  color: #1f2937;
}

form[name="cart_quantity"] .easy-tabs h2 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 600;
  color: #1f3a93;
}

form[name="cart_quantity"] .easy-tabs h3 {
  margin: 16px 0 8px;
  font-size: 16px;
  font-weight: 700;
  color: #1f2937;
}

form[name="cart_quantity"] .reviews > h3 {
  margin: 8px 0 12px;
  font-size: 18px;
  font-weight: 600;
  color: #1f3a93;
}

form[name="cart_quantity"] .reviews > h3 font {
  color: #1f3a93 !important;
}

/* --------------------------------------------------------------------------
   Phones: keep the live stacked order and the sticky buy bar;
   tighten spacing only
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {
  form[name="cart_quantity"] .contentText > .split-4-2-2-left,
  form[name="cart_quantity"] .contentText > .split-4-2-2-center,
  form[name="cart_quantity"] .contentText > .split-4-2-2-right {
    display: block;
    float: none !important;
    width: 100% !important;
    border: 0;
    margin-bottom: 16px;
    padding-left: 0;
    padding-right: 0;
    text-align: left !important;
  }

  form[name="cart_quantity"] .contentText > .split-4-2-2-left {
    text-align: center !important;
    margin-bottom: 12px;
  }

  form[name="cart_quantity"] .split-4-2-2-left #piGalImg_1,
  form[name="cart_quantity"] .split-4-2-2-left a:first-of-type img {
    max-height: 300px;
    width: auto;
    object-fit: contain;
  }

  form[name="cart_quantity"] .contentText > .split-4-2-2-center {
    margin-bottom: 8px;
  }

  form[name="cart_quantity"] .contentText > .split-4-2-2-right {
    padding: 12px 0 8px;
    background: transparent;
    border: 0;
    border-radius: 0;
  }

  form[name="cart_quantity"] .split-4-2-2-right button.btn-success,
  form[name="cart_quantity"] .split-4-2-2-right .btn-success,
  form[name="cart_quantity"] .split-4-2-2-right .btn-primary,
  form[name="cart_quantity"] .split-4-2-2-right .btn-danger {
    min-height: 44px;
    font-size: 16px;
  }

  /* In-page Add to Cart should remain scrollable above the sticky bar */
  form[name="cart_quantity"] .split-4-2-2-right .btn-success {
    scroll-margin-bottom: 96px;
  }
}

/* Do not restyle or hide the existing phone sticky buy bar. */

/* --------------------------------------------------------------------------
   Options: two columns on desktop when a product has three or more
   dropdowns (2026-11-27b)

   osCommerce prints each attribute as a bare
   <strong>Label:</strong><br><select name="id[…]">…</select><br>
   with no wrapper, so a 2-column grid is applied to those pairs.
   Labels stay with their own menu. Products with one or two options
   keep a single full-width column so long values stay readable.
   Phones stay a single column.
   -------------------------------------------------------------------------- */
@media (min-width: 768px) {
  form[name="cart_quantity"] .split-4-2-2-center:has(> :is(select, input):nth-child(3 of :is(select, input))) {
    display: -ms-grid;
    display: grid;
    -ms-grid-columns: 1fr 16px 1fr;
    grid-template-columns: 1fr 1fr;
    grid-auto-flow: dense;
    column-gap: 16px;
    row-gap: 0;
    -webkit-align-items: start;
            align-items: start;
    justify-items: stretch;
  }

  /* Manufacturer logo, or any non-option block, stays full width */
  form[name="cart_quantity"] .split-4-2-2-center > img,
  form[name="cart_quantity"] .split-4-2-2-center > a,
  form[name="cart_quantity"] .split-4-2-2-center > div,
  form[name="cart_quantity"] .split-4-2-2-center > p {
    grid-column: 1 / -1;
  }

  form[name="cart_quantity"] .split-4-2-2-center > strong:nth-child(odd of strong) {
    grid-column: 1;
  }

  form[name="cart_quantity"] .split-4-2-2-center > strong:nth-child(even of strong) {
    grid-column: 2;
  }

  form[name="cart_quantity"] .split-4-2-2-center > :is(select, input):nth-child(odd of :is(select, input)) {
    grid-column: 1;
  }

  form[name="cart_quantity"] .split-4-2-2-center > :is(select, input):nth-child(even of :is(select, input)) {
    grid-column: 2;
  }

  /* Top of both columns should line up */
  form[name="cart_quantity"] .split-4-2-2-center:has(> :is(select, input):nth-child(3 of :is(select, input))) > strong:nth-child(-n+2 of strong) {
    margin-top: 0;
  }

  form[name="cart_quantity"] .split-4-2-2-center:has(> :is(select, input):nth-child(3 of :is(select, input))) > select,
  form[name="cart_quantity"] .split-4-2-2-center:has(> :is(select, input):nth-child(3 of :is(select, input))) > input[type="text"],
  form[name="cart_quantity"] .split-4-2-2-center:has(> :is(select, input):nth-child(3 of :is(select, input))) > input[type="number"]:not([name="quantity[]"]),
  form[name="cart_quantity"] .split-4-2-2-center:has(> :is(select, input):nth-child(3 of :is(select, input))) > .form-control {
    width: 100% !important;
    max-width: 100%;
    margin-bottom: 8px;
  }
}

/* Phone: keep a single column; slightly tighter gaps so the list
   and the in-page Add to Cart sit a little closer together. */
@media (max-width: 767px) {
  form[name="cart_quantity"] .split-4-2-2-center strong {
    margin: 8px 0 3px;
  }

  form[name="cart_quantity"] .split-4-2-2-center strong:first-child {
    margin-top: 0;
  }

  form[name="cart_quantity"] .split-4-2-2-center select,
  form[name="cart_quantity"] .split-4-2-2-center .form-control {
    margin-bottom: 2px;
  }
}
