/* public/assets/css/cart.css */

/* Overlay pentru modalul/drawer-ul coșului */
.cart-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 50;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cart-modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

/* Containerul (drawer) pentru coșul de cumpărături */
.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 50;
  width: 20rem; /* valoare inițială */
  height: 100vh;
  background-color: #ffffff;
  padding: 1rem;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.cart-drawer.open {
  transform: translateX(0);
}

/* Lățime extinsă pentru drawer – se activează prin clasa "wider" */
.cart-drawer.wider {
  width: 24rem;
}

/* Container pentru fiecare produs în coș */
.cart-item {
  display: flex;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid #e5e7eb; /* gray-200 */
  position: relative;
}

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

/* Secțiunea imaginii produsului */
.cart-item-image {
  width: 4rem;
  height: 4rem;
  flex-shrink: 0;
}

.cart-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0.25rem;
}

/* Secțiunea de detalii pentru produs */
.cart-item-details {
  flex: 1;
  margin-left: 1rem;
}

.cart-item-name {
  font-size: 1rem;
  font-weight: 600;
  color: #374151; /* gray-700 */
  margin-bottom: 0.25rem;
}

.cart-item-quantity-price {
  font-size: 0.875rem;
  color: #6b7280; /* gray-600 */
}

/* Butonul de ștergere pentru produs (X) */
.cart-item-delete {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: transparent;
  border: none;
  font-size: 1.25rem;
  color: #ef4444; /* red-500 */
  cursor: pointer;
}

/* Selectorul de cantitate - noua clasă pentru lățime extinsă */
.cart-quantity-dropdown {
  width: 6rem; /* ajustați lățimea după preferințe */
}

/* Zona de subtotal și acțiuni */
.cart-summary {
  margin-top: 1rem;
  border-top: 1px solid #e5e7eb;
  padding-top: 1rem;
}

.cart-summary-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.125rem;
  font-weight: 600;
  color: #374151;
}

.cart-summary-note {
  font-size: 0.875rem;
  color: #6b7280;
  margin-top: 0.25rem;
}

/* Stilurile butoanelor de acțiune din coș */
.cart-buttons {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.cart-button-secondary {
  padding: 0.5rem;
  border: 1px solid #d1d5db;
  color: var(--secondary-color);
  background-color: #ffffff;
  border-radius: 0.375rem;
  font-size: 1rem;
  text-align: center;
  cursor: pointer;
}

.cart-button-secondary:hover {
  background-color: #f3f4f6;
}

.cart-button-primary {
  padding: 0.5rem;
  background-color: var(--primary-color);
  color: #ffffff;
  border: none;
  border-radius: 0.375rem;
  font-size: 1rem;
  text-align: center;
  cursor: pointer;
}

.cart-button-primary:hover {
  background-color: #1a355b; /* o nuanță puțin mai închisă */
}