/* BSB Cart Overrides */

.bsb-cart-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-family: inherit;
}

/* Force native containers to 100% inside our grid */
.woocommerce-cart-form.bsb-custom-cart-form {
  width: 100% !important;
  float: none !important;
}

.cart-collaterals.bsb-custom-collaterals {
  width: 100% !important;
  float: none !important;
}

.bsb-cart-main {
  flex: 1;
  min-width: 0;
}

.bsb-cart-main h1 {
  font-size: 32px;
  line-height: 41.6px;
  padding: 24px 0;
  margin: 0 0 24px;
  border-top: 1px solid var(--e-global-color-3d017ca);
}

.bsb-cart-sidebar {
  width: 100%;
  flex: 0 0 410px;
}

@media (max-width: 991px) {
  .bsb-cart-sidebar {
    flex: 0 0 100%;
  }
}

/* Custom Cart Table */
.bsb-cart-main form .bsb-cart-table {
  width: 100%;
  border-collapse: collapse;
  border: 0;
  border-radius: 0;
  margin: 0;
}

.bsb-cart-table th {
  display: none; /* Hide standard headers for a cleaner look */
}

.bsb-cart-item {
  border-bottom: 1px solid var(--e-global-color-df443a6);
  padding: 32px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

/* Cart Item Structure */
.bsb-cart-main form .bsb-cart-table tbody tr.bsb-cart-item td {
  border: none;
  padding: 0;
  vertical-align: middle;
  background: inherit;
  width: 100%;
}
.bsb-cart-item-flex-wrapper {
  display: flex;
  gap: 16px;
}
.bsb-cart-item-image-col {
  width: 115px;
  flex-shrink: 0;
  position: relative;
}
.bsb-cart-main
  form
  .bsb-cart-table
  tbody
  tr.bsb-cart-item
  td
  .bsb-cart-item-image-col
  img {
  width: 100%;
  height: auto;
  display: block;
}
.bsb-cart-badges {
  position: absolute;
  top: -10px;
  left: -10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  z-index: 2;
}
.bsb-cart-badges .bsb-badge {
  background: #8a2b3e;
  color: #fff;
  padding: 2px 8px;
  font-size: 0.65rem;
  text-transform: uppercase;
  border-radius: 12px;
  text-decoration: none;
  display: inline-block;
  white-space: nowrap;
}

.bsb-cart-item-info-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.bsb-cart-item-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}
.bsb-cart-item-name-wrap {
  flex: 1;
}
.bsb-cart-item-price-wrap {
  text-align: right;
}
.bsb-cart-item-price-wrap .bsb-cart-item-price {
  font-size: 18px;
  font-weight: 400;
  color: var(--e-global-color-67833de);
}
.bsb-cart-item-price-wrap .bsb-cart-item-unit-price {
  font-size: 12px;
  color: var(--e-global-color-1f7a474);
  margin-top: 4px;
  letter-spacing: 1.1px;
}

.bsb-cart-item-bottom {
  margin-top: 15px;
}

.bsb-cart-item-producer {
  font-size: 11px;
  color: var(--e-global-color-e517805);
  text-transform: uppercase;
  letter-spacing: 1.1px;
  line-height: 18.7px;
}
.bsb-cart-item-name-wrap .bsb-cart-item-title {
  font-family: var(--e-global-typography-primary-font-family);
  font-size: 36px;
  color: var(--e-global-color-67833de);
  margin: 0 0 16px;
  line-height: 43.2px;
  text-decoration: none;
}

/* Format item data (variations/meta) as pills */
.bsb-cart-item-info-col dl.variation {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
  font-size: 0.75rem;
}
.bsb-cart-item-info-col dl.variation dt {
  display: none; /* Hide labels to just show pill values */
}
.bsb-cart-item-info-col dl.variation dd {
  margin: 0;
}
.bsb-cart-item-info-col dl.variation dd p {
  background: var(--e-global-color-bd858b1);
  margin: 0 0 14px;
  padding: 6px 12px;
  font-size: 13px;
  line-height: 18.7px;
  border-radius: 4px;
  color: var(--e-global-color-fb541cf);
}

.bsb-cart-item-price-col {
  text-align: right;
  width: 120px;
}

.bsb-cart-item-price {
  font-weight: 600;
  font-size: 1.1rem;
  color: #2c2c2c;
}

.bsb-cart-item-unit-price {
  font-size: 0.8rem;
  color: #777;
  margin-top: 5px;
}

/* Actions Wrapper */
.bsb-cart-item .product-actions {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  padding-top: 10px;
}

.bsb-cart-actions-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}

/* Quantity Input Styling */
.bsb-cart-actions-wrapper .quantity {
  display: flex;
  align-items: center;
  border: 1px solid #eaeaea;
  border-radius: 4px;
  overflow: hidden;
}

.bsb-cart-actions-wrapper
  .quantity
  input[type="number"]::-webkit-outer-spin-button,
.bsb-cart-actions-wrapper
  .quantity
  input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Wishlist and Remove Icons */
.bsb-cart-actions-wrapper .bsb-wishlist-icon,
.bsb-cart-actions-wrapper a.remove.bsb-remove-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--e-global-color-bd90e6c);
  border-radius: 0px;
  color: var(--e-global-color-67833de) !important;
  transition: all 0.3s;
}

.bsb-wishlist-icon svg,
.bsb-remove-icon svg {
  width: 18px;
  height: 18px;
}

.bsb-cart-actions-wrapper .bsb-wishlist-icon:hover,
.bsb-cart-actions-wrapper a.remove.bsb-remove-icon:hover {
  background: var(--e-global-color-bd90e6c);
  color: var(--e-global-color-67833de) !important;
}

/* Update Cart Button (hidden usually if ajax updates on qty change, but keep for fallback) */
.bsb-cart-update-row {
  display: none; /* Hide unless needed */
}

/* Qty Buttons (Theme overrides) */
.woocommerce-cart-form .quantity {
  display: flex !important;
  align-items: center;
  border: 0px;
  border-radius: 0;
  overflow: hidden;
  background: var(--e-global-color-bd90e6c);
}

.woocommerce-cart-form .quantity button.bsb-qty-minus,
.woocommerce-cart-form .quantity button.bsb-qty-plus {
  border: 0;
  width: 24px;
  height: 24px;
  min-width: 24px;
  min-height: 24px;
  padding: 16px;
  box-sizing: content-box;
  font-size: 18px;
  line-height: 24px;
  color: var(--e-global-color-67833de);
}
.woocommerce-cart-form .quantity button.bsb-qty-minus:focus,
.woocommerce-cart-form .quantity button.bsb-qty-plus:focus,
.woocommerce-cart-form .quantity button.bsb-qty-minus:hover,
.woocommerce-cart-form .quantity button.bsb-qty-plus:hover {
  background: transparent;
}

.bsb-cart-actions-wrapper .quantity input[type="number"] {
  width: 30px;
  text-align: center;
  border: none;
  padding: 10px 0;
  font-size: 20px;
  background: transparent;
}

/* Sidebar Styling */
.cart-collaterals.bsb-custom-collaterals .bsb-cart-sidebar-box {
  background: #fff;
  border: 1px solid var(--e-global-color-df443a6);
  padding: 24px;
  float: none;
  width: 100%;
}

.cart-collaterals.bsb-custom-collaterals
  .bsb-cart-sidebar-box
  .bsb-sidebar-title {
  font-family: var(--e-global-typography-primary-font-family);
  font-size: 32px;
  color: var(--e-global-color-408f40e);
  margin-top: 0;
  margin-bottom: 24px;
  font-weight: 500;
  line-height: 41.6px;
}

.bsb-cart-sidebar-items-summary {
  margin-bottom: 34px;
  border-bottom: 1px solid var(--e-global-color-df443a6);
  padding-bottom: 34px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 16px;
}

.bsb-summary-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
  gap: 24px;
}

.bsb-summary-item-info {
  display: flex;
  flex-direction: column;
}

.bsb-summary-item-name {
  font-size: 16px;
  color: var(--e-global-color-67833de);
  line-height: 24px;
}

.bsb-summary-item-producer {
  font-size: 11px;
  color: var(--e-global-color-e517805);
  text-transform: uppercase;
  line-height: 18.7px;
  letter-spacing: 1.1px;
  font-weight: 500;
}

.bsb-summary-item-producer span {
  color: var(--e-global-color-7b04add);
}

.bsb-summary-item-price {
  font-size: 16px;
  color: var(--e-global-color-67833de);
  line-height: 24px;
}

/* Totals Table */
.cart-collaterals.bsb-custom-collaterals
  .bsb-cart-sidebar-box
  .bsb-totals-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
  border: 0;
  border-radius: 0;
}

.cart-collaterals.bsb-custom-collaterals
  .bsb-cart-sidebar-box
  .bsb-totals-table
  th {
  font-size: 13px;
  line-height: 24px;
  font-weight: 400;
  border: 0;
  background: #fff;
  color: var(--e-global-color-49c3530);
  padding: 0 0 16px;
  vertical-align: middle;
}

.cart-collaterals.bsb-custom-collaterals
  .bsb-cart-sidebar-box
  .bsb-totals-table
  td {
  font-size: 16px;
  padding: 0;
  line-height: 24px;
  font-weight: 500;
  border: 0;
  background: #fff;
  color: var(--e-global-color-67833de);
  text-align: right;
  padding: 0 0 16px;
  vertical-align: middle;
}

.bsb-totals-table .shipping td {
  color: var(--e-global-color-a68cd2f); /* Greenish for FREE */
}

/* Shipping Estimator Accordion */
.bsb-shipping-estimator-accordion {
  margin-bottom: 25px;
}

.bsb-shipping-estimator-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13.5px 16px;
  border: 1px solid var(--e-global-color-df443a6);
  cursor: pointer;
  font-size: 13px;
  color: var(--e-global-color-67833de);
  transition: color 0.3s;
}

.bsb-shipping-estimator-toggle:hover {
  color: var(--e-global-color-408f40e);
}

.bsb-shipping-estimator-toggle svg {
  width: 16px;
  height: 16px;
  transition: transform 0.3s;
}

.bsb-shipping-estimator-toggle.open svg {
  transform: rotate(180deg);
}

.bsb-shipping-estimator-content {
  padding: 24px;
  background: var(--e-global-color-b209b6e);
  border: 1px solid var(--e-global-color-df443a6);
  border-top: 0;
}

/* Force block display because WooCommerce native JS hides .shipping-calculator-form */
.bsb-shipping-estimator-content
  form.woocommerce-shipping-calculator.bsb-custom-shipping-calculator
  .shipping-calculator-form {
  display: block !important;
  margin: 0;
}

.bsb-shipping-estimator-content
  form.woocommerce-shipping-calculator.bsb-custom-shipping-calculator
  .shipping-calculator-form
  .bsb-shipping-form-row {
  margin: 0 0 16px;
  padding: 0;
}

.bsb-shipping-estimator-content
  form.woocommerce-shipping-calculator.bsb-custom-shipping-calculator
  .shipping-calculator-form
  .bsb-shipping-form-row
  label {
  display: block;
  font-size: 11px;
  color: var(--e-global-color-e517805);
  text-transform: uppercase;
  letter-spacing: 1.1px;
  margin-bottom: 4px;
  font-weight: 500;
}

.bsb-shipping-estimator-content
  form.woocommerce-shipping-calculator.bsb-custom-shipping-calculator
  input,
.bsb-shipping-estimator-content
  form.woocommerce-shipping-calculator.bsb-custom-shipping-calculator
  select {
  width: 100%;
  padding: 13.5px 16px;
  border: 1px solid var(--e-global-color-df443a6);
  border-radius: 0;
  font-size: 13px;
  font-family: var(--e-global-typography-text-font-family);
  color: var(--e-global-color-67833de);
  background-color: #fff;
}

.bsb-shipping-estimator-content select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg viewBox='0 0 24 24' fill='none' stroke='%2367833de' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 16px;
}

.bsb-shipping-estimator-content input::placeholder {
  color: var(--e-global-color-a68cd2f);
}

.bsb-shipping-form-btn {
  display: none; /* Hide default calculate button to make it seamless, or keep it styled */
}

/* Shipping Summary Box */
.bsb-shipping-summary-box {
  border: 1px solid var(--e-global-color-df443a6);
  padding: 16px;
  background: #fff;
  margin: -8px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bsb-shipping-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--e-global-color-49c3530);
}

.bsb-shipping-summary-row:last-of-type {
  margin-bottom: 0;
}

.bsb-shipping-value {
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
}

.bsb-shipping-summary-divider {
  border-top: 1px solid var(--e-global-color-df443a6);
  margin: 10px 0;
}

.bsb-shipping-summary-note {
  font-size: 13px;
  color: var(--e-global-color-67833de);
  line-height: 20.15px;
  margin: 0 !important;
}

/* Sidebar Coupon */
.bsb-sidebar-coupon {
  margin-bottom: 34px;
}

.bsb-sidebar-coupon form.checkout_coupon.woocommerce-form-coupon {
  display: flex;
  margin: 16px 0;
  text-align: left;
  border-radius: 0;
  gap: 8px;
  border: 0px solid #cfc8d8;
  padding: 0;
}

.bsb-sidebar-coupon form.checkout_coupon.woocommerce-form-coupon input {
  flex: 1;
  padding: 13.5px 16px;
  border: 1px solid var(--e-global-color-df443a6);
  font-size: 13px;
  min-width: 0;
  border-radius: 0;
}

.bsb-sidebar-coupon form.checkout_coupon.woocommerce-form-coupon button {
  background: var(--e-global-color-a68cd2f);
  color: #fff;
  border: none;
  padding: 16px 13.5px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 400;
  border-radius: 0;
}
.bsb-sidebar-coupon button:hover {
  background: #376358;
}

/* Order Total */
.bsb-order-total {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  padding-top: 34px;
  border-top: 1px solid var(--e-global-color-df443a6);
}

.bsb-order-total h4 {
  font-family: var(--e-global-typography-primary-font-family);
  font-size: 24px;
  color: var(--e-global-color-d536683);
  margin: 0;
  font-weight: 400;
  line-height: 31.2px;
}

.bsb-total-price {
  font-size: 24px;
  font-weight: 400;
  color: var(--e-global-color-d536683);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-start;
  font-family: var(--e-global-typography-primary-font-family);
}

.bsb-total-price strong {
  font-weight: 400;
}

.bsb-total-price small.includes_tax {
  font-family: var(--e-global-typography-text-font-family);
  font-size: 11px;
}

/* Checkout Button */

.wc-proceed-to-checkout.bsb-proceed-checkout {
  padding: 0;
}

.cart-collaterals.bsb-custom-collaterals
  .bsb-cart-sidebar-box
  a.checkout-button.button.alt.wc-forward {
  background: var(--e-global-color-31d9a12);
  text-align: left;
  font-weight: 500;
  font-size: 16px;
  border-radius: 0;
  line-height: 27.2px;
  padding: 14px 32px;
  margin: 0;
  width: 100%;
}

.bsb-checkout-trust-badges {
  text-align: center;
  margin-top: 8px;
}

.bsb-trust-text {
  color: var(--e-global-color-c4debf2);
  font-size: 13px;
  line-height: 20.15px;
}

/* Free Shipping Bar */
.bsb-free-shipping-bar-wrapper {
  background: var(--e-global-color-b209b6e);
  padding: 24px;
  margin-bottom: 24px;
  border: 1px solid var(--e-global-color-df443a6);
}

.bsb-fsb-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 16px;
  color: var(--e-global-color-67833de);
}

.bsb-fsb-text strong {
  color: #8a2b3e;
}

.bsb-fsb-link {
  color: #555;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 5px;
}

.bsb-fsb-progress {
  height: 8px;
  background: var(--e-global-color-65d0ca5);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 10px;
}

.bsb-fsb-progress-fill {
  height: 100%;
  background: var(--e-global-color-8e40936);
  transition: width 0.5s ease;
}

.bsb-fsb-footer {
  font-size: 13px;
  color: var(--e-global-color-49c3530);
}

/* Club Aficionados Widget */
.bsb-sidebar-club-widget {
  background: var(--e-global-color-b209b6e);
  border: 1px solid var(--e-global-color-df443a6);
  padding: 24px;
  margin-top: 32px;
}

.bsb-sidebar-club-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--e-global-typography-primary-font-family);
  font-size: 24px;
  color: var(--e-global-color-fe7ff33);
  margin-top: 0;
  margin-bottom: 16px;
  font-weight: 400;
}

.bsb-sidebar-club-title .bsb-info-icon-wrapper {
  position: relative;
  display: flex;
  cursor: pointer;
  margin-left: 8px;
  align-items: center;
  justify-content: center;
}

.bsb-sidebar-club-title svg {
  width: 20px;
  height: 20px;
  color: var(--e-global-color-408f40e);
}

.bsb-sidebar-club-widget .bsb-sidebar-club-title + p {
  margin: 0;
  font-size: 16px;
  color: var(--e-global-color-67833de);
}

.bsb-sidebar-club-widget strong {
  color: var(--e-global-color-d6d6ec0);
}

/* Bottom Tabs */
.bsb-cart-bottom-tabs {
  margin-top: 60px;
  width: 100%;
  margin-bottom: 80px;
}

.bsb-tabs-header {
  display: flex;
  gap: 15px;
  margin-bottom: 30px;
  justify-content: center;
}

.bsb-tab-btn {
  background: #f5f5f5;
  border: none;
  padding: 10px 25px;
  border-radius: 30px;
  font-size: 0.9rem;
  color: #555;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s;
}

.bsb-tab-btn svg {
  width: 16px;
  height: 16px;
}

.bsb-tab-btn.active,
.bsb-tab-btn:hover {
  background: #2c2c2c;
  color: #fff;
}

