/* Widget Styles */
.bsb-side-cart-widget .bsb-side-cart-trigger-btn {
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  cursor: pointer;
  position: relative;
  color: #fff;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease;
}

.bsb-side-cart-widget .bsb-side-cart-trigger-btn:hover {
  background: rgb(255 255 255 / 10%);
}

.bsb-side-cart-widget .bsb-side-cart-trigger-btn svg {
  width: 18px;
  height: 18px;
}

.bsb-side-cart-trigger-counter {
  position: absolute;
  top: 0;
  right: 0;
  background-color: var(--e-global-color-9f07017);
  color: #fff;
  font-size: 11px;
  /* font-weight: bold; */
  line-height: 1;
  padding: 3px 5px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
  transform: translate(35%, -35%);
  opacity: 0.95;
}
.bsb-side-cart-trigger-counter[data-count="0"] {
  display: none;
}

/* Overlay */
.bsb-side-cart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.4);
  z-index: 99998;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.bsb-side-cart-overlay.active {
  opacity: 1;
}

/* Panel */
.bsb-side-cart-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 450px;
  height: 100vh;
  background: #fff;
  z-index: 99999;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s cubic-bezier(0.77, 0.2, 0.05, 1);
  font-family: inherit;
}

.bsb-side-cart-panel.active {
  transform: translateX(0) !important;
}

/* Header */
.bsb-side-cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px;
  border-bottom: 1px solid var(--e-global-color-65d0ca5);
}

.bsb-side-cart-header .bsb-side-cart-title {
  margin: 0 0 0 24px;
  font-size: 24px;
  font-weight: 400;
  color: var(--e-global-color-d44d2fe);
}

.bsb-side-cart-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  color: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 24px 0 0;
}

.bsb-side-cart-close svg {
  width: 20px;
  height: 20px;
}

/* Content */
.bsb-side-cart-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.bsb-side-cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 0;
}

/* Empty State */
.bsb-side-cart-empty {
  padding: 40px 30px;
  text-align: center;
}

.bsb-side-cart-empty p {
  font-size: 16px;
  color: #666;
  margin-bottom: 20px;
}

.bsb-side-cart-return-shop {
  display: inline-block;
  background: #7e283f; /* Brand dark red */
  color: #fff;
  padding: 12px 24px;
  text-decoration: none;
  font-weight: 500;
  border-radius: 2px;
  transition: background 0.2s;
}
.bsb-side-cart-return-shop:hover {
  background: #5a1c2d;
  color: #fff;
}

/* Cart Item */
.bsb-side-cart-item {
  display: flex;
  padding: 20px 20px;
  border-bottom: 1px solid var(--e-global-color-3d017ca);
  position: relative;
}
.bsb-side-cart-item.loading {
  opacity: 0.5;
  pointer-events: none;
}

.bsb-side-cart-item-image {
  width: 75px;
  margin-right: 10px;
  flex-shrink: 0;
}

.bsb-side-cart-item-image img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.bsb-side-cart-item-details {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.bsb-side-cart-item-title-wrap {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 5px;
}

.bsb-side-cart-item-title-wrap .bsb-side-cart-item-title {
  font-size: 18px;
  color: var(--e-global-color-d536683);
  text-decoration: none;
  font-weight: 400;
  line-height: 27px;
  padding-right: 15px;
}

.bsb-side-cart-item-price {
  font-size: 16px;
  color: var(--e-global-color-d536683);
  font-weight: 400;
  white-space: nowrap;
}

.bsb-side-cart-item-tag {
  display: inline-block;
  background-color: var(--e-global-color-fe7ff33);
  color: #fff;
  font-size: 11px;
  padding: 8px 12px;
  border-radius: 27px;
  font-weight: 500;
  line-height: 9px;
  align-self: flex-start;
}

.bsb-side-cart-item-meta-wrapper {
  display: flex;
}
.bsb-side-cart-item-meta {
  background: var(--e-global-color-bd858b1);
  margin: 0 0 14px;
  padding: 6px 12px;
  font-size: 13px;
  line-height: 18.7px;
  border-radius: 4px;
}

/* Actions */
.bsb-side-cart-item-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: auto;
}

.bsb-side-cart-qty {
  display: flex;
  align-items: center;
  background: var(--e-global-color-bd90e6c);
  border-radius: 0px;
  margin-right: 8px;
}

.bsb-side-cart-qty .bsb-side-cart-qty-btn {
  background: none;
  border: none;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--e-global-color-67833de);
  font-size: 16px;
  padding: 0;
  border-radius: 0;
}

.bsb-side-cart-qty .bsb-side-cart-qty-input {
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  text-align: center;
  font-size: 13px;
  color: var(--e-global-color-67833de);
  padding: 0;
  -moz-appearance: textfield;
}
.bsb-side-cart-qty-input::-webkit-outer-spin-button,
.bsb-side-cart-qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.bsb-side-cart-item-actions .bsb-side-cart-remove-btn {
  background: #f5f4ed;
  border: none;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #333;
  border-radius: 2px;
  transition:
    background 0.2s,
    color 0.2s;
  padding: 0;
  border-radius: 0;
}

.bsb-side-cart-qty .bsb-side-cart-qty-btn:hover,
.bsb-side-cart-item-actions .bsb-side-cart-remove-btn:hover {
  background: var(--e-global-color-f2f53bb);
}

/* Footer */
.bsb-side-cart-footer {
  padding: 24px;
  border-top: 1px solid #ebebeb;
  background: #fff;
}

.bsb-side-cart-subtotal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  font-size: 18px;
  color: var(--e-global-color-d536683);
}

.bsb-side-cart-subtotal-amount {
  font-weight: 600;
  color: var(--e-global-color-408f40e);
  font-size: 16px;
}

.bsb-side-cart-footer .bsb-side-cart-checkout-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: var(--e-global-color-31d9a12);
  color: #fff;
  padding: 14px 32px;
  text-decoration: none;
  font-weight: 500;
  font-size: 16px;
  border-radius: 2px;
  transition: background 0.2s;
  height: 56px;
}

.bsb-side-cart-checkout-btn:hover {
  background: var(--e-global-color-487cf0c);
  color: #fff;
}

/* Spinner/Loading */
.bsb-side-cart-loading {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.7);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.bsb-side-cart-panel.is-loading .bsb-side-cart-loading {
  opacity: 1;
  pointer-events: auto;
}

.bsb-cart-spinner {
  width: 30px;
  height: 30px;
  border: 3px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  border-top-color: #a32a44;
  animation: bsb-spin 1s ease-in-out infinite;
}

@keyframes bsb-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Fullscreen on mobile */
@media (max-width: 768px) {
  .bsb-side-cart-panel {
    width: 100%;
    right: 0;
  }
  .bsb-side-cart-overlay {
    display: none !important; /* Not needed since panel is full screen */
  }
}
