@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600&display=swap');

:root{
  --navy:#0F2A4A;
  --navy-deep:#0A1F38;
  --navy-light:#EAF0F7;
  --amber:#E8891A;
  --amber-dark:#C4720F;
  --green:#15803D;
  --red:#DC2626;
  --text:#111827;
  --muted:#6B7280;
  --bg:#F5F7FA;
  --card:#FFFFFF;
  --border:#E4E8EE;
  --radius-lg:14px;
  --radius-md:10px;
  --radius-sm:7px;
  --shadow-sm:0 1px 2px rgba(15,42,74,.06);
  --shadow-md:0 12px 28px rgba(15,42,74,.12);
}
*{box-sizing:border-box; margin:0; padding:0;}
html{scroll-behavior:smooth;}
body{
  font-family:'Plus Jakarta Sans', -apple-system, 'Segoe UI', Arial, sans-serif;
  font-weight:400;
  background:var(--bg); color:var(--text); -webkit-font-smoothing:antialiased;
  overflow-x:hidden; /* keeps the off-canvas sidebar from ever causing horizontal scroll */
}
h1,h2,h3,h4,button,input,select,.btn-amber,.btn-navy,.btn-outline{ font-weight:600; }
a{text-decoration:none; color:inherit;}
ul{list-style:none;}
button{font-family:inherit; cursor:pointer; border:none; background:none;}
input,select{font-family:inherit;}
.wrap{max-width:1260px; margin:0 auto; padding:0 18px;}
.icon{width:18px; height:18px; display:inline-block; vertical-align:middle; stroke:currentColor; fill:none; stroke-width:2; stroke-linecap:round; stroke-linejoin:round;}

/* =======================================================================
   NAVBAR (top info bar + main navbar + category bar)
   Dropdowns use native <details>/<summary>. The mobile hamburger opens
   #quickLinks as a right-side sidebar (see .nav-overlay + media query
   below); the open/close JS lives in index.php.
   ======================================================================= */
.top-bar{background:var(--navy-deep); color:#C9D4E2; font-size:12.9px;}
.top-bar-inner{display:flex; align-items:center; justify-content:space-between; padding:7px 18px; gap:10px; max-width:1260px; margin:0 auto;}
.top-left{display:flex; align-items:center; gap:18px;}
.top-left a{display:flex; align-items:center; gap:6px; color:#d2d2d2; font-weight:400;}
.top-left .icon{width:13px; height:13px; color:var(--amber);}
.top-right{display:flex; align-items:center; gap:16px;}
.top-right .dealer-link{color:var(--amber); font-weight:500;}

header.site-header{position:sticky; top:0; z-index:100; background:#fff;}
.header-inner{display:flex; align-items:center; gap:14px; padding:12px 18px; max-width:1260px; margin:0 auto;}
.logo{display:flex; align-items:center; gap:8px; font-size:19px; font-weight:600; flex-shrink:0; color:var(--navy);}
.logo .mark{width:32px; height:32px; background:var(--navy); color:#fff; border-radius:var(--radius-sm); display:flex; align-items:center; justify-content:center; font-weight:600; font-size:15px;}
.logo .accent{color:var(--amber);}

.search-form{flex:1; display:flex; align-items:center; background:var(--bg); border:1.5px solid var(--border); border-radius:var(--radius-sm); padding:10px 14px; gap:8px; min-width:0;}
.search-form input{flex:1; background:transparent; border:none; outline:none; font-size:14px; font-weight:400; min-width:0;}
.search-form button{display:flex; color:var(--muted);}

.header-actions{display:flex; align-items:center; gap:8px; flex-shrink:0;}
.account-link, .cart-link{display:flex; align-items:center; gap:7px; font-weight:600; font-size:13px; padding:10px 14px; border-radius:var(--radius-sm);}
.account-link{color:var(--navy); border:1.5px solid var(--border);}
.cart-link{background:var(--navy); color:#fff; position:relative;}
.cart-badge{position:absolute; top:-6px; right:-6px; background:var(--amber); color:#fff; font-size:10px; font-weight:600; width:19px; height:19px; border-radius:50%; display:flex; align-items:center; justify-content:center;}

/* category bar */
.category-bar{background:#fff; border-top:1px solid var(--border);}
.category-bar-inner{display:flex; align-items:stretch; max-width:1260px;     justify-content: space-between; margin:0 auto; padding:10px 18px; position:relative; gap:14px;}

/* All-Categories dropdown via <details> -- no JS to open/close */
.allcat-details{position:relative; flex-shrink:0;}
.allcat-details summary{list-style:none; border-radius:4px; display:flex; text-transform:uppercase; align-items:center; gap:15px; height:100%; padding:12px 20px; font-weight:600; font-size:13.5px; color:#ffffff; background:var(--navy-deep); cursor:pointer;}
.allcat-details summary::-webkit-details-marker{display:none;}
.allcat-details .vert-dropdown{position:absolute; top:100%; left:0; width:270px; background:#fff; border:1px solid var(--border); border-radius:0 0 var(--radius-md) var(--radius-md); box-shadow:var(--shadow-md); padding:8px; z-index:200; overflow-y:auto;}
.vert-dropdown a{display:flex; align-items:center; gap:12px; padding:10px 12px; border-radius:var(--radius-sm); font-size:13.5px; font-weight:500; color:var(--text);}
.vert-dropdown a:hover{background:var(--navy-light);}
.vert-dropdown a .circ{width:28px; height:28px; border-radius:50%; background:var(--bg); overflow:hidden; flex-shrink:0;}
.vert-dropdown a .circ img{width:100%; height:100%; object-fit:cover;}

.quick-links{flex:1; display:flex; align-items:center; justify-content:center; gap:28px; overflow-x:auto;}
.quick-links a{white-space:nowrap; font-size:14px; font-weight:600; color:#1d1d1d; padding:12px 0; border-bottom:2px solid transparent;}
.quick-links a:hover{color:var(--amber-dark); border-color:var(--amber);}
.quick-links-head{display:none;} /* only shown inside the mobile sidebar, see media query below */

/* mobile nav-links hamburger toggle -- hidden on desktop */
.navlinks-toggle{display:none; align-items:center; justify-content:center; width:38px; height:38px; border-radius:var(--radius-sm); border:1.5px solid var(--border); color:var(--navy); flex-shrink:0;}

/* dark backdrop behind the mobile sidebar nav */
.nav-overlay{
  position:fixed; inset:0; background:rgba(10,31,56,.55);
  opacity:0; visibility:hidden; transition:opacity .25s ease, visibility .25s ease;
  z-index:185;
}
.nav-overlay.active{opacity:1; visibility:visible;}

/* account dropdown (profile) via <details> */
.account-details{position:relative;}
.account-details summary{list-style:none; cursor:pointer;}
.account-details summary::-webkit-details-marker{display:none;}
.account-details .profile-dropdown{position:absolute; top:48px; right:0; width:200px; background:#fff; border:1px solid var(--border); border-radius:var(--radius-md); box-shadow:var(--shadow-md); padding:8px; z-index:200;}
.profile-dropdown a, .profile-dropdown button{display:flex; align-items:center; gap:10px; width:100%; text-align:left; padding:10px 12px; border-radius:var(--radius-sm); font-size:13px; font-weight:500; color:var(--text);}
.profile-dropdown a:hover{background:var(--bg);}
.profile-dropdown hr{border:none; border-top:1px solid var(--border); margin:6px 0;}

/* =======================================================================
   HERO CAROUSEL -- slider with prev/next arrows + dots.
   Looping (clone-based, seamless forward loop) is handled by the inline
   script at the bottom of index.php; this CSS just needs the track to be
   a plain flex row -- it works whether there are 3 slides or 3+2 clones.
   ======================================================================= */
.carousel{position:relative; border-radius:var(--radius-lg); overflow:hidden; margin:22px 0;}
.carousel-track{display:flex; transition:transform .45s ease;}
.hero-slide{flex:0 0 100%; height:390px;}
.hero-slide img{width:100%; height:100%; object-fit:cover; display:block;}
.car-arrow{position:absolute; top:50%; transform:translateY(-50%); width:40px; height:40px; border-radius:50%; background:rgba(255,255,255,.92); box-shadow:var(--shadow-sm); display:flex; align-items:center; justify-content:center; color:var(--navy); font-size:18px; z-index:5;}
.car-arrow:hover{background:#fff;}
.car-arrow.prev{left:14px;} .car-arrow.next{right:14px;}
.car-dots{position:absolute; bottom:14px; left:50%; transform:translateX(-50%); display:flex; gap:6px; z-index:5;}
.car-dots button{width:7px; height:7px; border-radius:999px; background:rgba(255,255,255,.55); border:none; padding:0;}
.car-dots button.active{width:20px; background:#fff;}

/* =======================================================================
   SECTIONS / CARDS
   (trust-strip removed per request)
   ======================================================================= */
.trust-strip{display:grid; grid-template-columns:repeat(4,1fr); gap:14px; margin:0 0 44px;}
.trust-item{background:var(--card); border:1px solid var(--border); border-radius:var(--radius-md); padding:18px; display:flex; align-items:center; gap:14px;}
.trust-item .circ{width:44px; height:44px; border-radius:var(--radius-sm); background:var(--navy-light); display:flex; align-items:center; justify-content:center; flex-shrink:0;}
.trust-item .circ .icon{color:var(--navy); width:21px; height:21px;}
.trust-item h4{font-size:14px; font-weight:600; margin-bottom:3px;}
.trust-item p{font-size:12px; color:var(--muted); font-weight:400;}

.section{margin-bottom:60px;}
.section-head{display:flex; align-items:baseline; justify-content:space-between; margin-bottom:22px;}
.section-title{font-size:20.5px; font-weight:650; display:flex; align-items:center; gap:9px;}
.section-title .icon{color:var(--amber); width:19px; height:19px;}
.section-sub{font-size:12.5px; color:var(--muted); margin-top:2px; font-weight:400;}
.see-all{font-size:13px; font-weight:600; color:var(--navy);}

.rfq-band{display:flex; align-items:center; justify-content:space-between; gap:20px; background:var(--navy); border-radius:var(--radius-lg); padding:28px 34px; margin-bottom:50px; flex-wrap:wrap;}
.rfq-band h3{color:#fff; font-size:19px; font-weight:600; margin-bottom:6px;}
.rfq-band p{color:#C9D4E2; font-size:13px; font-weight:400;}

/* Shop-by-category: fixed 4-per-line at every breakpoint */
.top-cats{display:grid; grid-template-columns:repeat(7,1fr); gap:28px 16px; margin-top:60px;}
.top-cat{display:flex; flex-direction:column; align-items:center; gap:12px; text-align:center;}
.top-cat .img-box{width:100%; max-width:92px; aspect-ratio:1/1; border-radius:var(--radius-md); background:var(--navy-light); overflow:hidden; display:flex; align-items:center; justify-content:center; box-shadow:var(--shadow-sm); margin:0 auto;}
.top-cat .img-box img{width:100%; height:100%; object-fit:cover; display:block;}
.top-cat span{font-size:12px; font-weight:600; line-height:1.3; color:var(--text);}

/* product row + side scroll arrows */
.row-wrap{position:relative;}
.row-scroll{display:flex; gap:14px; overflow-x:auto; padding-bottom:6px; scroll-behavior:smooth;}
.row-arrow{position:absolute; top:42%; transform:translateY(-50%); width:34px; height:34px; border-radius:50%; background:#fff; border:1.5px solid var(--border); display:flex; align-items:center; justify-content:center; box-shadow:var(--shadow-sm); z-index:5; color:var(--navy); font-size:16px;}
.row-arrow:hover{border-color:var(--navy);}
.row-arrow.prev{left:-6px;} .row-arrow.next{right:-6px;}

.grid{display:grid; grid-template-columns:repeat(4,1fr); gap:16px;}
.card{flex-shrink:0; width:228px; background:var(--card); border:1px solid var(--border); border-radius:var(--radius-md); padding:14px; box-shadow:var(--shadow-sm); display:flex; flex-direction:column;}
.card .img{aspect-ratio:1/1; background:#fff; border-radius:var(--radius-sm); display:flex; align-items:center; justify-content:center; margin-bottom:10px; overflow:hidden;}
.card .img img{width:100%; height:100%; object-fit:contain;}
.card .name{font-size:13.5px; font-weight:600; margin-bottom:12px; min-height:28px;}
.card .price-row{display:flex; align-items:baseline; gap:6px; margin-bottom:2px;}
.card .price{font-size:16.5px; font-weight:700; color:var(--navy);}
.card .unit-price{font-size:11px; color:var(--muted); font-weight:400; margin-bottom:10px;}
.card .locked-price{font-size:12.5px; font-weight:600; color:var(--navy); text-decoration:underline; display:inline-block; margin-bottom:10px;}

/* Card form -- select is now flexible instead of a fixed 140px, and the
   add button is a fixed square icon button. This is what stopped the
   qty-select/cart-button overlap on narrow mobile cards. */
.card-form{display:flex; gap:6px; align-items:stretch;}
.card-form select{
  flex:1 1 auto; min-width:0; width:100%;
  border:1.5px solid var(--border); border-radius:var(--radius-sm);
  padding:9px 10px; font-size:12px; font-weight:500; background:#fff; color:var(--text);
}
.card-form .add-btn{
  flex:0 0 70px; width:40px; padding:0;
  border-radius:var(--radius-sm); background:var(--navy); color:#fff;
  display:flex; align-items:center; justify-content:center;
}
.card-form .add-btn .icon{width:17px; height:17px;}
.card-form .add-btn:hover{background:var(--navy-deep);}

/* =======================================================================
   FOOTER
   ======================================================================= */
footer.site-footer{background:var(--navy-deep); color:#B9C4D3; margin-top:24px;}
.footer-inner{max-width:1260px; margin:0 auto; padding:36px 18px; display:grid; grid-template-columns:1.4fr 1fr 1fr 1fr; gap:44px; font-size:13px;}
.footer-inner h4{color:#fff; font-size:13px; font-weight:600; margin-bottom:10px;}
.footer-inner p{font-weight:400;}
.footer-inner li{margin-bottom:6px; font-weight:400;}
.footer-inner a:hover{color:#fff;}
.footer-bottom{text-align:center; padding:14px; border-top:1px solid rgba(255,255,255,.08); font-size:12px; font-weight:400;}

/* =======================================================================
   SHOP PAGE (sidebar + subcategory accordion via <details>, grid)
   ======================================================================= */
.shop-body{display:flex; gap:20px; padding:24px 18px 60px; max-width:1260px; margin:0 auto; align-items:flex-start;}
.shop-sidebar{width:240px; flex-shrink:0; background:var(--card); border:1px solid var(--border); border-radius:var(--radius-md); padding:14px; position:sticky; top:150px;}
.shop-sidebar h4{font-size:12px; font-weight:600; margin:2px 0 10px; text-transform:uppercase; letter-spacing:.03em; color:var(--muted);}
.shop-sidebar > a{display:block; padding:9px 8px; border-radius:var(--radius-sm); font-size:13.5px; font-weight:600; color:#3D3D40; margin-bottom:6px;}
.shop-sidebar > a:hover{background:var(--bg);}
.shop-sidebar hr{border:none; border-top:1px solid var(--border); margin:10px 0;}

.main-cat{border:none; margin-bottom:2px;}
.main-cat summary{list-style:none; display:flex; align-items:center; gap:10px; padding:9px 8px; border-radius:var(--radius-sm); font-size:13.5px; font-weight:600; color:var(--text); cursor:pointer;}
.main-cat summary::-webkit-details-marker{display:none;}
.main-cat summary:hover{background:var(--bg);}
.main-cat summary .circ{width:28px; height:28px; border-radius:50%; overflow:hidden; flex-shrink:0; background:var(--bg);}
.main-cat summary .circ img{width:100%; height:100%; object-fit:cover;}
.main-cat summary .nm{flex:1;}
.main-cat summary .chev{width:14px; height:14px; color:var(--muted); transition:transform .15s;}
.main-cat[open] summary .chev{transform:rotate(180deg);}
.sub-cat-list{padding:2px 0 8px 16px;}
.sub-cat-list a{display:block; padding:7px 8px; border-radius:7px; font-size:12.5px; font-weight:500; color:#4B5563; margin-bottom:1px;}
.sub-cat-list a:hover{background:var(--bg); color:var(--text);}

.shop-main{flex:1; min-width:0;}
.page-title{font-size:22px; font-weight:600; margin-bottom:6px; margin-top:19px;}
.breadcrumb{font-size:12.5px; color:var(--muted); font-weight:400; margin-bottom:20px; display:flex; gap:8px;}
.breadcrumb a{color:var(--navy); font-weight:600;}

.pagination{display:flex; justify-content:center; gap:8px; margin-top:30px;}
.pagination a{width:36px; height:36px; display:flex; align-items:center; justify-content:center; border:1.5px solid var(--border); border-radius:var(--radius-sm); font-size:13px; font-weight:600; color:var(--text);}
.pagination a.active{background:var(--navy); color:#fff; border-color:var(--navy);}
.pagination a:hover:not(.active){border-color:var(--navy);}

/* =======================================================================
   RESPONSIVE
   ======================================================================= */
@media(max-width:1100px){ .stat-cards{grid-template-columns:repeat(2,1fr);} }

@media(max-width:900px){
  .footer-inner{grid-template-columns:1fr 1fr;}
  .top-right{display:none;}
  .grid{grid-template-columns:repeat(3,1fr);}
  .shop-sidebar{display:none;}
  .hero-slide{height:300px;}
  .trust-item{
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

@media(max-width:860px){
  .navlinks-toggle{display:flex;}

  /* Right-side sidebar drawer (replaces the old top dropdown) */
  .quick-links{
    display:flex; flex-direction:column; align-items:stretch; gap:0; justify-content:start;
    position:fixed; top:0; right:0; bottom:0;
    width:80%; max-width:300px; height:100vh;
    background:#fff; box-shadow:var(--shadow-md);
    transform:translateX(100%);
    transition:transform .3s ease;
    z-index:190; overflow-y:auto; overflow-x:hidden;
  }
  .quick-links.open{transform:translateX(0);}

  .quick-links-head{
    display:flex; align-items:center; justify-content:space-between;
    padding:16px 18px; border-bottom:1px solid var(--border);
    font-size:15px; font-weight:600; color:var(--navy);
  }
  .quick-links-close{
    width:32px; height:32px; border-radius:50%; font-size:22px; line-height:1;
    display:flex; align-items:center; justify-content:center; color:var(--muted);
  }
  .quick-links-close:hover{background:var(--bg);}

  .quick-links a{
    padding:23px 18px; border-bottom:1px solid var(--border);
    text-align:left; white-space:normal;
  }
  .quick-links a:last-child{border-bottom:none;}
  
  .top-cats{display:grid; grid-template-columns:repeat(5,1fr); gap:22px 16px;}
  .trust-strip{display:none;}
}

@media(max-width:640px){
    .top-bar-inner{display:none;}
    .header-inner{flex-wrap:wrap; justify-content: space-between;}
    .search-form{order:3; width:100%; flex:1 1 100%;}
    .account-link span.label{display:none;}
    .top-left a:last-child{display:none;}
    .grid{grid-template-columns:repeat(2,1fr);}
    .rfq-band{flex-direction:column; align-items:flex-start;}
    .hero-slide{height:200px;}
    .row-arrow{display:none;} /* horizontal swipe/scroll works natively on touch */
    .card{width:170px;}
    .top-cats{gap:16px 10px; grid-template-columns:repeat(5,1fr);}
    .top-cat .img-box{max-width:78px;}
    .section-title{font-size:17.5px; }
    .section-sub{font-size: 11.5px;}

}

@media(max-width:480px){
  .footer-inner{grid-template-columns:1fr;}
  .grid{grid-template-columns:repeat(2,1fr); gap:10px;}
  .top-cats{gap:14px 8px; grid-template-columns:repeat(4,1fr);}
  .top-cat .img-box{max-width:66px;}
  .top-cat span{font-size:11px;}
  .card .name{font-size:11.5px; font-weight:500; margin-bottom:12px;}
}


  .shop-main .buy-actions[action="shop.php"] {
    display: flex;
    align-items: center;
    gap: 10px;
}

.shop-main .buy-actions[action="shop.php"] label {
    font-size: 14px;
    color: #8a8a8a;
    white-space: nowrap;
}

.shop-main #sort {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 12px center;
    background-size: 16px;
    border: 1.5px solid #1a1a1a;
    border-radius: 10px;
    padding: 6px 18px 6px 4px;
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
    cursor: pointer;
    min-width: 170px;
}

.shop-main #sort:focus {
    outline: none;
    border-color: var(--amber, #F59E0B);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.shop-main #sort:hover {
    border-color: #444;
}

@media (max-width: 640px) {
    .shop-main .page-title-row {
        flex-direction: column;
        align-items: flex-start;
    }
    .shop-main .buy-actions[action="shop.php"] {
        width: 100%;
    }
    .shop-main #sort {
        flex: 1;
        min-width: 0;
    }
}

.buy-actions {
    display: flex;
    align-items: stretch;
    gap: 8px;
}

/* Quantity dropdown */
.buy-actions .pd-qty-select {
    flex: 1;
    height: 37px;
    padding: 0 36px 0 14px;
    border: 1.5px solid var(--border, #e2e5eb);
    border-radius: 7px;
    background: #fff;
    font-size: 14px;
    font-weight: 500;
    color: var(--text, #1a1a1a);
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 18px;
    cursor: pointer;
    transition: border-color .15s ease;
}

.buy-actions .pd-qty-select:hover,
.buy-actions .pd-qty-select:focus {
    border-color: var(--navy, #0f2a4a);
    outline: none;
}

/* Add-to-cart icon button */
.buy-actions .add-to-cart-btn {
    width: 64px;
    height: 37px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--navy, #0f2a4a);
    border: none;
    border-radius: 7px;
    cursor: pointer;
    transition: background-color .15s ease, opacity .15s ease;
}

.buy-actions .add-to-cart-btn:hover {
    background: var(--navy-dark, #0a1e38);
}

.buy-actions .add-to-cart-btn .icon {
    width: 18px;
    height: 18px;
    stroke: #fff;
    fill: none;
}

.buy-actions .add-to-cart-btn:disabled {
    cursor: not-allowed;
}

/* State feedback (set via JS: button.classList.add('is-loading' | 'is-added' | 'is-error')) */
.buy-actions .add-to-cart-btn.is-loading {
    opacity: .6;
}

.buy-actions .add-to-cart-btn.is-added {
    background: var(--green, #16a34a);
}

.buy-actions .add-to-cart-btn.is-error {
    background: #dc2626;
}