/* Cart Page Styles */
/* Theme: Dark background (#151515), white text, yellow accent (#FFFF00), Montserrat font */

.cart-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* Cart Progress Indicator */
.cart-progress {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 3rem;
  position: relative;
}

.cart-progress::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 10%;
  right: 10%;
  height: 2px;
  background: #333;
  z-index: 0;
  transform: translateY(-50%);
}

.cart-progress__step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  position: relative;
  z-index: 1;
  flex: 1;
  max-width: 150px;
}

.cart-progress__circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #1a1a1a;
  border: 3px solid #333;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  color: #666;
  transition: all 0.3s;
}

.cart-progress__step--active .cart-progress__circle {
  background: #FFFF00;
  border-color: #FFFF00;
  color: #151515;
  box-shadow: 0 0 20px rgba(255, 255, 0, 0.3);
}

.cart-progress__step--completed .cart-progress__circle {
  background: #333;
  border-color: #FFFF00;
  color: #FFFF00;
}

.cart-progress__label {
  color: #666;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  transition: color 0.3s;
}

.cart-progress__step--active .cart-progress__label {
  color: #FFFF00;
}

.cart-progress__step--completed .cart-progress__label {
  color: #aaa;
}

/* Cart Container */
.cart-container {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 2rem;
  align-items: start;
}

/* Cart Items Section */
.cart-items {
  background: #1a1a1a;
  border-radius: 8px;
  padding: 1.5rem;
}

.cart-items__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #333;
}

.cart-items__title {
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
}

.cart-items__count {
  color: #FFFF00;
  font-size: 0.9rem;
  font-weight: 600;
}

/* Cart Table */
.cart-table {
  width: 100%;
}

.cart-item {
  display: grid;
  grid-template-columns: 100px 1fr auto auto auto auto;
  gap: 1.5rem;
  align-items: center;
  padding: 1.5rem 0;
  border-bottom: 1px solid #333;
}

.cart-item:first-child {
  padding-top: 0;
}

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

.cart-item__image {
  width: 100px;
  height: 100px;
  background: #222;
  border-radius: 4px;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-item__image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.cart-item__details {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.cart-item__brand {
  color: #FFFF00;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.cart-item__name {
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
}

.cart-item__specs {
  color: #888;
  font-size: 0.85rem;
}

.cart-item__price {
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  text-align: right;
}

/* Cart Quantity Controls */
.cart-quantity {
  display: flex;
  align-items: center;
  background: #151515;
  border: 1px solid #333;
  border-radius: 4px;
  overflow: hidden;
}

.cart-quantity__btn {
  padding: 0.5rem 0.75rem;
  background: transparent;
  border: none;
  color: #FFFF00;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.2s;
  line-height: 1;
}

.cart-quantity__btn:hover {
  background: #222;
}

.cart-quantity__btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.cart-quantity__input {
  width: 50px;
  padding: 0.5rem;
  background: transparent;
  border: none;
  border-left: 1px solid #333;
  border-right: 1px solid #333;
  color: #fff;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 600;
}

.cart-quantity__input:focus {
  outline: none;
  background: #1a1a1a;
}

.cart-item__total {
  color: #FFFF00;
  font-size: 1.25rem;
  font-weight: 700;
  text-align: right;
  min-width: 120px;
}

.cart-item__remove {
  background: transparent;
  border: 1px solid #f87171;
  color: #f87171;
  padding: 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 1.2rem;
  line-height: 1;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-item__remove:hover {
  background: #f87171;
  color: #151515;
}

/* Cart Totals Sidebar */
.cart-totals {
  background: #1a1a1a;
  border-radius: 8px;
  padding: 1.5rem;
  position: sticky;
  top: 2rem;
}

.cart-totals__title {
  color: #fff;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #333;
}

.cart-totals__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  color: #aaa;
  font-size: 0.95rem;
}

.cart-totals__row--subtotal {
  border-bottom: 1px solid #333;
}

.cart-totals__row--total {
  border-top: 2px solid #333;
  padding-top: 1.5rem;
  margin-top: 1rem;
  font-size: 1.1rem;
  font-weight: 700;
}

.cart-totals__label {
  color: #fff;
}

.cart-totals__value {
  color: #fff;
  font-weight: 600;
}

.cart-totals__row--total .cart-totals__value {
  color: #FFFF00;
  font-size: 1.5rem;
}

.cart-totals__note {
  color: #666;
  font-size: 0.8rem;
  margin-top: 0.5rem;
  font-style: italic;
}

/* Promo Code */
.cart-totals__promo {
  margin: 1.5rem 0;
}

.cart-totals__promo-input {
  display: flex;
  gap: 0.5rem;
}

.cart-totals__promo-field {
  flex: 1;
  padding: 0.75rem;
  background: #151515;
  border: 1px solid #333;
  border-radius: 4px;
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9rem;
}

.cart-totals__promo-field:focus {
  outline: none;
  border-color: #FFFF00;
}

.cart-totals__promo-btn {
  padding: 0.75rem 1.25rem;
  background: transparent;
  border: 1px solid #FFFF00;
  border-radius: 4px;
  color: #FFFF00;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cart-totals__promo-btn:hover {
  background: #FFFF00;
  color: #151515;
}

/* Checkout Button */
.cart-checkout-btn {
  width: 100%;
  padding: 1rem;
  background: #FFFF00;
  border: none;
  border-radius: 4px;
  color: #151515;
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 1.5rem;
}

.cart-checkout-btn:hover {
  background: #e6e600;
  transform: scale(1.02);
}

.cart-checkout-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Continue Shopping Link */
.cart-continue {
  display: block;
  text-align: center;
  margin-top: 2rem;
  color: #FFFF00;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.cart-continue:hover {
  color: #fff;
}

/* Empty Cart */
.cart-empty {
  text-align: center;
  padding: 4rem 2rem;
  background: #1a1a1a;
  border-radius: 8px;
}

.cart-empty__icon {
  font-size: 5rem;
  color: #333;
  margin-bottom: 1.5rem;
}

.cart-empty__title {
  color: #fff;
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.cart-empty__message {
  color: #aaa;
  font-size: 1rem;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.cart-empty__btn {
  display: inline-block;
  padding: 1rem 2rem;
  background: #FFFF00;
  color: #151515;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.2s;
}

.cart-empty__btn:hover {
  background: #e6e600;
  transform: scale(1.05);
}

/* Responsive Design */
@media (max-width: 768px) {
  .cart-progress {
    margin-bottom: 2rem;
  }

  .cart-progress::before {
    left: 5%;
    right: 5%;
  }

  .cart-progress__circle {
    width: 40px;
    height: 40px;
    font-size: 0.9rem;
  }

  .cart-progress__label {
    font-size: 0.75rem;
  }

  .cart-container {
    grid-template-columns: 1fr;
  }

  .cart-totals {
    position: static;
  }

  .cart-item {
    grid-template-columns: 80px 1fr;
    gap: 1rem;
  }

  .cart-item__image {
    width: 80px;
    height: 80px;
  }

  .cart-item__details {
    grid-column: 1 / -1;
  }

  .cart-item__price {
    display: none;
  }

  .cart-item__actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .cart-item__total {
    min-width: auto;
  }
}

@media (max-width: 480px) {
  .cart-progress__step {
    max-width: 80px;
  }

  .cart-progress__circle {
    width: 36px;
    height: 36px;
    font-size: 0.8rem;
  }

  .cart-progress__label {
    font-size: 0.7rem;
  }

  .cart-items {
    padding: 1rem;
  }

  .cart-item {
    gap: 0.75rem;
    padding: 1rem 0;
  }

  .cart-item__name {
    font-size: 0.9rem;
  }

  .cart-totals__promo-input {
    flex-direction: column;
  }

  .cart-totals__promo-btn {
    width: 100%;
  }
}

/* Loading State */
.cart-item.updating {
  opacity: 0.6;
  pointer-events: none;
}

/* Success/Error Messages */
.cart-message {
  padding: 1rem;
  border-radius: 4px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.cart-message--success {
  background: rgba(74, 222, 128, 0.1);
  color: #4ade80;
  border: 1px solid #4ade80;
}

.cart-message--error {
  background: rgba(248, 113, 113, 0.1);
  color: #f87171;
  border: 1px solid #f87171;
}

.cart-message__icon {
  font-size: 1.2rem;
}
