/* =====================================================
   AMAR ABID — Components (buttons, cards, forms, etc.)
   ===================================================== */

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 12px 26px;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-soft); box-shadow: var(--shadow-lg); }

.btn-accent { background: var(--accent); color: var(--white); }
.btn-accent:hover { background: var(--accent-hover); box-shadow: 0 8px 24px rgba(217, 119, 6, 0.35); }

.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: var(--white); }

.btn-whatsapp { background: #25D366; color: var(--white); }
.btn-whatsapp:hover { background: #1EBE5A; box-shadow: 0 8px 24px rgba(37, 211, 102, 0.35); }

.btn-danger { background: var(--danger); color: var(--white); }
.btn-danger:hover { background: #B91C1C; }

.btn-sm { padding: 9px 16px; font-size: 0.85rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* ---------- Product grid & cards ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 28px;
}

.product-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.product-card .card-media {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #F3F4F6;
}

.product-card .card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.product-card:hover .card-media img { transform: scale(1.07); }

.badge {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
}

.badge-available { background: rgba(5, 150, 105, 0.95); color: var(--white); }
.badge-unavailable { background: rgba(107, 114, 128, 0.95); color: var(--white); }

.product-card .card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.product-card h3 { font-size: 1.05rem; font-weight: 600; color: var(--primary); }

.product-card .price {
  color: var(--accent);
  font-size: 1.15rem;
  font-weight: 700;
}

.product-card .desc {
  color: var(--text-muted);
  font-size: 0.88rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.product-card .card-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.product-card .card-actions .btn { flex: 1; }

/* ---------- Product details ---------- */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 52px;
  align-items: start;
  padding: 60px 0;
}

.product-detail .detail-media {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  position: sticky;
  top: 96px;
}

.product-detail .detail-media img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.product-detail .detail-media:hover img { transform: scale(1.04); }

.detail-info h1 {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  color: var(--primary);
  margin-bottom: 10px;
}

.detail-info .price { font-size: 1.8rem; font-weight: 700; color: var(--accent); margin-bottom: 18px; }

.detail-info .availability {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 22px;
}

.availability .dot { width: 9px; height: 9px; border-radius: 50%; }
.availability.in-stock { color: var(--success); }
.availability.in-stock .dot { background: var(--success); }
.availability.out-stock { color: var(--text-muted); }
.availability.out-stock .dot { background: var(--text-muted); }

.detail-info .description {
  color: var(--text-muted);
  margin-bottom: 30px;
  font-size: 1.02rem;
}

.detail-actions { display: flex; flex-direction: column; gap: 12px; max-width: 380px; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
  margin-bottom: 22px;
  transition: color 0.2s;
}

.back-link:hover { color: var(--accent); }

/* ---------- Feature / info cards ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 26px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.feature-card .icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 16px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
}

.feature-card h3 { font-size: 1.05rem; color: var(--primary); margin-bottom: 8px; }
.feature-card p { font-size: 0.9rem; color: var(--text-muted); }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--primary);
  border-radius: var(--radius);
  padding: 56px 40px;
  text-align: center;
  color: var(--white);
}

.cta-band h2 { font-family: var(--font-display); font-size: clamp(1.5rem, 3vw, 2.1rem); margin-bottom: 12px; }
.cta-band p { color: #9CA3AF; margin-bottom: 26px; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
}

.contact-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 26px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.contact-card .icon {
  width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 16px;
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center;
}
.contact-card h3 { color: var(--primary); margin-bottom: 6px; font-size: 1.05rem; }
.contact-card p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 16px; word-break: break-word; }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 20px; }

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 8px;
}

.form-group .hint { font-size: 0.8rem; color: var(--text-muted); font-weight: 400; }

.form-control {
  width: 100%;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.15);
}

textarea.form-control { resize: vertical; min-height: 110px; }

/* ---------- Alerts / states ---------- */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  margin-bottom: 20px;
  animation: fadeIn 0.3s ease;
}

.alert-success { background: #ECFDF5; color: var(--success); border: 1px solid #A7F3D0; }
.alert-error { background: #FEF2F2; color: var(--danger); border: 1px solid #FECACA; }

.loading-state, .empty-state, .error-state {
  text-align: center;
  padding: 70px 20px;
  color: var(--text-muted);
}

.empty-state h3, .error-state h3 { color: var(--primary); margin: 14px 0 6px; }

.spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto 16px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Skeleton loading cards */
.skeleton-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
}

.skeleton-card .sk-img { aspect-ratio: 1/1; }
.skeleton-card .sk-line { height: 14px; border-radius: 6px; margin: 12px 20px; }
.skeleton-card .sk-line.short { width: 40%; }

.sk-img, .sk-line {
  background: linear-gradient(90deg, #F3F4F6 25%, #E5E7EB 50%, #F3F4F6 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}

@keyframes shimmer { to { background-position: -200% 0; } }
