/* Cart Page Styles - Table Layout */

/* Main Cart Page Container */
.cart-page-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 60px 40px 100px;
  background-color: #fff;
  min-height: 70vh;
}

/* Cart Table Wrapper */
.cart-table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Cart Table */
.cart-table {
  width: 100%;
  border-collapse: collapse;
  font-family: Arial, Helvetica, sans-serif;
  margin-bottom: 30px;
}

.cart-table thead {
  border-top: 1px solid #000;
  border-bottom: 1px solid #000;
}

.cart-table thead tr {
  height: 60px;
}

.cart-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #000;
  padding: 20px 15px;
  vertical-align: middle;
  text-transform: uppercase;
}

.cart-table th.cart-header-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.8px;
}

.cart-table th.cart-header-col {
  font-size: 11px;
  font-weight: 700;
}

/* Cart Table Body */
.cart-table tbody tr {
  border-bottom: 1px solid #e5e5e5;
  transition: background-color 0.2s ease;
}

.cart-table tbody tr:hover {
  background-color: #fafafa;
}

.cart-table tbody td {
  padding: 30px 15px;
  vertical-align: top;
  font-size: 13px;
  color: #000;
  line-height: 1.6;
}

/* Product Column with Image and Details */
.cart-item-product {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  min-width: 280px;
}

.cart-item-image {
  width: 140px;
  height: 180px;
  object-fit: cover;
  background-color: #f5f5f5;
  flex-shrink: 0;
}

.cart-item-details {
  flex: 1;
  padding-top: 5px;
}

.cart-item-name {
  font-size: 14px;
  font-weight: 400;
  color: #000;
  margin: 0 0 8px 0;
  line-height: 1.4;
}

.cart-item-remove {
  display: inline-block;
  font-size: 12px;
  color: #666;
  text-decoration: underline;
  cursor: pointer;
  margin-top: 5px;
  transition: color 0.2s ease;
}

.cart-item-remove:hover {
  color: #000;
}

/* Size Column */
.cart-item-size {
  font-size: 13px;
  color: #000;
  font-weight: 400;
}

/* Vendor Column */
.cart-item-vendor {
  font-size: 13px;
  color: #000;
  font-weight: 400;
}

/* Ships From Column */
.cart-item-ships-from {
  font-size: 13px;
  color: #000;
  font-weight: 400;
}

/* Quantity Column */
.cart-item-quantity {
  min-width: 100px;
}

.quantity-controls {
  display: inline-flex;
  align-items: center;
  border: 1px solid #000;
  background-color: #fff;
  height: 32px;
}

.quantity-btn {
  width: 32px;
  height: 30px;
  border: none;
  background-color: transparent;
  color: #000;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-weight: 300;
}

.quantity-btn:hover:not(:disabled) {
  background-color: #f0f0f0;
}

.quantity-btn:disabled {
  color: #ccc;
  cursor: not-allowed;
}

.quantity-input {
  width: 40px;
  height: 30px;
  border: none;
  border-left: 1px solid #000;
  border-right: 1px solid #000;
  text-align: center;
  font-size: 13px;
  color: #000;
  background-color: transparent;
  font-family: Arial, Helvetica, sans-serif;
  padding: 0;
  -moz-appearance: textfield;
}

.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.quantity-input:focus {
  outline: none;
  background-color: #fafafa;
}

/* Item Price Column */
.cart-item-price {
  font-size: 14px;
  font-weight: 400;
  color: #000;
  text-align: left;
  white-space: nowrap;
}

/* Cart Footer Notice */
.cart-footer-notice {
  padding: 30px 15px 40px;
  border-bottom: 1px solid #e5e5e5;
  margin-bottom: 30px;
}

.cart-footer-notice p {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  line-height: 1.8;
  color: #000;
  margin: 0 0 30px 0;
  max-width: 900px;
}

.cart-total-section {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 30px;
  margin-top: 20px;
}

.cart-total-label {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: #000;
  text-transform: uppercase;
}

.cart-total-amount {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #000;
}

/* Cart Actions */
.cart-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 15px;
  padding: 0 15px;
}

.cart-action-btn {
  padding: 12px 35px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid #000;
  background-color: #fff;
  color: #000;
}

.cart-action-btn:hover {
  background-color: #000;
  color: #fff;
}

.cart-action-btn.checkout-btn {
  background-color: #000;
  color: #fff;
}

.cart-action-btn.checkout-btn:hover {
  background-color: #fff;
  color: #000;
}

/* Empty Cart State */
.empty-cart {
  text-align: center;
  padding: 100px 20px;
  min-height: 400px;
}

.empty-cart p {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 18px;
  color: #666;
  margin-bottom: 30px;
}

.continue-shopping-btn {
  display: inline-block;
  padding: 14px 40px;
  background-color: #000;
  color: #fff;
  text-decoration: none;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  border: 1px solid #000;
}

.continue-shopping-btn:hover {
  background-color: #fff;
  color: #000;
}

/* Message Notifications */
.cart-message {
  position: fixed;
  top: 100px;
  right: 30px;
  padding: 18px 30px;
  background-color: #000;
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  border-radius: 2px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  opacity: 0;
  transform: translateX(400px);
  transition: all 0.3s ease;
  z-index: 10000;
  max-width: 350px;
}

.cart-message.show {
  opacity: 1;
  transform: translateX(0);
}

.cart-message.error {
  background-color: #d32f2f;
}

.cart-message.success {
  background-color: #2e7d32;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .cart-page-container {
    padding: 50px 30px 80px;
  }

  .cart-table th {
    padding: 15px 10px;
    font-size: 10px;
  }

  .cart-table tbody td {
    padding: 25px 10px;
    font-size: 12px;
  }

  .cart-item-product {
    min-width: 240px;
    gap: 12px;
  }

  .cart-item-image {
    width: 120px;
    height: 150px;
  }
}

@media (max-width: 968px) {
  .cart-page-container {
    padding: 40px 20px 60px;
  }

  .cart-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .cart-table {
    min-width: 900px;
  }

  .cart-item-product {
    min-width: 200px;
  }

  .cart-item-image {
    width: 100px;
    height: 130px;
  }

  .cart-footer-notice {
    padding: 25px 10px 30px;
  }

  .cart-actions {
    padding: 0 10px;
  }
}

@media (max-width: 640px) {
  .cart-page-container {
    padding: 30px 15px 50px;
  }

  /* Switch to mobile card layout on small screens */
  .cart-table-wrapper {
    overflow-x: auto;
  }

  .cart-table {
    min-width: 800px;
  }

  .cart-table th {
    padding: 12px 8px;
    font-size: 9px;
  }

  .cart-table tbody td {
    padding: 20px 8px;
    font-size: 11px;
  }

  .cart-item-product {
    flex-direction: column;
    min-width: 140px;
    gap: 8px;
  }

  .cart-item-image {
    width: 80px;
    height: 100px;
  }

  .cart-item-name {
    font-size: 12px;
  }

  .cart-footer-notice p {
    font-size: 11px;
  }

  .cart-total-section {
    gap: 20px;
  }

  .cart-total-label {
    font-size: 10px;
  }

  .cart-total-amount {
    font-size: 14px;
  }

  .cart-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .cart-action-btn {
    width: 100%;
    padding: 12px 20px;
    font-size: 12px;
  }

  .empty-cart {
    padding: 60px 15px;
  }

  .empty-cart p {
    font-size: 16px;
  }

  .continue-shopping-btn {
    padding: 12px 30px;
    font-size: 12px;
  }

  .cart-message {
    top: 80px;
    right: 15px;
    left: 15px;
    max-width: none;
    font-size: 13px;
    padding: 15px 20px;
  }
}

/* Loading State */
.cart-loading {
  text-align: center;
  padding: 100px 20px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  color: #666;
}

/* Print Styles */
@media print {
  .cart-action-btn,
  .cart-item-remove,
  .continue-shopping-btn {
    display: none;
  }

  .cart-page-container {
    background-color: #fff;
  }

  .cart-table {
    border: 1px solid #000;
  }
}
