/* css/cart.css */
.cart-section {
  padding-top: 120px;
  padding-bottom: 80px;
}

.cart-title {
  text-align: left;
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  color: var(--text-dark, #2c2c2c);
}

.cart-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
}

@media (max-width: 900px) {
  .cart-layout {
    grid-template-columns: 1fr;
  }
}

.cart-items-wrapper {
  background: var(--bg-light, #ffffff);
  border-radius: 12px;
  padding: 2rem;
}

.cart-table-wrapper {
  width: 100%;
  overflow-x: auto;
}

.cart-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  min-width: 600px;
}

.cart-table th {
  text-transform: uppercase;
  font-size: 0.8rem;
  font-weight: 700;
  color: #000;
  padding-bottom: 1rem;
  padding-right: 1.5rem;
  border-bottom: 1px solid var(--border-color, #eaeaea);
  white-space: nowrap;
}

.cart-table td {
  padding: 1.5rem 1.5rem 1.5rem 0;
  border-bottom: 1px solid var(--border-color, #eaeaea);
  vertical-align: middle;
}

.cart-table tbody tr:last-child td {
  border-bottom: none;
}

.cart-img-box {
  width: 100px;
  height: 100px;
  background-color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.cart-img-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
}

.td-image {
  width: 120px;
}

.cart-item-brand {
  font-size: 1rem;
  font-weight: 600;
  color: #000;
  margin-bottom: 0.25rem;
}

.cart-item-title {
  font-size: 1.1rem;
  color: var(--text-dark, #2c2c2c);
  margin-bottom: 0.5rem;
}

.cart-item-size {
  font-size: 0.9rem;
  color: #666;
}

.td-price {
  font-size: 1.1rem;
  color: #000;
  font-weight: 500;
}

.qty-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid #000;
  border-radius: 999px;
  padding: 0.25rem 0.5rem;
}

.qty-pill button {
  background: transparent;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0 0.5rem;
  color: #000;
}

.qty-pill span {
  padding: 0 1rem;
  font-size: 1rem;
  font-weight: 500;
  color: #000;
}

.total-wrap {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.item-total-price {
  font-size: 1.1rem;
  font-weight: 600;
  color: #000;
}

.remove-icon-btn {
  background: transparent;
  border: none;
  color: #e53935;
  font-size: 1.2rem;
  cursor: pointer;
  transition: transform 0.2s;
}

.remove-icon-btn:hover {
  transform: scale(1.1);
  color: #c62828;
}

.cart-summary {
  background: var(--bg-light, #ffffff);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  height: fit-content;
  position: sticky;
  top: 100px;
}

.cart-summary h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  margin-top: 0;
  margin-bottom: 1.5rem;
  color: var(--text-dark, #2c2c2c);
  border-bottom: 1px solid var(--border-color, #eaeaea);
  padding-bottom: 1rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
  color: #555;
}

.summary-row.total {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-dark, #2c2c2c);
  margin-top: 1rem;
}

.cart-summary hr {
  border: none;
  border-top: 1px solid var(--border-color, #eaeaea);
  margin: 1.5rem 0;
}

.cart-summary .btn-primary {
  background: transparent;
  border: 1px solid rgba(108, 50, 64, 0.4);
  color: var(--heading);
}

.cart-summary .btn-primary:hover {
  background: var(--wine);
  border: 1px solid var(--wine);
  color: var(--white);
}

.continue-shopping {
  display: block;
  text-align: center;
  margin-top: 1rem;
  color: #666;
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.3s;
}

.continue-shopping:hover {
  color: var(--primary-color, #800020);
  text-decoration: underline;
}

.empty-state {
  text-align: center;
  padding: 3rem 0;
  color: #666;
}

.empty-continue-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--wine, #6c3240);
  color: #fff;
  border: none;
  padding: 12px 32px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  border-radius: 10px;
  transition: opacity 0.3s ease;
}

.empty-continue-btn:hover {
  opacity: 0.9;
}

@media (max-width: 768px) {
  .cart-section {
    padding-top: 40px;
    padding-bottom: 40px;
  }
  .cart-title {
    font-size: 2rem;
    margin-bottom: 2rem;
  }
  .cart-items-wrapper {
    padding: 1rem;
  }
  .cart-table {
    min-width: unset;
  }
  .cart-table thead {
    display: none;
  }
  .cart-table tbody tr {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 0.5rem 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color, #eaeaea);
    position: relative;
  }
  .cart-table td {
    padding: 0;
    border: none;
    display: flex;
    align-items: center;
  }
  .td-image {
    grid-column: 1;
    grid-row: 1 / span 3;
    width: 80px;
    align-items: flex-start !important;
  }
  .cart-img-box {
    width: 80px;
    height: 80px;
  }
  .td-name {
    grid-column: 2;
    grid-row: 1;
    align-items: flex-start !important;
    flex-direction: column;
    padding-right: 2rem;
  }
  .td-price {
    display: none;
  }
  .td-qty {
    grid-column: 2;
    grid-row: 2;
  }
  .td-total {
    grid-column: 2;
    grid-row: 3;
    justify-content: space-between;
    width: 100%;
  }
  .remove-icon-btn {
    position: absolute;
    top: 1rem;
    right: 0;
  }
  .cart-summary {
    padding: 1.5rem;
  }
}
