/* ============================================================
   EZYBITE — Components
   ============================================================ */

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 14px 28px;
  font-weight: var(--font-weight-semibold);
  font-size: var(--text-sm);
  border-radius: var(--radius-lg);
  transition: all var(--duration-normal) var(--ease-out);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn svg.btn-arrow {
  width: 16px;
  height: 16px;
  transition: transform var(--duration-normal) var(--ease-out);
  flex-shrink: 0;
}

.btn:hover svg.btn-arrow {
  transform: translateX(5px);
}

.btn--primary {
  background-color: var(--color-brand-red);
  color: var(--color-white);
}

.btn--primary:hover {
  background-color: var(--color-brand-red-hover);
  color: var(--color-white);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn--secondary {
  background-color: var(--color-white);
  color: var(--color-deep-blue);
  border: 1px solid var(--color-border);
}

.btn--secondary:hover {
  border-color: var(--color-deep-blue);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
  color: var(--color-deep-blue);
}

.btn--ghost {
  background: transparent;
  color: var(--color-deep-blue);
  padding: 10px 0;
}

.btn--ghost:hover {
  color: var(--color-brand-red);
}

.btn--dark {
  background-color: var(--color-white);
  color: var(--color-deep-blue);
}

.btn--dark:hover {
  background-color: rgba(255, 255, 255, 0.9);
  color: var(--color-deep-blue);
  transform: translateY(-1px);
}

.btn--sm {
  padding: 10px 20px;
  font-size: var(--text-xs);
}

.btn--lg {
  padding: 18px 36px;
  font-size: var(--text-base);
}

/* ---- Badges ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 4px 12px;
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  border-radius: var(--radius-full);
  letter-spacing: var(--tracking-wide);
}

.badge--blue {
  background-color: var(--color-brand-blue-10);
  color: var(--color-brand-blue);
}

.badge--red {
  background-color: var(--color-brand-red-10);
  color: var(--color-brand-red);
}

.badge--new {
  background-color: var(--color-brand-red);
  color: var(--color-white);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
}

/* ---- Cards ---- */
.card {
  background: var(--color-white);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: all var(--duration-normal) var(--ease-out);
  border: 1px solid var(--color-border);
}

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

.card__image {
  width: 100%;
  aspect-ratio: 1;
  background-color: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-out);
}

.card:hover .card__image img {
  transform: scale(1.03);
}

.card__body {
  padding: var(--space-5);
}

.card__brand {
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--color-brand-blue);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  margin-bottom: var(--space-1);
}

.card__title {
  font-family: var(--font-product);
  font-size: var(--text-base);
  font-weight: var(--font-weight-semibold);
  line-height: var(--leading-snug);
  margin-bottom: var(--space-2);
}

.card__meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--color-muted);
}

.card__meta-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background-color: var(--color-border);
}

/* ---- Eyebrow ---- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  color: var(--color-brand-blue);
}

.eyebrow svg {
  width: 16px;
  height: 16px;
}

/* ---- Section Header ---- */
.section-header {
  margin-bottom: var(--space-12);
}

.section-header--center {
  text-align: center;
  max-width: 640px;
  margin-inline: auto;
}

.section-header .eyebrow {
  margin-bottom: var(--space-4);
}

.section-header h2 {
  margin-bottom: var(--space-4);
}

.section-header p {
  font-size: var(--text-lg);
  max-width: 560px;
}

.section-header--center p {
  margin-inline: auto;
}

/* ---- Retailer Badge ---- */
.retailer-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 8px 16px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  transition: all var(--duration-fast) var(--ease-out);
}

.retailer-badge:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  color: var(--color-deep-blue);
}

.retailer-badge img {
  height: 20px;
  width: auto;
}

/* ---- Form Controls ---- */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.form-label {
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-deep-blue);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 14px 18px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  color: var(--color-deep-blue);
  transition: border-color var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast) var(--ease-out);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--color-brand-blue);
  box-shadow: 0 0 0 3px var(--color-brand-blue-10);
  outline: none;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--color-muted);
  opacity: 0.6;
}

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

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%2365727D' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 44px;
}

/* ---- Divider ---- */
.divider {
  width: 100%;
  height: 1px;
  background-color: var(--color-border);
}

/* ---- Product Detail Quick-View Modal ---- */
.product-modal {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.product-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.product-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 36, 58, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.product-modal__container {
  position: relative;
  background: var(--color-white);
  border-radius: var(--radius-2xl);
  max-width: 720px;
  width: 100%;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--color-border);
  overflow: hidden;
  z-index: 2;
  transform: scale(0.94) translateY(12px);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-modal.is-open .product-modal__container {
  transform: scale(1) translateY(0);
}

.product-modal__close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  cursor: pointer;
  z-index: 5;
  transition: background 0.2s ease, transform 0.2s ease;
}

.product-modal__close:hover {
  background: var(--color-border);
  transform: rotate(90deg);
}

.product-modal__close svg {
  width: 18px;
  height: 18px;
  color: var(--color-deep-blue);
}

.product-modal__content {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  align-items: center;
}

.product-modal__media {
  background: radial-gradient(circle at center, rgba(98, 181, 229, 0.15) 0%, var(--color-bg) 75%);
  padding: var(--space-8);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-modal__media img {
  max-height: 280px;
  max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 16px 24px rgba(16, 36, 58, 0.22));
}

.product-modal__details {
  padding: var(--space-8);
}

.product-modal__eyebrow {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-brand-blue);
  margin-bottom: var(--space-2);
}

.product-modal__title {
  font-family: var(--font-product);
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--color-deep-blue);
  line-height: var(--leading-tight);
  margin-bottom: var(--space-3);
}

.product-modal__tags {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.product-modal__description {
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  color: var(--color-muted);
  margin-bottom: var(--space-6);
}

.product-modal__specs {
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding-block: var(--space-3);
  margin-bottom: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.product-modal__spec {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-xs);
}

.product-modal__spec-label {
  color: var(--color-muted);
}

.product-modal__spec-value {
  font-weight: 600;
  color: var(--color-deep-blue);
}

.product-modal__actions {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  .product-modal__content {
    grid-template-columns: 1fr;
  }
  .product-modal__media {
    padding: var(--space-6);
  }
  .product-modal__media img {
    max-height: 180px;
  }
  .product-modal__details {
    padding: var(--space-6);
  }
}
