/* ======================================================
   VPB CSS – NEW ROW MODEL:
   Row layout: [+] [picker] [qty stepper] [delete]
   Design language: Matches Equipment page (Figma)
   - Border radius: 10px
   - Border color: #ECECEC
   - Card padding: 10px
   - Typography: SF Pro, 16px, weight 510/590
   - Colors: #1A1A1A (text), #6E6E6E (muted)
====================================================== */

/* Design tokens (matching Equipment page design language) */
#sp-vpkg{
    --sp-max: 1200px;
    --sp-pad: 32px;
    --sp-gap: 28px;
    
    --sp-text: #1A1A1A;
    --sp-muted: #6E6E6E;
    --sp-line: #ECECEC;
    --sp-card: #FFF;
    
    --sp-radius: 10px;
    --sp-shadow: 0 8px 18px rgba(0,0,0,.08);
}

#sp-vpkg{
    max-width: var(--sp-max) !important;
    margin: 0 auto;
    padding: 0 var(--sp-pad) 60px !important;
    position: relative;
    isolation: isolate;
  }
  
  /* Remove white space above date picker bar (Astra theme spacing) */
  body:has(#sp-vpkg) .site-content,
  body:has(#sp-vpkg) .content-area,
  body:has(#sp-vpkg) .site-main,
  body:has(#sp-vpkg) #primary{
    margin-top: 0 !important;
    padding-top: 0 !important;
  }
  
  body:has(#sp-vpkg) .site-content .ast-container,
  body:has(#sp-vpkg) .ast-container{
    padding-top: 0 !important;
  }
  
  body:has(#sp-vpkg) .entry-header{
    margin: 0 !important;
    padding: 0 !important;
  }
  
  body:has(#sp-vpkg) .entry-content > *:first-child{
    margin-top: 0 !important;
  }
  
  body:has(#sp-vpkg) #sp-vpkg{
    margin-top: 0 !important;
  }
  
  /* Ensure sticky rental bar starts at the top */
  body:has(#sp-vpkg) #sp-vpkg .sp-sticky-rental{
    margin-top: 0 !important;
  }
  
  /* Layout */
  #sp-vpkg .sp-layout{
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: var(--sp-gap) !important;
    align-items: start;
    overflow: visible;
  }
  #sp-vpkg .sp-main{
    min-width: 0;
    position: relative;
    z-index: 1;
    overflow: visible;
  }
  
  /* Sticky rental bar */
  #sp-vpkg .sp-sticky-rental{
    position: sticky;
    top: 0;
    z-index: 5000;
    background: var(--sp-card) !important;
    border-bottom: 1px solid var(--sp-line) !important;
  }
  #sp-vpkg .sp-sticky-rental__inner{
    padding: 12px 0 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  
  /* Hide "Rental Period" heading at the top */
  #sp-vpkg .sp-sticky-rental__inner > h2,
  #sp-vpkg .sp-sticky-rental__inner > h3,
  #sp-vpkg .sp-sticky-rental__inner > h4,
  #sp-vpkg .sp-sticky-rental__inner > .sp-sticky-rental__title,
  #sp-vpkg .sp-sticky-rental__inner > p:first-child,
  #sp-vpkg .sp-sticky-rental__inner > div:first-child:not(.sp-sticky-rental__fields){
    display: none !important;
  }
  
  /* Add note below date pills at bottom of header */
  #sp-vpkg .sp-sticky-rental__inner::after{
    content: "Note: Pickup after 1 PM · Return before 12 PM" !important;
    display: block !important;
    width: 100% !important;
    font-size: 12px !important;
    font-weight: 400 !important; /* not bolded, same as label font */
    color: #6E6E6E !important; /* dark grey matching site colors */
    font-family: "SF Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    letter-spacing: 0.2px !important;
    margin-top: 6px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }
  #sp-vpkg .sp-sticky-rental__fields{
    display:flex;
    gap: 18px !important;
    flex-wrap: wrap;
    align-items: flex-end !important;
  }
  #sp-vpkg .sp-sticky-rental__field{
    display:flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12px !important;
    font-weight: 510 !important;
    color: #6E6E6E !important;
    letter-spacing: 0.2px !important;
    opacity: 1 !important;
    font-family: "SF Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
  }
  #sp-vpkg .sp-sticky-rental__field input{
    height: 36px !important;
    line-height: 36px !important;
    min-height: 36px !important;
    padding: 0 12px !important;
    border: 1px solid #C6C6C6 !important;
    border-radius: 20px !important;
    min-width: 220px;
    font-size: 14px !important;
    background: #fff !important;
    color: #111 !important;
    font-family: "SF Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
    vertical-align: middle !important;
  }
  #sp-vpkg .sp-sticky-rental__field input:focus{
    outline: none !important;
    border-color: #0b57d0 !important;
    box-shadow: 0 0 0 3px rgba(11,87,208,.10) !important;
  }
  
  /* Sections */
  #sp-vpkg .sp-section{
    margin: 26px 0;
    overflow: visible;
  }
  #sp-vpkg .sp-section h2{
    margin: 0 0 10px;
    font-size: 20px !important;  /* decreased font size */
    font-weight: 590;
    line-height: 1.05;
    font-family: "SF Pro Display","SF Pro Text",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
    color: var(--sp-text) !important;
  }
  #sp-vpkg .sp-wrap{
    display:flex;
    flex-direction: column;
    gap: 14px;
    overflow: visible;
  }
  
  /* ✅ NEW ROW GRID: [+] [picker] [qty] [del] */
  #sp-vpkg .sp-row{
    display: grid;
    grid-template-columns: 52px minmax(0,1fr) 140px 52px;
    gap: 12px;
    align-items: center;
    position: relative;
    z-index: 1;
    overflow: visible;
  }
  
  /* Open row above everything */
  #sp-vpkg .sp-row.is-open{ z-index: 999998 !important; }
  #sp-vpkg .sp-row:has(.sp-picker.open){ z-index: 999999; }
  
  #sp-vpkg .sp-row-leftcell,
  #sp-vpkg .sp-row-rightcell{
    display:flex;
    justify-content:center;
    align-items:center;
  }
  #sp-vpkg .sp-field{
    min-width:0;
    overflow: visible;
  }
  
  /* Buttons */
  #sp-vpkg .sp-btn{
    width: 44px;
    height: 44px;
    padding: 0 !important;
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    font-size: 26px;
    font-weight: 900;
    display:flex;
    align-items:center;
    justify-content:center;
  }
  #sp-vpkg .sp-btn:hover{ opacity:.92; }
  #sp-vpkg .sp-btn:disabled{ opacity:.35; cursor:not-allowed; }
  #sp-vpkg .sp-btn-add{ background:#111111 !important; color:#fff !important; }
  
  #sp-vpkg .sp-btn-del{
    width: 40px;
    height: 40px;
    font-size: 0 !important;  /* Hide the original cross character */
    line-height: 0 !important;
    background: transparent !important;
    border: none !important;
    color: #111111 !important;
    position: relative;
  }
  /* Replace cross with trash icon */
  #sp-vpkg .sp-btn-del::before{
    content: "";
    display: inline-block;
    width: 18px;
    height: 18px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='3 6 5 6 21 6'%3E%3C/polyline%3E%3Cpath d='M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2'%3E%3C/path%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }
  #sp-vpkg .sp-btn-del:hover:not(:disabled){ 
    background: transparent !important; 
    opacity: 0.7 !important;
  }
  
  /* Custom picker */
  #sp-vpkg .sp-picker{
    position: relative;
    z-index: 1;
    overflow: visible;
  }
  #sp-vpkg .sp-picker.open{ z-index: 999999 !important; }
  
  #sp-vpkg .sp-picker-btn{
    width: 100%;
    height: 44px;
    display:flex;
    align-items:center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid var(--sp-line) !important;
    background: var(--sp-card) !important;
    color: var(--sp-text) !important;
    font-weight: 800;
    cursor: pointer;
  }
  
  #sp-vpkg .sp-picker-btn-left{
    display:flex;
    align-items:center;
    gap: 10px;
    min-width: 0;
    flex: 1 1 auto;
  }
  #sp-vpkg .sp-picker-btn-title{
    font-size: 14px !important;   /* match dropdown option exactly */
    line-height: 1.1 !important;  /* match dropdown option exactly */
    white-space: normal;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    min-width: 0;
    font-family: "SF Pro Display","SF Pro Text",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
    font-weight: 800 !important;  /* match dropdown option exactly */
    color: var(--sp-text) !important;
  }
  #sp-vpkg .sp-picker-btn-price{
    font-size: 12px;
    font-weight: 800;
    opacity: .7;
    margin-left: 6px;
    flex: 0 0 auto;
    max-width: 92px;
    text-align: right;
    white-space: nowrap;
  }
  
  #sp-vpkg .sp-thumb,
  #sp-vpkg .sp-thumb--empty{
    width: 34px;
    height: 34px;
    object-fit: contain;
    border-radius: 6px;
    background: #f6f7f8;
    flex: 0 0 auto;
  }
  
  /* Dropdown panel */
  #sp-vpkg .sp-picker-panel{
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    margin-top: 8px;
    z-index: 1000000;
    background: var(--sp-card) !important;
    border: 1px solid var(--sp-line) !important;
    border-radius: var(--sp-radius) !important;
    box-shadow: var(--sp-shadow) !important;
    max-height: min(360px, calc(100vh - 180px));
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    display: none;
    padding: 6px;
  }
  #sp-vpkg .sp-picker.open .sp-picker-panel{ display:block; }
  
  /* Search bar */
  #sp-vpkg .sp-picker-search{
    padding: 10px;
    position: sticky;
    top: 0;
    background: var(--sp-card) !important;
    z-index: 2;
  }
  #sp-vpkg .sp-picker-search-input{
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid var(--sp-line) !important;
    border-radius: 10px;
    background: #f6f7f8;
    color: var(--sp-text) !important;
    outline: none;
  }
  #sp-vpkg .sp-picker-search-input:focus{ border-color: rgba(0,0,0,.35) !important; }
  
  /* Dropdown items */
  #sp-vpkg .sp-picker-item{
    display:flex;
    align-items:center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 10px;
    cursor: pointer;
    border-radius: 10px;
  }
  #sp-vpkg .sp-picker-item:hover{ background:#f4f7ff; }
  
  #sp-vpkg .sp-picker-item-left{
    display:flex;
    align-items:center;
    gap: 10px;
    min-width: 0;
    flex: 1 1 auto;
  }
  #sp-vpkg .sp-picker-item-title{
    font-weight: 800 !important;  /* match equipment grid product card */
    font-size: 14px !important;   /* match equipment grid product card (exactly) */
    line-height: 1.1 !important;  /* match equipment grid product card (exactly) */
    white-space: normal;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    word-break: break-word;
    min-width: 0;
    font-family: "SF Pro Display","SF Pro Text",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
    color: var(--sp-text) !important;
  }
  #sp-vpkg .sp-picker-item-price{
    font-size: 12px;
    font-weight: 800;
    opacity: .65;
    margin-left: 8px;
    flex: 0 0 auto;
    max-width: 90px;
    text-align: right;
    white-space: nowrap;
  }
  
  /* ✅ QTY STEPPER */
  #sp-vpkg .sp-qty{
    height: 44px;
    display: grid;
    grid-template-columns: 38px 1fr 38px;
    border: 1px solid var(--sp-line) !important;
    border-radius: 10px !important;
    overflow: hidden;
    background: var(--sp-card) !important;
  }
  #sp-vpkg .sp-qty.is-disabled{
    opacity: .55;
  }
  #sp-vpkg .sp-qty-btn{
    border: 0;
    background: #f1f3f5;
    cursor: pointer;
    font-weight: 900;
    font-size: 18px;
    display:flex;
    align-items:center;
    justify-content:center;
  }
  #sp-vpkg .sp-qty-btn:hover{ opacity: .92; }
  #sp-vpkg .sp-qty-btn:disabled{ cursor:not-allowed; opacity:.6; }
  
  #sp-vpkg .sp-qty-input{
    width: 100% !important;
    border: 0 !important;
    outline: none;
    text-align: center;
    font-weight: 900;
    font-size: 14px;
    padding: 0 6px !important;
    background: var(--sp-card) !important;
  }
  #sp-vpkg .sp-qty-input:disabled{
    background: var(--sp-card) !important;
    cursor: not-allowed;
  }
  
  /* Sidebar (keep your existing styling) */
  #sp-vpkg .sp-summary--sidebar{
    position: sticky;
    top: 96px !important; /* header height (110px) + spacing (16px) - 30px */
    z-index: 10 !important;
    max-height: calc(100vh - 112px); /* account for header + top spacing */
    overflow: hidden !important; /* no scroll on sidebar itself */
    border: 1px solid var(--sp-line) !important;
    border-radius: var(--sp-radius) !important;
    background: var(--sp-card) !important;
    padding: 10px !important;
    box-shadow: var(--sp-shadow) !important;
    display: flex !important;
    flex-direction: column !important;
  }
  
  /* Account for admin bar when logged in */
  body.admin-bar #sp-vpkg .sp-summary--sidebar{
    top: 128px !important; /* header (110px) + admin bar (32px) + spacing (16px) - 30px */
    max-height: calc(100vh - 144px);
  }
  @media (max-width: 782px){
    body.admin-bar #sp-vpkg .sp-summary--sidebar{
      top: 142px !important; /* header (110px) + admin bar (46px) + spacing (16px) - 30px */
      max-height: calc(100vh - 158px);
    }
  }
  
  /* Mobile: smaller header height */
  @media (max-width: 768px){
    #sp-vpkg .sp-summary--sidebar{
      top: 126px !important; /* header height (140px) + spacing (16px) - 30px */
      max-height: calc(100vh - 142px);
    }
    body.admin-bar #sp-vpkg .sp-summary--sidebar{
      top: 158px !important; /* header (140px) + admin bar (32px) + spacing (16px) - 30px */
      max-height: calc(100vh - 174px);
    }
  }
  
  /* Keep Browsing link */
  #sp-vpkg #sp-keep-browsing-link{
    display: block;
    text-align: center;
    font-size: 13px;
    color: #111111 !important;
    text-decoration: underline;
    margin-top: 4px !important; /* reduced from 10px to 4px */
  }
  
  /* Hide update quote dates */
  #sp-rental-apply,
  #sp-vpkg #sp-rental-apply,
  #sp-vpkg .sp-sticky-rental__apply{
    display: none !important;
  }
  
  /* Clear Builder modal styles (kept) */
  #sp-clear-builder-overlay{
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 2147483647;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
  }
  #sp-clear-builder-overlay.is-open{ display: flex; }
  
  #sp-clear-builder-modal{
    width: min(520px, 100%);
    background: var(--sp-card) !important;
    border-radius: var(--sp-radius) !important;
    border: 1px solid var(--sp-line) !important;
    box-shadow: 0 18px 60px rgba(0,0,0,.28);
    padding: 18px;
  }
  #sp-clear-builder-modal h3{
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 590;
    font-family: "SF Pro Display","SF Pro Text",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
    color: var(--sp-text) !important;
  }
  #sp-clear-builder-modal p{
    margin: 0 0 14px;
    font-size: 16px;
    color: var(--sp-muted) !important;
    line-height: 1.35;
    font-family: "SF Pro Display","SF Pro Text",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  }
  #sp-clear-builder-modal .sp-modal-actions{
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
  }
  #sp-clear-builder-modal .sp-modal-btn{
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid var(--sp-line);
    background: #111111 !important;
    color: #fff !important;
    cursor: pointer;
    font-weight: 900;
  }
  #sp-clear-builder-modal .sp-modal-btn-danger{
    background: #d32f2f;
    color: #fff;
    border-color: rgba(0,0,0,.08);
  }
  
  #sp-vpkg .sp-clear-builder-btn:disabled,
  #sp-vpkg .sp-clear-builder-btn.is-disabled{
    background: #9aa3ad !important;
    cursor: not-allowed !important;
    opacity: .65;
  }
  
  /* Mobile */
  @media (max-width: 980px){
    #sp-vpkg .sp-layout{ grid-template-columns: 1fr; }
    #sp-vpkg .sp-summary--sidebar{
      position: relative;
      top: auto;
      max-height: none;
      overflow: visible;
    }
  }
  
  @media (max-width: 800px){
    #sp-vpkg .sp-row{
      grid-template-columns: 44px 1fr 1fr 44px;
      grid-template-areas:
        "btn field qty del";
      gap: 10px;
    }
  }
  /* ======================================================
     SUMMARY SIDEBAR – RESTORE ORIGINAL STYLE (paste at bottom)
     Keeps your old look while using new row grid/qty stepper
  ====================================================== */
  
  /* Sidebar */
  #sp-vpkg .sp-summary--sidebar{
    position: sticky;
    top: 96px !important; /* header height (110px) + spacing (16px) - 30px */
    z-index: 10 !important; /* keep below open picker */
    max-height: calc(100vh - 112px); /* account for header + top spacing */
    overflow: hidden !important; /* no scroll on sidebar itself */
    border: 1px solid var(--sp-line) !important;
    border-radius: var(--sp-radius) !important;
    background: var(--sp-card) !important;
    padding: 10px !important;
    box-shadow: var(--sp-shadow) !important;
    display: flex !important;
    flex-direction: column !important;
  }
  
  #sp-vpkg .sp-summary__header{
    display:flex;
    justify-content: space-between;
    gap: 12px;
    align-items: baseline;
  }
  #sp-vpkg .sp-summary__title{ 
    font-size: 18px; 
    font-weight: 590; 
    font-family: "SF Pro Display","SF Pro Text",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
    color: var(--sp-text) !important;
  }
  #sp-vpkg .sp-summary__meta{ 
    font-size: 12px; 
    color: var(--sp-muted) !important;
    text-align:right; 
  }
  
  #sp-vpkg .sp-summary__body{
    padding: 6px 0 12px 0 !important; /* reduced top padding from 12px to 6px */
    border-top: 1px solid var(--sp-line) !important;
    border-bottom: 1px solid var(--sp-line) !important;
    margin-top: 5px !important; /* reduced from 10px to 5px */
    flex: 1 1 auto !important; /* allow this section to grow and shrink */
    min-height: 0 !important; /* critical for flex scrolling */
    overflow-y: auto !important; /* only this section scrolls */
    overflow-x: hidden !important;
  }
  
  /* Keep header, totals, and footer fixed (not scrollable) */
  #sp-vpkg .sp-summary__header,
  #sp-vpkg .sp-summary__totals,
  #sp-vpkg .sp-summary__footer{
    flex-shrink: 0 !important; /* don't shrink */
  }
  #sp-vpkg .sp-summary__section-title{
    font-size: 12px;
    font-weight: 590;
    color: var(--sp-muted) !important;
    text-transform: uppercase;
    letter-spacing: .02em;
    margin-bottom: 8px;
    font-family: "SF Pro Display","SF Pro Text",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  }
  #sp-vpkg .sp-summary__list{
    display:flex;
    flex-direction: column;
    gap: 4px !important; /* decreased line spacing */
  }
  #sp-vpkg .sp-summary__item{
    display:flex;
    justify-content: space-between;
    gap: 8px !important; /* reduced from 12px to 8px */
    font-size: 16px;
    font-family: "SF Pro Display","SF Pro Text",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
    color: var(--sp-text) !important;
    line-height: 1.3 !important; /* decreased line spacing */
    margin: 0 !important;
    padding: 0 !important;
  }
  #sp-vpkg .sp-summary__item-name{
    overflow:hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 88% !important; /* increased from 72% to 88% to show more text */
    flex: 1 1 auto !important; /* allow it to grow */
    min-width: 0 !important; /* allow shrinking */
    font-size: 14px !important; /* smaller font for equipment names */
  }
  #sp-vpkg .sp-summary__item-meta{
    flex-shrink: 0 !important; /* prevent count from shrinking */
  }
  #sp-vpkg .sp-summary__item-meta{ opacity:.75; white-space:nowrap; color: var(--sp-muted); }
  #sp-vpkg .sp-muted{ color: var(--sp-muted); font-size:14px; }
  
  #sp-vpkg .sp-summary__totals{
    padding-top: 6px !important; /* reduced from 12px to 6px to compensate for body padding reduction */
    display:flex;
    flex-direction: column;
    gap: 8px;
  }
  #sp-vpkg .sp-summary__row{
    display:flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 16px;
    font-family: "SF Pro Display","SF Pro Text",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
    color: var(--sp-text) !important;
  }
  #sp-vpkg .sp-summary__row--bold{
    font-weight: 590;
    font-size: 16px;
    color: var(--sp-text) !important;
  }
  
  #sp-vpkg .sp-summary__footer{
    padding-top: 6px !important; /* reduced from 12px to 6px */
    display:flex;
    flex-direction: column;
    gap: 4px !important; /* reduced from 10px to 4px */
  }
  #sp-vpkg .sp-summary__cta{
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--sp-radius) !important;
    border: 1px solid var(--sp-line) !important;
    background: #111111 !important;
    color: #fff !important;
    cursor: pointer;
  }
  #sp-vpkg .sp-summary__cta:hover{ opacity:.92; }
  #sp-vpkg .sp-summary__cartlink{
    text-align:center;
    font-size: 13px;
    opacity: .75;
    text-decoration: underline;
  }
  
  /* Hide ONLY the original "View cart" link (it points to /cart/) */
  #sp-vpkg .sp-summary--sidebar a.sp-summary__cartlink[href*="/cart"]{
    display: none !important;
  }
  
  /* Style our injected Keep Browsing link (same as before) */
  #sp-vpkg #sp-keep-browsing-link{
    display: block;
    text-align: center;
    font-size: 13px;
    color: #111111 !important;
    text-decoration: underline;
    margin-top: 4px !important; /* reduced from 10px to 4px */
  }
  
  /* If you still hide "Selected in Builder" block */
  #sp-vpkg #sp-summary-builder { display: none !important; }
  #sp-vpkg .sp-summary__section-title:has(+ #sp-summary-builder){ display:none !important; }
  
  /* Tier discount block should visually blend with existing rows */
  #sp-vpkg #sp-tier-discount-block .sp-summary__row span{ opacity: .85 !important; }
  
  /* (Optional) If your search bar changed appearance and you want the old dark one back, uncomment:
  #sp-vpkg .sp-picker-search-input{
    border: 1px solid rgba(255,255,255,.18) !important;
    background: rgba(0,0,0,.25) !important;
    color: inherit !important;
  }
  #sp-vpkg .sp-picker-search-input:focus{
    border-color: rgba(255,255,255,.35) !important;
  }
  */
  /* ======================================================
     RESET PACKAGE BUTTON – restore old placement + divider
     (paste at VERY BOTTOM)
  ====================================================== */
  
  #sp-vpkg .sp-sticky-rental__fields{
    display: flex !important;
    align-items: flex-end !important;
    gap: 12px !important;
    flex-wrap: wrap !important;
  }
  
  /* Make Reset sit at far right */
  #sp-vpkg #sp-clear-builder-btn{
    margin-left: auto !important;
    order: 999 !important;          /* always last in row */
    align-self: flex-end !important;
    position: relative !important;
  }
  
  /* Remove divider line to match equipment page style */
  #sp-vpkg #sp-clear-builder-btn::before{
    display: none !important;
  }
  
  /* Match equipment page header clear button style (blue) */
  #sp-vpkg .sp-clear-builder-btn,
  #sp-vpkg #sp-clear-builder-btn.sp-clear-builder-btn{
    height: 36px !important;
    line-height: 36px !important;
    background: #0B57D0 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    padding: 0 16px !important;
    font-family: "SF Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  #sp-vpkg .sp-clear-builder-btn:hover:not(:disabled),
  #sp-vpkg #sp-clear-builder-btn:hover:not(:disabled){
    opacity: 0.92 !important;
  }
  
  /* Disabled/grey state */
  #sp-vpkg #sp-clear-builder-btn:disabled,
  #sp-vpkg #sp-clear-builder-btn.is-disabled{
    background: #9aa3ad !important;
    cursor: not-allowed !important;
    opacity: .65 !important;
  }
  /* /* ======================================================
     CHROME-PROOF DATE ICON TOGGLE
     - We insert a transparent overlay button INSIDE the field wrapper
     - Use pointerdown to close/open before Chrome handles the native UI
  ====================================================== */
  
  #sp-vpkg .sp-sticky-rental__field{
    position: relative; /* anchor overlay */
  }
  
  /* Invisible overlay over the native calendar icon area */
  #sp-vpkg .sp-date-icon-hitbox{
    position: absolute;
    right: 10px;
    bottom: 7px;          /* aligns with input */
    width: 38px;
    height: 38px;
  
    border: 0;
    padding: 0;
    background: transparent;
    opacity: 0;           /* invisible */
    cursor: pointer;
  
    z-index: 9999;        /* above input's icon area */
  }
  /* ===== Qty (spinner-only) ===== */
  #sp-vpkg .sp-qty{
    display:flex;
    align-items:center;
    justify-content:center;
  }
  
  #sp-vpkg .sp-qty-input{
    width: 72px !important;          /* smaller */
    height: 44px !important;
    padding: 0 8px !important;
    border-radius: 10px !important;
    border: 1px solid var(--sp-line) !important;
    background: var(--sp-card) !important;
    font-weight: 900;
    text-align: center;
  }
  
  /* Ensure Chrome spinner stays visible */
  #sp-vpkg .sp-qty-input{
    -webkit-appearance: auto;
    appearance: auto;
  }
  #sp-vpkg .sp-qty-input::-webkit-outer-spin-button,
  #sp-vpkg .sp-qty-input::-webkit-inner-spin-button{
    opacity: 1;
  }
  
  #sp-vpkg .sp-qty.is-disabled{ opacity:.45; }
  /* ===== Row layout for: [+] [dropdown] [qty] [X] ===== */
  #sp-vpkg .sp-row{
    grid-template-columns: 60px minmax(0, 1fr) 80px 60px !important;
  }
  
  /* Make the dropdown take full available width */
  #sp-vpkg .sp-field{
    min-width: 0 !important;
  }
  
  /* Qty input only (no outer wrapper exists anymore) */
  #sp-vpkg .sp-qty-input{
    width: 100% !important;
    max-width: 120px !important;
    height: 44px !important;
    padding: 0 10px !important;
    border-radius: 10px !important;
    border: 1px solid var(--sp-line) !important;
    background: var(--sp-card) !important;
    font-weight: 900;
    text-align: center;
    box-sizing: border-box;
  }
  
  /* Keep Chrome spinner visible */
  #sp-vpkg .sp-qty-input{
    -webkit-appearance: auto;
    appearance: auto;
  }
  #sp-vpkg .sp-qty-input::-webkit-outer-spin-button,
  #sp-vpkg .sp-qty-input::-webkit-inner-spin-button{
    opacity: 1;
  }
  
  /* Disabled look */
  #sp-vpkg .sp-row.sp-qty-disabled .sp-qty-input{
    opacity: .45;
    cursor: not-allowed;
  }
  
  /* ===== Bigger, easier-to-click native number arrows (Chrome/Edge/Safari) ===== */
  #sp-vpkg .sp-qty-input{
    height: 45px !important;      /* makes spinner area taller */
    font-size: 18px !important;
    line-height: 4px !important;
    padding-right: 3px !important; /* room for scaled spinner */
    appearance: auto !important;    /* ensure native controls are allowed */
    -webkit-appearance: auto !important;
  }
  
  /* Scale the native spinner itself (width is often ignored, scale works) */
  #sp-vpkg .sp-qty-input::-webkit-inner-spin-button,
  #sp-vpkg .sp-qty-input::-webkit-outer-spin-button{
    opacity: 1 !important;
    transform: scale(1.5) !important;          /* <-- bigger hit target */
    transform-origin: right center !important; /* keep it anchored right */
    cursor: pointer;
  }