/* Valley iStore branding candidate, 2026-11-12.
 * Supplemental CSS only. Native markup, links and extension fragments stay intact.
 * Header !important declarations override iStore's existing <=768px rules.
 */
body {
  background: #ffffff;
  color: #15233b;
}

body > header {
  background: #ffffff;
  padding: 24px 0;
}

body > header > .container > .row {
  display: grid !important;
  grid-template-columns: minmax(0, 294px) minmax(0, 1fr) minmax(0, 220px);
  gap: 20px;
  align-items: center;
  margin: 0;
}

/* Bootstrap's clearfix pseudo-elements must not occupy header grid cells. */
body > header > .container > .row::before,
body > header > .container > .row::after {
  display: none;
  content: none;
}

body > header > .container > .row > .col-sm-4,
body > header > .container > .row > .col-sm-5,
body > header > .container > .row > .col-sm-3 {
  width: auto !important;
  min-width: 0;
  float: none;
  padding: 0;
  display: block;
  order: 0;
}

body > header > .container > .row > .col-sm-4 { grid-column: 1; grid-row: 1; }
body > header > .container > .row > .col-sm-5 { grid-column: 2; grid-row: 1; }
body > header > .container > .row > .col-sm-3 { grid-column: 3; grid-row: 1; }

body > header #logo {
  margin: 0;
  text-align: left;
  justify-content: flex-start;
}

body > header #logo a { display: block; max-width: 100%; }
body > header #logo img { display: block; max-width: 100%; height: auto; }
body > header #logo h1 { margin: 0; font-size: 24px; overflow-wrap: anywhere; }
body > header #logo h1 a { font-size: inherit; }

body > header #search { width: 100%; margin: 0; }
body > header #search .input-lg {
  height: 44px;
  background: #ffffff;
  border-color: #cbd5e6;
  color: #15233b;
  font-size: 15px;
}
body > header #search .btn-lg {
  min-width: 44px;
  height: 44px;
  background: #ffffff;
  border-color: #cbd5e6;
  color: #223e92;
}

body > header #cart { float: none; width: 100%; margin: 0; text-align: right; }
body > header #cart > .btn {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 0;
  color: #223e92;
  background: transparent;
  white-space: normal;
  text-align: right;
}
body > header #cart > .btn .fa { flex: none; }
body > header #cart-total { min-width: 0; overflow-wrap: anywhere; }
body > header #cart.open > .btn,
body > header #cart > .btn:hover { color: #182f75; }

/* Keep the populated native mini-cart inside a 320px viewport, without hiding data. */
body > header #cart .dropdown-menu {
  left: auto;
  right: 0;
  width: 430px;
  min-width: 0;
  max-width: calc(100vw - 30px);
  max-height: calc(100vh - 180px);
  overflow: auto;
  background: #ffffff;
  color: #15233b;
}
body > header #cart .dropdown-menu li > div { min-width: 0; max-width: 100%; }
body > header #cart .dropdown-menu td { overflow-wrap: anywhere; }
/* Mini-cart buttons (Request a Quote, View Cart, Checkout): stacked, full width, same size.
   The theme only styled the first and last link, which broke once Dual Cart added a third. */
body > header #cart ul.dropdown-menu.pull-right p.text-right {
  display: block;
  margin: 12px 0 15px;
  font-size: 0;   /* hides the &nbsp; spacers between the links */
  line-height: 0;
}
body > header #cart ul.dropdown-menu.pull-right p.text-right a:nth-child(n) {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 0 0 8px;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.3;
  text-align: center;
  color: #223e92;
  background: #ffffff;
  border: 2px solid #223e92;
  text-decoration: none;
  transition: .2s;
}
body > header #cart ul.dropdown-menu.pull-right p.text-right a:nth-child(n):hover {
  color: #182f75;
  background: #f2f5fb;
  border-color: #182f75;
}
body > header #cart ul.dropdown-menu.pull-right p.text-right a:last-child {
  margin-bottom: 0;
  color: #ffffff;
  background: #223e92;
  border-color: #223e92;
}
body > header #cart ul.dropdown-menu.pull-right p.text-right a:last-child:hover {
  color: #ffffff;
  background: #182f75;
  border-color: #182f75;
}
body > header #cart ul.dropdown-menu.pull-right p.text-right a .fa { margin-right: 6px; }
/* Keep prices and "Request a Quote" from breaking mid-word on phones. */
body > header #cart .dropdown-menu td.text-right { overflow-wrap: normal; word-break: normal; }
body > header #cart .dropdown-menu .table-striped td.text-right { white-space: nowrap; }
body > header #cart .dropdown-menu .table-striped td.text-right:nth-last-child(2) { white-space: normal; min-width: 4.5em; }

#menu {
  background: #223e92;
  border: 0;
  border-bottom: 3px solid #ffe500;
  padding-top: 0;
}
#menu .navbar-nav { margin: 0; }
#menu .nav > li > a {
  color: #ffffff;
  background: transparent;
  min-height: 44px;
  text-transform: none;
}
#menu .nav > li > a:hover,
#menu .nav > li > a:focus,
#menu .nav > li:hover > a,
#menu .nav > li.open > a {
  color: #ffffff;
  background: #182f75;
}
#menu #category { color: #ffffff; }
#menu .btn-navbar {
  color: #ffffff;
  background: transparent;
  border: 1px solid #ffffff;
  min-width: 44px;
  min-height: 44px;
}
#menu .btn-navbar:hover,
#menu .btn-navbar:focus { color: #ffffff; background: #182f75; }
#menu .dropdown-menu { background: #ffffff; color: #15233b; }
#menu .dropdown-menu a,
#menu .see-all { color: #223e92; }
#menu .dropdown-menu a:hover,
#menu .dropdown-menu a:focus { color: #15233b; background: #eef2fb; }

body > footer {
  background: #0c1732;
  color: #dbe3f1;
  padding: 32px 0 24px;
}
body > footer h5 { color: #ffffff; margin-bottom: 14px; }
body > footer p,
body > footer a,
body > footer li a { color: #dbe3f1; }
body > footer a:hover,
body > footer li a:hover { color: #ffffff; text-decoration: underline; }
body > footer hr { border-bottom-color: #33415c; }

#content .btn-primary { color: #ffffff; background: #223e92; border-color: #223e92; }
#content .btn-primary:hover,
#content .btn-primary:focus,
#content .btn-primary:active { background: #182f75; border-color: #182f75; }

body > header a:focus-visible,
body > header button:focus-visible,
body > header input:focus-visible,
#content :focus-visible,
#menu .dropdown-menu a:focus-visible {
  outline: 3px solid #223e92;
  outline-offset: 2px;
}
#menu .navbar-nav > li > a:focus-visible,
#menu .btn-navbar:focus-visible,
body > footer a:focus-visible {
  outline: 3px solid #ffe500;
  outline-offset: -3px;
}

@media (min-width: 768px) {
  #menu .navbar-nav { display: flex; flex-wrap: wrap; float: none; }
}

@media (max-width: 991px) {
  body > header > .container > .row {
    grid-template-columns: minmax(0, 180px) minmax(0, 1fr) minmax(0, 130px);
    gap: 16px;
  }
}

@media (max-width: 767px) {
  body > header { padding: 18px 0; }
  body > header > .container > .row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 130px);
    gap: 16px;
  }
  body > header > .container > .row > .col-sm-4 { grid-column: 1; grid-row: 1; }
  body > header > .container > .row > .col-sm-3 { grid-column: 2; grid-row: 1; }
  body > header > .container > .row > .col-sm-5 { grid-column: 1 / -1; grid-row: 2; }
  body > header #logo { max-width: 220px; }
  body > header #search .input-lg { font-size: 16px; }
  body > header #cart > .btn { font-size: 12px; line-height: 1.4; gap: 6px; }
  body > header #cart .dropdown-menu .img-thumbnail { max-width: 48px; height: auto; }
  #menu .dropdown-menu a { white-space: normal; overflow-wrap: anywhere; }
}

@media (pointer: coarse) {
  #menu .dropdown-menu a { min-height: 44px; }
}

/* Product-card readability: full titles and persistent purchase controls. */
#content .product-thumb .caption h4,
#content .product-thumb .caption h4 a {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  text-transform: none;
  height: auto;
  max-height: none;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

#content .product-thumb .button-group,
#content .product-thumb:hover .button-group {
  position: static !important;
  bottom: auto;
  opacity: 1 !important;
  visibility: visible;
  transition: none;
}

/* Fluid storefront shell, 2026-11-12.
 * Root page containers only: nested extension containers retain their own layout.
 * Native product grid/list classes, clearing rules and controls are preserved.
 */
body {
  --ve-page-gutter: 15px;
}



/* Exact native menu wrapper follows header and has no id; page shells have ids. */
body > header + div.container:not([id]) {
  padding-left: 0;
  padding-right: 0;
}

#menu {
  padding-left: var(--ve-page-gutter);
  padding-right: var(--ve-page-gutter);
  border-radius: 0;
}

/* The entire header remains fluid while its central search stays usable. */
body > header #search {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

/* Bound cards, not their native layout columns; list view stays full width. */
#content > .row > .product-layout:not(.product-list) > .product-thumb,
#product-product #content > .row > .col-xs-6 > .product-thumb,
#product-product #content > .row > .col-xs-8 > .product-thumb {
  max-width: 340px;
  margin-left: auto;
  margin-right: auto;
}

/* Preserve table/form widths while limiting the long descriptive text. */
#product-product #tab-description > p,
#product-product #tab-description > ul,
#product-product #tab-description > ol {
  max-width: 75ch;
}

@media (min-width: 768px) {
  body { --ve-page-gutter: 24px; }
}

@media (min-width: 1200px) {
  body { --ve-page-gutter: 32px; }

  /* Current category layout has one left sidebar and a col-sm-9 content sibling. */
  #product-category > .row > #column-left { width: 280px; }
  #product-category > .row > #column-left + #content.col-sm-9 {
    width: calc(100% - 280px);
  }
}

@media (min-width: 1600px) {
  body { --ve-page-gutter: 40px; }
}

/* Let long native breadcrumb titles wrap within the phone page shell. */
@media (max-width: 767px) {
  body > .container > .breadcrumb > li {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    vertical-align: top;
  }
}


@media (min-width: 768px) {
  body > header + div.container:not([id]) {
    background: linear-gradient(#223b85, #223b85) top / 100% 57px no-repeat;
    width: 100%;
    padding-inline: 0;
  }
  body > header + div.container:not([id]) > #menu {
    margin-inline: auto;
    max-width: 750px;
  }
}
@media (min-width: 992px) {
  body > header + div.container:not([id]) > #menu { max-width: 970px; }
}
@media (min-width: 1200px) {
  body > header + div.container:not([id]) > #menu { max-width: 1170px; }
}

#menu { background-color: #223b85; border-bottom-color: #223b85; }

#product-product #content > p:has(> a[href*="&tag="]) { overflow-wrap: anywhere; }
@media (min-width: 768px) {
  #product-product #content:has(.row > .col-sm-8 > .tab-content) > p:has(> a[href*="&tag="]) { max-width: calc(66.666667% - 10px); }
}

/* Compact the space between the header controls and navigation. */
body > header { padding-bottom: 8px; }

/* VE: visible comment boxes (theme default border #eee is nearly invisible; height was forced to 40px) */
textarea.form-control {
	border: 1px solid #b8c0cc !important;
	height: auto !important;
	min-height: 120px;
	padding: 8px 10px;
}
textarea.form-control:focus {
	border-color: #1d4e89 !important;
	box-shadow: 0 0 0 2px rgba(29, 78, 137, .15) !important;
}

/* VE: hide Dual Cart's empty quote-button row on stocked items (its border showed as a thick bar between product cards) */
.product-thumb .button-group.qbutton:not(:has(*)) {
	display: none !important;
}


/* === Header (2026-11-20): charcoal top line matches footer, light gray header, gold stripe, blue menu === */
#top{background:#2b2e33 !important;border:0 !important}
#top a,#top .btn-link,#top span,#top i{color:#d4d6d9 !important}
#top a:hover{color:#fdcc00 !important}
header{background:#eceef1 !important;padding:8px 0 !important;border-bottom:4px solid #fcdc01 !important}
header .row{display:flex;align-items:center;flex-wrap:wrap}
header .row>[class*=col-]{float:none}
#logo{margin:0 !important}
#logo img{max-height:92px !important;width:auto !important}
header #search{margin:0 !important}
header #search .form-control{border-color:#c9cdd3 !important;background:#fff !important}
header #cart{margin:0 !important}
#menu{border-top:0 !important}
header #cart>.btn,header #cart>button{font-size:15px !important;font-weight:600 !important;color:#1e2d6b !important;background:transparent !important;border:0 !important;box-shadow:none !important}
header #cart>.btn i,header #cart>button i{font-size:20px !important;color:#1e2d6b !important;margin-right:4px}
header #search .form-control{height:42px !important;font-size:15px !important}
header #search .btn{height:42px !important}
#logo img{max-height:92px !important}
/* Header notice (Extensions > Modules > HTML Content > Header Notice) */
.ve-header-notice{color:#1e2d6b;font-size:13.5px;font-weight:600;margin-top:8px;text-align:center;line-height:1.35}
.ve-header-notice p{margin:0}
.ve-header-notice a{color:#1d4e89;text-decoration:underline}
@media (max-width:991px){.ve-header-notice{white-space:normal}}
@media (max-width:767px){header .row>[class*=col-]{width:100%;margin-bottom:8px}#logo{text-align:center}#logo img{margin:0 auto}}
/* Home intro: full width, 2-3 lines */
.ve-intro{max-width:none !important}
.ve-intro p{max-width:none !important;font-size:15px !important;line-height:1.6 !important}

/* Mobile header tidy (2026-11-20) */
@media (max-width:767px){
header{padding:6px 0 4px !important}
header .row>[class*=col-]{margin-bottom:6px !important}
#logo img{max-height:56px !important}
header #cart>.btn,header #cart>button{font-size:13px !important;padding:6px 4px !important;white-space:nowrap}
header #cart>.btn i,header #cart>button i{font-size:18px !important}
header #search .form-control,header #search .btn{height:38px !important}
.ve-header-notice{font-size:12px !important;margin-top:5px !important}
.ve-intro h1{font-size:24px !important}
.ve-intro p{font-size:14px !important;line-height:1.5 !important}
}

/* Desktop header tidy (2026-11-20) */
@media (min-width:768px){
header{padding:6px 0 !important}
header #cart>.btn,header #cart>button{font-size:14px !important;white-space:nowrap}
.ve-header-notice{margin-top:6px !important}
}

/* Space between logo underline and gold stripe */
@media (min-width:768px){header{padding:8px 0 18px !important}}
@media (max-width:767px){header{padding:6px 0 12px !important}}

/* Our Stores dropdown (top bar, left) */
#ve-family{line-height:1;padding-top:8px}
#ve-family>a,#ve-family .ve-parent{color:#d4d6d9 !important;font-size:12px;text-transform:uppercase;letter-spacing:.4px;text-decoration:none}
#ve-family>a:hover{color:#fcdc01 !important}
#ve-family .dropdown-menu{min-width:230px;margin-top:8px}
#ve-family .dropdown-menu>li>a{color:#1e2d6b !important;padding:6px 16px;font-size:14px}
#ve-family .dropdown-menu>li>a:hover{background:#fcdc01 !important;color:#1e2d6b !important}
#ve-family .dropdown-header{font-size:11px;text-transform:uppercase;color:#777}
#ve-family .dropdown-menu>li>a{text-transform:none !important;letter-spacing:0 !important;font-weight:500}
.ve-family-row{text-align:center;padding:6px 0 2px}
.ve-family-row a{color:#d4d6d9 !important;margin:0 9px;white-space:nowrap;display:inline-block;line-height:2}
.ve-family-row a:hover{color:#fcdc01 !important}
.ve-family-row{text-align:left !important;padding:0 !important}
.ve-family-row a{margin:0 22px 0 0 !important}
a.ve-family-head{color:inherit !important;text-decoration:none !important}
a.ve-family-head:hover{color:#fcdc01 !important}

/* Footer store row on one line (desktop) */
@media (min-width:1200px){.ve-family-row a{margin:0 15px 0 0 !important;font-size:13.5px}}
/* Breathing room between menu bar and home slider */
#menu{margin-bottom:22px !important}
/* Footer trust line */
.ve-trust{display:flex;flex-wrap:wrap;align-items:center;gap:10px 18px;color:#d4d6d9;font-size:13.5px}
.ve-trust .ve-cards i{font-size:26px;margin-right:6px;color:#d4d6d9;vertical-align:middle}
.ve-trust .fa-lock{color:#fcdc01;margin-right:5px}

/* Yellow stripe moved below the blue menu bar (2026-11-21) */
header{border-bottom:0 !important}
header + .container{border-bottom:8px solid #fcdc01 !important;margin-bottom:22px !important}
header + .container #menu{margin-bottom:0 !important}
@media (max-width:767px){header + .container{border-bottom-width:6px !important}} /* stripe on phones matches the smaller logo */
/* Narrower search box on desktop (2026-11-21) */
@media (min-width:768px){header #search{max-width:330px !important;margin-left:auto !important;margin-right:auto !important}}

/* cart buttons 20261121 */
#checkout-cart .buttons{display:flex;flex-wrap:wrap;align-items:center;gap:10px}
#checkout-cart .buttons:before,#checkout-cart .buttons:after{display:none}
#checkout-cart .buttons>div{float:none !important;margin:0 !important}
#checkout-cart .buttons>.pull-right{margin-left:auto !important}
@media (max-width:767px){#checkout-cart .buttons>div{flex:1 1 100%}#checkout-cart .buttons .btn{display:block;width:100%;text-align:center}#checkout-cart .buttons>.pull-right{order:-1}}
@media (max-width:767px){body:has(#checkout-cart) .ve-totop{display:none !important}}
/* back-to-top box 20261121 */
.ve-totop{border-radius:0 !important;background:rgba(240,240,240,.8) !important;border:1px solid #b5b5b5 !important;color:#333 !important;box-shadow:none !important;width:42px !important;height:42px !important;right:14px !important;bottom:14px !important;font-size:20px !important}
.ve-totop.show{opacity:1 !important}
.ve-totop:hover,.ve-totop:focus{background:rgba(255,255,255,.95) !important;color:#000 !important;border-color:#888 !important}
@media (max-width:767px){.ve-totop{width:38px !important;height:38px !important;right:10px !important;bottom:70px !important;font-size:17px !important}}
@media (max-width:767px){.ve-totop,.ve-totop.show{display:none !important}}
html body a.ve-totop,html body #mega-footer a.ve-totop,html body a.ve-totop .fa,html body #mega-footer a.ve-totop .fa{color:#333 !important}
html body a.ve-totop:hover,html body a.ve-totop:hover .fa{color:#000 !important}
html body a.ve-totop{font-size:28px !important}
html body a.ve-totop .fa{font-size:28px !important;line-height:1 !important;margin:0 0 3px 0 !important}
/* top-bar dropdowns readable 20261121 */
#top .dropdown-menu{background:#fff !important}
#top .dropdown-menu a,#top .dropdown-menu span,#top .dropdown-menu i,#top .dropdown-menu .btn-link{color:#222 !important}
#top .dropdown-menu a:hover,#top .dropdown-menu a:focus,#top .dropdown-menu .btn-link:hover{color:#1e2d6b !important;background:#f1f3f6 !important}
/* top-bar dropdowns match Our Stores 20261121 */
#top .dropdown-menu{min-width:200px}
#top .dropdown-menu>li>a,#top .dropdown-menu>li>.btn-link{color:#1e2d6b !important;padding:6px 16px !important;font-size:14px !important;font-weight:500 !important;text-transform:none !important;letter-spacing:0 !important}
#top .dropdown-menu>li>a:hover,#top .dropdown-menu>li>a:focus,#top .dropdown-menu>li>.btn-link:hover{background:#fcdc01 !important;color:#1e2d6b !important}
#top .dropdown-menu>li>a i,#top .dropdown-menu>li>a span{color:inherit !important}
/* cart stock pills 20261121 */
small.cart-stock{display:inline-block;margin-top:5px;padding:2px 9px;border-radius:999px;font-size:12px;font-weight:700;line-height:1.5;border:1px solid transparent}
small.cart-stock.text-success{background:#e7f8e9;border-color:#5cc46a;color:#137a24 !important}
small.cart-stock.text-danger{background:#fdecec;border-color:#e57373;color:#b3261e !important}
small.cart-stock.text-info{background:#fff6d6;border-color:#e0b400;color:#7a5b00 !important}

/* iPad / tablet (768-991px): keep the category menu on one row, full-width blue bar. 2026-11-22 */
@media (min-width: 768px) and (max-width: 991px) {
  body > header + div.container:not([id]) > #menu { max-width: none; width: 100vw; margin-left: calc(50% - 50vw); margin-right: 0; padding-left: 12px; padding-right: 12px; border-radius: 0; }
  #menu .navbar-nav { flex-wrap: nowrap; justify-content: center; }
  #menu .navbar-nav > li > a { white-space: nowrap; }
}

/* iPad / tablet (768-991px): footer links in 3 columns, contact + follow in 2 columns. 2026-11-22 */
@media (min-width: 768px) and (max-width: 991px) {
  footer .container > .mf-row:first-child { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); column-gap: 24px; row-gap: 28px; }
  footer .container > .mf-row:first-child::before, footer .container > .mf-row:first-child::after { display: none; }
  footer .container > .mf-row:first-child > .mf-column { width: auto; float: none; grid-column: span 2; }
  footer .container > .mf-row:first-child > .mf-column:nth-child(n+4) { grid-column: span 3; }
}

/* Restore Product Compare buttons hidden by iStore (2026-11-22) */
.product-thumb .button-group button[onclick*="compare.add"],
#content .btn-group button[onclick*="compare.add"] {
  display: inline-block !important;
}
/* Phones: keep Cart + Wish List + Compare inside the 2-column card */
@media (max-width: 767px) {
  #content .product-layout.product-grid .button-group button[onclick*="wishlist.add"],
  #content .product-layout.product-grid .button-group button[onclick*="compare.add"] {
    flex: 0 0 32px; width: 32px; min-width: 0; padding: 0; text-align: center;
  }
  #content .product-layout.product-grid .button-group button:first-child { min-width: 0; }
  #content .product-layout.product-grid .button-group { overflow: hidden; }
}

/* Tablet sideways scroll (2026-11-22): search-page category thumbnails were 200px wide inside ~128px links */
#category-results a.category img { max-width: 100%; height: auto; }
/* 768-991px: menu fills its full-width container instead of 100vw (100vw includes the scrollbar on desktop browsers) */
@media (min-width: 768px) and (max-width: 991px) {
  body > header + div.container:not([id]) > #menu { width: 100%; margin-left: 0; }
}

/* Customer message bar under the menu (Extensions > Modules > HTML Content > "Customer Message"). 2026-11-23 */
.ve-customer-message { background: #eef2fa; color: #204395; border-bottom: 1px solid #cfd8ec; font-size: 15px; font-weight: 600; line-height: 1.4; text-align: center; padding: 10px 0; }
.ve-customer-message p { margin: 0; }
.ve-customer-message p + p { margin-top: 4px; }
.ve-customer-message a { color: #204395; text-decoration: underline; }
.ve-customer-message strong { color: #1b1b1b; }
@media (max-width: 767px) { .ve-customer-message { font-size: 14px; padding: 8px 0; } }

/* Message bar sits flush under the yellow stripe; the menu's bottom gap moves below the bar. 2026-11-23 */
header + .container:has(~ .ve-customer-message) { margin-bottom: 0 !important; }
.ve-customer-message { margin-bottom: 22px; }

/* Message bar pieces never split mid-phrase; narrow phones get slightly smaller text. 2026-11-23 */
.ve-customer-message p > span { display: inline-block; white-space: nowrap; margin: 2px 0; }
@media (max-width: 400px) { .ve-customer-message { font-size: 13px; padding: 7px 0; } .ve-customer-message p > span[style*="padding"] { padding: 1px 7px !important; } }
