/* ============================================
   Custom WooCommerce Cart
   ============================================ */

/* --- Wrapper --- */
.custom-cart-wrapper {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 20px 16px 40px;
}

/* --- Modal Card --- */
.custom-cart-modal {
  width: 100%;
  max-width: 600px;
  padding: 0;
}

/* --- Header --- */
.cart-header {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 24px 16px 20px;
}

.cart-title {
  font-size: 22px;
  font-weight: 700;
  color: #1a1a1a;
  letter-spacing: 0.02em;
  text-align: center;
}

/* --- Cart Empty --- */
.cart-empty {
  text-align: center;
  padding: 40px 20px;
  color: #555;
}
.cart-empty p {
  margin-bottom: 20px;
  font-size: 15px;
}

/* --- Cart Item Card --- */
.cart-item-wrap {
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: stretch;
  border: 1px solid rgba(41, 45, 45, 0.15);
}
.cart-item {
  display: flex;
  gap: 16px;
  align-items: stretch;
}

.cart-item-image {
  flex-shrink: 0;
  width: 100px;
  height: 100px;
  border-radius: 8px;
  overflow: hidden;
  background: #e8eef5;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.cart-item-image a {
  display: block;
  width: 100%;
  height: 100%;
}

.cart-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: space-between;
}

.cart-item-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.cart-item-name {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.3;
  text-align: left;
}
.cart-item-name a {
  color: inherit;
  text-decoration: none;
}

.cart-item-meta {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 400;
}

.payment-type {
  font-size: 12px;
  color: #777;
  display: block;
}

.cart-item-price {
  font-size: 15px;
  font-weight: 400;
  white-space: nowrap;
}
.cart-item-price .woocommerce-Price-amount {
  font-weight: 600;
}

/* --- Quantity Controls --- */
.cart-item-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.qty-control {
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 8px;
  padding: 0px;
}

.qty-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: #444;
  line-height: 1;
  padding: 2px 4px;
  transition: color 0.2s;
}
.qty-btn:hover {
  color: #000;
}

.qty-input {
  width: 28px;
  text-align: center;
  border: none;
  outline: none;
  font-size: 16px;
  font-weight: 500;
  background: transparent;
  font-family: 'Montserrat';
  -moz-appearance: textfield;
}
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

.ps-badge {
  font-size: 14px;
  padding: 6px 10px;
  text-align: center;
  border: 0;
  cursor: pointer;
}
.ps-badge--cta.is-loading {
    opacity: 0.6;
    pointer-events: none;
}

.remove-item {
  display: flex;
  align-items: center;
  opacity: 0.5;
  transition: opacity 0.2s;
  text-decoration: none;
}
.remove-item:hover {
  opacity: 1;
}

/* --- Subscribe & Save Bar --- */
.subscribe-save-bar {
  background: #fff;
  border-top: 1px solid #f0f0f0;
  padding: 10px 16px;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  margin-bottom: 14px;
}

.subscribe-save-text {
  display: block;
  text-align: center;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #1a1a1a;
  background: #c8f0c8;
  border-radius: 6px;
  padding: 10px 16px;
  cursor: pointer;
}

/* --- Upgrade Block --- */
.upgrade-block {
  background: #dee9f1;
  border-radius: 12px;
  padding: 20px 16px 16px;
  margin-bottom: 28px;
  position: relative;
  margin-top: 30px;
}

.upgrade-badge {
  display: table;
  background: var(--teal);
  color: var(--off-white);
  font-size: 12px;
  font-weight: 500;
  padding: 2px 10px;
  border-radius: 20px;
  white-space: nowrap;
  letter-spacing: 0;
  text-transform: uppercase;
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
}

.upgrade-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 14px;
  text-align: left;
}

.upgrade-image {
  flex-shrink: 0;
  width: 88px;
}
.upgrade-image img {
  width: auto;
  height: 88px;
  margin: auto;
}

.upgrade-title {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 6px;
  line-height: 1.3;
}

.upgrade-desc {
  font-size: 14px;
  line-height: 1.5;
}
.upgrade-desc strong {
  font-weight: 600;
}

/* --- Upgrade Button --- */
.btn-upgrade {
  display: block;
  width: 100%;
  text-align: center;
  border: 1px solid var(--teal);
  border-radius: 50px;
  color: var(--teal);
  font-size: 14px;
  font-weight: 500;
  padding: 12px 24px;
  text-decoration: none;
  background: transparent;
  transition:
    background 0.2s,
    color 0.2s;
}
.btn-upgrade:hover {
  background: var(--teal);
  color: var(--off-white);
}

/* --- Trust Badges --- */
.trust-badges {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 0 24px;
  border-bottom: 1px solid #e0d8d0;
  margin-bottom: 20px;
}

.trust-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
  text-align: center;
}

.trust-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.trust-badge span {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  text-transform: uppercase;
}

/* --- Cart Footer --- */
.cart-footer {
  padding-top: 4px;
}

.cart-drawer-contents .cart-subtotal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.subtotal-label {
  font-size: 18px;
  font-weight: 500;
  font-family: 'DM Mono';
}

.subtotal-amount {
  font-size: 16px;
  font-weight: 400;
}
.subtotal-amount .woocommerce-Price-amount {
  font-weight: 400;
}

/* --- Checkout Button --- */
.btn-checkout {
  display: block;
  width: 100%;
  text-align: center;
  background: var(--teal);
  color: var(--off-white);
  font-size: 15px;
  font-weight: 500;
  padding: 14px 24px;
  border-radius: 50px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
  margin-bottom: 16px;
}

/* --- Reassurances Row --- */
.cart-reassurances {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.reassurance-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: #555;
  letter-spacing: 0.04em;
}
.reassurance-item svg {
  flex-shrink: 0;
  opacity: 0.7;
}
.reassurance-item strong {
  font-weight: 700;
  color: #333;
}

.reassurance-divider {
  font-size: 16px;
  color: #aaa;
}

/* --- WooCommerce notices override --- */
.woocommerce-error,
.woocommerce-message,
.woocommerce-info {
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 13px;
}

/* --- Screen reader only --- */
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

/* --- Responsive --- */
@media (max-width: 480px) {
  .custom-cart-wrapper {
    padding: 0;
    align-items: flex-start;
  }
  .custom-cart-modal {
    max-width: 100%;
    min-height: 100vh;
    padding-bottom: 30px;
  }
  .trust-badge span {
    font-size: 8px;
  }
}