/********** Primary Button *************/
/*************************************/
.primary-btn {
  background-color: #ff4400;
  color: white;
  transition: all 0.3s;
}

.primary-btn:hover {
  background-color: #e03e00;
}


/********** Cart Container *************/
/*************************************/

.cart-container {
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 20px;
  flex: 2;
}

.cart-item {
  display: flex;
  border-bottom: 1px solid #eee;
  padding: 15px 0;
  align-items: center;
}

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

/********** Item Image *************/
/*********************************/

.item-image {
  width: 100px;
  height: 100px;
  background-color: #f5f5f5;
  border-radius: 5px;
  margin-right: 15px;
  overflow: hidden;
  flex-shrink: 0;
}

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

.item-details {
  flex: 1;
}

.item-name {
  font-weight: bold;
  font-size: 18px;
  margin-bottom: 5px;
}

.cart-product-link {
  color: inherit;
  text-decoration: none;
}

.cart-product-link:hover,
.cart-product-link:focus,
.cart-product-link:visited,
.cart-product-link:active {
  color: inherit;
  text-decoration: none;
}

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

.item-price {
  color: #4caf50;
  font-weight: bold;
  font-size: 16px;
}

.item-controls {
  display: flex;
  align-items: center;
  margin-top: 10px;
}

/********** Quantity Controls *************/
/***************************************/

.quantity-control {
  display: flex;
  align-items: center;
  margin-right: 20px;
}

.quantity-btn {
  width: 30px;
  height: 30px;
  background-color: #f0f0f0;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.quantity-input {
  width: 40px;
  height: 30px;
  text-align: center;
  border: 1px solid #ddd;
  margin: 0 5px;
  border-radius: 5px;
}

.remove-btn {
  background-color: #ff6b6b;
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.remove-btn:hover {
  background-color: #ff5252;
}

/********** Cart Summary *************/
/***********************************/

.cart-summary {
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 20px;
  flex: 1;
  height: fit-content;
  margin-left: 20px;
}

.cart-summary h2 {
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 1.25rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #eee;
}

.summary-row:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.summary-row.total {
  font-weight: bold;
  font-size: 18px;
  color: #4caf50;
  margin-top: 10px;
  border-top: 2px solid #eee;
  padding-top: 10px;
}

/********** Checkout Button *************/
/*************************************/

.checkout-btn {
  display: block;
  width: 100%;
  background-color: #4caf50;
  color: white;
  border: none;
  padding: 15px;
  border-radius: 5px;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s;
  margin-top: 20px;
}

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

/********** Continue Shopping Button *************/
/*********************************************/

.continue-shopping {
  display: block;
  text-align: center;
  margin-top: 20px;
  color: #4caf50;
  text-decoration: none;
  font-weight: 500;
}

.continue-shopping:hover {
  text-decoration: underline;
}

.empty-cart {
  text-align: center;
  padding: 50px 0;
  display: none;
}

.empty-cart p {
  margin: 20px 0;
  font-size: 18px;
  color: #777;
}

.shop-now-btn {
  display: inline-block;
  background-color: #4caf50;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.3s;
}

.shop-now-btn:hover {
  background-color: #45a049;
}

/********** Cart Layout *************/
/*********************************/

.cart-layout {
  display: flex;
  margin-bottom: 20px;
}

.payment-methods {
  display: flex;
  gap: 10px;
  font-size: 24px;
}

/********** Media Query for Cart Layout - Mobile *************/
/************************************************************/

/********** Order summary price column *************/
/***************************************************/

#orderSummary .order-summary-price,
#order-form .order-summary-price {
  flex-shrink: 0;
  min-width: 4.5rem;
  text-align: right;
  white-space: nowrap;
}

#orderSummary .order-summary-product-info,
#order-form .order-summary-product-info {
  flex: 1 1 auto;
  min-width: 0;
  padding-right: 0.25rem;
}

#orderSummary .order-summary-product-details,
#order-form .order-summary-product-details {
  flex: 1 1 0;
  min-width: 0;
}

#orderSummary .order-summary-product-title,
#order-form .order-summary-product-title {
  width: 100%;
  max-width: 100%;
}

#order-form .order-summary-header-row {
  align-items: center;
}

#orderSummary .order-summary-row {
  align-items: flex-start;
}

@media (min-width: 640px) {
  #orderSummary .order-summary-price,
  #order-form .order-summary-price {
    min-width: 5rem;
  }
}

@media (max-width: 768px) {
  .cart-layout {
    flex-direction: column;
  }

  .cart-summary {
    margin-left: 0;
    margin-top: 20px;
  }

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

  .cart-page .order-summary-item {
    gap: 0.5rem;
  }

  .cart-page .order-summary-actions {
    align-items: stretch;
    min-width: 4.5rem;
  }

  .cart-page .cart-summary-controls {
    width: 100%;
    justify-content: flex-end;
    margin-right: 0;
    padding-right: 0;
  }

  .cart-page .cart-summary-controls .quantity-control {
    justify-content: flex-end;
    margin-right: 0;
  }

  .cart-page .cart-summary-controls .cart-summary-remove {
    padding-right: 0;
    margin-right: 0;
  }

  .cart-page .order-summary-actions .order-summary-price {
    width: 100%;
    padding-right: 0;
    margin-right: 0;
  }
}

/* Cart summary: controls + price column (default for cart-page) */
.cart-page .order-summary-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

@media (min-width: 769px) {
  .cart-page .order-summary-actions {
    flex-direction: row;
    align-items: center;
    gap: 6px;
  }
}
