/* ===========================================
   Cart Page Styles - Verdanisse
   Full cart page layout and components
   =========================================== */

/* ===========================================
   Page Layout
   =========================================== */

.cart-page {
  padding: 2rem 1.5rem 4rem;
  min-height: 60vh;
}

.cart-page .container {
  max-width: 1200px;
  margin: 0 auto;
}

.cart-page__title {
  font-size: 2rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 1.5rem 0 2rem;
}

/* ===========================================
   Empty Cart State
   =========================================== */

.cart-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50vh;
  padding: 2rem;
}

.cart-empty__content {
  text-align: center;
  max-width: 400px;
}

.cart-empty__icon {
  width: 80px;
  height: 80px;
  color: #d1d5db;
  margin: 0 auto 1.5rem;
}

.cart-empty__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 0.75rem;
}

.cart-empty__text {
  color: #6b7280;
  line-height: 1.6;
  margin: 0 0 2rem;
}

/* ===========================================
   Cart Content Layout
   =========================================== */

.cart-content {
  display: block;
}

.cart-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 3rem;
  align-items: start;
}

/* ===========================================
   Cart Items Section
   =========================================== */

.cart-items-wrapper {
  background: #fff;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  overflow: hidden;
}

.cart-header {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 50px;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
  font-size: 0.75rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cart-items-list {
  display: flex;
  flex-direction: column;
}

/* ===========================================
   Individual Cart Item
   =========================================== */

.cart-item {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 50px;
  gap: 1rem;
  padding: 1.5rem;
  border-bottom: 1px solid #e5e7eb;
  align-items: center;
}

.cart-item:last-child {
  border-bottom: none;
}

.cart-item__product {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.cart-item__image {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  background: #f9fafb;
  border-radius: 6px;
  overflow: hidden;
}

.cart-item__image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
}

.cart-item__details {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.cart-item__name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #1a1a1a;
  text-decoration: none;
  line-height: 1.4;
}

.cart-item__name:hover {
  color: #1a1a1a;
}

.cart-item__meta {
  font-size: 0.8125rem;
  color: #6b7280;
}

.cart-item__price {
  font-size: 0.9375rem;
  font-weight: 500;
  color: #374151;
}

/* Quantity Controls */
.cart-item__quantity {
  display: flex;
  align-items: center;
  gap: 0;
}

.cart-qty-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid #e5e7eb;
  cursor: pointer;
  transition: all 0.15s ease;
  color: #374151;
}

.cart-qty-btn:first-child {
  border-radius: 4px 0 0 4px;
}

.cart-qty-btn:last-child {
  border-radius: 0 4px 4px 0;
}

.cart-qty-btn:hover {
  background: #f3f4f6;
}

.cart-qty-btn:active {
  background: #e5e7eb;
}

.cart-qty-btn svg {
  width: 14px;
  height: 14px;
}

.cart-qty-value {
  width: 40px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
  font-size: 0.875rem;
  font-weight: 600;
  color: #1a1a1a;
}

/* Item Total */
.cart-item__total {
  font-size: 1rem;
  font-weight: 700;
  color: #1a1a1a;
}

/* Remove Button */
.cart-item__remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: #9ca3af;
  transition: all 0.15s ease;
}

.cart-item__remove:hover {
  background: #fee2e2;
  color: #ef4444;
}

.cart-item__remove svg {
  width: 18px;
  height: 18px;
}

/* ===========================================
   Cart Summary
   =========================================== */

.cart-summary {
  background: #fff;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  padding: 1.5rem;
  position: sticky;
  top: 7rem;
}

.cart-summary__title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 1.25rem;
}

.cart-summary__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.625rem 0;
  font-size: 0.9375rem;
  color: #374151;
}

.cart-summary__row--total {
  padding: 1rem 0;
  font-size: 1.125rem;
  font-weight: 700;
  color: #1a1a1a;
}

.cart-summary__divider {
  height: 1px;
  background: #e5e7eb;
  margin: 0.5rem 0;
}

.cart-summary__vat {
  font-size: 0.75rem;
  color: #9ca3af;
  text-align: center;
  margin: 0 0 1rem;
}

/* Promo Code Section */
.cart-promo {
  margin: 1rem 0;
  padding: 1rem 0;
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
}

.cart-promo__label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.5rem;
}

.cart-promo__input-wrapper {
  display: flex;
  gap: 0.5rem;
}

.cart-promo__input {
  flex: 1;
  padding: 0.625rem 0.875rem;
  font-size: 0.875rem;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #fff;
  transition: border-color 0.15s ease;
}

.cart-promo__input:focus {
  outline: none;
  border-color: #1f3a2e;
}

.cart-promo__btn {
  padding: 0.625rem 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #374151;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cart-promo__btn:hover {
  background: #e5e7eb;
}

.cart-promo__message {
  font-size: 0.75rem;
  margin-top: 0.5rem;
}

.cart-promo__message--success {
  color: #059669;
}

.cart-promo__message--error {
  color: #dc2626;
}

/* Checkout Button */
.cart-summary__checkout-btn {
  width: 100%;
  padding: 1rem;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: #1a1a1a;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 0.75rem;
}

.cart-summary__checkout-btn:hover {
  background: #333;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.cart-summary__checkout-btn:disabled {
  background: #d1d5db;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.cart-summary__continue-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #6b7280;
  text-decoration: none;
  transition: color 0.15s ease;
}

.cart-summary__continue-link:hover {
  color: #1a1a1a;
}

/* Trust Badges */
.cart-summary__trust {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cart-trust-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8125rem;
  color: #6b7280;
}

.cart-trust-item svg {
  width: 20px;
  height: 20px;
  color: #1a1a1a;
  flex-shrink: 0;
}

/* ===========================================
   Button Styles
   =========================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.btn--primary {
  background: #1a1a1a;
  color: #fff;
}

.btn--primary:hover {
  background: #333;
  transform: translateY(-1px);
}

/* ===========================================
   Responsive Design
   =========================================== */

@media (max-width: 1024px) {
  .cart-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .cart-summary {
    position: static;
  }
}

@media (max-width: 768px) {
  .cart-page {
    padding: 1rem 1rem 3rem;
  }

  .cart-page__title {
    font-size: 1.5rem;
    margin: 1rem 0 1.5rem;
  }

  .cart-header {
    display: none;
  }

  .cart-item {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1.25rem;
  }

  .cart-item__product {
    gap: 1rem;
  }

  .cart-item__image {
    width: 70px;
    height: 70px;
  }

  .cart-item__price,
  .cart-item__quantity,
  .cart-item__total {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .cart-item__price::before {
    content: "Price:";
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
  }

  .cart-item__total::before {
    content: "Total:";
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
  }

  .cart-item__remove {
    position: absolute;
    top: 1rem;
    right: 1rem;
  }

  .cart-item {
    position: relative;
  }
}

@media (max-width: 480px) {
  .cart-empty__icon {
    width: 64px;
    height: 64px;
  }

  .cart-empty__title {
    font-size: 1.25rem;
  }

  .cart-item__image {
    width: 60px;
    height: 60px;
  }

  .cart-item__name {
    font-size: 0.875rem;
  }
}
