/*
 * Design tokens, read from the LIVE theme on 2026-08-25.
 *
 * Source: config/settings_data.json on OnlineStoreTheme/186669432877
 * ("PUBLISH ME — Arabic landing page", role MAIN).
 *
 * Nothing here was designed. Every value is copied from what the storefront
 * already renders, so the chat widget and the "For you" row look like part of
 * the shop rather than a bolted-on tool. A chat widget that looks like a
 * chat widget is the thing shoppers have learned to dismiss.
 *
 * If the owner changes a colour scheme in the theme editor, re-read that file
 * and update this one. These are a copy, not a source of truth.
 */

:root {
  /* ---- Colour, from color_schemes ---- */
  /* scheme-1: the page. Warm off-white, not white. */
  --hjt-bg: #fcf8f5;
  --hjt-text: #121212;

  /* The brand gold. This exact value is the primary button across the store. */
  --hjt-gold: #cb8012;
  --hjt-gold-mid: #d49639; /* scheme-4 button */
  --hjt-gold-soft: #daa14c; /* scheme-5, used on product cards */
  --hjt-on-gold: #ffffff;

  /* scheme-2: cream, used for warm panels. */
  --hjt-cream: #fff4e2;
  /* scheme-5: card surface. Slightly cooler than the page. */
  --hjt-surface: #fafafa;
  /* scheme-3: the dark scheme, used for contrast blocks. */
  --hjt-dark: #1f1f1f;
  --hjt-on-dark: #ffffff;

  /* Borders are drawn as text colour at low opacity, exactly as Dawn does. */
  --hjt-border: rgba(18, 18, 18, 0.05);   /* card_border_opacity 5 */
  --hjt-border-input: rgba(18, 18, 18, 0.20); /* inputs_border_opacity 20 */
  --hjt-shadow: rgba(18, 18, 18, 0.05);

  /* ---- Type, from type_header_font / type_body_font ---- */
  /* Headings: Andada Pro 600, a serif. Body: Poppins 400. */
  --hjt-font-heading: "Andada Pro", Georgia, "Times New Roman", serif;
  --hjt-font-body: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --hjt-weight-heading: 600;
  --hjt-weight-body: 400;

  /* ---- Shape, from the *_radius settings ---- */
  --hjt-radius: 4px;        /* buttons, cards, inputs, media all use 4 */
  --hjt-radius-pill: 40px;  /* variant pills and badges */
  --hjt-radius-popup: 0px;  /* popups are deliberately square */

  /* ---- Spacing, from spacing_grid_* ---- */
  --hjt-gap: 16px;
  --hjt-gap-sm: 8px;
  --hjt-gap-lg: 24px;

  --hjt-border-width: 1px;
}

/*
 * The theme sets no dark-mode scheme, so the widget does not invent one. A
 * chat panel that flips to dark on a light storefront looks broken, not clever.
 */

/* ---- Primitives the chat UI and the For-you row share ---- */

.hjt-surface {
  background: var(--hjt-surface);
  color: var(--hjt-text);
  border: var(--hjt-border-width) solid var(--hjt-border);
  border-radius: var(--hjt-radius);
}

.hjt-btn {
  font-family: var(--hjt-font-body);
  font-weight: var(--hjt-weight-body);
  background: var(--hjt-gold);
  color: var(--hjt-on-gold);
  border: var(--hjt-border-width) solid var(--hjt-gold);
  border-radius: var(--hjt-radius);
  padding: 10px 18px;
  cursor: pointer;
  line-height: 1.2;
}

.hjt-btn:hover {
  /* animations_hover_elements is "none" on this theme, so the hover is a plain
     tone change rather than a lift or a scale. */
  background: var(--hjt-gold-mid);
  border-color: var(--hjt-gold-mid);
}

.hjt-btn--secondary {
  background: transparent;
  color: var(--hjt-gold);
  border-color: var(--hjt-gold);
}

.hjt-input {
  font-family: var(--hjt-font-body);
  background: #ffffff;
  color: var(--hjt-text);
  border: var(--hjt-border-width) solid var(--hjt-border-input);
  border-radius: var(--hjt-radius);
  padding: 10px 12px;
  width: 100%;
}

.hjt-input:focus {
  outline: 2px solid var(--hjt-gold);
  outline-offset: 1px;
  border-color: var(--hjt-gold);
}

.hjt-heading {
  font-family: var(--hjt-font-heading);
  font-weight: var(--hjt-weight-heading);
  color: var(--hjt-text);
  margin: 0;
}

.hjt-body {
  font-family: var(--hjt-font-body);
  font-weight: var(--hjt-weight-body);
  color: var(--hjt-text);
  line-height: 1.5;
}

/*
 * Product card. Mirrors the theme's own card: 1px border at 5%, 4px radius,
 * 12px image padding, centred text (card_text_alignment "center").
 */
.hjt-card {
  background: var(--hjt-surface);
  border: var(--hjt-border-width) solid var(--hjt-border);
  border-radius: var(--hjt-radius);
  padding: 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: var(--hjt-gap-sm);
}

.hjt-card img {
  width: 100%;
  height: auto;
  border-radius: var(--hjt-radius);
  display: block;
}

.hjt-card__title {
  font-family: var(--hjt-font-heading);
  font-weight: var(--hjt-weight-heading);
  font-size: 0.95rem;
  color: var(--hjt-text);
}

.hjt-card__price {
  font-family: var(--hjt-font-body);
  color: var(--hjt-text);
}

/*
 * Honest qualifier under a card, e.g. "imitation pearl" or "gold plated".
 * Muted rather than hidden: the point is that it is always visible, not that
 * it is prominent.
 */
.hjt-card__qualifier {
  font-family: var(--hjt-font-body);
  font-size: 0.78rem;
  opacity: 0.7;
}

/* Respect a shopper who has asked the OS for less motion. */
@media (prefers-reduced-motion: reduce) {
  .hjt-btn,
  .hjt-card {
    transition: none !important;
  }
}

/*
 * "For you" row (P4-1).
 *
 * The section is hidden until the Worker returns cards, so none of this paints
 * on a visitor with no signal. Sizes mirror the theme's own product cards so
 * the row reads as part of the page rather than an inserted widget.
 */
.hjt-fy {
  margin: var(--hjt-gap-lg) 0;
}

.hjt-fy__head {
  margin-bottom: var(--hjt-gap);
}

.hjt-fy__title {
  font-family: var(--hjt-font-heading);
  font-weight: var(--hjt-weight-heading);
  color: var(--hjt-text);
  margin: 0;
  font-size: 1.4rem;
}

.hjt-fy__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--hjt-gap);
}

.hjt-fy__card {
  display: flex;
  flex-direction: column;
  gap: var(--hjt-gap-sm);
  text-decoration: none;
  color: inherit;
  background: var(--hjt-surface);
  border: var(--hjt-border-width) solid var(--hjt-border);
  border-radius: var(--hjt-radius);
  padding: 12px;
  text-align: center;
}

.hjt-fy__card:hover {
  border-color: var(--hjt-gold-soft);
}

.hjt-fy__card:focus-visible {
  outline: 2px solid var(--hjt-gold);
  outline-offset: 1px;
}

/* Reserving the square keeps a slow CDN from resizing the card mid-scroll. */
.hjt-fy__imgwrap {
  aspect-ratio: 1 / 1;
  background: #fff;
  border-radius: var(--hjt-radius);
  overflow: hidden;
}

.hjt-fy__imgwrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hjt-fy__name {
  font-family: var(--hjt-font-heading);
  font-weight: var(--hjt-weight-heading);
  font-size: 0.9rem;
  line-height: 1.25;
}

.hjt-fy__price {
  font-family: var(--hjt-font-body);
  font-size: 0.88rem;
}
