/* ==========================
   MODAL CARRELLO MODERNO
   ========================== */

.rp-cart-modal .modal-dialog {
  max-width: 1320px !important;
  width: calc(100% - 40px) !important;
  height: calc(100vh - 40px) !important;
  margin: 20px auto !important;
}

.rp-cart-modal .modal-content {
  height: 100% !important;
  display: flex;
  flex-direction: column;
  overflow: hidden !important;
  margin-top: 10px;
}

.rp-cart-modal-header {
  flex: 0 0 auto;
  padding: 26px 30px 18px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  background: linear-gradient(180deg, #ffffff 0%, #f7f8fb 100%);
}

.rp-cart-modal-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rp-cart-modal-eyebrow {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #7b8190;
}

.rp-cart-modal .modal-title {
  font-size: 30px;
  font-weight: 800;
  line-height: 1.1;
  color: #141821;
}

.rp-cart-modal-body {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  padding: 24px 30px 170px !important;
  background: #f8f9fc !important;
}

.rp-cart-modal-footer {
  position: sticky;
  bottom: 0;
  z-index: 20;
  flex: 0 0 auto;
  margin-top: auto;
  display: block !important;
  padding: 0px 30px 0px !important;
  border-top: 1px solid rgba(0,0,0,0.06) !important;
  background: rgba(255,255,255,0.96) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 -10px 30px rgba(0,0,0,0.06) !important;
}
.rp-cart-modal-footer::before {
  content: "";
  position: absolute;
  top: -20px;
  left: 0;
  right: 0;
  height: 20px;
  background: linear-gradient(to top, rgba(255,255,255,0.96), rgba(255,255,255,0));
  pointer-events: none;
}

.rp-cart-layout {
  display: grid;
  grid-template-columns: minmax(420px, 1.75fr) minmax(320px, 1.35fr);
  gap: 24px;
  align-items: start;
}

.rp-cart-panel {
  background: #fff;
  border-radius: 22px;
  padding: 22px;
  box-shadow: 0 10px 30px rgba(17, 24, 39, 0.06);
  border: 1px solid rgba(17, 24, 39, 0.05);
}

.rp-cart-panel-head {
  margin-bottom: 5px;
}

.rp-cart-panel-badge {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(0,0,0,0.05);
  font-size: 12px;
  font-weight: 700;
  color: #4f5665;
  margin-bottom: 10px;
}

.rp-cart-panel-title {
  margin: 0 0 6px;
  font-size: 24px;
  font-weight: 800;
  color: #161b26;
}

.rp-cart-panel-desc {
  margin: 0;
  color: #6f7787;
  font-size: 14px;
  line-height: 1.5;
}

.rp-cart-items-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.rp-cart-items-count span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  padding: 9px 14px;
  border-radius: 999px;
  background: #f2f4f8;
  color: #161b26;
  font-size: 13px;
  font-weight: 700;
}

.rp-cart-items-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.rp-cart-item {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) 40px;
  gap: 16px;
  align-items: start;
  padding: 16px;
  border-radius: 18px;
  background: #fbfcfe;
  border: 1px solid #edf0f5;
}

.rp-cart-item-thumb {
  width: 90px;
}

.rp-cart-item-thumb img {
  width: 100%;
  height: auto;
  border-radius: 14px;
  display: block;
  background: #fff;
}

.rp-cart-item-title {
  display: inline-block;
  font-size: 17px;
  font-weight: 700;
  color: #111827;
  text-decoration: none;
  line-height: 1.35;
  margin-bottom: 8px;
}

.rp-cart-item-title:hover {
  color: var(--primary-color);
}

.rp-cart-variation-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.rp-cart-variation-item {
  padding: 5px 10px;
  border-radius: 999px;
  background: #f1f4f8;
  font-size: 12px;
  color: #4b5563;
}

.rp-cart-item-meta {
  margin-bottom: 14px;
}

.rp-cart-item-unit-price {
  font-size: 13px;
  color: #6b7280;
}

.rp-cart-item-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.rp-cart-qty-box {
  display: inline-flex;
  align-items: center;
  background: #f3f5f9;
  border: 1px solid #e6eaf0;
  border-radius: 14px;
  overflow: hidden;
}

.rp-qty-btn {
  width: 38px;
  height: 38px;
  border: 0;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  color: #111827;
  cursor: pointer;
  transition: 0.2s ease;
}

.rp-qty-btn:hover {
  background: rgba(0,0,0,0.04);
}

.rp-cart-qty-input {
  width: 48px !important;
  height: 38px;
  border: 0;
  background: transparent;
  text-align: center;
  font-weight: 700;
  color: #111827;
  box-shadow: none !important;
  outline: none !important;
  padding: 0;
}

.rp-cart-price-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.rp-cart-price-old {
  color: #9ca3af;
  text-decoration: line-through;
  font-size: 14px;
}

.rp-cart-price-new {
  color: #111827;
  font-size: 20px;
  font-weight: 800;
}

.rp-cart-discount-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  background: #e8fff1;
  color: #0f9f57;
  font-size: 12px;
  font-weight: 800;
}

.rp-cart-item-actions {
  display: flex;
  justify-content: flex-end;
}

.rp-cart-remove-btn {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 0;
  background: #f3f4f6;
  color: #111827;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: 0.2s ease;
}

.rp-cart-remove-btn:hover {
  background: #fee2e2;
  color: #b91c1c;
}

.rp-cart-empty {
  text-align: center;
  padding: 50px 20px;
}

.rp-cart-empty-icon {
  font-size: 42px;
  margin-bottom: 12px;
}

.rp-cart-empty h4 {
  font-size: 22px;
  font-weight: 800;
  color: #111827;
  margin-bottom: 8px;
}

.rp-cart-empty p {
  margin: 0;
  color: #6b7280;
}

.rp-cart-footer-top {
  display: grid !important;
  grid-template-columns: 300px 1fr !important;
  gap: 18px !important;
  align-items: center !important;
  margin-bottom: 0px !important;
  margin-top: 10px !important;
}

.rp-cart-total-box {
  padding: 12px 27px;
  border-radius: 18px;
  background: #29b96d3b;
  color: #212736;
}

.rp-cart-total-label {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.75;
  font-weight: 700;
}

.rp-cart-total-value {
  /* font-weight: 800; */
  /* line-height: 1; */
}

.rp-cart-shipping-box {
  padding: 18px 20px;
  border-radius: 18px;
  background: #f4f7fb;
  border: 1px solid #e7ebf2;
}

.rp-cart-footer-actions {
  display: flex;
  gap: 18px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.rp-cart-footer-actions .buttoncart,
.rp-cart-footer-actions .checkout-button {
  min-width: 220px;
  padding: 14px 24px;
  border-radius: 14px;
  font-weight: 700;
  text-align: center;
  transition: 0.25s ease;
  max-width: 220px;
}

.rp-cart-footer-actions .buttoncart {
  background: #eef2f7;
  color: #111827;
  border: 1px solid #e2e8f0;
}

.rp-cart-footer-actions .buttoncart:hover {
  background: #e5ebf3;
  color: #111827;
}

.rp-cart-footer-actions .checkout-button {
  background: linear-gradient(90deg, #002049 0%, #1a7949 50%, #8373a1 100%);
  color: #fff;
}

.rp-cart-footer-actions .checkout-button:hover {
  transform: translateY(-1px);
  filter: brightness(0.96);
  color: #fff;
}

.rp-cart-loading {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #6b7280;
}

.rp-cart-loading-spinner {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 3px solid #e5e7eb;
  border-top-color: var(--primary-color);
  animation: rpCartSpin 0.8s linear infinite;
}

@keyframes rpCartSpin {
  to { transform: rotate(360deg); }
}

.rp-cart-shipping-box .progress-bar-container {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
  margin-bottom: 10px;
}

.rp-cart-shipping-box .progress-bar {
  height: 100%;
  border-radius: 999px;
}

.rp-cart-shipping-box .progress-text {
  font-size: 14px;
  color: #374151;
  line-height: 1.45;
}

.rp-cart-crosssell-content ul.products {
  margin: 0 !important;
}

.rp-cart-crosssell-content .products {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.rp-cart-crosssell-content .product,
.rp-cart-crosssell-content li.product {
  width: 100% !important;
  margin: 0 !important;
  float: none !important;
  background: #fbfcfe;
  border: 1px solid #edf0f5;
  border-radius: 18px;
  padding: 14px;
  box-shadow: none !important;
}

.rp-cart-crosssell-content .woocommerce-loop-product__title {
  font-size: 15px !important;
  line-height: 1.35;
  min-height: auto !important;
}

.rp-cart-crosssell-content .price {
  font-size: 15px !important;
  font-weight: 700;
}

.rp-cart-crosssell-content .button,
.rp-cart-crosssell-content .add_to_cart_button,
.rp-cart-crosssell-content .single_add_to_cart_button {
  width: 100%;
  text-align: center;
  border-radius: 12px;
  padding: 11px 14px;
  font-weight: 700;
}

@media (max-width: 1199px) {
.rp-cart-modal .modal-dialog {
  max-width: 1320px;
  width: calc(100% - 40px);
  height: calc(100vh - 40px);
  margin: 20px auto;
}

  .rp-cart-layout {
    grid-template-columns: 1fr;
  }

  .rp-cart-footer-top {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .rp-cart-modal .modal-dialog {
    width: 100%;
    max-width: 100%;
    height: 100vh;
    margin: 0;
  }

  .rp-cart-modal .modal-content {
    border-radius: 0;
    min-height: 100vh;
  }

  .rp-cart-modal-header,
  .rp-cart-modal-body,
  .rp-cart-modal-footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .rp-cart-modal-header {
    padding-top: 18px;
    padding-bottom: 14px;
  }

  .rp-cart-modal-body {
    padding-top: 16px;
    padding-bottom: 16px;
  }

  .rp-cart-modal-footer {
    padding-top: 16px;
    padding-bottom: 18px;
  }

  .rp-cart-modal .modal-title {
    font-size: 24px;
  }

  .rp-cart-panel {
    padding: 16px;
    border-radius: 18px;
  }

  .rp-cart-panel-title {
    font-size: 20px;
  }

  .rp-cart-item {
    grid-template-columns: 72px minmax(0, 1fr) 32px;
    gap: 12px;
    padding: 12px;
  }

  .rp-cart-item-thumb {
    width: 72px;
  }

  .rp-cart-item-title {
    font-size: 15px;
  }

  .rp-cart-price-new {
    font-size: 18px;
  }

  .rp-cart-footer-actions {
    flex-direction: column;
  }

  .rp-cart-footer-actions .buttoncart,
  .rp-cart-footer-actions .checkout-button {
    width: 100%;
    min-width: 100%;
  }

  .rp-cart-crosssell-content .products {
    grid-template-columns: 1fr;
  }
}

button.rp-cart-remove-btn.remove-cart-item span {
    position: relative;
    top: -4px;
}

@media (max-width: 767px) {
  .rp-cart-modal .modal-dialog {
    width: 100%;
    max-width: 100%;
    height: 100vh;
    margin: 0;
  }

  .rp-cart-modal .modal-content {
    min-height: 100vh;
    border-radius: 0;
  }

  .rp-cart-modal-body {
    padding: 16px 16px 180px;
  }

  .rp-cart-modal-footer {
    padding: 14px 16px 16px;
  }
}