/* ── Leconi Cart Overlay ── */

/* Cart icon button – fixed top-right */
#lc-cart-btn {
  position: fixed;
  top: 20px;
  right: 24px;
  z-index: 9000;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #1a1a1a;
  color: #f9f5f0;
  border: none;
  padding: 10px 16px;
  font-family: 'Oswald', sans-serif;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s;
}

#lc-cart-btn:hover {
  background: #333;
}

#lc-cart-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  background: #b8955e;
  color: #fff;
  border-radius: 50%;
  font-size: 10px;
  font-family: 'Roboto', sans-serif;
  font-weight: 700;
  padding: 0 3px;
  line-height: 1;
}

/* Backdrop */
#lc-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9001;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

#lc-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

/* Cart drawer */
#lc-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 9002;
  width: 420px;
  max-width: 100vw;
  background: #f9f5f0;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -4px 0 32px rgba(0, 0, 0, 0.12);
}

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

/* Drawer header */
#lc-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px 20px;
  border-bottom: 1px solid #e8e2d9;
}

#lc-drawer-title {
  font-family: 'Oswald', sans-serif;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #1a1a1a;
  margin: 0;
}

#lc-drawer-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: #666;
  transition: color 0.2s;
  display: flex;
  align-items: center;
}

#lc-drawer-close:hover {
  color: #1a1a1a;
}

/* Cart items list */
#lc-items {
  flex: 1;
  overflow-y: auto;
  padding: 20px 28px;
}

/* Empty state */
#lc-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 12px;
  color: #999;
  font-family: 'Roboto', sans-serif;
  font-size: 14px;
  text-align: center;
}

#lc-empty svg {
  opacity: 0.3;
}

/* Individual cart item */
.lc-item {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid #e8e2d9;
}

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

.lc-item-img {
  width: 72px;
  height: 90px;
  object-fit: cover;
  flex-shrink: 0;
  background: #ede8e0;
}

.lc-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lc-item-name {
  font-family: 'Oswald', sans-serif;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: #1a1a1a;
  text-transform: uppercase;
  margin: 0;
}

.lc-item-cat {
  font-family: 'Roboto', sans-serif;
  font-size: 11px;
  color: #999;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0;
}

.lc-item-price {
  font-family: 'Roboto', sans-serif;
  font-size: 13px;
  color: #1a1a1a;
  font-weight: 500;
  margin-top: auto;
}

.lc-item-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.lc-qty-btn {
  background: none;
  border: 1px solid #ccc;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  color: #1a1a1a;
  transition: border-color 0.15s;
  flex-shrink: 0;
}

.lc-qty-btn:hover {
  border-color: #1a1a1a;
}

.lc-qty {
  font-family: 'Roboto', sans-serif;
  font-size: 13px;
  color: #1a1a1a;
  min-width: 20px;
  text-align: center;
}

.lc-remove {
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Roboto', sans-serif;
  font-size: 11px;
  color: #999;
  letter-spacing: 0.06em;
  padding: 0;
  margin-left: auto;
  transition: color 0.15s;
  text-transform: uppercase;
}

.lc-remove:hover {
  color: #c0392b;
}

/* Drawer footer */
#lc-drawer-footer {
  padding: 20px 28px 28px;
  border-top: 1px solid #e8e2d9;
  background: #f9f5f0;
}

#lc-subtotal-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

#lc-subtotal-label {
  font-family: 'Oswald', sans-serif;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #666;
}

#lc-subtotal-value {
  font-family: 'Oswald', sans-serif;
  font-size: 18px;
  font-weight: 400;
  color: #1a1a1a;
}

#lc-checkout-btn {
  width: 100%;
  background: #1a1a1a;
  color: #f9f5f0;
  border: none;
  padding: 16px;
  font-family: 'Oswald', sans-serif;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

#lc-checkout-btn:hover:not(:disabled) {
  background: #333;
}

#lc-checkout-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#lc-checkout-note {
  font-family: 'Roboto', sans-serif;
  font-size: 11px;
  color: #999;
  text-align: center;
  margin-top: 10px;
  letter-spacing: 0.04em;
}

/* "Add to Cart" buttons injected into product cards */
.lc-add-btn {
  display: block;
  width: 100%;
  margin-top: 12px;
  background: #1a1a1a;
  color: #f9f5f0;
  border: none;
  padding: 10px 16px;
  font-family: 'Oswald', sans-serif;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
}

.lc-add-btn:hover {
  background: #333;
}

.lc-add-btn.added {
  background: #b8955e;
}

/* For grid-article cards, keep the button compact */
.grid-article .lc-add-btn {
  margin-top: 10px;
  font-size: 10px;
  padding: 8px 12px;
}

/* For design-tiles, overlay style */
.design-tile .lc-add-btn {
  margin-top: 8px;
  background: rgba(249, 245, 240, 0.9);
  color: #1a1a1a;
  font-size: 10px;
  padding: 8px 12px;
}

.design-tile .lc-add-btn:hover {
  background: #f9f5f0;
}

/* Toast notification */
#lc-toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  z-index: 9100;
  background: #1a1a1a;
  color: #f9f5f0;
  padding: 12px 24px;
  font-family: 'Oswald', sans-serif;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

#lc-toast.show {
  transform: translateX(-50%) translateY(0);
}

/* Loading spinner for checkout button */
.lc-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(249, 245, 240, 0.3);
  border-top-color: #f9f5f0;
  border-radius: 50%;
  animation: lc-spin 0.7s linear infinite;
  flex-shrink: 0;
}

@keyframes lc-spin {
  to { transform: rotate(360deg); }
}
