/* CART PAGE - Accessibility & Custom Styles */

/* Skip Links */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: #2563eb;
  color: white;
  padding: 8px;
  text-decoration: none;
  border-radius: 4px;
  z-index: 1000;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 6px;
}

/* Screen Reader Only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus Styles */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  .cart-item {
    border: 2px solid #000;
  }
  
  .checkout-btn {
    border: 2px solid #000;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Cart items spacing: exactly 20px between items */
.cart-section > * + * { 
  margin-top: 20px; 
}

#cart-items-list > * + * { 
  margin-top: 20px; 
}

/* Remove box shadows on cart page */
.cart-item { 
  box-shadow: none !important; 
}

.cart-item:hover { 
  box-shadow: none !important; 
  transform: none !important; 
}

#cart-summary { 
  box-shadow: none !important; 
}

/* Cart Item Layout - Mobile/Small Tablet (< 1024px): flexible, sin min-width */
@media (max-width: 1023px) {
  .cart-item-info {
    min-width: 0 !important;
    max-width: 100% !important;
    flex: 1 !important;
  }
  
  /* Ajustar padding del contenedor en tablets pequeñas */
  .cart-item {
    padding: 1rem !important;
  }
  
  /* En pantallas muy pequeñas (< 640px), apilar todo verticalmente */
  @media (max-width: 639px) {
    .cart-item > div {
      flex-direction: column !important;
      align-items: flex-start !important;
    }
  }
  
  /* Para pantallas entre 640px y 900px, reducir gap */
  @media (min-width: 640px) and (max-width: 900px) {
    .cart-item > div {
      gap: 0.75rem !important;
    }
  }
}

/* Cart Item Layout - Desktop (≥ 1024px): con min-width para alinear a la derecha */
@media (min-width: 1024px) {
  .cart-item-info {
    min-width: 450px !important;
    max-width: 600px !important;
  }
}

/* Cart Item Layout - Large Desktop (≥ 1280px): más espacio */
@media (min-width: 1280px) {
  .cart-item-info {
    min-width: 550px !important;
    max-width: 650px !important;
  }
}

