/* =================================================
   Location: /assets/css/cart-page.css
   Purpose: Premium Cart Page UI for HyperDAF.
            Keeps cart headings and checkout CTA readable in normal,
            hover and responsive states without text clipping.
   Related PHP:
   - /inc/features/cart/cart-page.php
   - /page.php (.hdaf-container--wide-1400)
   Linkage/Loader:
   - Enqueued via /inc/assets.php on is_cart()
================================================= */

:root{
  --hdaf-orange: #ff6a00;
  --hdaf-orange-dark: #e85b00; /* ✅ darker for headings + hover */
  --hdaf-border: rgba(0,0,0,.10);
  --hdaf-border2: rgba(0,0,0,.08);
  --hdaf-text: #111;
}

/* =================================================
   CART WRAPPER — LOCK TO 1400px (match requirement)
================================================= */
.hdaf-cartx{
  max-width: 1400px;
  margin: 0 auto;
  padding: 16px 16px 40px;
}

/* Cart/checkout wide container (used by page.php) */
.hdaf-container--wide-1400{
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* Remove extra top spacing on clean woo pages */
.hdaf-page--woo-clean{ padding-top: 0; }

/* =================================================
   HEADER
================================================= */
.hdaf-cartx__header{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
  margin:10px 0 14px;
}
.hdaf-cartx__title{
  margin:0;
  font-size:26px;
  line-height:1.2;
  font-weight:900;
  letter-spacing:-0.2px;
}
.hdaf-cartx__meta{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  margin-top:8px;
  font-size:13px;
  opacity:.85;
}
.hdaf-cartx__dot{ opacity:.5; }
.hdaf-cartx__link{
  text-decoration:none;
  border-bottom:1px solid rgba(0,0,0,.18);
  padding-bottom:2px;
  color: inherit;
}
.hdaf-cartx__link:hover{
  border-bottom-color: rgba(232,91,0,.65);
}

/* =================================================
   PREMIUM NOTICES
================================================= */
.hdaf-cartx__notices{ margin:10px 0 14px; }

.hdaf-cartx__notices .woocommerce-message,
.hdaf-cartx__notices .woocommerce-info,
.hdaf-cartx__notices .woocommerce-error{
  border:1px solid rgba(0,0,0,.10);
  background:#fff;
  border-radius:16px;
  padding:12px 14px;
  margin:0 0 10px;
  font-size:13px;
  line-height:1.4;
  box-shadow:0 10px 28px rgba(0,0,0,.06);

  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.hdaf-cartx__notices .woocommerce-message::before,
.hdaf-cartx__notices .woocommerce-info::before,
.hdaf-cartx__notices .woocommerce-error::before{
  display:none !important;
}

/* Woo notice action button/link (often "Continue shopping") */
.hdaf-cartx__notices .woocommerce-message a.button,
.hdaf-cartx__notices .woocommerce-info a.button{
  height:36px;
  padding:0 14px;
  border-radius:999px;
  border:1px solid rgba(0,0,0,.14);
  background:#111;
  color:#fff;
  font-weight:900;
  font-size:12px;
  line-height:36px;
  text-decoration:none;
  white-space:nowrap;
}
.hdaf-cartx__notices .woocommerce-message a.button:hover,
.hdaf-cartx__notices .woocommerce-info a.button:hover{
  filter:brightness(.95);
}

/* If Woo outputs a normal link instead of .button */
.hdaf-cartx__notices .woocommerce-message a:not(.button),
.hdaf-cartx__notices .woocommerce-info a:not(.button){
  font-weight:900;
  text-decoration:none;
  border-bottom:1px dashed rgba(0,0,0,.22);
}

/* Error notice readability */
.hdaf-cartx__notices .woocommerce-error{
  border-color: rgba(210, 0, 0, .20);
}

/* Mobile: stack notice content nicely */
@media (max-width: 768px){
  .hdaf-cartx__notices .woocommerce-message,
  .hdaf-cartx__notices .woocommerce-info,
  .hdaf-cartx__notices .woocommerce-error{
    flex-direction:column;
    align-items:flex-start;
  }
  .hdaf-cartx__notices .woocommerce-message a.button,
  .hdaf-cartx__notices .woocommerce-info a.button{
    width:100%;
    text-align:center;
  }
}

/* =================================================
   PAGE GRID
================================================= */
.hdaf-cartx-grid{
  display:grid;
  grid-template-columns: 1fr 380px;
  gap:16px;
  align-items:start;
}
@media (max-width: 1024px){
  .hdaf-cartx-grid{ grid-template-columns:1fr; }
}

/* Cards */
.hdaf-cartx-card,
.hdaf-cartx-sum{
  background:#fff;
  border:1px solid rgba(0,0,0,.10);
  border-radius:16px;
}
.hdaf-cartx-card{ overflow:hidden; }

/* =================================================
   DESKTOP HEAD (Heading strip: dark orange + white text)
   NOTE: Keep padding generous to avoid “side text hide”
================================================= */
.hdaf-cartx-head{
  display:grid;
  grid-template-columns: 1.35fr .45fr .55fr .55fr;
  gap: 10px;
  padding: 12px 16px; /* ✅ more safe padding */
  border-bottom: 1px solid rgba(0,0,0,.08);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .3px;
  text-transform: uppercase;

  background: var(--hdaf-orange-dark);
  color:#fff;
  opacity: 1; /* ✅ no dimming */
}

.hdaf-cartx-head > div:nth-child(2),
.hdaf-cartx-head > div:nth-child(3),
.hdaf-cartx-head > div:nth-child(4){
  text-align: right;
}

@media (max-width: 900px){
  .hdaf-cartx-head{ display:none; }
}

/* Items */
.hdaf-cartx-items{ padding:6px 10px; }

/* Desktop row */
.hdaf-cartx-item{
  display:grid;
  grid-template-columns: 1.35fr .45fr .55fr .55fr;
  gap:10px;
  padding:14px 6px;
  border-bottom:1px solid rgba(0,0,0,.06);
  align-items:center;
}
.hdaf-cartx-item:last-child{ border-bottom:0; }

/* Product cell */
.hdaf-cartx-item__product{
  display:flex;
  gap:12px;
  align-items:flex-start;
  min-width:0;
}
.hdaf-cartx-item__media{
  width:74px;
  height:74px;
  flex:0 0 74px;
  display:block;
  border:1px solid rgba(0,0,0,.10);
  border-radius:16px;
  overflow:hidden;
  background:#fff;
}
.hdaf-cartx-item__thumb{
  width:100%;
  height:100%;
  object-fit:contain;
  display:block;
}
.hdaf-cartx-item__meta{ min-width:0; }
.hdaf-cartx-item__title{
  font-size:14px;
  font-weight:900;
  line-height:1.25;
  margin:0 0 6px;
}
.hdaf-cartx-item__title a{ color:inherit; text-decoration:none; }
.hdaf-cartx-item__sku{
  font-size:12px;
  opacity:.78;
  margin-top:6px;
}
.hdaf-cartx-item__remove{
  display:inline-block;
  margin-top:8px;
  font-size:12px;
  text-decoration:none;
  opacity:.85;
  border-bottom:1px dashed rgba(0,0,0,.22);
}
.hdaf-cartx-item__remove:hover{
  color: var(--hdaf-orange-dark);
  border-bottom-color: rgba(232,91,0,.55);
}

/* Controls wrapper */
.hdaf-cartx-item__controls{ display: contents; }

.hdaf-cartx-item__price{
  grid-column: 2;
  font-size:14px;
  font-weight:900;
  white-space:nowrap;
  justify-self:end;
  text-align:right;
  letter-spacing:-0.1px;
  padding-right: 8px;
}

.hdaf-cartx-item__qty{
  grid-column: 3;
  display:flex;
  align-items:center;
  justify-content:flex-end;
}

.hdaf-cartx-item__sub{
  grid-column: 4;
  font-size:14px;
  font-weight:900;
  white-space:nowrap;
  justify-self:end;
  padding-right: 8px;
  letter-spacing: -0.1px;
}

/* Qty pill */
.hdaf-cartx-qty{
  display:flex;
  align-items:center;
  gap:6px;
  border:1px solid rgba(0,0,0,.12);
  border-radius:14px;
  padding:5px 6px;
  background:#fff;
  margin-left: auto;
}
.hdaf-cartx-qty__btn{
  width:32px;
  height:32px;
  border-radius:12px;
  border:1px solid rgba(0,0,0,.12);
  background:#fff;
  font-weight:900;
  font-size:17px;
  line-height:1;
  cursor:pointer;
}
.hdaf-cartx-qty__btn:hover{
  border-color: rgba(232,91,0,.55);
}

.hdaf-cartx-qty input.qty,
.hdaf-cartx-qty__input{
  width:64px;
  height:32px;
  border:1px solid rgba(0,0,0,.10);
  border-radius:12px;
  outline:none;
  text-align:center;
  font-weight:900;
  background:#fff;
  color:#111;
  padding:0;
  font-size:14px;
}

.hdaf-cartx-qty input::-webkit-outer-spin-button,
.hdaf-cartx-qty input::-webkit-inner-spin-button{ -webkit-appearance:none; margin:0; }
.hdaf-cartx-qty input[type=number]{ -moz-appearance:textfield; }

/* =================================================
   ACTIONS + BUTTONS (Orange buttons + white text)
================================================= */
.hdaf-cartx-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  padding:12px 14px 14px;
  border-top:1px solid rgba(0,0,0,.08);
}

/* Base button */
.hdaf-cartx-btn{
  height:42px;
  border-radius:16px;
  border:1px solid rgba(0,0,0,.16);
  padding:0 14px;
  font-weight:900;
  font-size:13px;
  background:#fff;
  color: var(--hdaf-text);
  cursor:pointer;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

/* Primary = Orange */
.hdaf-cartx-btn--primary{
  background: var(--hdaf-orange);
  color:#fff;
  border-color: rgba(255,106,0,.45);
}
.hdaf-cartx-btn--primary:hover{
  background: var(--hdaf-orange-dark);
  border-color: rgba(232,91,0,.55);
}

/* Make other important Woo buttons orange too (safe targets) */
.hdaf-cartx a.button,
.hdaf-cartx button.button,
.hdaf-cartx input.button,
.hdaf-cartx .button{
  border-radius:16px;
}

/* Ensure cart action buttons look premium */
body.woocommerce-cart .woocommerce button[name="update_cart"],
body.woocommerce-cart .woocommerce .coupon button,
body.woocommerce-cart .woocommerce a.checkout-button{
  background: var(--hdaf-orange) !important;
  color:#fff !important;
  border:1px solid rgba(255,106,0,.45) !important;
  font-weight:900 !important;
  border-radius:16px !important;
}
body.woocommerce-cart .woocommerce button[name="update_cart"]:hover,
body.woocommerce-cart .woocommerce .coupon button:hover,
body.woocommerce-cart .woocommerce a.checkout-button:hover{
  background: var(--hdaf-orange-dark) !important;
  border-color: rgba(232,91,0,.55) !important;
}

.hdaf-cartx-btn--block{ width:100%; }

/* =================================================
   SUMMARY (Heading: dark orange + white text)
================================================= */
.hdaf-cartx-right .hdaf-cartx-sum{
  padding:14px;
  position:sticky;
  top:18px;
}
@media (max-width: 1024px){
  .hdaf-cartx-right .hdaf-cartx-sum{ position:static; }
}

.hdaf-cartx-sum__title{
  font-size:13px;
  font-weight:1000;
  text-transform:uppercase;
  letter-spacing:.4px;
  margin-bottom:12px;

  background: var(--hdaf-orange-dark);
  color:#fff;
  padding:10px 12px;
  border-radius:14px;
}

.hdaf-cartx-row{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
  padding:9px 0;
  font-size:13px;
}
.hdaf-cartx-row__l{ opacity:.82; }
.hdaf-cartx-row__r{ font-weight:900; }

.hdaf-cartx-divider{
  height:1px;
  background:rgba(0,0,0,.08);
  margin:10px 0;
}
.hdaf-cartx-row--total{ font-size:14px; }

.hdaf-cartx-safe{
  font-size:12px;
  opacity:.72;
  margin-top:10px;
  line-height:1.4;
}

/* Desktop premium feel */
@media (min-width: 901px){
  .hdaf-cartx-item__sub{ font-weight: 900; }
  .hdaf-cartx-item__price{ opacity: .95; }
}

/* =================================================
   TABLET + MOBILE — SLIM ANDROID-LIKE
================================================= */
@media (max-width: 900px){

  .hdaf-cartx{ padding-bottom:110px; }
  .hdaf-cartx-items{ padding:12px; }

  .hdaf-cartx-item{
    grid-template-columns: 1fr;
    gap:10px;
    padding:12px;
    border:1px solid rgba(0,0,0,.10);
    border-radius:16px;
    margin-bottom:12px;
    box-shadow:0 12px 36px rgba(0,0,0,.05);
  }

  .hdaf-cartx-item__media{
    width:58px;
    height:58px;
    flex:0 0 58px;
    border-radius:14px;
  }

  .hdaf-cartx-item__title{
    font-size:13.5px;
    line-height:1.25;
    margin:0 0 4px;
  }

  .hdaf-cartx-item__sku{ font-size:11.5px; }
  .hdaf-cartx-item__remove{ margin-top:6px; }

  .hdaf-cartx-item__controls{
    display:grid;
    grid-template-columns: 1fr auto 1fr;
    gap:10px;
    align-items:center;
    padding-top:6px;
  }

  .hdaf-cartx-item__price{
    grid-column:auto;
    justify-self:start;
    font-size:12.5px;
  }

  .hdaf-cartx-item__qty{
    grid-column:auto;
    justify-self:center;
  }

  .hdaf-cartx-item__sub{
    grid-column:auto;
    justify-self:end;
    font-size:12.5px;
  }

  .hdaf-cartx-qty{
    padding:6px 8px;
    border-radius:14px;
  }
  .hdaf-cartx-qty__btn{
    width:32px;
    height:32px;
    border-radius:12px;
  }
  .hdaf-cartx-qty input.qty,
  .hdaf-cartx-qty__input{
    width:46px;
    height:32px;
    border-radius:12px;
    font-size:13px;
  }

  .hdaf-cartx-sum__cta{
    position:fixed;
    left:12px;
    right:12px;
    bottom:12px;
    background:#fff;
    border:1px solid rgba(0,0,0,.10);
    border-radius:18px;
    padding:10px;
    box-shadow:0 18px 60px rgba(0,0,0,.16);
    z-index:999;
    margin:0;
  }

  .hdaf-cartx-sum__cta .hdaf-cartx-btn--block{
    height:48px;
    border-radius:18px;
    font-size:14px;
    background: var(--hdaf-orange) !important;
    color:#fff !important;
  }
  .hdaf-cartx-sum__cta .hdaf-cartx-btn--block:hover{
    background: var(--hdaf-orange-dark) !important;
  }

  .hdaf-cartx-safe{ display:none; }

  .hdaf-cartx-actions{
    flex-direction:column;
    align-items:stretch;
    gap:10px;
  }
}

/* =================================================
   CART CTA — DISABLE STICKY on Tablet/Mobile
================================================= */
@media (max-width: 900px){
  .hdaf-cartx-sum__cta{
    position: static !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    margin: 12px 0 0 !important;
    box-shadow: none !important;
    z-index: auto !important;
  }

  .hdaf-cartx{
    padding-bottom: 40px !important;
  }
}

/* =================================================
   CART RECOMMENDATIONS — CONTENT BOUNDARY SAFE
   - Exactly 4 products
   - Does not enter summary/sidebar area
   - Scoped only to cart recommendations section
================================================= */
.hdaf-cartx-reco{
  grid-column:1 / -1;
  width:100%;
  max-width:100%;
  min-width:0;
  margin:18px 0 0;
  padding:0;
  overflow:hidden;
  box-sizing:border-box;
}

.hdaf-cartx-reco__inner{
  width:100%;
  max-width:100%;
  min-width:0;
  padding:16px;
  border:1px solid rgba(0,0,0,.10);
  border-radius:16px;
  background:#fff;
  box-sizing:border-box;
  overflow:hidden;
}

.hdaf-cartx-reco__title{
  margin:0 0 14px;
  color:#111;
  font-size:18px;
  line-height:1.2;
  font-weight:900;
  letter-spacing:-.2px;
}

.hdaf-cartx-reco ul.products{
  display:grid !important;
  grid-template-columns:repeat(4, minmax(0, 1fr)) !important;
  gap:14px !important;
  width:100% !important;
  max-width:100% !important;
  min-width:0 !important;
  margin:0 !important;
  padding:0 !important;
  list-style:none !important;
  overflow:visible !important;
  box-sizing:border-box !important;
}

.hdaf-cartx-reco ul.products::before,
.hdaf-cartx-reco ul.products::after{
  display:none !important;
  content:none !important;
}

.hdaf-cartx-reco ul.products > li.product{
  float:none !important;
  clear:none !important;
  width:auto !important;
  max-width:100% !important;
  min-width:0 !important;
  margin:0 !important;
  padding:0 !important;
  box-sizing:border-box !important;
}

.hdaf-cartx-reco ul.products > li.product img{
  max-width:100% !important;
  height:auto !important;
}

/* Tablet: stay inside cart container and avoid sidebar overlap */
@media (max-width:1024px){
  .hdaf-cartx-reco{
    grid-column:1;
    margin-top:16px;
  }

  .hdaf-cartx-reco__inner{
    padding:14px;
  }

  .hdaf-cartx-reco ul.products{
    display:flex !important;
    grid-template-columns:none !important;
    flex-wrap:nowrap !important;
    gap:14px !important;
    overflow-x:auto !important;
    overflow-y:hidden !important;
    -webkit-overflow-scrolling:touch !important;
    scroll-snap-type:x mandatory !important;
    padding:2px 2px 12px !important;
    touch-action:pan-x !important;
  }

  .hdaf-cartx-reco ul.products > li.product{
    flex:0 0 calc((100% - (14px * 2)) / 2.5) !important;
    width:calc((100% - (14px * 2)) / 2.5) !important;
    scroll-snap-align:start !important;
  }

  .hdaf-cartx-reco ul.products > li.product img{
    height:120px !important;
    max-height:120px !important;
    width:100% !important;
    object-fit:contain !important;
  }

  .hdaf-cartx-reco .woocommerce-loop-product__title{
    font-size:13px !important;
    line-height:1.3 !important;
  }

  .hdaf-cartx-reco .price{
    font-size:13px !important;
  }
}

/* Mobile: horizontal cards remain inside section, never sidebar/footer area */
@media (max-width:768px){
  .hdaf-cartx-reco{
    margin-top:14px;
  }

  .hdaf-cartx-reco__inner{
    padding:12px;
    border-radius:15px;
  }

  .hdaf-cartx-reco__title{
    margin-bottom:12px;
    font-size:16px;
  }

  .hdaf-cartx-reco ul.products{
    gap:12px !important;
    padding:2px 2px 12px !important;
  }

  .hdaf-cartx-reco ul.products > li.product{
    flex:0 0 calc((100% - 12px) / 1.5) !important;
    width:calc((100% - 12px) / 1.5) !important;
  }

  .hdaf-cartx-reco ul.products > li.product img{
    height:110px !important;
    max-height:110px !important;
  }
}

/* =================================================
   CART RECOMMENDATIONS — LEFT PRODUCT AREA ONLY
   - Desktop: do not span under cart summary/sidebar
   - Tablet/mobile: natural full content width
================================================= */
@media (min-width:1025px){
  .hdaf-cartx-reco{
    grid-column:1 !important;
    width:100% !important;
    max-width:100% !important;
    margin-right:0 !important;
  }

  .hdaf-cartx-reco__inner{
    width:100% !important;
    max-width:100% !important;
  }
}

/* =================================================
   FINAL CART RECOMMENDATIONS WIDTH LOCK
   - recommendations output is after the grid, not inside it
   - so grid-column cannot control its desktop width
   - lock desktop width to left cart column:
     total width - sidebar 380px - grid gap 16px
================================================= */
@media (min-width:1025px){
  body.woocommerce-cart .hdaf-cartx-reco{
    display:block !important;
    width:calc(100% - 396px) !important;
    max-width:calc(100% - 396px) !important;
    min-width:0 !important;
    margin-left:0 !important;
    margin-right:auto !important;
    box-sizing:border-box !important;
    overflow:hidden !important;
  }

  body.woocommerce-cart .hdaf-cartx-reco__inner{
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    box-sizing:border-box !important;
    overflow:hidden !important;
  }

  body.woocommerce-cart .hdaf-cartx-reco ul.products{
    grid-template-columns:repeat(4, minmax(0, 1fr)) !important;
  }

  body.woocommerce-cart .hdaf-cartx-reco ul.products > li.product{
    min-width:0 !important;
    max-width:100% !important;
  }
}


/* Cart page setup controls */
.hdaf-cartx-right.is-not-sticky .hdaf-cartx-sum,
.hdaf-cartpage__sticky.is-not-sticky {
	position: static !important;
	top: auto !important;
}

/* =================================================
   Location: /assets/css/cart-page.css
   Purpose: Patch 4 commercial polish for Cart page checkout flow.
            Adds safer focus states, form controls, sticky summary and mobile fixes.
================================================= */
.hdaf-cartx,
.hdaf-cartpage{
  --hdaf-checkout-accent:#ff6a00;
  --hdaf-checkout-accent-dark:#e85b00;
  --hdaf-checkout-ink:#111827;
  --hdaf-checkout-muted:#6b7280;
  --hdaf-checkout-ring:0 0 0 3px rgba(255,106,0,.18);
}

.hdaf-cartx *,
.hdaf-cartpage *{
  box-sizing:border-box;
}

.hdaf-cartx a:focus-visible,
.hdaf-cartx button:focus-visible,
.hdaf-cartx input:focus-visible,
.hdaf-cartpage a:focus-visible,
.hdaf-cartpage button:focus-visible,
.hdaf-cartpage input:focus-visible{
  outline:none !important;
  box-shadow:var(--hdaf-checkout-ring) !important;
}

.hdaf-cartx__title,
.hdaf-cartpage__title{
  color:var(--hdaf-checkout-ink);
  text-wrap:balance;
}

.hdaf-cartx__meta,
.hdaf-cartpage__meta{
  color:var(--hdaf-checkout-muted);
}

.hdaf-cartx-card,
.hdaf-cartx-sum,
.hdaf-cartpage__card{
  border-color:rgba(15,23,42,.10) !important;
  box-shadow:0 14px 42px rgba(15,23,42,.055);
}

.hdaf-cartx-item,
.hdaf-cartpage__row{
  transition:background-color .18s ease, border-color .18s ease;
}
.hdaf-cartx-item:hover,
.hdaf-cartpage__row:hover{
  background:#fffaf6;
}

.hdaf-cartx-item__media,
.hdaf-cartpage__thumb{
  background:linear-gradient(180deg,#fff,#f8fafc);
  border:1px solid rgba(15,23,42,.08);
}

.hdaf-cartx-item__title a,
.hdaf-cartpage__name a{
  color:var(--hdaf-checkout-ink);
  text-decoration:none;
}
.hdaf-cartx-item__title a:hover,
.hdaf-cartpage__name a:hover{
  color:var(--hdaf-checkout-accent-dark);
  text-decoration:underline;
  text-underline-offset:3px;
}

.hdaf-cartx-item__remove,
.hdaf-cartpage__remove{
  color:#991b1b !important;
  border-color:rgba(153,27,27,.22) !important;
  text-decoration:none !important;
}
.hdaf-cartx-item__remove:hover,
.hdaf-cartpage__remove:hover{
  color:#fff !important;
  background:#991b1b !important;
  border-color:#991b1b !important;
}

.hdaf-cartx-qty,
.hdaf-cartpage__qty{
  background:#fff;
  border:1px solid rgba(15,23,42,.12);
  border-radius:999px;
  overflow:hidden;
}
.hdaf-cartx-qty input.qty,
.hdaf-cartpage__qty input.qty{
  min-width:46px;
  text-align:center;
  font-weight:900;
  color:var(--hdaf-checkout-ink);
}
.hdaf-cartx-qty button,
.hdaf-cartpage__qty button{
  transition:background-color .16s ease, color .16s ease;
}
.hdaf-cartx-qty button:hover,
.hdaf-cartpage__qty button:hover{
  background:var(--hdaf-checkout-accent);
  color:#fff;
}

.hdaf-cartx input.input-text,
.hdaf-cartx input[type="text"],
.hdaf-cartpage input.input-text,
.hdaf-cartpage input[type="text"]{
  border:1px solid rgba(15,23,42,.14) !important;
  border-radius:12px !important;
  background:#fff !important;
  color:var(--hdaf-checkout-ink) !important;
  transition:border-color .16s ease, box-shadow .16s ease;
}
.hdaf-cartx input.input-text:focus,
.hdaf-cartx input[type="text"]:focus,
.hdaf-cartpage input.input-text:focus,
.hdaf-cartpage input[type="text"]:focus{
  border-color:rgba(255,106,0,.70) !important;
  box-shadow:var(--hdaf-checkout-ring) !important;
}

.hdaf-cartx .button,
.hdaf-cartx-btn,
.hdaf-cartpage__btn{
  transition:background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}
.hdaf-cartx .button:hover,
.hdaf-cartx-btn:hover,
.hdaf-cartpage__btn:hover{
  transform:translateY(-1px);
}
.hdaf-cartx .button:disabled,
.hdaf-cartx .button[disabled],
.hdaf-cartpage__btn:disabled,
.hdaf-cartpage__btn[disabled]{
  cursor:not-allowed !important;
  opacity:.62 !important;
  transform:none !important;
}

.hdaf-cartx-sum,
.hdaf-cartpage__sticky{
  top:calc(var(--hdaf-sticky-offset, 92px) + 12px) !important;
}
.admin-bar .hdaf-cartx-sum,
.admin-bar .hdaf-cartpage__sticky{
  top:calc(var(--hdaf-sticky-offset, 92px) + 44px) !important;
}

.hdaf-cartx-sum__row,
.hdaf-cartpage__totals .cart-subtotal,
.hdaf-cartpage__totals .order-total{
  min-width:0;
}
.hdaf-cartx-sum .woocommerce-Price-amount,
.hdaf-cartpage__totals .woocommerce-Price-amount{
  white-space:nowrap;
}

@media (max-width: 782px){
  .admin-bar .hdaf-cartx-sum,
  .admin-bar .hdaf-cartpage__sticky{
    top:auto !important;
  }
}

@media (max-width: 640px){
  .hdaf-cartx,
  .hdaf-cartpage{
    padding-left:12px !important;
    padding-right:12px !important;
  }

  .hdaf-cartx__header,
  .hdaf-cartpage__head{
    align-items:flex-start;
  }

  .hdaf-cartx__title,
  .hdaf-cartpage__title{
    font-size:24px !important;
  }

  .hdaf-cartx-item,
  .hdaf-cartpage__row{
    border-radius:14px;
  }

  .hdaf-cartx-item__controls,
  .hdaf-cartpage__mini{
    min-width:0;
  }

  .hdaf-cartx .actions,
  .hdaf-cartpage__actions,
  .hdaf-cartpage__couponRow{
    gap:10px !important;
  }

  .hdaf-cartx .actions .button,
  .hdaf-cartx-btn,
  .hdaf-cartpage__btn{
    width:100%;
    justify-content:center;
  }
}

/* =================================================
   Location: /assets/css/cart-page.css
   Purpose: Cart heading and checkout CTA contrast patch.
================================================= */
.hdaf-cartx-head,
.hdaf-cartx-sum__title{
  background:#111827 !important;
  color:#fff !important;
  border-bottom:2px solid var(--hdaf-checkout-accent, #ff6a00) !important;
  opacity:1 !important;
}

.hdaf-cartx-head > *,
.hdaf-cartx-sum__title{
  color:#fff !important;
}

.hdaf-cartx-btn--primary,
.hdaf-cartx-btn--primary:hover,
.hdaf-cartx-btn--primary:focus,
.hdaf-cartx-btn--primary:active,
body.woocommerce-cart .woocommerce a.checkout-button,
body.woocommerce-cart .woocommerce a.checkout-button:hover,
body.woocommerce-cart .woocommerce a.checkout-button:focus,
body.woocommerce-cart .woocommerce a.checkout-button:active{
  color:#fff !important;
}

.hdaf-cartx-btn--primary:hover,
body.woocommerce-cart .woocommerce a.checkout-button:hover{
  background:var(--hdaf-checkout-accent-dark, #e85b00) !important;
}
