/**
 * EZ Zone — custom styles complementing Tailwind CSS
 */

:root {
  --ez-primary: #2563eb;
  --ez-primary-dark: #1d4ed8;
  --ez-accent: #f59e0b;
  --ez-success: #16a34a;
  --ez-danger: #dc2626;
  --ez-muted: #64748b;
  --ez-surface: #f8fafc;
  --ez-radius: 0.75rem;
}

/* Smooth scrolling & base typography */
html {
  scroll-behavior: smooth;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Product cards */
.ez-product-card {
  border-radius: var(--ez-radius);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ez-product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgb(0 0 0 / 0.1);
}

.ez-product-card img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

/* Price badges */
.ez-price-cash {
  color: var(--ez-success);
  font-weight: 700;
}

.ez-price-installment {
  color: var(--ez-primary);
  font-size: 0.875rem;
}

/* Booking form */
.ez-booking-form .form-error {
  color: var(--ez-danger);
  font-size: 0.8125rem;
  margin-top: 0.25rem;
}

.ez-booking-form input:invalid:not(:placeholder-shown),
.ez-booking-form textarea:invalid:not(:placeholder-shown) {
  border-color: var(--ez-danger);
}

.ez-booking-form .btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

html.dark {
  color-scheme: dark;
}

html.dark main nav[role="navigation"] a,
html.dark .pagination a,
html.dark .pagination span {
  color: #cbd5e1;
}

html.dark .pagination a:hover {
  color: #34d399;
}

/* Search autosuggest dropdown */
.ez-search-suggest {
  position: absolute;
  z-index: 50;
  width: 100%;
  margin-top: 0.25rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: var(--ez-radius);
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  max-height: 16rem;
  overflow-y: auto;
}

html.dark .ez-search-suggest {
  background: #1e293b;
  border-color: #475569;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.4);
}

.ez-search-suggest__item {
  display: block;
  width: 100%;
  padding: 0.625rem 1rem;
  text-align: left;
  font-size: 0.875rem;
  color: #1e293b;
  transition: background 0.15s ease;
}

html.dark .ez-search-suggest__item {
  color: #e2e8f0;
}

.ez-search-suggest__item:hover,
.ez-search-suggest__item.is-active {
  background: var(--ez-surface);
}

html.dark .ez-search-suggest__item:hover,
html.dark .ez-search-suggest__item.is-active {
  background: #334155;
}

.ez-search-suggest__item mark {
  background: #fef08a;
  padding: 0 0.125rem;
  border-radius: 0.125rem;
}

/* Installment calculator panel */
.ez-installment-panel {
  background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
  border: 1px solid #bfdbfe;
  border-radius: var(--ez-radius);
  padding: 1.25rem;
}

.ez-installment-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid #e2e8f0;
}

.ez-installment-row:last-child {
  border-bottom: none;
  font-weight: 700;
  color: var(--ez-primary-dark);
}

/* Hero banners */
.ez-hero-slide img {
  width: 100%;
  height: auto;
  max-height: 28rem;
  object-fit: cover;
}

/* WhatsApp CTA pulse */
.ez-whatsapp-btn {
  animation: ez-pulse 2s infinite;
}

@keyframes ez-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgb(37 211 102 / 0.4); }
  50% { box-shadow: 0 0 0 8px rgb(37 211 102 / 0); }
}

/* Admin sidebar active state */
.ez-admin-nav a.is-active {
  background: rgb(37 99 235 / 0.1);
  color: var(--ez-primary);
  font-weight: 600;
}

/* Utility: hide honeypot field */
.ez-honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
  overflow: hidden;
}

/* Responsive container tweak */
@media (max-width: 640px) {
  .ez-installment-panel {
    padding: 1rem;
  }
}
