/* ============================================================
   CART DRAWER
   ============================================================ */
.bws-cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 1100;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s, visibility .25s;
}
.bws-cart-overlay.is-open { opacity: 1; visibility: visible; }

.bws-cart-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(400px, 100vw);
  background: #100d08;
  border-left: 1px solid rgba(214,158,60,.2);
  z-index: 1101;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .28s cubic-bezier(.4,0,.2,1);
  box-shadow: -8px 0 40px rgba(0,0,0,.5);
}
.bws-cart-drawer.is-open { transform: translateX(0); }
body.bws-cart-open { overflow: hidden; }

.bws-cart-drawer__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(214,158,60,.14);
  flex-shrink: 0;
}
.bws-cart-drawer__title {
  font-size: 18px; font-weight: 700; color: #f0c060;
  margin: 0; display: flex; align-items: center; gap: 8px;
}
.bws-cart-drawer__icon { font-size: 20px; }
.bws-cart-drawer__close {
  background: none; border: none; color: #aaa;
  font-size: 26px; cursor: pointer; line-height: 1; padding: 0 4px;
  border-radius: 4px; transition: color .15s;
}
.bws-cart-drawer__close:hover { color: #fff; }

.bws-cart-drawer__body {
  flex: 1; overflow-y: auto; padding: 14px 16px;
  display: flex; flex-direction: column; gap: 12px;
}

.bws-cart-loading {
  text-align: center; color: #888; padding: 40px 0; font-size: 14px;
}
.bws-cart-empty {
  display: flex; flex-direction: column; align-items: center;
  gap: 10px; padding: 48px 20px; text-align: center; color: #aaa;
}
.bws-cart-empty__icon { font-size: 48px; opacity: .4; }
.bws-cart-empty__link { color: #d4a93a; font-size: 14px; text-decoration: underline; }

.bws-cart-item {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 10px; padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.bws-cart-item:last-child { border-bottom: none; }
.bws-cart-item__img {
  width: 64px; height: 64px;
  background: rgba(255,255,255,.05);
  border-radius: 6px; overflow: hidden;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.bws-cart-item__img img { width: 100%; height: 100%; object-fit: cover; }
.bws-cart-item__no-img { font-size: 24px; opacity: .3; }
.bws-cart-item__info { min-width: 0; }
.bws-cart-item__name {
  font-size: 13px; color: #e8dcc8; margin: 0 0 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bws-cart-item__vendor { font-size: 11px; color: #888; margin: 0 0 6px; }
.bws-cart-item__controls { display: flex; align-items: center; gap: 8px; }
.bws-cart-qty-btn {
  width: 24px; height: 24px; border-radius: 50%;
  border: 1px solid rgba(214,158,60,.3); background: transparent;
  color: #d4a93a; font-size: 16px; cursor: pointer;
  display: grid; place-items: center; line-height: 1;
  transition: background .15s, border-color .15s;
}
.bws-cart-qty-btn:hover { background: rgba(214,158,60,.12); border-color: #d4a93a; }
.bws-cart-qty { font-size: 14px; color: #e8dcc8; min-width: 18px; text-align: center; }
.bws-cart-item__right {
  display: flex; flex-direction: column; align-items: flex-end; gap: 6px;
}
.bws-cart-item__price { font-size: 14px; font-weight: 700; color: #f0c060; white-space: nowrap; }
.bws-cart-item__remove {
  background: none; border: none; color: #666;
  font-size: 12px; cursor: pointer; padding: 2px; transition: color .15s;
}
.bws-cart-item__remove:hover { color: #e07070; }

.bws-cart-drawer__foot {
  padding: 14px 16px; border-top: 1px solid rgba(214,158,60,.14);
  flex-shrink: 0; display: flex; flex-direction: column; gap: 10px;
}
.bws-cart-drawer__impact {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px;
  background: rgba(214,158,60,.08); border: 1px solid rgba(214,158,60,.18);
  border-radius: 8px; font-size: 12px; color: #d4a93a;
}
.bws-cart-drawer__impact strong { font-size: 14px; }
.bws-cart-drawer__totals {
  display: flex; justify-content: space-between;
  font-size: 15px; color: #e8dcc8; font-weight: 600;
}
.bws-cart-drawer__checkout-btn {
  display: block; width: 100%; padding: 13px;
  background: linear-gradient(135deg, #d4a93a, #f0c060);
  color: #000; font-weight: 800; font-size: 15px;
  text-align: center; border-radius: 8px; text-decoration: none;
  transition: opacity .18s, transform .15s;
}
.bws-cart-drawer__checkout-btn:hover { opacity: .9; transform: translateY(-1px); }

/* ============================================================
   CART PAGE
   ============================================================ */
.cart-page-shell { max-width: 1100px; margin: 0 auto; padding: 24px 20px 60px; }
.cart-page-header {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 24px; flex-wrap: wrap; gap: 10px;
}
.cart-page-title {
  font-size: clamp(22px, 4vw, 32px);
  font-family: var(--font-display); color: #f0c060; margin: 0;
}
.cart-continue-link { color: #d4a93a; font-size: 14px; text-decoration: none; opacity: .8; }
.cart-continue-link:hover { opacity: 1; text-decoration: underline; }

.cart-page-state {
  display: flex; flex-direction: column; align-items: center;
  gap: 14px; padding: 64px 20px; color: #aaa; text-align: center;
}
.cart-spinner {
  width: 36px; height: 36px;
  border: 3px solid rgba(214,158,60,.2); border-top-color: #d4a93a;
  border-radius: 50%; animation: cartSpin .7s linear infinite;
}
@keyframes cartSpin { to { transform: rotate(360deg); } }
.cart-empty-icon { font-size: 56px; opacity: .35; }
.cart-page-state h2 { color: #e8dcc8; margin: 0; }
.cart-page-cta {
  background: linear-gradient(135deg, #d4a93a, #f0c060);
  color: #000; font-weight: 700; padding: 12px 28px;
  border-radius: 8px; text-decoration: none; margin-top: 8px; transition: opacity .18s;
}
.cart-page-cta:hover { opacity: .88; }

.cart-page-layout {
  display: grid; grid-template-columns: 1fr 320px;
  gap: 24px; align-items: start;
}
.cart-page-left { display: flex; flex-direction: column; gap: 20px; }

.cart-section {
  background: rgba(9,6,2,.82);
  border: 1px solid rgba(218,158,52,.22); border-radius: 10px; overflow: hidden;
}
.cart-section-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; border-bottom: 1px solid rgba(214,158,60,.1);
}
.cart-section-title { font-size: 16px; font-weight: 700; color: #f0c060; margin: 0; }
.cart-item-count { font-size: 13px; color: #888; }
.cart-items-list { padding: 8px 0; }

.cart-item-card {
  display: grid; grid-template-columns: 100px 1fr auto;
  gap: 14px; padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,.05); transition: background .15s;
}
.cart-item-card:last-child { border-bottom: none; }
.cart-item-card:hover { background: rgba(255,255,255,.02); }
.cart-item-card--saved { opacity: .8; }

.cart-item-img {
  width: 100px; height: 100px;
  background: rgba(255,255,255,.04); border: 1px solid rgba(214,158,60,.15);
  border-radius: 8px; overflow: hidden; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.cart-item-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-img-placeholder { font-size: 32px; opacity: .25; }
.cart-item-body { min-width: 0; }
.cart-item-name { font-size: 15px; color: #e8dcc8; margin: 0 0 4px; font-weight: 600; }
.cart-item-vendor { font-size: 12px; color: #888; margin: 0 0 8px; }
.cart-vendor-link { color: #d4a93a; text-decoration: none; }
.cart-vendor-link:hover { text-decoration: underline; }

.cart-item-price-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.cart-item-price { font-size: 16px; font-weight: 700; color: #f0c060; }
.cart-item-price.is-sale { color: #e07060; }
.cart-item-list-price { font-size: 13px; color: #666; text-decoration: line-through; }

.cart-item-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cart-qty-control {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.04); border: 1px solid rgba(214,158,60,.2);
  border-radius: 6px; padding: 4px 10px;
}
.cart-qty-btn {
  background: none; border: none; color: #d4a93a;
  font-size: 18px; cursor: pointer; padding: 0; line-height: 1;
  width: 20px; text-align: center; transition: color .15s;
}
.cart-qty-btn:hover { color: #f0c060; }
.cart-qty-value { font-size: 14px; color: #e8dcc8; min-width: 20px; text-align: center; }

.cart-action-btn {
  background: none; border: 1px solid rgba(255,255,255,.12);
  color: #aaa; font-size: 12px; padding: 5px 12px;
  border-radius: 5px; cursor: pointer; transition: all .15s; white-space: nowrap;
}
.cart-action-btn:hover { color: #fff; border-color: rgba(255,255,255,.3); }
.cart-action-btn--primary { background: rgba(214,158,60,.15); border-color: rgba(214,158,60,.4); color: #d4a93a; }
.cart-action-btn--primary:hover { background: rgba(214,158,60,.25); }
.cart-action-btn--danger { border-color: rgba(200,60,60,.3); color: #c07070; }
.cart-action-btn--danger:hover { background: rgba(200,60,60,.1); color: #e08080; }

.cart-item-total { display: flex; align-items: flex-start; padding-top: 2px; }
.cart-item-line-total { font-size: 16px; font-weight: 700; color: #f0c060; white-space: nowrap; }

.cart-page-summary { position: sticky; top: 90px; }
.cart-summary-card {
  background: rgba(9,6,2,.9); border: 1px solid rgba(218,158,52,.28);
  border-radius: 10px; overflow: hidden;
}
.cart-impact-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; background: rgba(214,158,60,.08);
  border-bottom: 1px solid rgba(214,158,60,.15); font-size: 13px; color: #d4a93a;
}
.cart-impact-icon { font-size: 22px; flex-shrink: 0; }
.cart-impact-bar strong { font-size: 16px; display: block; }
.cart-impact-sub { font-size: 11px; color: #a0844a; margin-top: 2px; }

.cart-summary-body {
  padding: 14px 18px; display: flex; flex-direction: column; gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.cart-summary-row { display: flex; justify-content: space-between; align-items: center; font-size: 14px; color: #c8b898; }
.cart-free-shipping { color: #5cb87a; font-weight: 600; font-size: 13px; }
.cart-savings-value { color: #5cb87a; }
.cart-summary-total {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px; font-size: 17px; font-weight: 700; color: #f0c060;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.cart-checkout-btn {
  display: block; width: calc(100% - 36px); margin: 16px 18px;
  padding: 14px; background: linear-gradient(135deg, #d4a93a, #f0c060);
  color: #000; font-weight: 800; font-size: 16px;
  text-align: center; border: none; border-radius: 8px; cursor: pointer;
  transition: opacity .18s, transform .15s, box-shadow .15s;
  box-shadow: 0 4px 16px rgba(214,158,60,.3);
}
.cart-checkout-btn:hover:not(:disabled) { opacity: .92; transform: translateY(-1px); box-shadow: 0 6px 22px rgba(214,158,60,.45); }
.cart-checkout-btn:disabled { opacity: .6; cursor: not-allowed; }
.cart-secure-note { text-align: center; font-size: 12px; color: #666; padding: 0 18px 12px; margin: 0; }
.cart-summary-links {
  display: flex; justify-content: center; gap: 18px;
  padding: 10px 18px 16px; border-top: 1px solid rgba(255,255,255,.06);
}
.cart-summary-links a { font-size: 12px; color: #888; text-decoration: underline; }
.cart-summary-links a:hover { color: #d4a93a; }

.cart-recommended { margin-top: 40px; padding-top: 32px; border-top: 1px solid rgba(255,255,255,.06); }
.cart-recommended-title { font-size: 20px; color: #f0c060; margin: 0 0 18px; font-family: var(--font-display); }
.cart-recommended-rail { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.cart-rec-card { background: rgba(9,6,2,.82); border: 1px solid rgba(218,158,52,.2); border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; transition: border-color .2s; }
.cart-rec-card:hover { border-color: rgba(218,158,52,.5); }
.cart-rec-img-link { aspect-ratio: 1; display: block; overflow: hidden; background: rgba(255,255,255,.03); }
.cart-rec-img-link img { width: 100%; height: 100%; object-fit: cover; }
.cart-rec-no-img { width: 100%; aspect-ratio: 1; display: grid; place-items: center; font-size: 32px; opacity: .2; }
.cart-rec-info { padding: 8px 10px 4px; flex: 1; }
.cart-rec-name { font-size: 12px; color: #d4c4a0; margin: 0 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-rec-price { font-size: 14px; font-weight: 700; color: #f0c060; margin: 0; }
.cart-rec-add { margin: 6px 10px 10px; padding: 7px; background: rgba(214,158,60,.1); border: 1px solid rgba(214,158,60,.3); border-radius: 6px; color: #d4a93a; font-size: 12px; font-weight: 600; cursor: pointer; transition: background .15s; }
.cart-rec-add:hover:not(:disabled) { background: rgba(214,158,60,.2); }
.cart-rec-add:disabled { opacity: .6; cursor: not-allowed; }

.cart-checkout-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.7); z-index: 1200; display: flex; align-items: center; justify-content: center; padding: 20px; }
.cart-checkout-modal { background: #100d08; border: 1px solid rgba(214,158,60,.35); border-radius: 12px; padding: 32px 28px; max-width: 440px; width: 100%; text-align: center; }
.cart-checkout-modal h2 { color: #f0c060; margin: 0 0 12px; font-family: var(--font-display); }
.cart-checkout-modal p  { color: #c8b898; margin: 0 0 20px; line-height: 1.5; }
.cart-checkout-modal-actions { display: flex; flex-direction: column; gap: 10px; }
.cart-modal-cancel { background: none; border: 1px solid rgba(255,255,255,.15); color: #888; padding: 11px; border-radius: 8px; cursor: pointer; font-size: 14px; transition: all .15s; }
.cart-modal-cancel:hover { color: #ccc; border-color: rgba(255,255,255,.3); }

/* Checkout modal enhancements */
.co-order-summary { color: #c8b898; margin: 0 0 18px; }
.co-field-group { text-align: left; margin-bottom: 16px; }
.co-field-label { display: block; font-size: 12px; color: #888; margin-bottom: 5px; text-transform: uppercase; letter-spacing: .04em; }
.co-field-input {
  width: 100%; box-sizing: border-box;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.15);
  color: #f0e8d5; border-radius: 8px; padding: 10px 12px; font-size: 14px;
  outline: none; transition: border-color .15s;
}
.co-field-input:focus { border-color: #d69e3c; }
.co-payment-section { text-align: left; margin-bottom: 20px; }
.co-payment-label { font-size: 12px; color: #888; margin: 0 0 8px; text-transform: uppercase; letter-spacing: .04em; }
.co-payment-methods { display: flex; flex-direction: column; gap: 8px; }
.co-payment-opt {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px; padding: 10px 14px; cursor: pointer; text-align: left;
  transition: border-color .15s; color: #f0e8d5; font-size: 14px;
}
.co-payment-opt.is-active { border-color: #d69e3c; background: rgba(214,158,60,.08); }
.co-payment-icon { font-size: 18px; flex-shrink: 0; }
.co-payment-note { font-size: 12px; color: #888; margin: 6px 0 0; line-height: 1.4; }

@media (max-width: 700px) {
  .cart-page-layout { grid-template-columns: 1fr; }
  .cart-page-summary { position: static; }
  .cart-item-card { grid-template-columns: 80px 1fr; }
  .cart-item-total { grid-column: 2; padding-top: 0; }
  .cart-recommended-rail { grid-template-columns: repeat(2, 1fr); }
}

/* ── Wishlist heart button on product cards ────────────────────────── */
.pcard-wish-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 20px;
  color: rgba(255,255,255,.4);
  padding: 4px 6px;
  line-height: 1;
  transition: color .2s, transform .15s;
}
.pcard-wish-btn:hover { color: #e05555; transform: scale(1.15); }
.pcard-wish-btn.is-wishlisted { color: #e05555; }

/* Detail page wishlist button */
.buy-ghost.is-wishlisted { color: #e05555; border-color: rgba(224,85,85,.4); }

/* Wishlist page grid */
.wishlist-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.wishlist-card {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color .2s;
}
.wishlist-card:hover { border-color: rgba(214,158,60,.35); }
.wishlist-card-img { aspect-ratio: 1; background: rgba(255,255,255,.05); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.wishlist-card-img img { width: 100%; height: 100%; object-fit: cover; }
.wishlist-no-img { font-size: 36px; opacity: .4; }
.wishlist-card-body { padding: 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.wishlist-card-name { font-size: 14px; font-weight: 600; margin: 0; }
.wishlist-card-name a { color: inherit; text-decoration: none; }
.wishlist-card-name a:hover { color: #d69e3c; }
.wishlist-card-vendor { font-size: 12px; color: #888; margin: 0; }
.wishlist-card-price { font-size: 15px; font-weight: 700; color: #d69e3c; margin: 0; }
.wishlist-card-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 10px; }
.wishlist-add-cart {
  flex: 1;
  background: #d69e3c;
  color: #000;
  border: none;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
}
.wishlist-add-cart:hover { background: #f0c060; }
.wishlist-add-cart:disabled { opacity: .6; cursor: not-allowed; }
.wishlist-remove {
  background: none;
  border: 1px solid rgba(255,255,255,.12);
  color: #888;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 12px;
  cursor: pointer;
  transition: all .15s;
}
.wishlist-remove:hover { color: #e05555; border-color: rgba(224,85,85,.4); }
.wishlist-empty { text-align: center; padding: 48px 20px; color: #888; }
.wishlist-empty a { color: #d69e3c; }
.wishlist-loading { color: #888; padding: 24px 0; }
