@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Libre+Baskerville:wght@700&display=swap");

:root {
  --ems-bg: #fffaf4;
  --ems-surface: #ffffff;
  --ems-ink: #151616;
  --ems-muted: #6f6a64;
  --ems-green: #073d20;
  --ems-gold: #a66a0e;
  --ems-red: #a9040a;
  --ems-red-dark: #8d0508;
  --ems-border: #eadfd1;
  --ems-shadow: 0 8px 22px rgba(70, 42, 18, 0.14);
}

* {
  box-sizing: border-box;
}

html,
body {
  overflow-x: hidden;
}

body {
  margin: 0;
  background: #363636;
  color: var(--ems-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

.ems-shell {
  width: min(100%, 430px);
  min-height: 100vh;
  margin: 0;
  background: linear-gradient(180deg, #fffaf4 0%, #fff 42%, #fff9ef 100%);
  overflow: hidden;
}

.ems-topbar {
  height: 60px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 38px;
  align-items: center;
  gap: 8px;
  padding: 6px 20px 5px;
  background: rgba(255, 251, 244, 0.96);
  border-bottom: 1px solid rgba(232, 220, 207, 0.82);
}

.ems-icon-button {
  width: 34px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #121212;
}

.ems-icon-button .dashicons {
  width: 26px;
  height: 26px;
  font-size: 26px;
}

.ems-icon-button:focus-visible {
  outline: 2px solid var(--ems-green);
  outline-offset: 2px;
}

.ems-brand {
  min-width: 0;
  color: var(--ems-green);
  text-align: center;
}

.ems-brand__line {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  max-width: 100%;
}

.ems-brand__mark {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  object-fit: contain;
}

.ems-brand__name {
  display: inline-block;
  min-width: 0;
  overflow: hidden;
  color: var(--ems-green);
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 23px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.ems-brand__tagline {
  display: block;
  margin-top: 3px;
  color: var(--ems-gold);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.ems-hero {
  position: relative;
  min-height: 196px;
  isolation: isolate;
}

.ems-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: var(--ems-hero-image);
  background-size: cover;
  background-position: center right;
}

.ems-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(255, 250, 242, 0.98) 0%, rgba(255, 250, 242, 0.88) 45%, rgba(255, 250, 242, 0.1) 100%);
}

.ems-hero__copy {
  width: 88%;
  padding: 22px 26px 18px;
}

.ems-hero h1 {
  margin: 0;
  color: #960c12;
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 36px;
  line-height: 1.05;
}

.ems-hero h1 span {
  display: block;
}

.ems-hero p {
  max-width: 280px;
  margin: 12px 0 0;
  color: #1e1e1c;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.38;
}

.ems-hero-star {
  display: block;
  width: 20px;
  height: 20px;
  margin: 8px 0 0 94px;
  color: #bd861b;
  font-size: 20px;
  line-height: 1;
}

.ems-finder {
  padding: 0 25px 6px;
  background: linear-gradient(180deg, #fff7ed 0%, #fff 100%);
}

.ems-search {
  transform: translateY(-34px);
  margin-bottom: -15px;
  width: 100%;
  min-height: 44px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 96px;
  align-items: center;
  gap: 8px;
  padding: 7px 9px 7px 13px;
  border: 1px solid #d9cbbd;
  border-radius: 8px;
  background: var(--ems-surface);
  box-shadow: var(--ems-shadow);
}

.ems-search .dashicons-search {
  width: 28px;
  height: 28px;
  font-size: 28px;
}

.ems-search input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--ems-ink);
  font-size: 14px;
  font-weight: 600;
}

.ems-search input::placeholder {
  color: #817d79;
}

.ems-search button {
  width: 100%;
  min-height: 32px;
  border: 0;
  border-radius: 6px;
  padding: 7px 8px;
  background: #f6ede5;
  color: var(--ems-red-dark);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.ems-filters {
  display: none;
  gap: 7px;
  overflow-x: auto;
  scrollbar-width: none;
}

.ems-filters::-webkit-scrollbar {
  display: none;
}

.ems-filters button {
  min-height: 35px;
  padding: 8px 12px;
  border: 1px solid var(--ems-border);
  border-radius: 999px;
  background: #fff;
  color: var(--ems-muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.ems-filters button.is-active {
  border-color: var(--ems-green);
  background: var(--ems-green);
  color: #fff;
}

.ems-toast {
  margin: 0 25px 13px;
  padding: 9px 12px;
  border: 1px solid #ecd5b8;
  border-radius: 8px;
  background: #fff8ea;
  color: #5d3a08;
  font-size: 12px;
  font-weight: 700;
}

.ems-section {
  padding: 0 25px 13px;
}

.ems-section h2,
.ems-section-heading h2 {
  margin: 0;
  color: var(--ems-green);
  font-size: 17px;
  font-weight: 900;
  line-height: 1.12;
}

.ems-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.ems-section-heading a {
  flex: 0 0 auto;
  color: var(--ems-red-dark);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.ems-featured-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.ems-deal-card {
  min-width: 0;
  padding: 5px 5px 7px;
  border: 1px solid var(--ems-border);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 5px 14px rgba(68, 38, 15, 0.08);
}

.ems-product-image,
.ems-recent-image {
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #f8efe2;
}

.ems-product-image {
  width: 100%;
  border-radius: 6px;
}

.ems-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  margin-top: 4px;
  color: #20201f;
  font-size: 10px;
  font-weight: 800;
}

.ems-item-pill {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 3px 6px;
  border-radius: 4px;
  background: var(--ems-red);
  color: #fff;
  font-weight: 900;
  white-space: nowrap;
}

.ems-deal-card h3 {
  min-height: 25px;
  margin: 5px 0 3px;
  color: #111;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.12;
}

.ems-category-line {
  display: flex;
  align-items: center;
  gap: 3px;
  margin: 0 0 5px;
  color: var(--ems-green);
  font-size: 10.5px;
  font-weight: 700;
}

.ems-category-line .dashicons {
  width: 15px;
  height: 15px;
  font-size: 15px;
}

.ems-offer-grid {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px;
  align-items: center;
}

.ems-discount {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 23px;
  padding: 3px 7px;
  border-radius: 4px;
  background: linear-gradient(180deg, #c5080f, var(--ems-red-dark));
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.ems-discount--small {
  min-height: 22px;
  padding: 3px 7px;
  font-size: 11px;
}

.ems-code-button,
.ems-mini-code {
  min-height: 23px;
  border: 1px dashed #c5af98;
  border-radius: 5px;
  padding: 3px 5px;
  background: #fffaf3;
  color: #5c4e43;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.ems-code-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
}

.ems-code-button .dashicons {
  width: 14px;
  height: 14px;
  color: #6b625c;
  font-size: 14px;
}

.ems-checkout-note {
  margin: 4px 0 5px;
  color: var(--ems-muted);
  font-size: 10px;
  font-weight: 500;
}

.ems-shop-button {
  width: 100%;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 0;
  border-radius: 5px;
  background: linear-gradient(180deg, #c60910, #a00006);
  color: #fff;
  font-size: 11.5px;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 6px 12px rgba(169, 4, 10, 0.18);
}

.ems-occasion-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 8px;
}

.ems-occasion-grid button {
  min-height: 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 5px 5px;
  border: 1px solid var(--ems-border);
  border-radius: 8px;
  background: #fff9f1;
  color: var(--ems-ink);
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.12;
  text-align: center;
}

.ems-occasion-grid .dashicons {
  width: 25px;
  height: 25px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #eadac7;
  border-radius: 8px;
  background: #fff;
  color: var(--ems-green);
  font-size: 16px;
}

.ems-recent-list {
  border: 1px solid var(--ems-border);
  border-radius: 9px;
  background: #fff;
  overflow: hidden;
}

.ems-recent-row {
  min-width: 0;
  min-height: 52px;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 68px 16px;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  border-bottom: 1px solid #eee4d9;
}

.ems-recent-row:last-child {
  border-bottom: 0;
}

.ems-recent-image {
  width: 46px;
  border-radius: 5px;
}

.ems-recent-body {
  min-width: 0;
}

.ems-recent-title {
  display: grid;
  grid-template-columns: 43px minmax(0, 1fr);
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.ems-recent-title .ems-item-pill {
  justify-content: center;
  min-height: 20px;
  padding: 2px 5px;
  font-size: 11px;
}

.ems-recent-title strong {
  min-width: 0;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.08;
}

.ems-recent-body p {
  margin: 3px 0 0 48px;
  color: var(--ems-muted);
  font-size: 9.5px;
  font-weight: 500;
  line-height: 1.15;
}

.ems-recent-offer {
  display: grid;
  gap: 3px;
  justify-items: end;
}

.ems-mini-code {
  min-height: 19px;
  font-size: 9.5px;
}

.ems-row-link {
  color: var(--ems-ink);
  font-size: 23px;
  font-weight: 700;
  line-height: 1;
  text-align: right;
  text-decoration: none;
}

.ems-empty {
  margin: 0;
  padding: 16px 14px;
  color: var(--ems-muted);
  font-size: 13px;
  font-weight: 700;
}

.ems-footer-note {
  min-height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 5px;
  padding: 7px 20px 8px;
  border-top: 1px solid var(--ems-border);
  background: #fbf0e1;
  color: #4e4d4b;
  font-size: 10.5px;
  line-height: 1.35;
  text-align: center;
}

.ems-footer-note__mark {
  width: 21px;
  height: 21px;
  flex: 0 0 21px;
  object-fit: contain;
}

.ems-index__message {
  padding: 40px 25px;
}

@media (min-width: 680px) {
  body {
    padding: 24px 0;
  }

  .ems-shell {
    width: min(100% - 48px, 430px);
    margin: 0 auto;
    border: 1px solid var(--ems-border);
    border-radius: 5px;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
  }
}

@media (max-width: 374px) {
  .ems-brand__name {
    font-size: 20px;
  }

  .ems-search {
    grid-template-columns: 30px minmax(0, 1fr) 88px;
  }

  .ems-featured-grid {
    gap: 8px;
  }

  .ems-occasion-grid {
    gap: 8px;
  }

  .ems-recent-row {
    grid-template-columns: 58px minmax(0, 1fr) 20px;
  }

  .ems-recent-image {
    width: 58px;
  }

  .ems-recent-offer {
    grid-column: 2 / 3;
    grid-template-columns: auto auto;
    justify-items: start;
  }
}
