/* KHAITE Cart Page Styles */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  font-family: "Helvetica Neue", Arial, sans-serif;
  background-color: #ffffff;
}

main {
  margin: 0;
  padding: 0;
}

/* Cart Page Container */
.cart-page-container {
  display: flex;
  max-width: 1600px;
  margin: 0 auto;
  padding: 60px;
  gap: 80px;
  min-height: calc(100vh - 200px);
}

/* Cart Items Section (Left) */
.cart-items-section {
  flex: 1;
  max-width: 600px;
}

.cart-title {
  font-size: 32px;
  font-weight: 300;
  font-style: italic;
  color: #000000;
  margin: 0 0 40px 0;
  letter-spacing: 1px;
  font-family: "Times New Roman", Georgia, serif;
}

#cart-items-list {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

/* Cart Item */
.cart-item {
  display: flex;
  gap: 30px;
  padding-bottom: 30px;
  border-bottom: 1px solid #e0e0e0;
}

.cart-item:last-child {
  border-bottom: none;
}

.cart-item-image {
  width: 150px;
  height: 200px;
  flex-shrink: 0;
  overflow: hidden;
  background-color: #f8f8f8;
}

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

.cart-item-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.cart-item-info {
  margin-bottom: 20px;
}

.cart-item-name {
  font-size: 18px;
  font-weight: 400;
  color: #000000;
  margin: 0 0 10px 0;
  letter-spacing: 0.5px;
  font-family: "Helvetica Neue", Arial, sans-serif;
  text-transform: uppercase;
}

.cart-item-price {
  font-size: 16px;
  font-weight: 400;
  color: #000000;
  margin: 0 0 15px 0;
  letter-spacing: 0.3px;
  font-family: "Helvetica Neue", Arial, sans-serif;
}

.cart-item-attributes {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 20px;
}

.cart-item-attribute {
  font-size: 14px;
  font-weight: 400;
  color: #666666;
  letter-spacing: 0.3px;
  font-family: "Helvetica Neue", Arial, sans-serif;
}

.cart-item-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.quantity-controls {
  display: flex;
  align-items: center;
  gap: 15px;
}

.quantity-btn {
  width: 30px;
  height: 30px;
  border: 1px solid #e0e0e0;
  background-color: #ffffff;
  color: #000000;
  font-size: 16px;
  font-weight: 400;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.quantity-btn:hover {
  border-color: #000000;
}

.quantity-display {
  font-size: 16px;
  font-weight: 400;
  color: #000000;
  letter-spacing: 0.3px;
  font-family: "Helvetica Neue", Arial, sans-serif;
  min-width: 20px;
  text-align: center;
}

.remove-item-btn {
  background: none;
  border: none;
  color: #666666;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.3px;
  font-family: "Helvetica Neue", Arial, sans-serif;
  cursor: pointer;
  text-decoration: underline;
  transition: color 0.3s ease;
}

.remove-item-btn:hover {
  color: #000000;
}

/* Cart Summary Section (Right) */
.cart-summary-section {
  flex: 0 0 400px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* Tax Notice */
.tax-notice {
  text-align: right;
}

.tax-notice p {
  font-size: 14px;
  font-weight: 400;
  color: #666666;
  margin: 0;
  letter-spacing: 0.3px;
  font-family: "Helvetica Neue", Arial, sans-serif;
}

/* Total Section */
.cart-total-section {
  text-align: right;
  margin-bottom: 20px;
}

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

.total-label {
  font-size: 24px;
  font-weight: 300;
  font-style: italic;
  color: #000000;
  letter-spacing: 0.5px;
  font-family: "Times New Roman", Georgia, serif;
}

.total-value {
  font-size: 24px;
  font-weight: 400;
  color: #000000;
  letter-spacing: 0.3px;
  font-family: "Helvetica Neue", Arial, sans-serif;
}

/* Checkout Button */
.checkout-btn {
  width: 100%;
  padding: 18px 30px;
  background-color: #000000;
  color: #ffffff;
  border: none;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 1px;
  font-family: "Helvetica Neue", Arial, sans-serif;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 20px;
}

.checkout-btn:hover {
  background-color: #333333;
}

.checkout-btn:disabled {
  background-color: #cccccc;
  cursor: not-allowed;
}

/* Info Sections */
.shipping-section,
.contact-section,
.return-policy-section {
  margin-bottom: 30px;
}

.shipping-title,
.contact-title,
.return-policy-title {
  font-size: 16px;
  font-weight: 400;
  color: #000000;
  margin: 0 0 15px 0;
  letter-spacing: 0.3px;
  font-family: "Helvetica Neue", Arial, sans-serif;
}

.shipping-text,
.contact-text,
.contact-hours,
.return-policy-text {
  font-size: 14px;
  font-weight: 400;
  color: #666666;
  line-height: 1.6;
  margin: 0 0 10px 0;
  letter-spacing: 0.3px;
  font-family: "Helvetica Neue", Arial, sans-serif;
}

.shipping-link,
.contact-link,
.return-policy-link {
  color: #000000;
  text-decoration: underline;
  transition: opacity 0.3s ease;
}

.shipping-link:hover,
.contact-link:hover,
.return-policy-link:hover {
  opacity: 0.7;
}

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

.empty-cart-title {
  font-size: 24px;
  font-weight: 400;
  color: #000000;
  margin: 0 0 30px 0;
  letter-spacing: 0.5px;
  font-family: "Helvetica Neue", Arial, sans-serif;
}

.continue-shopping-btn {
  padding: 15px 30px;
  background-color: #000000;
  color: #ffffff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 1px;
  font-family: "Helvetica Neue", Arial, sans-serif;
  text-transform: uppercase;
  transition: all 0.3s ease;
}

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

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

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

  .cart-summary-section {
    flex: 0 0 350px;
  }
}

@media (max-width: 992px) {
  .cart-page-container {
    flex-direction: column;
    gap: 50px;
    padding: 40px 30px;
  }

  .cart-summary-section {
    flex: none;
    max-width: none;
  }

  .cart-item {
    gap: 20px;
  }

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

@media (max-width: 768px) {
  .cart-page-container {
    padding: 30px 25px;
    gap: 40px;
  }

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

  .cart-item {
    flex-direction: column;
    gap: 15px;
  }

  .cart-item-image {
    width: 100%;
    height: 300px;
    align-self: center;
    max-width: 250px;
  }

  .cart-item-controls {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .total-label,
  .total-value {
    font-size: 20px;
  }
}

@media (max-width: 480px) {
  .cart-page-container {
    padding: 25px 20px;
    gap: 30px;
  }

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

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

  .cart-item-price {
    font-size: 14px;
  }

  .checkout-btn {
    padding: 16px 25px;
    font-size: 15px;
  }

  .cart-item-image {
    height: 250px;
  }
}

/* Loading State */
.cart-page-container.loading {
  opacity: 0.6;
}

.loading-spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #000000;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
