/* ---------------------------
   Cart Wrapper + Title
--------------------------- */
.woocommerce-info {
    border-top-color: #1e85be;
    margin-top: 30px;
}

.cart-wrapper {
  margin: 0;
  padding: 7rem 1rem 3rem 1rem;
  font-family: "Poppins", sans-serif;
  background: linear-gradient(to bottom right, #eff6ff, #dbeafe); /* light blue gradient */
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  z-index: 1;
}
.cart-title {
  font-size: 2.5rem;
  font-weight: bold;
  color: #1e40af; /* dark blue */
  text-align: center;
  margin-bottom: 2.5rem;
  letter-spacing: 0.05em;
}

/* Decorative Background */
.cart-bg-decor {
  position: absolute;
  width: 18rem;
  opacity: 0.1;
  z-index: 0;
  pointer-events: none;
}
.cart-top-left {
  top: 0;
  left: 0;
}
.cart-bottom-right {
  bottom: 0;
  right: 0;
}

/* ---------------------------
   Cart Container
--------------------------- */
.cart-container {
  max-width: 1152px;
  margin: 0 auto;
  position: relative;
  z-index: 10;
}

/* ---------------------------
   Empty Cart
--------------------------- */
.cart-empty {
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  padding: 2.5rem;
  border-radius: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.4);
  text-align: center;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
  animation: fadeIn 0.3s ease-in-out;
}
.cart-empty-img {
  width: 11rem;
  margin: 0 auto .5rem;
}
.cart-empty h2 {
  font-size: 1.75rem;
  font-weight: bold;
  color: #1e40af;
}
.cart-empty p {
  color: #4b5563;
  margin-bottom: 1.5rem;
}
.cart-shop-now-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(to right, #3b82f6, #60a5fa);
  color: white;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}
.cart-shop-now-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

/* ---------------------------
   Cart Content Layout
--------------------------- */
.cart-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  animation: fadeIn 0.3s ease-in-out;
}
@media (min-width: 1024px) {
  .cart-content {
    flex-direction: row;
  }
}

/* ---------------------------
   Cart Items
--------------------------- */
.cart-items {
  flex: 1;
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}
.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}
.cart-back-link,
.cart-clear-btn {
  color: #2563eb;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
  text-decoration: none;
  transition: transform 0.2s ease, font-size 0.2s ease;
}

.cart-back-link:hover,
.cart-clear-btn:hover {
  transform: scale(1.05);
  background-color: #60a5fa;
  color: white;
  padding: 4px 6px;
  border-radius: 8px;
}

/* ---------------------------
   Cart Item
--------------------------- */
.cart-item {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1rem 1rem 1rem 0;
  border-bottom: 1px solid #e5e7eb;
  position: relative;
}

.cart-item .remove-icon {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
}

.quantity-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.qty-input {
  width: 50px;
  text-align: center;
  padding: 0.4rem;
  font-size: 0.85rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
}

.qty-btn {
  background-color: #f3f4f6;
  border: 1px solid #d1d5db;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
}

.qty-btn:hover {
  background-color: #e5e7eb;
}

.hidden {
  display: none;
}

/* Price Row Layout */
.price-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 0.75rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: #1f2937;
}

/* Individual price items */
.price-row .product-price,
.price-row .product-subtotal {
  flex: 1 1 45%;
  background-color: #dbeafe;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
  color: #1e3a8a;
}

/* Emphasize numeric price values */
.price-row .woocommerce-Price-amount {
  font-weight: bold;
  font-size: 1.05rem;
}

/* Optional: Align numbers to the right */
.price-row .woocommerce-Price-amount.amount {
  float: right;
}

.remove-item {
  background-color: #e0f2fe;
  border-radius: 50%;
  padding: 0.5rem;
  color: #2563eb;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  transition: background-color 0.3s ease, transform 0.2s;
}

.remove-item:hover {
  background-color: #bfdbfe;
  transform: scale(1.1);
}

.cart-item img {
  width: 6rem;
  height: 6rem;
  object-fit: cover;
  border-radius: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}
.cart-item:hover img {
  transform: scale(1.05);
}

.item-details {
  flex: 1;
}
.item-details h3,
.item-details .product-name {
  font-size: 1rem;
  font-weight: 600;
  color: #1f2937;
  margin: 0;
}
.item-details h3 a,
.item-details .product-name a {
  color: inherit;
  text-decoration: none;
}
.item-details h3 a:hover {
  text-decoration: underline;
}

/* WooCommerce Price Styling */
.product-price,
.product-subtotal,
.woocommerce-Price-amount {
  color: #2563eb;
  font-weight: 500;
  margin: 0.25rem 0;
  font-size: 0.95rem;
}

/* Quantity */
.product-quantity {
  font-size: 0.85rem;
  color: #374151;
}

/* Remove Button */
.product-remove .remove-item {
  display: inline-block;
  background-color: #e0f2fe;
  border-radius: 9999px;
  padding: 0.4rem 0.75rem;
  color: #2563eb;
  font-size: 0.85rem;
  text-decoration: none;
  transition: background-color 0.3s ease;
}
.product-remove .remove-item:hover {
  background-color: #bfdbfe;
}

/* ---------------------------
   Order Summary
--------------------------- */
.cart-summary {
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.5rem;
  width: 100%;
  max-width: 400px;
  margin: auto;
  font-family: "Poppins", sans-serif;
}

.cart-summary h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 0.75rem;
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  color: #374151;
}

.cart-total-row {
  font-size: 1.05rem;
  font-weight: 600;
  color: #111827;
  border-top: 1px solid #e5e7eb;
  margin-top: 1rem;
  padding-top: 1rem;
}

.cart-summary .value {
  font-weight: 500;
}

/* Coupon Form */
.cart-coupon-row {
  margin: 1.5rem 0;
}

.coupon-form {
  display: flex;
  gap: 0.5rem;
}

#coupon-input {
  flex: 1;
  padding: 0.6rem 0.8rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s ease;
}

#coupon-input:focus {
  border-color: #93c5fd;
}

#apply-coupon-btn {
  padding: 0.6rem 1rem;
  background-color: #f3f4f6;
  color: #111827;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

#apply-coupon-btn:hover {
  background-color: #e5e7eb;
  border-color: #9ca3af;
}

/* Checkout Button */
.cart-checkout-btn {
    display: block;
    width: auto;
    text-align: center;
    margin-top: 1.5rem;
    background-color: #111827;
    color: white;
    font-weight: 600;
    padding: 0.9rem 1.25rem;
    border-radius: 8px;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
    text-decoration: none;
}

.cart-checkout-btn:hover {
  background-color: #1f2937;
}

/* ---------------------------
   Blobs + Animations
--------------------------- */
.cart-blob {
  position: absolute;
  width: 18rem;
  height: 18rem;
  border-radius: 9999px;
  filter: blur(80px);
  mix-blend-mode: multiply;
  opacity: 0.3;
  z-index: 0;
  animation: blob 8s infinite;
}
.cart-blob-pink {
  background-color: #bfdbfe;
  top: 0;
  left: -5rem;
}
.cart-blob-rose {
  background-color: #93c5fd;
  bottom: 0;
  right: -5rem;
  animation-delay: 2s;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes blob {
  0%,
  100% {
    transform: translate(0px, 0px) scale(1);
  }
  33% {
    transform: translate(30px, -20px) scale(1.05);
  }
  66% {
    transform: translate(-20px, 20px) scale(0.95);
  }
}

/* Utility */
.hidden {
  display: none;
}

/* Your original CSS is fully kept above this line */

/* ---------------------------
   Responsive Enhancements
--------------------------- */

/* Mobile First - Small Screens (iOS/Android) */
@media (max-width: 640px) {
  .cart-title {
    font-size: 1.75rem;
  }

  .cart-empty {
    padding: 1.5rem;
  }

  .cart-empty h2 {
    font-size: 1.25rem;
  }

  .cart-empty-img {
    width: 7rem;
  }

  .cart-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .cart-item img {
    width: 5rem;
    height: 5rem;
  }

  .item-details h3 {
    font-size: 0.95rem;
  }

  .cart-summary {
    margin-top: 2rem;
    max-width: -webkit-fill-available;
  }

  .cart-shop-now-btn,
  .cart-checkout-btn {
    width: auto;
    font-size: 0.9rem;
    padding: 0.75rem 1rem;
  }
}

/* Tablets */
@media (min-width: 641px) and (max-width: 1024px) {
  .cart-title {
    font-size: 2rem;
  }

  .cart-item {
    gap: 1rem;
  }

  .cart-summary {
    max-width: 100%;
  }
}

/* High-Resolution / Large Screens */
@media (min-width: 1440px) {
  .cart-wrapper {
    padding: 8rem 2rem 4rem;
  }

  .cart-title {
    font-size: 3rem;
  }

  .cart-empty h2 {
    font-size: 2rem;
  }

  .cart-summary {
    max-width: 480px;
  }
}

/* iOS specific fix for smooth scrolling */
.cart-items {
  -webkit-overflow-scrolling: touch;
}

/* Fluid typography for all devices */
.cart-title,
.cart-empty h2,
.cart-summary h2 {
  font-size: clamp(1.25rem, 2vw, 2.5rem);
}


/* Coupon popup */
.coupon-popup {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}
.coupon-popup .popup-content {
    background: #fff;
    padding: 1.5rem 2rem;
    border-radius: 10px;
    text-align: center;
    width: 300px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}
.coupon-popup p {
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: 500;
}
.applied-coupon-box {
    background: #f5f5f5;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}
#applied-coupon-name {
    font-weight: bold;
    color: #27ae60;
    margin-right: 10px;
}
#remove-coupon-btn {
    border: none;
    background: #e74c3c;
    color: #fff;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    line-height: 18px;
    cursor: pointer;
}
#close-popup-btn {
    background: #27ae60;
    color: #fff;
    border: none;
    padding: 0.4rem 1rem;
    border-radius: 5px;
    cursor: pointer;
}

/* Applied Coupon Display */
.applied-coupon-display {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 0;
    background: #ecfdf5;
    border: 1px solid #10b981;
    color: #065f46;
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    font-weight: 600;
    font-size: 0.9rem;
    animation: fadeIn 0.3s ease-in-out;
}

.applied-coupon-display #active-coupon-name {
    margin: 0;       /* removes any default margin */
    padding: 0;      /* removes padding if any */
}


#active-coupon-name {
    margin-right: 8px;
}

#clear-coupon-btn {
    font-weight: bolder;
    color: #ef4444;
    border: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    line-height: 18px;
    font-size: 1.2rem;
    cursor: pointer;
}

#clear-coupon-btn:hover {
    background: none;
}

/* Coupon popup refine */
.coupon-popup .popup-content {
    position: relative;
}

#close-popup-btn {
    position: absolute;
    top: 8px;
    right: 10px;
    background: transparent;
    border: none;
    font-size: 1.2rem;
    color: #333;
    cursor: pointer;
}

