/* ─── Cart Icon in Header ─────────────────────────────────────────── */

#cvbs-cart-icon-wrap {
  position: fixed;
  right: 16px;
  top: 14px;
  z-index: 1002;
}

#cvbs-cart-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  color: #fff;
  text-decoration: none;
  padding: 10px;
  transition: color 0.2s, background 0.2s;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 50%;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.4));
}

#cvbs-cart-icon:hover {
  color: #f0a030;
  background: rgba(0, 0, 0, 0.5);
}

/* When header is stuck/scrolled, darken background for contrast */
.darken #cvbs-cart-icon-wrap #cvbs-cart-icon {
  color: #fff;
  background: rgba(0, 0, 0, 0.45);
}

#cvbs-cart-badge {
  position: absolute;
  top: -2px;
  right: -4px;
  background: #c0392b;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  font-family: Arial, sans-serif;
  line-height: 1;
}

/* ─── Cart Notification Toast ────────────────────────────────────── */

#cvbs-cart-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #2c3e50;
  color: #fff;
  padding: 14px 24px;
  border-radius: 6px;
  font-family: "Droid Serif", Georgia, serif;
  font-size: 14px;
  z-index: 10001;
  opacity: 0;
  transform: translateY(-20px);
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  max-width: 400px;
}

#cvbs-cart-notification.cvbs-show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.cvbs-notif-check {
  color: #27ae60;
  font-weight: bold;
  margin-right: 4px;
}

/* ─── Cart Drawer ────────────────────────────────────────────────── */

#cvbs-cart-drawer {
  display: none;
}

#cvbs-cart-drawer.cvbs-open {
  display: block;
}

#cvbs-cart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9998;
  animation: cvbs-fadeIn 0.2s ease;
}

#cvbs-cart-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 420px;
  max-width: 90vw;
  height: 100vh;
  height: 100dvh;
  background: #fff;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
  animation: cvbs-slideIn 0.3s ease;
}

@keyframes cvbs-slideIn {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

@keyframes cvbs-fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

#cvbs-cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #e0e0e0;
  background: #fafafa;
}

#cvbs-cart-header h3 {
  margin: 0;
  font-family: "Droid Serif", Georgia, serif;
  font-size: 20px;
  color: #333;
  font-weight: 700;
}

#cvbs-cart-close {
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: #666;
  padding: 0 4px;
  line-height: 1;
  transition: color 0.2s;
}

#cvbs-cart-close:hover {
  color: #333;
}

/* ─── Cart Items ─────────────────────────────────────────────────── */

#cvbs-cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 0;
  -webkit-overflow-scrolling: touch;
}

.cvbs-cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: #999;
  font-family: "Droid Serif", Georgia, serif;
}

.cvbs-cart-empty p {
  margin-top: 16px;
  font-size: 16px;
}

.cvbs-cart-item {
  display: flex;
  padding: 16px 20px;
  border-bottom: 1px solid #f0f0f0;
  gap: 14px;
}

.cvbs-cart-item-image {
  width: 70px;
  min-width: 70px;
  height: 70px;
  border-radius: 6px;
  overflow: hidden;
  background: #f5f5f5;
}

.cvbs-cart-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cvbs-cart-item-details {
  flex: 1;
  min-width: 0;
}

.cvbs-cart-item-name {
  font-family: "Droid Serif", Georgia, serif;
  font-size: 14px;
  font-weight: 700;
  color: #333;
  margin-bottom: 2px;
  line-height: 1.3;
}

.cvbs-cart-item-options {
  font-size: 12px;
  color: #888;
  margin-bottom: 4px;
  font-family: Arial, sans-serif;
}

.cvbs-cart-item-price {
  font-family: "Actor", Arial, sans-serif;
  font-size: 15px;
  color: #9d4f16;
  font-weight: 700;
  margin-bottom: 8px;
}

.cvbs-cart-item-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ─── Quantity Controls ──────────────────────────────────────────── */

.cvbs-qty-controls {
  display: flex;
  align-items: center;
  border: 1px solid #ddd;
  border-radius: 4px;
  overflow: hidden;
}

.cvbs-qty-btn {
  background: #f5f5f5;
  border: none;
  width: 28px;
  height: 28px;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
  transition: background 0.15s;
  padding: 0;
}

.cvbs-qty-btn:hover {
  background: #e8e8e8;
}

.cvbs-qty-value {
  padding: 0 10px;
  font-size: 14px;
  font-family: Arial, sans-serif;
  min-width: 20px;
  text-align: center;
}

.cvbs-view-amazon {
  font-size: 12px;
  color: #2980b9;
  text-decoration: none;
  font-family: Arial, sans-serif;
  white-space: nowrap;
}

.cvbs-view-amazon:hover {
  text-decoration: underline;
}

.cvbs-remove-btn {
  background: none;
  border: none;
  color: #c0392b;
  font-size: 12px;
  cursor: pointer;
  padding: 2px 0;
  font-family: Arial, sans-serif;
  white-space: nowrap;
}

.cvbs-remove-btn:hover {
  text-decoration: underline;
}

/* ─── Cart Footer ────────────────────────────────────────────────── */

#cvbs-cart-footer {
  padding: 16px 20px;
  border-top: 2px solid #e0e0e0;
  background: #fafafa;
}

#cvbs-cart-total {
  font-family: "Droid Serif", Georgia, serif;
  font-size: 16px;
  color: #333;
  margin-bottom: 14px;
  line-height: 1.5;
}

#cvbs-cart-total small {
  color: #888;
  font-size: 11px;
}

.cvbs-btn-checkout {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px 20px;
  background: #f0a030;
  color: #111;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 700;
  font-family: "Droid Serif", Georgia, serif;
  cursor: pointer;
  transition: background 0.2s;
  text-align: center;
}

.cvbs-btn-checkout:hover {
  background: #e8931e;
}

#cvbs-cart-note {
  font-size: 11px;
  color: #888;
  text-align: center;
  margin-top: 10px;
  margin-bottom: 0;
  font-family: Arial, sans-serif;
}

/* ─── Product Page Overrides ─────────────────────────────────────── */

/* Make the Add to Cart button look active (override disabled state) */
#wsite-com-product-add-to-cart.wsite-com-product-disabled {
  opacity: 1 !important;
  cursor: pointer !important;
  pointer-events: auto !important;
}

#wsite-com-product-quantity-input.wsite-com-product-disabled {
  opacity: 1 !important;
  pointer-events: auto !important;
}

/* ─── View on Amazon link on product pages ───────────────────────── */

#cvbs-amazon-link-wrap {
  margin-top: 12px;
  text-align: center;
}

#cvbs-amazon-link {
  display: inline-block;
  padding: 8px 16px;
  background: #f0a030;
  color: #111;
  border-radius: 4px;
  text-decoration: none;
  font-family: "Droid Serif", Georgia, serif;
  font-size: 14px;
  font-weight: 700;
  transition: background 0.2s;
}

#cvbs-amazon-link:hover {
  background: #e8931e;
}

/* ─── Mobile & Tablet Responsive ─────────────────────────────────── */

@media screen and (max-width: 1024px) {
  /* On tablet/mobile the hamburger menu is at right, move cart left of it */
  #cvbs-cart-icon-wrap {
    right: 58px;
    top: 12px;
  }
}

@media screen and (max-width: 767px) {
  #cvbs-cart-icon-wrap {
    right: 54px;
    top: 10px;
  }

  #cvbs-cart-icon {
    padding: 8px;
  }

  #cvbs-cart-panel {
    width: 100vw;
    max-width: 100vw;
  }

  .cvbs-cart-item {
    padding: 12px 14px;
  }

  .cvbs-cart-item-image {
    width: 56px;
    min-width: 56px;
    height: 56px;
  }

  .cvbs-cart-item-actions {
    gap: 8px;
  }

  #cvbs-cart-notification {
    top: 10px;
    right: 10px;
    left: 10px;
    max-width: none;
    font-size: 13px;
    padding: 12px 16px;
  }
}
