/** Campina Checkout v0.3.0 — global cart trigger + cart drawer. */
:root {
  --cc-drawer-accent: #f45b61;
  --cc-drawer-accent-text: #fff;
  --cc-drawer-surface: #fff;
  --cc-drawer-text: #2b2b2b;
  --cc-drawer-muted: #777;
  --cc-drawer-border: #ececec;
  --cc-drawer-soft: #f7f7f7;
}
.campina-cart-trigger-module { display:inline-block; position:relative; }
.campina-cart-trigger-module .hikashop_checkout_loading_elem,
.campina-cart-trigger-module .hikashop_checkout_loading_spinner { pointer-events:none; }
.campina-cart-trigger {
  position:relative; display:inline-flex; align-items:center; justify-content:center; gap:7px;
  min-width:44px; min-height:44px; padding:4px; margin:0; border:0; background:transparent;
  color:inherit; font:inherit; cursor:pointer; box-shadow:none; appearance:none;
}
.campina-cart-trigger-icon { width:30px; height:30px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.campina-cart-trigger-icon-img { display:block; width:auto; max-width:40px; height:34px; object-fit:contain; }
.campina-cart-trigger-count {
  position:absolute; inset-block-start:-2px; inset-inline-start:-4px; min-width:20px; height:20px; padding:0 5px;
  display:flex; align-items:center; justify-content:center; border-radius:999px;
  background:var(--cc-drawer-accent); color:var(--cc-drawer-accent-text); font-size:11px; line-height:1; font-weight:700;
  box-shadow:0 0 0 2px var(--cc-drawer-surface);
}
.campina-cart-trigger-count:empty { display:none; }
.campina-cart-trigger-label { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.campina-cart-drawer-source { display:none !important; }
.campina-cart-drawer-shell {
  position:fixed; inset:0; z-index:100050; pointer-events:none; direction:rtl;
  font-family:inherit; color:var(--cc-drawer-text);
}
.campina-cart-drawer-shell[aria-hidden="true"] { visibility:hidden; }
.campina-cart-drawer-shell.is-open { pointer-events:auto; visibility:visible; }
.campina-cart-drawer-backdrop {
  position:absolute; inset:0; display:block; width:100%; height:100%; padding:0; border:0; margin:0;
  background:rgba(0,0,0,.62); opacity:0; transition:opacity .22s ease; cursor:default;
}
.campina-cart-drawer-shell.is-open .campina-cart-drawer-backdrop { opacity:1; }
.campina-cart-drawer {
  position:absolute; top:0; bottom:0; left:0; right:auto; width:min(420px, 92vw); max-width:100%;
  display:grid; grid-template-rows:auto minmax(0,1fr) auto; background:var(--cc-drawer-surface);
  box-shadow:8px 0 35px rgba(0,0,0,.18); transform:translateX(-104%); transition:transform .24s ease;
  outline:none; overflow:hidden;
}
.campina-cart-drawer-shell.is-open .campina-cart-drawer { transform:translateX(0); }
.campina-cart-drawer-header {
  display:flex; flex-direction:row; align-items:center; justify-content:space-between; min-height:68px;
  padding:14px 18px; border-bottom:1px solid var(--cc-drawer-border); background:var(--cc-drawer-surface);
}
.campina-cart-drawer-header h2 { margin:0; font:700 20px/1.6 inherit; color:inherit; }
.campina-cart-drawer-close {
  order:-1; width:40px; height:40px; display:flex; align-items:center; justify-content:center;
  padding:0; border:0; background:transparent; color:inherit; font:300 30px/1 inherit; cursor:pointer; border-radius:50%;
}
.campina-cart-drawer-close:hover { background:var(--cc-drawer-soft); }
.campina-cart-drawer-body { min-height:0; overflow:auto; overscroll-behavior:contain; background:var(--cc-drawer-surface); }
.campina-cart-drawer-items { padding:0 18px; }
.campina-cart-drawer-item {
  position:relative; display:grid; grid-template-columns:82px minmax(0,1fr); gap:13px; padding:20px 0;
  border-bottom:1px solid var(--cc-drawer-border); min-width:0;
}
.campina-cart-drawer-image {
  width:82px; height:82px; display:flex; align-items:center; justify-content:center; border-radius:10px;
  background:var(--cc-drawer-soft); overflow:hidden;
}
.campina-cart-drawer-image img { width:100%; height:100%; object-fit:contain; }
.campina-cart-drawer-item-main { min-width:0; padding-inline-end:25px; }
.campina-cart-drawer-name { display:block; color:inherit; text-decoration:none; font-size:14px; font-weight:600; line-height:1.9; overflow-wrap:anywhere; }
.campina-cart-drawer-name:hover { color:var(--cc-drawer-accent); }
.campina-cart-drawer-code,
.campina-cart-drawer-option { display:block; margin-top:3px; color:var(--cc-drawer-muted); font-size:11px; line-height:1.7; overflow-wrap:anywhere; }
.campina-cart-drawer-item-bottom { display:flex; align-items:flex-end; justify-content:space-between; gap:10px; margin-top:11px; }
.campina-cart-drawer-price { color:var(--cc-drawer-accent); font-size:13px; font-weight:700; text-align:left; white-space:normal; }
.campina-cart-drawer-price .hikashop_product_price_full,
.campina-cart-drawer-price .hikashop_product_price { color:inherit; font-size:inherit; }
.campina-cart-drawer-delete {
  position:absolute; inset-block-start:18px; inset-inline-end:0; width:28px; height:28px;
  display:flex; align-items:center; justify-content:center; border-radius:50%; color:#777; text-decoration:none;
  background:transparent; font:300 22px/1 inherit;
}
.campina-cart-drawer-delete:hover { color:var(--cc-drawer-accent); background:var(--cc-drawer-soft); }
.campina-cart-drawer-quantity { min-width:98px; }
.campina-cart-drawer-quantity .hikashop_product_quantity_div { margin:0; float:none; width:auto; }
.campina-cart-drawer-quantity :is(input:not([type="hidden"]),select) {
  min-height:38px; max-width:100px; border:1px solid var(--cc-drawer-border); border-radius:8px; text-align:center; background:#fff; color:inherit;
}
.campina-drawer-quantity-control {
  display:flex; direction:ltr; width:104px; height:38px; align-items:stretch; border:1px solid var(--cc-drawer-border); border-radius:8px; overflow:hidden; background:#fff;
}
.campina-drawer-quantity-control button { width:34px; padding:0; border:0; background:var(--cc-drawer-soft); color:inherit; font-size:20px; cursor:pointer; }
.campina-drawer-quantity-control output { flex:1; display:flex; align-items:center; justify-content:center; min-width:30px; font-size:13px; }
.campina-drawer-quantity-control button:disabled { opacity:.38; cursor:not-allowed; }
.campina-cart-drawer-quantity select[data-cc-drawer-enhanced] { display:none !important; }
.campina-cart-drawer-footer {
  padding:15px 18px 18px; border-top:1px solid var(--cc-drawer-border); background:var(--cc-drawer-surface);
  box-shadow:0 -8px 22px rgba(0,0,0,.035);
}
.campina-cart-drawer-total { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:4px 0 13px; font-size:15px; }
.campina-cart-drawer-total strong { color:var(--cc-drawer-accent); font-size:16px; }
.campina-cart-drawer-view,
.campina-cart-drawer-checkout { display:flex; align-items:center; justify-content:center; min-height:48px; border-radius:4px; text-decoration:none; font-weight:700; font-size:14px; }
.campina-cart-drawer-view { margin-bottom:10px; background:var(--cc-drawer-soft); color:inherit; border:1px solid transparent; }
.campina-cart-drawer-checkout { background:var(--cc-drawer-accent); color:var(--cc-drawer-accent-text); }
.campina-cart-drawer-view:hover { border-color:var(--cc-drawer-border); color:inherit; }
.campina-cart-drawer-checkout:hover { filter:brightness(.97); color:var(--cc-drawer-accent-text); }
.campina-cart-drawer-empty { min-height:300px; padding:50px 24px; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; color:var(--cc-drawer-muted); }
.campina-cart-drawer-empty svg { width:52px; height:52px; margin-bottom:14px; fill:none; stroke:currentColor; stroke-width:1.5; }
.campina-cart-drawer-empty strong { color:var(--cc-drawer-text); font-size:16px; margin-bottom:6px; }
.campina-cart-drawer-empty span { font-size:12px; line-height:1.9; }
body.campina-cart-drawer-open { overflow:hidden !important; }
/* Suppress only success metro notices during a confirmed add-to-cart; errors stay visible. */
body.campina-cartnotify-success-window .notifyjs-metro-success,
body.campina-cartnotify-success-window .notifyjs-metro-base,
body.campina-cartnotify-success-window .notifyjs-wrapper:has(.notifyjs-metro-base) { display:none !important; }
@media (max-width:600px) {
  .campina-cart-drawer { width:min(94vw, 420px); }
  .campina-cart-drawer-header { min-height:60px; padding:11px 14px; }
  .campina-cart-drawer-items { padding:0 14px; }
  .campina-cart-drawer-item { grid-template-columns:72px minmax(0,1fr); gap:10px; padding:16px 0; }
  .campina-cart-drawer-image { width:72px; height:72px; }
  .campina-cart-drawer-footer { padding:13px 14px 16px; }
  .campina-cart-trigger-icon-img { max-width:37px; height:32px; }
}
@media (prefers-reduced-motion:reduce) {
  .campina-cart-drawer,.campina-cart-drawer-backdrop { transition:none !important; }
}
