/* Edwiser Store - Cart Page Styles */
/* Cart items, order summary, and empty states */

.local-edwiserstore-cart-page {
  padding: 24px 0;
  max-width: 1400px;
  margin: 0 auto;
}

.cart-page-container {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  padding: 24px;
  background-color: #ffffff;
}

.cart-items-section {
  flex: 1;
  min-width: 0;
}

.cart-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.cart-header-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.cart-title {
  font-size: 32px;
  font-weight: 700;
  color: #212529;
  margin: 0;
}

.cart-item-count {
  font-size: 16px;
  color: #6c757d;
  font-weight: 400;
  white-space: nowrap;
}

.cart-delete-all {
  background-color: #2f80ed !important;
  color: #fff !important;
  border: 1px solid #2f80ed !important;
  font-size: 14px;
  padding: 8px 16px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 400;
  transition: background-color 0.2s ease, border-color 0.2s ease;
  box-shadow: none;
}

.cart-delete-all:hover,
.cart-delete-all:focus {
  background-color: #1e6fe0 !important;
  border-color: #1e6fe0 !important;
  color: #fff !important;
  text-decoration: none;
  box-shadow: none;
}

.cart-delete-all:active {
  background-color: #1a5fc7 !important;
  border-color: #1a5fc7 !important;
  box-shadow: none;
}

.cart-delete-all i {
  color: #fff !important;
  font-size: 14px;
}

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

.cart-item-card {
  display: flex;
  gap: 20px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border: 1px solid #e2e8f0;
}

.cart-item-image-wrapper {
  flex-shrink: 0;
  width: 240px;
  height: auto;
  border-radius: 8px;
  overflow: hidden;
  background: #f5f7fa;
}

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

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

.cart-item-image-link:hover .cart-item-image {
  opacity: 0.9;
  transition: opacity 0.2s ease;
}

.cart-item-title a {
  color: inherit;
  text-decoration: none;
}

.cart-item-title a:hover {
  color: #2f80ed;
}

.cart-item-details {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 0;
}

.cart-item-category-tag {
  display: inline-block;
  padding: 4px 12px;
  background: #f3f4f6;
  color: #374151;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 8px;
  width: fit-content;
}

.cart-item-title {
  font-size: 18px;
  font-weight: 600;
  color: #212529;
  margin: 0;
  line-height: 1.4;
}

.cart-item-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.cart-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #6c757d;
}

.cart-meta-item i {
  color: #ffd700;
}

.cart-meta-item i.fa-users {
  color: #6c757d;
}

.cart-item-price {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.cart-price-original {
  font-size: 16px;
  color: #9ca3af;
  text-decoration: line-through;
}

.cart-price-actual {
  font-size: 20px;
  font-weight: 700;
  color: #2f80ed;
}

.cart-sale-tag {
  display: inline-block;
  padding: 4px 10px;
  background: #ffd700;
  color: #212529;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.cart-item-actions {
  flex-shrink: 0;
  display: flex;
  align-items: flex-end;
  padding: 20px;
}

.cart-item-delete {
  font-size: 14px;
  padding: 6px 12px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cart-item-delete i {
  color: #fff;
}

.cart-order-summary-section {
  flex-shrink: 0;
  width: 380px;
}

.order-summary-card {
  background: #fff;
  padding: 24px;
  padding-bottom: 0;
  top: 20px;
}

.order-summary-title {
  font-size: 24px;
  font-weight: 700;
  color: #212529;
  margin: 0 0 24px 0;
}

.order-summary-details {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.summary-label {
  font-size: 16px;
  color: #374151;
  font-weight: 500;
}

.summary-value {
  font-size: 16px;
  color: #212529;
  font-weight: 600;
}

.summary-row.total-row {
  padding-top: 16px;
  border-top: 2px solid #e2e8f0;
  margin-top: 8px;
}

.summary-row.total-row .summary-label,
.summary-row.total-row .summary-value {
  font-size: 20px;
  font-weight: 700;
}

.total-value {
  color: #212529;
}

.coupon-row {
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.coupon-input-container {
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  gap: 4px;
}

.coupon-input-wrapper {
  display: flex;
  gap: 8px;
  width: 100%;
  max-width: 300px;
  margin-left: auto;
}

.coupon-input {
  flex: 1;
  padding: 12px 12px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 14px;
}

.coupon-input:focus {
  outline: 2px solid transparent;
  outline-offset: 2px;
  border-color: #2f80ed;
  box-shadow: 0 0 0 3px rgba(47, 128, 237, 0.1);
}

.coupon-apply-btn {
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.coupon-discount-value {
  color: #28a745;
}

.coupon-input-wrapper-applied {
  display: flex;
  gap: 8px;
  width: 100%;
  align-items: center;
  position: relative;
}

.coupon-input-applied {
  flex: 1;
  padding: 12px 12px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 14px;
  background: #fff;
  color: #6c757d;
}

.coupon-remove-btn-inline {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  background: transparent;
  border: none;
  color: #dc3545;
  cursor: pointer;
  padding: 4px 8px;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.coupon-remove-btn-inline:hover {
  color: #c82333;
}

.coupon-applied-message {
  font-size: 12px;
  color: #28a745;
  font-weight: 500;
  width: 100%;
  text-align: left;
}

.coupon-edit-link,
.coupon-apply-link {
  font-size: 14px;
  color: #2f80ed;
  text-decoration: none;
}

.coupon-edit-link:hover,
.coupon-apply-link:hover {
  text-decoration: underline;
}

.order-summary-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.proceed-checkout-btn {
  width: 100%;
  padding: 14px 24px;
  background: #2f80ed;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  display: block;
}

.proceed-checkout-btn:hover {
  background: #1e6fe0;
  color: #fff;
  text-decoration: none;
}

.continue-shopping-btn,
.continue-shopping-btn-empty {
  width: 100%;
  padding: 10px 24px;
  background: transparent;
  color: #2f80ed;
  border: none;
  font-size: 14px;
  text-align: center;
  text-decoration: none;
  display: block;
}

.continue-shopping-btn:hover,
.continue-shopping-btn-empty:hover {
  color: #1e6fe0;
  text-decoration: underline;
}

/* Empty Cart State */
.cart-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  text-align: center;
}

.cart-empty-illustration {
  margin-bottom: 32px;
}

.empty-cart-image {
  max-width: 400px;
  width: 100%;
  height: auto;
}

.cart-empty-content {
  max-width: 500px;
}

.cart-empty-title {
  font-size: 28px;
  font-weight: 700;
  color: #212529;
  margin: 0 0 16px 0;
}

.cart-empty-message {
  font-size: 16px;
  color: #6c757d;
  margin: 0 0 32px 0;
  line-height: 1.6;
}

/* Delete Confirmation Modal */
.cart-delete-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.cart-delete-modal-content {
  background: #fff;
  border-radius: 8px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.cart-delete-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #e2e8f0;
}

.cart-delete-modal-header h4 {
  font-size: 20px;
  font-weight: 700;
  color: #212529;
  margin: 0;
}

.cart-delete-modal-close {
  background: none;
  border: none;
  font-size: 28px;
  color: #6c757d;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-delete-modal-close:hover {
  color: #212529;
}

.cart-delete-modal-body {
  padding: 24px;
}

.cart-delete-modal-body p {
  font-size: 16px;
  color: #374151;
  margin: 0;
  line-height: 1.6;
}

.cart-delete-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid #e2e8f0;
}

.cart-delete-modal-footer .btn {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  min-width: 80px;
}

.cart-delete-cancel {
  background: #fff;
  color: #2f80ed;
  border: 1px solid #2f80ed;
}

.cart-delete-cancel:hover {
  background: #f5f8ff;
}

.cart-delete-confirm {
  background: #2f80ed;
  color: #fff;
}

.cart-delete-confirm:hover {
  background: #1e6fe0;
}

/* Responsive Cart Page */
@media (max-width: 1024px) {
  .cart-page-container {
    flex-direction: column;
  }

  .cart-order-summary-section {
    width: 100%;
  }

  .order-summary-card {
    position: static;
  }
}

@media (max-width: 768px) {
  .local-edwiserstore-cart-page {
    padding: 16px;
  }

  .cart-item-card {
    flex-direction: column;
    padding: 16px;
  }

  .cart-item-image-wrapper {
    width: 100%;
    height: 200px;
  }

  .cart-header-bottom {
    flex-wrap: wrap;
  }

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

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

  .cart-empty-illustration {
    margin-bottom: 24px;
  }

  .empty-cart-image {
    max-width: 300px;
  }
}

@media (max-width: 576px) {
  .cart-item-meta {
    flex-direction: column;
    gap: 8px;
  }

  .coupon-input-wrapper {
    flex-direction: column;
  }

  .coupon-apply-btn {
    width: 100%;
  }
}

/* Design fixes */
#page-local-edwiserstore-cart #page {
  padding: 0 !important;
}

#page-local-edwiserstore-cart #topofscroll {
  padding: 0 !important;
  max-width: 100% !important;
}

#page-local-edwiserstore-cart #page-content div[role='main'] {
  padding: 0 !important;
}

#page-local-edwiserstore-cart #page-header {
  display: none !important;
}

#page-local-edwiserstore-cart .local-edwiserstore-cart-page {
  max-width: 1320px !important;
  margin: 0 auto !important;
}

#page-local-edwiserstore-cart .coupon-input-wrapper {
  margin-left: 0 !important;
  max-width: 100% !important;
}

.local-edwiserstore-cart-page .cart-item-image-wrapper {
  border-radius: 8px 0 0 8px !important;
}

.local-edwiserstore-cart-page .cart-item-delete,
.local-edwiserstore-cart-page .cart-delete-all {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  font-weight: 600 !important;
  padding: 8px 12px !important;
  font-size: 12px !important;
  line-height: 16px !important;
}

#page-local-edwiserstore-cart .coupon-input-container {
  flex-direction: column;
}

#page-local-edwiserstore-cart .coupon-input-wrapper,
#page-local-edwiserstore-cart .coupon-input-wrapper-applied,
#page-local-edwiserstore-cart .coupon-applied-message {
  margin-left: 0 !important;
  max-width: 100% !important;
}
