/* ============================================
   Quote Cart — FAB, Panel, Items
   ============================================ */

/* FAB (Floating Action Button) */
.quote-cart-fab {
  position: fixed;
  bottom: 86px;
  right: 16px;
  z-index: 55;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: var(--primary, #0066cc);
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.quote-cart-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}
.quote-cart-fab:active {
  transform: scale(0.96);
}

/* Badge */
.cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  background: #dc2626;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  line-height: 1;
  pointer-events: none;
}

/* Overlay */
.cart-overlay {
  position: fixed;
  inset: 0;
  z-index: 1010;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.cart-overlay.is-visible {
  opacity: 1;
  visibility: visible;
}

/* Panel (drawer lateral) */
.cart-panel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 1020;
  width: 100%;
  max-width: 400px;
  height: 100%;
  background: #fff;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.cart-panel.is-open {
  transform: translateX(0);
}

/* Panel Header */
.cart-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #e5e7eb;
  flex-shrink: 0;
}
.cart-panel__header h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
  color: #111;
}
.cart-panel__close {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  color: #6b7280;
  padding: 0.25rem;
  line-height: 1;
  transition: color 0.15s;
}
.cart-panel__close:hover {
  color: #111;
}

/* Items Container */
#cart-items-container {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.25rem;
}

/* Empty State */
.cart-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: #9ca3af;
}
.cart-empty__icon {
  font-size: 2.5rem;
  margin: 0 auto 1rem;
  display: block;
}
.cart-empty p {
  margin: 0.25rem 0;
  font-size: 0.95rem;
}

/* Cart Item */
.cart-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid #f3f4f6;
}
.cart-item:last-child {
  border-bottom: none;
}
.cart-item__img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  border-radius: 6px;
  background: #f9fafb;
  flex-shrink: 0;
}
.cart-item__info {
  flex: 1;
  min-width: 0;
}
.cart-item__title {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: #111;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.cart-item__variant {
  margin: 0.15rem 0 0;
  font-size: 0.78rem;
  color: #6b7280;
}
.cart-item__controls {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.5rem;
}
.cart-item__qty-btn {
  width: 28px;
  height: 28px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  background: #fff;
  color: #374151;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  line-height: 1;
}
.cart-item__qty-btn:hover {
  background: #f3f4f6;
}
.cart-item__qty-value {
  min-width: 24px;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
}
.cart-item__remove-btn {
  margin-left: auto;
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  padding: 0.25rem;
  font-size: 0.85rem;
  transition: color 0.15s;
}
.cart-item__remove-btn:hover {
  color: #dc2626;
}

/* Panel Footer */
.cart-panel__footer {
  flex-shrink: 0;
  padding: 1rem 1.25rem;
  border-top: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.cart-panel__footer .btn-ghost {
  background: none;
  border: none;
  color: #6b7280;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0.5rem;
  text-align: center;
  transition: color 0.15s;
}
.cart-panel__footer .btn-ghost:hover {
  color: #111;
}
.cart-panel__footer .btn-whatsapp-checkout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.85rem 1rem;
  border: none;
  border-radius: 8px;
  background: #25d366;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, opacity 0.15s;
}
.cart-panel__footer .btn-whatsapp-checkout:hover {
  background: #20bd5a;
}
.cart-panel__footer .btn-whatsapp-checkout.disabled {
  opacity: 0.5;
  pointer-events: none;
}

/* ============================================
   Product Card Actions (catalog)
   ============================================ */
.product-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.5rem;
}
.btn-add-to-cart {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  white-space: nowrap;
}
.btn-add-to-cart--added {
  opacity: 0.7;
}

/* ============================================
   Product Page Actions
   ============================================ */
.product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

/* ============================================
   Empty State (categories without products)
   ============================================ */
.storefront-empty-state {
  text-align: center;
  padding: 4rem 2rem;
  grid-column: 1 / -1;
}
.storefront-empty-state__icon {
  font-size: 3rem;
  color: #d1d5db;
  margin-bottom: 1rem;
}
.storefront-empty-state h3 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  color: #374151;
}
.storefront-empty-state p {
  margin: 0 0 0.5rem;
  color: #6b7280;
  font-size: 0.95rem;
}
.storefront-empty-state .btn-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 480px) {
  .cart-panel {
    max-width: 100%;
  }
  .quote-cart-fab {
    bottom: 78px;
    right: 16px;
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
  }
  .product-card__actions {
    flex-direction: column;
  }
  .product-card__actions .btn {
    width: 100%;
    justify-content: center;
  }
}
