/* Cart Table */
.cart-table {
  width: 100%;
  border-collapse: collapse;
  box-sizing: border-box;
  margin: 0;
}

.cart-table-container {
  flex: 1;
  width: 100%;
  max-width: 900px;
  overflow-x: auto;
  padding: 20px;
  margin: 0 auto;
}

/* Cart Table Rows */
.cart-table tbody tr {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 15px;
  background-color: #f9f9f9;
  padding: 15px;
  border-radius: 8px;
  align-items: center;
  margin-bottom: 15px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cart-table tbody tr:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Aligning Table Columns */
.cart-table td {
  padding: 10px;
  border: none;
  vertical-align: middle;
  text-align: center;
}

/* Product Name Alignment */
.product-name {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  gap: 15px;
}

.product-name img {
  width: 80px;
  height: auto;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.product-name span {
  font-weight: bold;
  color: #333;
  line-height: 1.2;
  vertical-align: middle;
  display: inline-block;
}

/* Quantity and Price Alignment */
.quantity-selector {
  display: flex;
  align-items: center;
  justify-content: center;
}

.quantity-selector input {
  width: 60px;
  height: 30px;
  text-align: center;
  border: 1px solid #ddd;
  border-radius: 4px;
}

/* Cart Buttons */
.cart-buttons {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin-top: 24px;
}

.update-cart, .continue-shopping {
  padding: 12px 20px;
  background-color: #333;
  color: white;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s ease;
  border: none;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-decoration: none;
  text-align: center;
}

.update-cart:hover, .continue-shopping:hover {
  background-color: #555;
  transform: translateY(-2px);
}

/* Order Summary */
.cart-summary {
  margin-bottom: 20px;
}

.cart-summary p {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 16px;
}

.cart-summary p:last-of-type {
  font-weight: bold;
  font-size: 18px;
}

.cart-summary button {
  padding: 15px;
  background-color: #333;
  color: white;
  width: 100%;
  border: none;
  cursor: pointer;
}

.cart-summary button:hover {
  background-color: #555;
}

/* Shipping Form */
.location-form {
  padding: 20px;
  background: #f9f9f9;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.location-form label {
  display: block;
  font-weight: bold;
  margin-bottom: 8px;
}

.location-form input {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  margin-bottom: 10px;
  border-radius: 4px;
}

.location-form button {
  background-color: #4CAF50;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.location-form button:hover {
  background-color: #45a049;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .checkout-layout {
    display: block;
    width: 100%;
  }

  .checkout-main, .checkout-sidebar {
    width: 100%;
    display: block;
    padding: 10px;
  }
}

/* Header Row */
.cart-table thead tr {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 15px;
  padding: 15px;
  align-items: center;
  margin-bottom: 15px;
  background-color: #f5f5f5;
  border-radius: 8px;
}

.cart-table thead th {
  text-align: center;
  font-weight: bold;
  color: #333;
}

.cart-table thead th:first-child {
  text-align: left;
  justify-self: start;
}

/* Cart Main Section */
.cart-main-section {
  display: flex;
  gap: 60px;
  align-items: flex-start;
  justify-content: center;
  max-width: 1200px;  /* cap the overall width */
  margin: 0 auto;     /* center it in the page */
  padding-bottom: 40px;
}

/* Cart Extra Info (Video, Shipping, Order Summary) */
.cart-extra-info {
  display: flex;
  flex-direction: row;
  gap: 40px;
  justify-content: center;
  align-items: flex-start;
  max-width: 1200px;
  margin: 0 auto 40px auto;
  padding: 0 20px 40px;
}

.cart-extra-info .video-section,
.cart-extra-info .location-form,
.cart-extra-info .cart-summary {
  flex: 1;
  min-width: 320px;
  max-width: 400px;
}

@media (max-width: 900px) {
  .cart-extra-info {
    flex-direction: column;
    align-items: stretch;
    gap: 24px;
    padding: 0 10px 40px 10px;
  }

  .cart-extra-info .video-section,
  .cart-extra-info .location-form,
  .cart-extra-info .cart-summary {
    max-width: 100%;
  }
}

/* Cart Title */
.section-title {
  text-align: left;
  margin: 40px 0 32px 20px;
  font-size: 2.2rem;
  font-weight: 600;
  color: #333;
}

.checkout-button {
    display: block;
    width: 100%;
    padding: 15px;
    background-color: #333;
    color: white;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.checkout-button:hover {
    background-color: #555;
    transform: translateY(-2px);
}
