/* =============================================================
   cart-checkout-hard-update.css  — PawQuest
   SCOPE: mobile header, cart drawer, cart page.
   Checkout page CSS lives exclusively in checkout.css.
   ============================================================= */

/* ── Mobile header ───────────────────────────────────────────────────── */
.pq-header { z-index: 1000; }
.pq-header__inner { min-height: 72px; }
.pq-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.pq-cart-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--pq-border);
  background: #fff;
  border-radius: 999px;
  min-height: 42px;
  padding: 0 14px;
  box-shadow: 0 8px 24px rgba(17,34,25,.06);
  cursor: pointer;
}
.pq-cart-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--pq-orange, #f28c28);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

@media (max-width: 860px) {
  .pq-topbar__center,
  .pq-topbar__right,
  .pq-actions > a { display: none; }
  .pq-header__inner { min-height: 64px; gap: 10px; }
  .pq-nav-wrap { display: none; }
  .pq-logo img { max-width: 150px; }
  .pq-actions { margin-left: auto; }
  .pq-menu { display: inline-flex !important; }
  .pq-mobile {
    position: absolute;
    left: 12px; right: 12px;
    top: calc(100% + 8px);
    background: #fff;
    border: 1px solid var(--pq-border);
    border-radius: 22px;
    box-shadow: 0 18px 50px rgba(15,35,24,.16);
    padding: 12px;
    max-height: calc(100vh - 110px);
    overflow: auto;
  }
  .pq-mobile:not(.is-open) { display: none; }
  .pq-mobile-list { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
  .pq-mobile-list a { display: block; padding: 14px 16px; border-radius: 16px; font-weight: 800; color: var(--pq-ink); text-decoration: none; }
  .pq-mobile-list a:hover { background: #f4f8f4; }
}

/* ── Cart drawer ─────────────────────────────────────────────────────── */
.pq-cart-overlay {
  position: fixed; inset: 0;
  background: rgba(7,18,12,.48);
  backdrop-filter: blur(5px);
  opacity: 0; visibility: hidden;
  transition: .22s ease;
  z-index: 9998;
}
.pq-cart-drawer {
  position: fixed;
  top: 0; right: 0;
  width: min(430px, calc(100vw - 18px));
  height: 100dvh;
  background: #fff;
  border-left: 1px solid var(--pq-border);
  box-shadow: -28px 0 70px rgba(8,20,13,.22);
  transform: translateX(110%);
  transition: transform .28s ease;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  padding: 18px;
}
.admin-bar .pq-cart-drawer { top: 32px; height: calc(100dvh - 32px); }
body.pq-cart-open { overflow: hidden; }
body.pq-cart-open .pq-cart-overlay { opacity: 1; visibility: visible; }
body.pq-cart-open .pq-cart-drawer  { transform: translateX(0); }

.pq-cart-drawer__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--pq-border);
}
.pq-cart-drawer__head strong { font-size: 22px; letter-spacing: -.04em; }
.pq-cart-drawer__head button {
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--pq-border); background: #fff;
  font-size: 26px; line-height: 1; cursor: pointer;
}

.pq-mini-cart { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.pq-mini-cart .woocommerce-mini-cart { list-style: none; margin: 0; padding: 6px 0; overflow: auto; display: grid; gap: 6px; }
.pq-mini-cart .woocommerce-mini-cart-item {
  position: relative; display: grid; grid-template-columns: 74px 1fr;
  gap: 12px; min-height: 92px; padding: 12px 30px 12px 0;
  border-bottom: 1px solid rgba(36,61,44,.12);
}
.pq-mini-cart .woocommerce-mini-cart-item img {
  grid-row: 1 / 3; width: 74px !important; height: 74px !important;
  object-fit: contain; background: #f6faf6; border-radius: 16px; margin: 0 !important;
}
.pq-mini-cart .remove { position: absolute; right: 0; top: 14px; color: #b42318 !important; font-weight: 900; text-decoration: none !important; }
.pq-mini-cart .woocommerce-mini-cart-item a:not(.remove) { font-weight: 900; line-height: 1.25; color: var(--pq-ink); text-decoration: none; }
.pq-mini-cart .quantity { color: #657267; font-weight: 700; }
.pq-mini-cart .woocommerce-mini-cart__total {
  display: flex; justify-content: space-between; align-items: center;
  border-top: 1px solid var(--pq-border); padding: 16px 0 8px;
  margin-top: auto; font-size: 18px; font-weight: 950;
}
.pq-mini-cart .woocommerce-mini-cart__buttons { display: grid; gap: 10px; margin: 8px 0 0; }
.pq-mini-cart .woocommerce-mini-cart__buttons .button {
  width: 100%; min-height: 48px; border-radius: 999px !important;
  display: flex !important; align-items: center; justify-content: center; font-weight: 900 !important;
}
.pq-mini-cart .woocommerce-mini-cart__buttons .button:not(.checkout) {
  background: #f3f8f4 !important; color: var(--pq-green) !important; border: 1.5px solid var(--pq-border) !important;
}
.pq-mini-cart .woocommerce-mini-cart__buttons .checkout {
  background: var(--pq-green) !important; color: #fff !important; box-shadow: 0 12px 30px rgba(36,77,53,.24);
}
.pq-mini-cart .woocommerce-mini-cart__empty-message { margin: auto; text-align: center; font-weight: 850; color: #657267; }

/* ── Cart page ───────────────────────────────────────────────────────── */
.woocommerce-cart .pq-woo {
  border: 1px solid rgba(36,61,44,.16) !important;
  border-radius: 28px !important;
  background: #fff !important;
  box-shadow: 0 18px 55px rgba(17,34,25,.08) !important;
  padding: clamp(18px,3vw,42px) !important;
}
.woocommerce-cart h1 { font-size: clamp(38px,5vw,64px); letter-spacing: -.07em; margin-bottom: 18px; }
.woocommerce-cart table.cart { border: 0 !important; border-collapse: separate !important; border-spacing: 0 12px !important; }
.woocommerce-cart table.cart thead th { border: 0 !important; color: #66756b; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.woocommerce-cart table.cart td { border-top: 1px solid rgba(36,61,44,.12) !important; border-bottom: 1px solid rgba(36,61,44,.12) !important; padding: 18px 14px !important; vertical-align: middle; }
.woocommerce-cart table.cart td:first-child { border-left: 1px solid rgba(36,61,44,.12) !important; border-radius: 20px 0 0 20px; }
.woocommerce-cart table.cart td:last-child  { border-right: 1px solid rgba(36,61,44,.12) !important; border-radius: 0 20px 20px 0; }
.woocommerce-cart table.cart img { width: 86px !important; height: 86px !important; object-fit: contain; background: #f6faf6; border-radius: 18px; padding: 8px; }
.woocommerce-cart table.cart .product-name a { font-weight: 950; text-decoration: none; color: var(--pq-ink); }
.woocommerce-cart table.cart input.qty { width: 72px; height: 40px; border: 1px solid var(--pq-border); border-radius: 12px; text-align: center; font-weight: 800; }
.woocommerce-cart .coupon { display: flex; gap: 10px; flex-wrap: wrap; }
.woocommerce-cart .coupon .input-text { height: 46px; min-width: 240px; border-radius: 999px !important; border: 1px solid var(--pq-border) !important; padding: 0 18px !important; }
.woocommerce-cart .button { border-radius: 999px !important; font-weight: 900 !important; }
.woocommerce-cart button[name="update_cart"] { background: var(--pq-sand) !important; color: var(--pq-ink) !important; border: 1.5px solid var(--pq-border) !important; border-radius: 999px !important; font-weight: 800 !important; opacity: 1 !important; cursor: pointer; }
.woocommerce-cart button[name="update_cart"]:hover { border-color: var(--pq-green) !important; color: var(--pq-green) !important; }
.woocommerce-cart .cart-collaterals { display: flex; justify-content: flex-end; margin-top: 24px; }
.woocommerce-cart .cart_totals { width: min(480px,100%) !important; float: none !important; border: 1px solid rgba(36,61,44,.14); border-radius: 24px; padding: 18px; background: #fff; box-shadow: 0 16px 42px rgba(17,34,25,.07); }
.woocommerce-cart .cart_totals h2 { font-size: 26px; letter-spacing: -.04em; }
.woocommerce-cart .cart_totals table { border: 0 !important; }
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button { min-height: 58px; border-radius: 999px !important; background: var(--pq-green) !important; display: flex !important; align-items: center; justify-content: center; font-weight: 950 !important; }

@media (max-width: 760px) {
  .woocommerce-cart table.cart,
  .woocommerce-cart table.cart tbody,
  .woocommerce-cart table.cart tr,
  .woocommerce-cart table.cart td { display: block; width: 100%; }
  .woocommerce-cart table.cart thead { display: none; }
  .woocommerce-cart table.cart tbody tr { border: 1px solid rgba(36,61,44,.14); border-radius: 22px; margin-bottom: 12px; padding: 12px; }
  .woocommerce-cart table.cart td { border: 0 !important; padding: 8px !important; }
  .woocommerce-cart table.cart td:before { content: attr(data-title); display: block; color: #657267; font-size: 12px; font-weight: 900; text-transform: uppercase; margin-bottom: 4px; }
  .woocommerce-cart table.cart .product-thumbnail:before,
  .woocommerce-cart table.cart .product-remove:before { display: none; }
  .woocommerce-cart table.cart td:first-child,
  .woocommerce-cart table.cart td:last-child { border: 0 !important; border-radius: 0; }
  .woocommerce-cart .coupon .input-text { width: 100%; min-width: 0; }
  .woocommerce-cart .coupon .button,
  .woocommerce-cart table.cart button[name="update_cart"] { width: 100%; min-height: 46px; }
  .woocommerce-cart .cart-collaterals { display: block; }
  .woocommerce-cart .wc-proceed-to-checkout { position: sticky; bottom: 10px; z-index: 30; background: rgba(255,255,255,.92); backdrop-filter: blur(10px); padding: 10px; border-radius: 20px; }
}

/* ── Misc CRO helpers (shared across all pages) ──────────────────────── */
html.pq-scroll-locked,
body.pq-scroll-locked { overflow: hidden !important; touch-action: none !important; }

.pq-product-pill { position: absolute; top: 18px; left: 18px; z-index: 5; display: inline-flex; align-items: center; min-height: 28px; padding: 7px 11px; border-radius: 999px; background: #173f2a; color: #fff; font-size: 11px; font-weight: 950; box-shadow: 0 10px 24px rgba(17,34,25,.18); }
.pq-product-pill--sale     { background: #0d7be0; }
.pq-product-pill--featured { background: #244d35; }

.pq-single-sale-badge { display: inline-flex; align-items: center; width: max-content; margin: 0 0 10px; padding: 8px 13px; border-radius: 999px; background: #eaf4ff; color: #0d65b8; font-weight: 950; font-size: 13px; }

.woocommerce div.product p.stock,
.woocommerce div.product .stock { display: inline-flex !important; align-items: center; gap: 8px; color: #244d35 !important; font-weight: 900; }
.woocommerce div.product p.stock:before,
.woocommerce div.product .stock:before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: #1f8cff; animation: pqPulse 1.5s infinite; }
@keyframes pqPulse { 70% { box-shadow: 0 0 0 8px rgba(31,140,255,0); } 100% { box-shadow: 0 0 0 0 rgba(31,140,255,0); } }

.woocommerce div.product .reset_variations { display: none !important; }
.woocommerce ul.products li.product .star-rating { display: none !important; }
.woocommerce ul.products li.product .price del { color: #89958d !important; font-weight: 700 !important; }
.woocommerce ul.products li.product .price ins { text-decoration: none; color: #173f2a !important; }

.pq-cart-toggle.pq-is-adding,
.single_add_to_cart_button.pq-is-adding,
.ajax_add_to_cart.pq-is-adding { opacity: .72; pointer-events: none; }

@media (max-width: 560px) {
  .pq-header__inner { display: grid; grid-template-columns: auto 1fr auto; align-items: center; }
  .pq-logo img { max-width: 132px; }
  .pq-cart-toggle { min-width: 42px; padding: 0 10px; }
  .pq-cart-toggle span:not(.pq-cart-count) { display: none; }
  .pq-cart-drawer { width: 100vw !important; max-width: 100vw !important; border-left: 0; border-radius: 0; }
  .pq-product-pill { top: 12px; left: 12px; font-size: 10px; padding: 6px 9px; }
}
