/* AppleHome Store Custom Styles */

/* Toast notifications */
.toast {
  position: fixed;
  bottom: 40px;
  right: 20px;
  background: #1f2937;
  color: white;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  z-index: 10000;
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}
.toast-visible {
  transform: translateY(0);
  opacity: 1;
}
.toast-success { border-left: 3px solid #22c55e; }
.toast-error { border-left: 3px solid #ef4444; }

/* Smooth image loading */
.product-card img {
  background: #f3f4f6;
}

/* Line clamp */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Loading spinner */
.page-loader {
  position: fixed;
  inset: 0;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9998;
  transition: opacity 0.3s;
}
.page-loader.fade-out {
  opacity: 0;
  pointer-events: none;
}
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #e5e7eb;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Skeleton loading */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: 8px;
}
@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Hero gradient */
.hero-gradient {
  background: linear-gradient(135deg, #eff6ff 0%, #eef2ff 50%, #faf5ff 100%);
}

/* Product card hover lift */
.product-card {
  transform: translateY(0);
  transition: transform 0.3s, box-shadow 0.3s;
}
.product-card:hover {
  transform: translateY(-4px);
}

/* Category pill */
.category-pill {
  transition: all 0.2s;
}
.category-pill:hover {
  transform: translateY(-2px);
}
.category-pill.active {
  background: #2563eb;
  color: white;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Qty input */
.qty-input {
  -moz-appearance: textfield;
}
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Checkout form focus states */
.form-input {
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Error shake */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
  20%, 40%, 60%, 80% { transform: translateX(4px); }
}
.shake {
  animation: shake 0.5s;
}

/* Mobile break spacer (hidden by default) */
.mobile-break-spacer {
  display: none;
}

/* Rage click visual feedback */
[data-bug-rage="true"] {
  cursor: pointer;
}
[data-bug-rage="true"]:active {
  transform: scale(0.95);
}

/* Selection colors */
::selection {
  background: #bfdbfe;
  color: #1e3a5f;
}

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}
