.sidecart {
  position: fixed;
  inset: 0;
 z-index: 11000;
  pointer-events: none;

  --cc-primary: var(--cozzicotton-primary, #B89658);
  --cc-primary-hover: var(--cozzicotton-primary-hover, #947844);

  /* Used for rgba() effects (keeps theme consistent) */
  --cc-primary-rgb: 184, 150, 88;

  --cc-text: rgba(0, 0, 0, 0.88);
  --cc-muted: rgba(0, 0, 0, 0.62);
  --cc-border: rgba(0, 0, 0, 0.10);
--cc-border-soft: rgba(0, 0, 0, 0.06);
--cc-focus: 0 0 0 3px rgba(var(--cc-primary-rgb), 0.22);

  --cc-bg: #fbfaf8;
  --cc-card: #ffffff;

  --cc-radius: 18px;
  --cc-shadow: 0 14px 34px rgba(0, 0, 0, 0.14);
}

.sidecart.is-open { pointer-events: auto; }

.sidecart a { color: var(--cc-primary); }
.sidecart a:hover { color: var(--cc-primary-hover); }

/* Backdrop */
.sidecart-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.52);
  opacity: 0;
  transition: opacity 180ms ease;
}
.sidecart.is-open .sidecart-backdrop { opacity: 1; }

/* Drawer */
.sidecart-panel {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: 420px;
  max-width: 92vw;
  background: #fff;
  transform: translateX(102%);
  transition: transform 200ms ease;
  display: flex;
  flex-direction: column;
  box-shadow: var(--cc-shadow);
  border-left: 1px solid var(--cc-border-soft);

  border-top-left-radius: var(--cc-radius);
  border-bottom-left-radius: var(--cc-radius);
  overflow: hidden;
}
.sidecart.is-open .sidecart-panel { transform: translateX(0); }

/* Header */
.sidecart-header {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--cc-border-soft);
  background: linear-gradient(180deg, rgba(184,150,88,0.10), rgba(184,150,88,0.00));
}
.sidecart-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--cc-primary), rgba(184,150,88,0.20));
}

.sidecart-header strong {
  display: inline-block;
  font-size: 16px;
  font-weight: 900;
  color: var(--cc-text);
  letter-spacing: 0.2px;
}

.sidecart-header small {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 800;
  color: rgba(146, 64, 14, 0.95);
  background: rgba(184,150,88,0.16);
  border: 1px solid rgba(184,150,88,0.30);
}

.sidecart-close {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(184,150,88,0.16);
  border: 1px solid rgba(184,150,88,0.30);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  line-height: 1;
  color: rgba(0, 0, 0, 0.75);
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
}
.sidecart-close:hover {
  transform: scale(1.03);
  background: #fff;
  border-color: var(--cc-border);
}
.sidecart-close:focus { outline: none; box-shadow: var(--cc-focus); }

/* Flash */
.sidecart-flash {
  margin: 12px 16px 0;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13px;
  display: none;
  border: 1px solid var(--cc-border);
  background: rgba(0, 0, 0, 0.03);
  color: var(--cc-text);
}
.sidecart-flash.is-visible { display: block; }
.sidecart-flash.is-error {
  border-color: rgba(220, 53, 69, 0.28);
  background: rgba(220, 53, 69, 0.08);
}

/* Free shipping */
.sidecart-freeship {
  padding: 12px 16px 14px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
}

.sidecart-freeship-text {
  display: flex;
  align-items: center;
  gap: 10px;

  padding: 12px 12px;
  border-radius: 16px;

  background: rgba(var(--cc-primary-rgb), 0.13);
  border: 1px solid rgba(var(--cc-primary-rgb), 0.30);

  color: rgba(35, 20, 8, 0.92);
  font-weight: 900;
  font-size: 15px;
  line-height: 1.25;
  letter-spacing: 0.2px;

  box-shadow: 0 10px 20px rgba(var(--cc-primary-rgb), 0.12);
}

.sidecart-freeship-text::before {
  content: "🚚";
  font-size: 18px;
  line-height: 1;
}
/* Unlocked state */
.sidecart-freeship-text.sidecart-freeship-success {
  background: rgba(25, 135, 84, 0.12);
  border-color: rgba(25, 135, 84, 0.28);
  color: #0f5132;
}
.sidecart-freeship-text.sidecart-freeship-success::before {
  content: "✅";
}

.sidecart-progress {
  height: 12px;
  margin: 10px 0 0;

  border-radius: 999px;
  overflow: hidden;

  background: rgba(0, 0, 0, 0.08);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.10);
}

/* Fill */
.sidecart-progress .progress-bar {
    background: linear-gradient(90deg, var(--cozzicotton-primary), #caa15d);
    border-radius: 999px;

}


/* Body */
.sidecart-body {
  padding: 14px 18px 18px;
  overflow: auto;
  flex: 1;
  background: linear-gradient(180deg, rgba(0,0,0,0.02), rgba(0,0,0,0.00));
}

/* nicer scrollbar (chrome) */
.sidecart-body::-webkit-scrollbar { width: 10px; }
.sidecart-body::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.14);
  border-radius: 999px;
  border: 3px solid rgba(255,255,255,0.90);
}
.sidecart-body::-webkit-scrollbar-track { background: transparent; }

/* Line items */
.sidecart-lines { margin: 0; padding: 0; list-style: none; }

.sidecart-line {
  display: flex;
  gap: 12px;
  padding: 12px;
  margin: 10px 0;
  border: 1px solid var(--cc-border-soft);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.06);
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.sidecart-line:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.10);
}

.sidecart-line-media img {
  width: 64px;
  height: 78px;
  object-fit: cover;
  border-radius: 14px;
  display: block;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.sidecart-line-main {
  flex: 1;
  min-width: 0;
}

.sidecart-line-title {
  display: block;
  font-weight: 900;
  font-size: 13.5px;
  margin-bottom: 4px;
  color: var(--cc-text);
  line-height: 1.25;
}

.sidecart-line-attrs {
  font-size: 12.5px;
  color: var(--cc-muted);
  margin: 0 0 6px;
}

.sidecart-line-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 6px 0 8px;
}

.sidecart-line-price {
  font-size: 13px;
  font-weight: 900;
  color: rgba(0, 0, 0, 0.78);
}
/* --- Pricing (Retail vs Final) --- */
.sidecart-item-price,
.sidecart-line-prices{
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  margin-top: 6px;
}


.sidecart-price-old{
  color:#8a8a8a;
  text-decoration:line-through;
  font-weight:600;
  font-size:13px;
}

.sidecart-price-final,
.sidecart-price-new{
  font-weight: 800;
  font-size: 16px;
  color: var(--cc-text);
  white-space: nowrap;
}
/* --- Totals breakdown --- */
.sidecart-totals .sidecart-totals-row{
  margin-left:0;
  margin-right:0;
  padding:6px 0;
}
.sidecart-discount-row{
  color: var(--cozzicotton-primary, #B89658);
  font-weight:600;
}
/* Highlighted "Total to pay" row */
.sidecart-total-row.sidecart-total-highlight{
  margin-left: 0;
  margin-right: 0;
  margin-top: 12px;
  padding: 12px 10px;
  border-radius: 14px;
  border: 1px solid var(--cc-border-soft);
  background: rgba(var(--cc-primary-rgb), 0.08);
}

.sidecart-total-label{
  font-weight: 800;
  font-size: 16px;
  color: var(--cc-text);
  line-height: 1.1;
}

.sidecart-total-sub{
  margin-top: 3px;
  font-size: 12px;
  color: var(--cc-muted);
  line-height: 1.2;
}

.sidecart-total-amount{
  font-weight: 900;
  /* Use clamp so long currency amounts don't get clipped on narrow screens */
  font-size: clamp(16px, 4.8vw, 20px);
  color: var(--cc-primary);
  line-height: 1.1;
  /* Keep currency/amount on a single line (no mid-number wraps) */
  white-space: nowrap;
}


/* Quantity (− | qty | +) */
.sidecart-qty {
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: nowrap;
}

.qty-decrease,
.qty-increase,
.qty-input {
  height: 38px;
  border: 1px solid rgba(0, 0, 0, 0.16);
  background: #fff;
  font-size: 18px;
  line-height: 1;
}

.qty-decrease,
.qty-increase {
  width: 46px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(0, 0, 0, 0.80);
  background-image: none !important;
  transition: background 120ms ease, transform 120ms ease;
}

.qty-decrease:hover,
.qty-increase:hover {
  background: rgba(0, 0, 0, 0.03);
  transform: translateY(-1px);
}

.qty-decrease:focus,
.qty-increase:focus,
.qty-input:focus {
  outline: none;
  box-shadow: var(--cc-focus);
  position: relative;
  z-index: 2;
}

.qty-decrease {
  border-right: 0;
  border-top-left-radius: 12px;
  border-bottom-left-radius: 12px;
}

.qty-increase {
  border-left: 0;
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
}

.qty-input {
  width: 64px;
  text-align: center;
  font-size: 15px;
  font-weight: 900;
  border-left: 1px solid rgba(0, 0, 0, 0.14);
  border-right: 1px solid rgba(0, 0, 0, 0.14);
  border-radius: 0;
}

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


/* Remove */
.sidecart-remove {
  margin-left: auto;
  background: transparent;
  border: 0;
  color: rgba(0, 0, 0, 0.55);
  text-decoration: underline;
  cursor: pointer;
  font-size: 12.5px;
  padding: 8px 10px;
  border-radius: 10px;
}
.sidecart-remove:hover {
  color: rgba(0, 0, 0, 0.78);
  background: rgba(0, 0, 0, 0.03);
}
.sidecart .btn-primary:hover,
.sidecart .btn-primary:focus,
.sidecart button.btn-primary:hover,
.sidecart a.btn-primary:hover {
  background-color: var(--cc-primary-hover) !important;
  border-color: var(--cc-primary-hover) !important;
}

/* Voucher */
.sidecart-voucher {
  margin-top: 14px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--cc-border-soft);
  background: rgba(255,255,255,0.85);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.05);
}

.sidecart-voucher-label {
  display: block;
  font-size: 13px;
  font-weight: 900;
  margin: 0 0 8px;
  color: rgba(0, 0, 0, 0.78);
}

.sidecart-voucher-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.sidecart-voucher-row .form-control,
.sidecart-voucher-row input[type="text"] {
  flex: 1;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.14);
  padding: 0 12px;
  font-size: 13px;
}
.sidecart-voucher-row .form-control:focus,
.sidecart-voucher-row input[type="text"]:focus {
  outline: none;
  box-shadow: var(--cc-focus);
  border-color: rgba(0, 0, 0, 0.22);
}

.sidecart-voucher-errors {
  margin-top: 10px;
  font-size: 12.5px;
  color: rgba(220, 53, 69, 0.95);
  font-weight: 800;
}

.sidecart-voucher-list { margin: 12px 0 0; padding: 0; }
.sidecart-voucher-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.08);
  background: #fff;
  margin-top: 8px;
}
.sidecart-voucher-item .code {
  font-weight: 900;
  color: rgba(0,0,0,0.75);
}

/* Footer (fix checkout spacing + make CTA bar look premium) */
.sidecart-footer {
  padding: 10px 12px 12px;           /* smaller footer */
  border-top: 1px solid #efefef;
  background: #fff;
  box-shadow: 0 -10px 18px rgba(0, 0, 0, 0.06);
  z-index: 2;
}
/* On very small screens, stack the highlighted total row so amounts never clip */
@media (max-width: 420px) {
  .sidecart-total-row.sidecart-total-highlight .col-xs-7,
  .sidecart-total-row.sidecart-total-highlight .col-xs-5 {
    width: 100%;
    float: none;
  }

  .sidecart-total-row.sidecart-total-highlight .col-xs-5 {
    margin-top: 8px;
  }
}

.sidecart-totals .row { margin: 0 0 8px; }

.sidecart-totals .col-xs-6,
.sidecart-totals .col-xs-7,
.sidecart-totals .col-xs-5 { padding: 0; font-size: 13px; color: var(--cc-muted); }

.sidecart-totals .text-right { color: rgba(0, 0, 0, 0.86); font-weight: 900; white-space: nowrap; }




/* View cart link */
.sidecart-viewcart {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 4px 0 4px;;
  font-size: 13px;
  font-weight: 900;
  color: var(--cc-primary) !important;
  text-decoration: none !important;
}
.sidecart-viewcart:hover { text-decoration: underline !important; }
.sidecart-viewcart::after { content: "→"; font-weight: 900; }

/* Buttons overrides (Bootstrap gradient killer) */
.sidecart .btn,
.sidecart a.btn,
.sidecart button.btn {
  border-radius: 14px !important;
  background-image: none !important;
}

.sidecart .btn-primary,
.sidecart a.btn-primary,
.sidecart button.btn-primary {
  background: var(--cc-primary) !important;
  background-image: none !important;
  border-color: var(--cc-primary) !important;
  color: #fff !important;
  font-weight: 900;
  height: 50px;
  padding: 0 16px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.16);
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.sidecart .btn-primary:hover,
.sidecart a.btn-primary:hover,
.sidecart button.btn-primary:hover,
.sidecart .btn-primary:focus,
.sidecart a.btn-primary:focus,
.sidecart button.btn-primary:focus {
  background: var(--cc-primary-hover) !important;
  background-image: none !important;
  border-color: var(--cc-primary-hover) !important;
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.20);
  outline: none;
}

.sidecart .cc-trust-strip{
  margin: 8px 0 10px;
  padding: 10px 10px;
  border: 1px solid rgba(184,150,88,0.22);
  border-radius: 14px;
  background: rgba(184,150,88,0.06);
  color: #111827;
  font-size: 12px;
  line-height: 1.2;
}

/* Collapsible mode header stays (no JS) */
.sidecart .cc-trust-details{ margin: 0; }
.sidecart .cc-trust-details__summary{
  cursor: pointer;
  font-weight: 900;
  list-style: none;
  outline: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 2px 0 8px;
  color: rgba(0,0,0,0.62);
}
.sidecart .cc-trust-details__summary::-webkit-details-marker{ display: none; }
.sidecart .cc-trust-details__summary:after{
  content: "▾";
  opacity: 0.6;
  font-weight: 900;
}
.sidecart details[open] .cc-trust-details__summary:after{ content: "▴"; }
.sidecart .cc-trust-details__summary .cc-ar{
  direction: rtl;
  unicode-bidi: isolate;
  text-align: right;
  font-weight: 900;
}

/* Benefit cards list */
.sidecart .cc-trust-strip__list{
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.sidecart .cc-trust-strip__item{
  position: relative;
  padding: 8px 10px 8px 34px;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 12px;
  background: #fff;
}
.sidecart .cc-trust-strip__item:before{
  content: "";
  position: absolute;
  left: 10px;
  top: 10px;
  width: 16px;
  height: 16px;
  background-color: var(--cozzicotton-primary, #B89658);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
  opacity: 0.95;
}

/* Icon per item */
.sidecart .cc-trust-strip__item:nth-child(1):before{
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 7a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v1H3V7zm0 3h18v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-9zm12 4h5v2h-5v-2z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 7a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v1H3V7zm0 3h18v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-9zm12 4h5v2h-5v-2z'/%3E%3C/svg%3E");
}
.sidecart .cc-trust-strip__item:nth-child(2):before{
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M17.65 6.35A7.95 7.95 0 0 0 12 4V1L7 6l5 5V7a6 6 0 1 1-6 6H4a8 8 0 1 0 13.65-6.65z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M17.65 6.35A7.95 7.95 0 0 0 12 4V1L7 6l5 5V7a6 6 0 1 1-6 6H4a8 8 0 1 0 13.65-6.65z'/%3E%3C/svg%3E");
}
.sidecart .cc-trust-strip__item:nth-child(3):before{
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 10 10A10 10 0 0 0 12 2zm1 11h4v-2h-3V6h-2v7z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 10 10A10 10 0 0 0 12 2zm1 11h4v-2h-3V6h-2v7z'/%3E%3C/svg%3E");
}

/* EN + AR readable (AR on its own line) */
.sidecart .cc-trust-strip__item .cc-en{
  display: block;
  font-weight: 900;
  color: rgba(0,0,0,0.70);
}
.sidecart .cc-trust-strip__item .cc-ar{
  display: block;
  margin-top: 2px;
  direction: rtl;
  text-align: right;
  font-weight: 900;
  color: rgba(0,0,0,0.56);
}
.sidecart .cc-trust-strip__link{
  font-weight: 900;
  color: var(--cozzicotton-primary, #B89658);
  text-decoration: underline;
}
/* Prevent the open accordion from stealing all vertical space */
.sidecart .cc-trust-details[open] > .cc-trust-strip__list{
  max-height: 100px;
  overflow: auto;
  padding-right: 10px;
}

/* specifically the checkout button: give perfect spacing */
.sidecart-checkout {
  margin-top: 4px !important;
}
.sidecart-checkout::after {
  content: "→";
  margin-left: 10px;
  font-weight: 900;
  opacity: 0.95;
}

/* Secondary (Apply) */
.sidecart .btn-secondary,
.sidecart a.btn-secondary,
.sidecart button.btn-secondary {
  height: 40px;
  padding: 0 14px;
  font-weight: 900;
  background: rgba(184, 150, 88, 0.10) !important;
  border: 1px solid rgba(184, 150, 88, 0.40) !important;
  color: rgba(146, 64, 14, 0.95) !important;
  background-image: none !important;
}
.sidecart .btn-secondary:hover,
.sidecart a.btn-secondary:hover,
.sidecart button.btn-secondary:hover {
  background: rgba(184, 150, 88, 0.16) !important;
  border-color: rgba(184, 150, 88, 0.55) !important;
}

/* Empty state */
.sidecart-empty {
  padding: 28px 18px;
  text-align: center;
  color: var(--cc-muted);
}
.sidecart-empty p { margin: 0; font-weight: 800; }

/* Disabled inside drawer */
.sidecart .btn[disabled],
.sidecart button[disabled],
.sidecart a.disabled,
.sidecart .btn.disabled {
  opacity: 0.60 !important;
  cursor: not-allowed !important;
  transform: none !important;
  box-shadow: none !important;
}

/* Shipping visibility note (Phase B - Step 1) */
.sidecart .cc-shipping-note{
  margin: 2px 0 6px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--cc-border-soft);
  background: #fcfbf9;
  color: var(--cc-muted);
  font-size: 11.5px;
  line-height: 1.2;
  font-weight: 800;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.sidecart .cc-shipping-note:before{
  content: "";
  width: 24px;
  height: 24px;
  border-radius: 9px;
  border: 1px solid var(--cc-border-soft);
  background: #fff;
  flex: 0 0 auto;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23B89658' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 7h12v10H3z'/%3E%3Cpath d='M15 10h4l2 2v5h-6z'/%3E%3Ccircle cx='7' cy='19' r='2'/%3E%3Ccircle cx='17' cy='19' r='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 14px 14px;
}

.sidecart .cc-shipping-note .cc-ar{
  display:block;
  margin-top: 3px;
  direction: rtl;
  text-align: right;
  font-weight: 900;
  color: #6b7280;
}

/* Tablet */
/* Tablet */
@media (max-width: 991px) {
  /* Keep drawer not full width, but comfortable */
  .sidecart-panel { width: 420px; max-width: 88vw; }
  .sidecart-line-media img { width: 62px; height: 62px; }
}

/* Mobile */
@media (max-width: 767px) {
  /* More page visible behind drawer */
  .sidecart-panel { width: 420px; max-width: 76vw; }

  .sidecart-line-media img { width: 58px; height: 58px; }


  /* ✅ Fix: make "Remove" always visible/clickable */
  .sidecart-qty {
    flex-wrap: wrap;          /* allow Remove to go to next line */
  }

  .sidecart-remove {
    margin-left: 0;           /* cancel pushing it to the far right */
    flex: 1 0 100%;           /* take full row */
    width: 100%;
    text-align: center;
    padding: 6px 0 0;         /* tighter on mobile */
  }
}

/* Extra small phones (e.g., iPhone SE): make prices + controls fit comfortably */
@media (max-width: 420px) {
  /* Give the drawer a bit more breathing room on tiny screens */
  .sidecart-panel { max-width: 90vw; }
  /*
    Critical fix (iPhone SE):
    Footer can grow too tall (totals + notes + trust + CTAs) which makes sidecart-body shrink to 0.
    We cap footer height, make it internally scrollable, and keep the Checkout CTA sticky.
  */
  .sidecart-body{
    min-height: 220px; /* ensures products are visible */
    padding: 12px 12px 12px;
  }

  .sidecart-footer{
    padding: 10px 12px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
    gap: 6px;
    max-height: 44vh;              /* leaves enough room for products list */
    overflow: auto;               /* scroll footer content instead of eating the whole drawer */
    -webkit-overflow-scrolling: touch;
  }

  .sidecart-totals .row{ margin: 0 0 6px; }

  /* Keep the main CTA always reachable even when footer scrolls */
  .sidecart-checkout{
    position: sticky;
    bottom: calc(env(safe-area-inset-bottom));
    z-index: 2;
  }

  /* Slightly tighten CTA sizing on tiny screens */
  .sidecart .btn-primary,
  .sidecart a.btn-primary{
    height: 46px;
    font-size: 14px;
  }

  /* Slightly smaller media to free space for prices + qty controls */
  .sidecart-line { padding: 10px; gap: 10px; }
  .sidecart-line-media img { width: 54px; height: 54px; }

  /* Prices: tighter spacing but still readable */
  .sidecart-line-prices { gap: 6px 10px; margin-top: 4px; }
  .sidecart-price-new { font-size: 15px; }
  .sidecart-price-old { font-size: 12.5px; }

  /* Qty controls: slightly smaller so buttons/icons don't look cramped */
  .qty-decrease,
  .qty-increase,
  .qty-input { height: 34px; }

  .qty-decrease,
  .qty-increase { width: 40px; font-size: 16px; }

  .qty-input { width: 54px; font-size: 14px; }
}


:root{
  --cc-primary: var(--cozzicotton-primary, #B89658);
  --cc-primary-hover: var(--cozzicotton-primary-hover, #947844);
  --cc-primary-rgb: 184,150,88;

  --cc-text:#1b1b1b;
  --cc-muted:#6b6b6b;

  --cc-border-soft: rgba(0,0,0,0.09);
  --cc-border: rgba(0,0,0,0.14);

  --cc-bg:#fff;
  --cc-bg-soft:#f6f4f0;

  --cc-shadow:0 12px 30px rgba(0,0,0,0.14);
  --cc-radius:18px;
}
/* =====================================================================
   Sidecart footer v2 (clean totals + 2 action buttons like quick-cart)
   ===================================================================== */

/* Footer becomes a column: scrollable info + fixed action row */
.sidecart-footer{
  padding: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.sidecart-footer-inner{
  padding: 10px 12px 8px;
}

/* Total card: old retail (striked) + final (bold) */
.sidecart-total-card{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(var(--cc-primary-rgb), 0.22);
  background: rgba(var(--cc-primary-rgb), 0.06);
}
.sidecart-total-label{ font-weight: 1000; color: rgba(0,0,0,0.85); }
.sidecart-total-sub{ font-size: 12px; color: rgba(0,0,0,0.55); margin-top: 2px; }
.sidecart-total-right{ text-align: right; white-space: nowrap; }
.sidecart-total-old{
  font-size: 12px;
  color: rgba(0,0,0,0.45);
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  margin-bottom: 2px;
}
.sidecart-total-new{ font-size: 18px; font-weight: 1000; color: rgba(0,0,0,0.86); }

/* Shipping note: compact, readable */
.sidecart-footer .cc-shipping-note{
  margin-top: 8px;
}

/* Action bar: 2 buttons side-by-side */
.sidecart-actions{
  display: flex;
  gap: 10px;
  padding: 12px;
  border-top: 1px solid #efefef;
  background: #fff;
  /* keep visible when footer content grows */
  position: sticky;
  bottom: 0;
  z-index: 3;
}

.sidecart-actions .sidecart-action{
  flex: 1;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px !important;
  font-weight: 1000;
  text-decoration: none !important;
}

/* Override the global .sidecart .btn-primary { width:100% } */
.sidecart-actions .btn,
.sidecart-actions .btn-primary,
.sidecart-actions .btn-default{
  width: auto !important;
  margin: 0 !important;
}

.sidecart-actions .sidecart-action-viewcart{
  background: rgba(0,0,0,0.04) !important;
  border: 1px solid rgba(0,0,0,0.10) !important;
  color: var(--cozzicotton-primary) !important;
  box-shadow: none !important;
}
.sidecart-actions .sidecart-action-viewcart:hover{
  background: rgba(0,0,0,0.06) !important;
}

.sidecart-actions .sidecart-action-checkout{
  /* keep the premium look but avoid huge shadow */
  box-shadow: 0 10px 20px rgba(0,0,0,0.14) !important;
}

/* Checkout arrow spacing when used inside the action bar */
.sidecart-actions .sidecart-checkout{ margin-top: 0 !important; }

/* Make the accordion (Delivery & exchange) slightly tighter in sidecart */
.sidecart .cc-trust-strip--sidecart .cc-trust-details__summary{
  padding: 0 0 6px;
}
.sidecart .cc-trust-strip--sidecart .cc-trust-strip__list li{
  padding: 8px 0;
}

/* Mobile: allow the info area to scroll, keep actions always visible */
@media (max-width: 767px){
  .sidecart-footer-inner{
    max-height: 44vh;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }
}
/* =====================================================================
   Sidecart polish v3 — smaller CTAs, stronger Total card,
   bigger striked price, better chevron for Delivery & exchange
   Paste at END of static/oscar/css/sidecart.css
   ===================================================================== */

/* 1) Make the 2 CTA buttons smaller + more premium (like quick cart) */
.sidecart-actions{
  gap: 8px !important;
  padding: 10px 12px !important;
}

.sidecart-actions .sidecart-action{
  height: 42px !important;              /* smaller than before */
  border-radius: 12px !important;
  font-size: 14px !important;
  font-weight: 900 !important;
  letter-spacing: 0.1px;
}

/* reduce the heavy shadow on checkout button inside sidecart footer */
.sidecart-actions .sidecart-action-checkout{
  box-shadow: 0 10px 18px rgba(0,0,0,0.12) !important;
}

/* view cart should look like a clean secondary */
.sidecart-actions .sidecart-action-viewcart{
  background: rgba(0,0,0,0.03) !important;
  border: 1px solid rgba(0,0,0,0.10) !important;
}

/* 2) Make “Total to pay” card more catchy + structured */
.sidecart-total-card{
  position: relative;
  overflow: hidden;
  border-radius: 16px !important;
  border: 1px solid rgba(var(--cc-primary-rgb), 0.22) !important;
  background: #fff !important;
  box-shadow: 0 10px 22px rgba(0,0,0,0.10) !important;
  padding: 12px 12px 12px 14px !important;
}

/* subtle premium accent bar */
.sidecart-total-card:before{
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 4px;
  border-radius: 4px;
  background: var(--cc-primary);
  opacity: 0.95;
}

.sidecart-total-label{
  font-size: 14px !important;
  font-weight: 1000 !important;
  color: rgba(0,0,0,0.86) !important;
}

.sidecart-total-sub{
  font-size: 12px !important;
  font-weight: 800 !important;
  color: rgba(0,0,0,0.50) !important;
}

/* 3) Make the striked old price CLEAR (it’s too small currently) */
.sidecart-total-old{
  font-size: 13.5px !important;
  font-weight: 900 !important;
  color: rgba(0,0,0,0.48) !important;
  text-decoration-thickness: 2px !important;
  text-decoration-color: rgba(0,0,0,0.35) !important;
  margin-bottom: 2px !important;
}

/* final price bigger + stronger */
.sidecart-total-new{
  font-size: 20px !important;
  font-weight: 1100 !important;
  color: var(--cozzicotton-gold) !important;
}

/* 4) Make “Delivery & exchange” chevron more visible + modern */
.sidecart .cc-trust-details__summary{
  padding: 10px 10px !important;
  border-radius: 12px !important;
  border: 1px solid rgba(0,0,0,0.08) !important;
  background: rgba(0,0,0,0.02) !important;
  color: rgba(0,0,0,0.72) !important;
}

.sidecart .cc-trust-details__summary:after{
  content: "›" !important;                 /* overwrite ▾ / ▴ */
  font-size: 18px !important;
  opacity: 0.85 !important;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(var(--cc-primary-rgb), 0.14);
  color: rgba(0,0,0,0.75);
  transform: rotate(90deg);                /* points down */
  transition: transform 140ms ease, background 140ms ease;
}

.sidecart details[open] .cc-trust-details__summary:after{
  content: "›" !important;
  transform: rotate(-90deg);               /* points up */
  background: rgba(var(--cc-primary-rgb), 0.20);
}

/* optional: tighten the accordion list spacing a bit */
.sidecart .cc-trust-strip__list{ gap: 7px !important; }
.sidecart .cc-trust-strip__item{ padding: 8px 10px 8px 34px !important; }

