/* Base components. Values copied from Mureeh Design System.dc.html. */

/* Buttons: 48px pill (44 min tap target) */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 28px; border-radius: var(--r-pill); border: 0;
  font: 600 15px/1 var(--font-body); letter-spacing: .01em; white-space: nowrap;
  text-decoration: none; cursor: pointer; transition: background .15s;
}
.btn--primary { background: var(--navy); color: var(--offwhite); }
.btn--primary:hover { background: var(--navy-hover); color: var(--offwhite); }
.btn--secondary { background: var(--teal); color: #fff; }
.btn--secondary:hover { background: var(--teal-hover); color: #fff; }
.btn--tertiary { background: transparent; color: var(--navy); border: 1.5px solid var(--navy); }
.btn--tertiary:hover { background: var(--cream); color: var(--navy); }
.btn--lg { height: 56px; padding: 0 36px; font-size: 16px; }
.btn--sm { height: 44px; padding: 0 20px; font-size: 14px; }
.btn--whatsapp { background: #25D366; color: #0B3B22; font-weight: 700; padding: 0 24px; }
.btn:disabled, .btn[aria-disabled="true"] { background: var(--disabled-bg); color: var(--disabled-fg); cursor: not-allowed; }
.btn--tertiary:disabled { background: transparent; border-color: #9FB0B4; }
.btn-icon {
  width: 48px; height: 48px; border-radius: 50%; border: 1.5px solid var(--navy);
  background: transparent; display: grid; place-items: center; cursor: pointer;
}
.btn-icon:hover { background: var(--cream); }
.link {
  font-weight: 600; text-decoration: underline; text-decoration-color: var(--mustard);
  text-decoration-thickness: 2px; text-underline-offset: 5px;
}
.link:hover { color: var(--teal); }

/* Forms: labels above, 48px fields */
.field { display: flex; flex-direction: column; gap: 8px; }
.field > .field__label { font: 600 14px/1.4 var(--font-body); }
.field__opt { font-weight: 400; color: var(--muted-text); }
.input, .select, .textarea {
  width: 100%; height: 48px; padding: 0 16px; border-radius: var(--r-input);
  border: 1.5px solid var(--greyblue); background: var(--offwhite);
  font: 400 16px/1.4 var(--font-body); color: var(--navy);
}
.select { padding: 0 14px; }
.textarea { height: auto; min-height: 120px; padding: 12px 16px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus {
  outline: 3px solid rgba(83, 123, 123, .35); outline-offset: 0; border-color: var(--teal);
}
.input.is-error, .select.is-error, .textarea.is-error { border-color: var(--sale); background: var(--sale-tint); }
.input:disabled, .select:disabled, .textarea:disabled { border-color: var(--disabled-bg); background: var(--disabled-field); }
.field__error { font-size: 13px; color: var(--sale); font-weight: 600; }
.field__hint { font-size: 13px; color: var(--muted-text); }
.input-group {
  display: flex; height: 48px; border-radius: var(--r-input); border: 1.5px solid var(--greyblue);
  background: var(--offwhite); overflow: hidden;
}
.input-group:focus-within { outline: 3px solid rgba(83, 123, 123, .35); border-color: var(--teal); }
.input-group__addon {
  display: grid; place-items: center; padding: 0 14px;
  border-inline-end: 1.5px solid var(--line-strong); font: 600 15px var(--font-body);
}
.input-group .input { border: 0; background: transparent; height: 100%; outline: none; }
.search {
  display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 18px;
  border-radius: var(--r-pill); border: 1.5px solid var(--greyblue); background: var(--offwhite);
}
.search input { flex: 1; min-width: 0; border: 0; background: transparent; font: 16px var(--font-body); color: var(--navy); outline: none; }
.check { display: flex; align-items: center; gap: 12px; min-height: 44px; cursor: pointer; font-size: 15px; }
.check input { position: absolute; opacity: 0; }
.check__box {
  width: 22px; height: 22px; flex: none; border-radius: 6px; border: 1.5px solid var(--navy);
  display: grid; place-items: center; color: var(--offwhite); font-size: 14px; font-weight: 700;
}
.check input:checked + .check__box { background: var(--navy); }
.check input:checked + .check__box::after { content: "✓"; }
.check input:focus-visible + .check__box { outline: 3px solid var(--teal); outline-offset: 3px; }

/* Badges */
.badge {
  display: inline-block; height: 26px; padding: 0 10px; border-radius: var(--r-pill);
  font: 700 12px/26px var(--font-body); letter-spacing: .04em; text-transform: uppercase; white-space: nowrap;
}
.badge--sale { background: var(--sale); color: #fff; }
.badge--new { background: var(--teal); color: #fff; }
.badge--low { background: var(--low-tint); color: var(--navy); border: 1px solid var(--mustard); line-height: 24px; }
.badge--soldout { background: var(--soldout-bg); color: var(--navy); }
.badge--instock { background: var(--success-tint); color: var(--success-ink); }
.badge--sm { height: 24px; padding: 0 9px; font-size: 11px; line-height: 24px; }
.cod-badge {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px 0 6px;
  border-radius: var(--r-pill); border: 1.5px dashed var(--navy); font: 700 12px var(--font-body); letter-spacing: .06em;
}
.cod-badge__dot {
  width: 22px; height: 22px; border-radius: 50%; background: var(--navy); color: var(--cream);
  display: grid; place-items: center; font-size: 10px;
}

/* Cards */
.card { background: #fff; border-radius: var(--r-card); box-shadow: var(--shadow-sm); }
.card--md { box-shadow: var(--shadow-md); }

/* Product card */
.pcard { display: flex; flex-direction: column; gap: 12px; }
.pcard__img {
  position: relative; aspect-ratio: 4 / 5; border-radius: var(--r-card); overflow: hidden;
  display: flex; align-items: flex-end; padding: 12px;
}
.pcard__badges { position: absolute; top: 10px; inset-inline-start: 10px; display: flex; gap: 6px; }
.pcard__brand { font: 600 11px var(--font-body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted-text); }
.pcard__name { font: 600 16px var(--font-body); }
.swatches { display: flex; gap: 6px; align-items: center; margin-top: 4px; }
.swatch { width: 14px; height: 14px; border-radius: 50%; border: 1px solid var(--greyblue); }

/* Toast (aria-live region) */
.toasts { position: fixed; inset-inline: 0; bottom: 24px; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; z-index: 100; }
.toast {
  pointer-events: auto; background: var(--navy); color: var(--offwhite); padding: 14px 20px;
  border-radius: var(--r-pill); box-shadow: var(--shadow-lg); font-weight: 600; font-size: 14px;
  animation: toastIn .2s ease-out;
}
.toast--error { background: var(--sale); }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
