/* --- CSS Reset & Base Styles --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
/* --- Cart Container --- */
.cart-overlay {
  width: 100%;
  max-width: 450px;
  background: white;
  height: 100vh;
  position: fixed;
  right: 0;
  top: 0;
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  z-index: 9999;
  display:none;
}
.cart-overlay-visible {
    display: flex !important;
}

/* --- Header --- */
.cart-header {
  padding: 20px 25px;
  position: relative;
}

.cart-header h2 {
  font-weight: 400;
  color: #1a1a1a;
  font-size: 26px;
}

.cart-header h2 span {
  color: #4a90e2;
}

.header-underline {
  display: block;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, #2b6cb0 0%, #a3bffa 100%);
  margin-top: 8px;
}

.close-btn {
  position: absolute;
  right: 25px;
  top: 25px;
  background: none;
  border: none;
  font-size: 24px;
  color: #2b6cb0;
  cursor: pointer;
}

/* --- Cart Items List --- */
.cart-items-container {
  flex: 1;
  overflow-y: auto;
  padding: 0 25px;
}

.cart-item {
  display: flex;
  padding: 25px 0;
  border-bottom: 1px solid #eaeaea;
}

.item-image {
  width: 100px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  margin-right: 15px;
  background-color: #eee;
}

.item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.item-details {
  flex: 1;
}

.item-top-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.item-title {
    font-size: 18px;
    color: #0d6efd !important;
    font-weight: 500;
    line-height: 1.4;
    padding-right: 10px;
}

.delete-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #666;
  padding: 0;
}

.delete-btn:hover {
  color: #d32f2f;
}

.item-specs {
  font-size: 13px;
  color: #1a1a1a;
  margin-bottom: 4px;
}

.item-dims {
  font-size: 12px;
  color: #555;
  margin-bottom: 4px;
}

.metric-dims {
  color: #2b6cb0;
  display: block;
  margin-top: 2px;
}

.item-controls {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 15px;
}

/* --- Quantity Controls --- */
.qty-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.qty-label {
  font-size: 12px;
  color: #1a1a1a;
  margin-bottom: 5px;
  font-weight: 600;
}

.qty-input-group {
  display: flex;
  align-items: center;
  background-color: #f5f5f5;
  border-radius: 4px;
  overflow: hidden;
}

.qty-btn {
  width: 30px;
  height: 32px;
  border: none;
  background-color: #e0e0e0;
  color: #333;
  font-weight: bold;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.qty-btn:hover {
  background-color: #d0d0d0;
}

.qty-val {
  width: 40px;
  text-align: center;
  font-size: 14px;
  border: none;
  background: transparent;
  color: #333;
  font-weight: 600;
}

.price-block {
  text-align: right;
}

.current-price {
  font-size: 16px;
  font-weight: 600;
  color: #1a1a1a;
  display: block;
}

.old-price {
  font-size: 12px;
  text-decoration: line-through;
  color: #4a90e2;
  margin-right: 5px;
}

.discount {
  font-size: 12px;
  color: #00bcd4;
}

/* --- Footer --- */
.cart-footer {
  padding: 20px 25px;
  border-top: 1px solid #eaeaea;
  background: white;
}

.total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}

.total-label {
  font-size: 16px;
  color: #333;
}

.total-amount {
  font-size: 24px;
  color: #1a1a1a;
  font-weight: 400;
}

.tax-note {
  font-size: 12px;
  color: #333;
  margin-bottom: 20px;
}

.checkout-btn {
  width: 100%;
  background-color: #0056b3;
  color: white;
  border: none;
  padding: 15px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  border-radius: 4px;
  cursor: pointer;
  text-transform: uppercase;
  transition: background 0.3s;
}

.checkout-btn:hover {
  background-color: #004494;
}
