/**
 * PrizeMart Design Shell — v0.2.0
 * Retail red / white / dark grey. Mobile-first. No ecommerce UI.
 */

/* ---------- Tokens ---------- */
:root {
  --pm-red: #C8102E;
  --pm-red-alt: #CC0000;
  --pm-red-dk: #A00D24;
  --pm-red-50: #FDF0F2;
  --pm-white: #FFFFFF;
  --pm-bg: #FFFFFF;
  --pm-surface: #F7F7F8;
  --pm-line: #E6E6E8;
  --pm-ink: #222222;
  --pm-body: #3A3A3A;
  --pm-muted: #6B6B6B;
  --pm-faint: #9A9A9A;
  --pm-sans: "Noto Sans HK", "Noto Sans TC", "PingFang HK", "Microsoft JhengHei", system-ui, sans-serif;
  --pm-r: 12px;
  --pm-r-sm: 8px;
  --pm-shadow: 0 4px 16px rgba(34, 34, 34, 0.06);
  --pm-shadow-h: 0 10px 28px rgba(34, 34, 34, 0.1);
  --pm-wrap: 1120px;
  --pm-gap: 1rem;
}

/* ---------- Base typography (override Astra Customizer fonts) ---------- */
body,
button,
input,
select,
textarea,
.ast-container,
.entry-content {
  font-family: var(--pm-sans);
  color: var(--pm-body);
}

h1, h2, h3, h4, h5, h6,
.entry-title,
.site-title,
.ast-archive-description .ast-archive-title {
  font-family: var(--pm-sans);
  color: var(--pm-ink);
  font-weight: 700;
  letter-spacing: -0.01em;
}

a {
  color: var(--pm-red);
}

a:hover,
a:focus {
  color: var(--pm-red-dk);
}

/* Soft Astra button alignment when theme uses global palette */
.ast-custom-button,
.wp-block-button__link,
button.pm-btn,
.pm-btn {
  font-family: var(--pm-sans);
}

/* ---------- Shared helpers ---------- */
.pm-wrap {
  max-width: var(--pm-wrap);
  margin: 0 auto;
  padding: 0 1rem;
}

.pm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.35rem;
  background: var(--pm-red);
  color: var(--pm-white) !important;
  border: none;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none !important;
  line-height: 1.2;
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 2px 8px rgba(200, 16, 46, 0.25);
}

.pm-btn:hover,
.pm-btn:focus {
  background: var(--pm-red-dk);
  color: var(--pm-white) !important;
  transform: translateY(-1px);
}

.pm-btn--ghost {
  background: transparent;
  color: var(--pm-red) !important;
  border: 2px solid var(--pm-red);
  box-shadow: none;
}

.pm-btn--ghost:hover,
.pm-btn--ghost:focus {
  background: var(--pm-red-50);
  color: var(--pm-red-dk) !important;
}

.pm-section {
  padding: 2rem 0;
}

.pm-section__title {
  margin: 0 0 1.25rem;
  font-size: clamp(1.35rem, 4vw, 1.75rem);
  font-weight: 700;
  color: var(--pm-ink);
}

.pm-muted {
  color: var(--pm-muted);
}

/* ---------- Hero ---------- */
.pm-hero {
  position: relative;
  background: linear-gradient(135deg, var(--pm-red) 0%, #E02040 55%, #9E0C24 100%);
  color: var(--pm-white);
  border-radius: 0 0 var(--pm-r) var(--pm-r);
  overflow: hidden;
  margin: 0 0 1.5rem;
}

.pm-hero__inner {
  max-width: var(--pm-wrap);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 2.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pm-hero__eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.9;
}

.pm-hero__title {
  margin: 0;
  font-family: var(--pm-sans);
  font-size: clamp(1.75rem, 6vw, 2.75rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--pm-white);
}

.pm-hero__subtitle {
  margin: 0;
  max-width: 36rem;
  font-size: clamp(0.95rem, 2.5vw, 1.1rem);
  font-weight: 400;
  line-height: 1.55;
  opacity: 0.95;
}

.pm-hero .pm-btn {
  align-self: flex-start;
  background: var(--pm-white);
  color: var(--pm-red) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.pm-hero .pm-btn:hover,
.pm-hero .pm-btn:focus {
  background: var(--pm-red-50);
  color: var(--pm-red-dk) !important;
}

@media (min-width: 768px) {
  .pm-hero__inner {
    padding: 3.5rem 1.5rem 4rem;
  }
}

/* ---------- Promo grid / cards ---------- */
.pm-promo-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 0 0 1.5rem;
}

.pm-promo-card {
  display: flex;
  flex-direction: column;
  background: var(--pm-white);
  border: 1px solid var(--pm-line);
  border-radius: var(--pm-r);
  overflow: hidden;
  box-shadow: var(--pm-shadow);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  text-decoration: none;
  color: inherit;
  height: 100%;
}

a.pm-promo-card:hover,
a.pm-promo-card:focus {
  box-shadow: var(--pm-shadow-h);
  transform: translateY(-2px);
  color: inherit;
  text-decoration: none;
}

.pm-promo-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--pm-surface);
  overflow: hidden;
}

.pm-promo-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pm-promo-card__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--pm-red-50), var(--pm-surface));
  color: var(--pm-red);
  font-weight: 700;
  font-size: 0.95rem;
}

.pm-promo-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem 1.1rem 1.25rem;
  flex: 1;
}

.pm-promo-card__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--pm-ink);
  line-height: 1.35;
}

.pm-promo-card__excerpt {
  margin: 0;
  font-size: 0.9rem;
  color: var(--pm-muted);
  line-height: 1.5;
  flex: 1;
}

.pm-promo-card__link {
  margin-top: 0.35rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--pm-red);
}

@media (min-width: 600px) {
  .pm-promo-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .pm-promo-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
  }
}

/* ---------- Store locator (list + tabs + map placeholder) ---------- */
.pm-store-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin: 0 0 2rem;
}

.pm-store-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}

.pm-store-tabs button,
.pm-store-tabs .pm-store-tab {
  appearance: none;
  border: 1px solid var(--pm-line);
  background: var(--pm-white);
  color: var(--pm-body);
  font-family: var(--pm-sans);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.pm-store-tabs button:hover,
.pm-store-tabs .pm-store-tab:hover,
.pm-store-tabs button.is-active,
.pm-store-tabs .pm-store-tab.is-active,
.pm-store-tabs button[aria-selected="true"],
.pm-store-tabs .pm-store-tab[aria-selected="true"] {
  background: var(--pm-red);
  border-color: var(--pm-red);
  color: var(--pm-white);
}

.pm-store-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pm-store-item {
  background: var(--pm-white);
  border: 1px solid var(--pm-line);
  border-radius: var(--pm-r);
  padding: 1rem 1.1rem;
  box-shadow: var(--pm-shadow);
}

.pm-store-item__title {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--pm-ink);
}

.pm-store-item__title a {
  color: inherit;
  text-decoration: none;
}

.pm-store-item__title a:hover {
  color: var(--pm-red);
}

.pm-store-item__meta {
  margin: 0;
  font-size: 0.875rem;
  color: var(--pm-muted);
  line-height: 1.5;
}

.pm-store-item__meta + .pm-store-item__meta {
  margin-top: 0.25rem;
}

.pm-store-item__label {
  font-weight: 500;
  color: var(--pm-body);
}

.pm-store-map {
  min-height: 220px;
  background: var(--pm-surface);
  border: 1px dashed var(--pm-line);
  border-radius: var(--pm-r);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem;
  color: var(--pm-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.pm-store-map__icon {
  display: block;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--pm-red);
}

@media (min-width: 900px) {
  .pm-store-layout {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    align-items: start;
  }

  .pm-store-map {
    min-height: 420px;
    position: sticky;
    top: 1rem;
  }
}

/* ---------- Promo single (image + text; NO buy CTA) ---------- */
.single-promo .entry-content,
.pm-promo-single {
  max-width: 720px;
}

.pm-promo-single__media,
.single-promo .post-thumb-img-content img,
.single-promo .ast-single-post-featured-image img {
  width: 100%;
  border-radius: var(--pm-r);
  margin-bottom: 1.25rem;
}

.pm-promo-single__body {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--pm-body);
}

/* Hide any accidental ecommerce UI if present later */
.pm-no-cart,
.woocommerce .pm-hide-cart {
  display: none !important;
}

/* ---------- Empty / placeholder states ---------- */
.pm-empty {
  padding: 1.25rem;
  background: var(--pm-surface);
  border-radius: var(--pm-r);
  color: var(--pm-muted);
  text-align: center;
  font-size: 0.95rem;
}

/* ---------- Mobile tweaks ---------- */
@media (max-width: 599px) {
  .pm-section {
    padding: 1.5rem 0;
  }

  .pm-hero__inner {
    padding: 2rem 1rem 2.25rem;
  }
}
