:root {
  --emwp-ink: #202624;
  --emwp-muted: #66706c;
  --emwp-paper: #f7f6f1;
  --emwp-line: #e3e5df;
  --emwp-accent: #f3bd24;
  --emwp-accent-dark: #dda90d;
  --emwp-radius: 18px;
}

.emwp-catalog, .emwp-category-grid, .emwp-designer, .emwp-form-wrap {
  color: var(--emwp-ink);
  font-family: inherit;
}
.emwp-catalog *, .emwp-category-grid *, .emwp-designer *, .emwp-form-wrap * { box-sizing: border-box; }
.emwp-button {
  min-height: 48px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border: 0;
  border-radius: 999px;
  background: var(--emwp-accent);
  color: var(--emwp-ink) !important;
  font: inherit;
  font-weight: 750;
  line-height: 1.2;
  text-decoration: none !important;
  cursor: pointer;
  transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
}
.emwp-button:hover { background: var(--emwp-accent-dark); transform: translateY(-1px); box-shadow: 0 8px 18px #2026241a; }
.emwp-button:focus-visible, .emwp-catalog a:focus-visible, .emwp-category-grid a:focus-visible, .emwp-designer button:focus-visible, .emwp-form-wrap input:focus-visible, .emwp-form-wrap textarea:focus-visible, .emwp-form-wrap select:focus-visible { outline: 3px solid #356ec4; outline-offset: 3px; }
.emwp-button-small { min-height: 40px; padding: 9px 15px; font-size: .92rem; }
.emwp-section-title { margin: 0 0 24px; color: var(--emwp-ink); font-size: clamp(1.6rem, 3vw, 2.3rem); }

.emwp-catalog-tools { display: grid; grid-template-columns: minmax(180px, 1.6fr) minmax(180px, 1fr) auto; gap: 10px; margin: 0 0 25px; }
.emwp-catalog-tools input, .emwp-catalog-tools select, .emwp-field input:not([type="checkbox"]):not([type="color"]):not([type="range"]), .emwp-field textarea, .emwp-field select {
  width: 100%; min-height: 48px; border: 1px solid #d9ddd6; border-radius: 11px; background: #fff; color: var(--emwp-ink); padding: 11px 13px; font: inherit;
}
.emwp-catalog-tools input::placeholder, .emwp-field input::placeholder, .emwp-field textarea::placeholder { color: #8b928e; }
.emwp-product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.emwp-product-card { overflow: hidden; border: 1px solid var(--emwp-line); border-radius: var(--emwp-radius); background: #fff; transition: transform .2s ease, box-shadow .2s ease; }
.emwp-product-card:hover { transform: translateY(-3px); box-shadow: 0 16px 36px #20262412; }
.emwp-product-image { display: flex; aspect-ratio: 1.28 / 1; align-items: center; justify-content: center; overflow: hidden; background: var(--emwp-paper); text-decoration: none; }
.emwp-product-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.emwp-product-card:hover .emwp-product-image img { transform: scale(1.035); }
.emwp-image-placeholder { color: #9ca49e; font-size: .9rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.emwp-product-copy { padding: 18px 19px 20px; }
.emwp-product-category, .emwp-eyebrow { margin: 0 0 8px; color: #777f78; font-size: .72rem; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.emwp-product-copy h3 { margin: 0 0 9px; font-size: 1.16rem; line-height: 1.25; }
.emwp-product-copy h3 a { color: var(--emwp-ink); text-decoration: none; }
.emwp-product-copy p:not(.emwp-product-category) { margin: 0 0 13px; color: var(--emwp-muted); font-size: .93rem; line-height: 1.5; }
.emwp-text-link { display: inline-flex; gap: 8px; color: var(--emwp-ink); font-weight: 750; text-decoration: none; }
.emwp-text-link:hover { color: #9a7000; }
.emwp-pagination { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 28px 0 0; }
.emwp-pagination a { display: grid; min-width: 40px; height: 40px; place-items: center; border: 1px solid var(--emwp-line); border-radius: 50%; color: var(--emwp-ink); text-decoration: none; }
.emwp-pagination a.is-current { border-color: var(--emwp-ink); background: var(--emwp-ink); color: #fff; }
.emwp-empty, .emwp-notice { padding: 24px; border-radius: 14px; background: var(--emwp-paper); }
.emwp-empty h3 { margin: 0 0 7px; }
.emwp-category-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; }
.emwp-category-card { overflow: hidden; min-height: 190px; display: flex; flex-direction: column; justify-content: flex-end; position: relative; padding: 18px; border-radius: 16px; background: var(--emwp-paper); color: var(--emwp-ink); text-decoration: none; }
.emwp-category-card img { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; }
.emwp-category-card::after { position: absolute; inset: 30% 0 0; background: linear-gradient(transparent, #161a18d9); content: ""; }
.emwp-category-card > span:not(.emwp-category-mark), .emwp-category-card small { position: relative; z-index: 1; color: #fff; }
.emwp-category-card > span:not(.emwp-category-mark) { font-size: 1.12rem; font-weight: 800; }
.emwp-category-card small { margin-top: 3px; opacity: .85; }
.emwp-category-mark { position: absolute; top: 18px; right: 18px; color: #b48d1d; font-size: 1.5rem; }

.emwp-designer { overflow: hidden; border: 1px solid var(--emwp-line); border-radius: 22px; background: #fff; box-shadow: 0 18px 50px #2026240d; }
.emwp-designer-heading { padding: 28px 30px 0; }
.emwp-designer-heading h2 { margin: 0 0 8px; color: var(--emwp-ink); font-size: clamp(1.65rem, 3vw, 2.25rem); }
.emwp-designer-heading > p:last-child { max-width: 680px; margin: 0; color: var(--emwp-muted); line-height: 1.55; }
.emwp-designer-layout { display: grid; grid-template-columns: minmax(300px, .95fr) minmax(330px, 1.05fr); gap: 30px; padding: 26px 30px 30px; }
.emwp-editor { min-width: 0; }
.emwp-side-tabs { display: inline-flex; gap: 5px; padding: 5px; border-radius: 999px; background: #eff0ec; }
.emwp-side-tabs button { min-width: 100px; padding: 10px 17px; border: 0; border-radius: 999px; background: transparent; color: var(--emwp-muted); font: inherit; font-weight: 750; cursor: pointer; }
.emwp-side-tabs button.is-active { background: #fff; color: var(--emwp-ink); box-shadow: 0 2px 8px #20262412; }
.emwp-preview-stage { position: relative; width: min(100%, 470px); margin: 18px auto 0; aspect-ratio: 1222 / 1287; border-radius: 18px; background: #f7f7f3; }
.emwp-shirt-canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; filter: drop-shadow(0 12px 15px #20262414); }
.emwp-print-area { position: absolute; left: 29%; top: 24%; width: 42%; height: 44%; overflow: visible; }
.emwp-print-area.is-back { top: 19%; height: 49%; }
.emwp-print-hint { position: absolute; inset: 0; display: grid; place-items: center; color: #858d86; font-size: .75rem; text-align: center; }
.emwp-print-hint[hidden] { display: none !important; }
.emwp-design-image { position: absolute; max-width: 100%; max-height: 100%; object-fit: contain; transform: translate(-50%, -50%); touch-action: none; user-select: none; cursor: move; }
.emwp-design-text { position: absolute; white-space: nowrap; transform: translate(-50%, -50%); text-align: center; font-weight: 800; line-height: 1.1; text-shadow: 0 1px 2px #fff7; touch-action: none; user-select: none; cursor: move; }
.emwp-selection-box { position: absolute; z-index: 4; border: 1px dashed #1752ad; box-shadow: 0 0 0 1px #fff; pointer-events: none; touch-action: none; }
.emwp-selection-box[hidden] { display: none !important; }
.emwp-selection-box button { position: absolute; width: 18px; height: 18px; padding: 0; border: 2px solid #1752ad; border-radius: 4px; background: #fff; box-shadow: 0 1px 5px #15254155; pointer-events: auto; touch-action: none; }
.emwp-selection-box button:nth-child(1) { top: 0; left: 0; transform: translate(-50%, -50%); cursor: nwse-resize; }
.emwp-selection-box button:nth-child(2) { top: 0; right: 0; transform: translate(50%, -50%); cursor: nesw-resize; }
.emwp-selection-box button:nth-child(3) { bottom: 0; left: 0; transform: translate(-50%, 50%); cursor: nesw-resize; }
.emwp-selection-box button:nth-child(4) { right: 0; bottom: 0; transform: translate(50%, 50%); cursor: nwse-resize; }
.emwp-preview-side { position: absolute; z-index: 5; top: 12px; right: 12px; padding: 7px 11px; border: 1px solid #e7e9e3; border-radius: 999px; background: #ffffffed; color: #4f5851; font-size: .68rem; font-weight: 800; letter-spacing: .12em; }
.emwp-hint { margin: 9px 0 0; color: #7b837d; font-size: .8rem; text-align: center; }
.emwp-controls { display: grid; align-content: start; gap: 16px; min-width: 0; }
.emwp-field { display: grid; gap: 7px; margin: 0; color: var(--emwp-ink); font-size: .91rem; font-weight: 700; }
.emwp-field small { color: #747d76; font-size: .78rem; font-weight: 450; line-height: 1.4; }
.emwp-controls .emwp-field input[type="file"] { max-width: 100%; padding: 10px; border: 1px dashed #c9cfc6; border-radius: 11px; background: var(--emwp-paper); font: inherit; }
.emwp-controls .emwp-field input[type="range"] { width: 100%; accent-color: #c59400; }
.emwp-colors { display: flex; flex-wrap: wrap; gap: 10px; }
.emwp-color-count { margin-left: 7px; padding: 4px 8px; border-radius: 999px; background: #f2f3ee; color: #737c75; font-size: .7rem; font-weight: 700; white-space: nowrap; }
.emwp-colors { display: grid; grid-template-columns: repeat(6, minmax(42px, 1fr)); gap: 8px; }
.emwp-color-swatch { min-width: 0; display: grid; justify-items: center; gap: 5px; padding: 5px 3px 6px; border: 1px solid transparent; border-radius: 11px; background: transparent; color: var(--emwp-ink); font: inherit; cursor: pointer; transition: background .16s ease, border-color .16s ease, transform .16s ease; }
.emwp-color-swatch:hover { background: #f6f6f2; transform: translateY(-1px); }
.emwp-color-swatch.is-selected { border-color: #d9ad26; background: #fffaf0; }
.emwp-swatch-dot { width: 31px; height: 31px; display: block; border: 2px solid #fff; border-radius: 50%; background: var(--swatch); box-shadow: 0 0 0 1px #cfd4cd, inset 0 0 0 1px #0000000d; }
.emwp-swatch-code { font-size: .72rem; font-weight: 800; line-height: 1; }
.emwp-color-note { display: block; margin-top: 7px; }
.emwp-color-note strong { color: var(--emwp-ink); }
.emwp-control-pair, .emwp-field-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.emwp-control-pair input[type="color"] { width: 58px; height: 40px; padding: 3px; border: 1px solid var(--emwp-line); border-radius: 9px; background: #fff; }
.emwp-controls > .emwp-button { justify-self: start; }
.emwp-designer-submit { padding: 28px 30px 30px; border-top: 1px solid var(--emwp-line); background: #fbfaf6; scroll-margin-top: 24px; }
.emwp-designer-submit h3 { margin: 0 0 5px; font-size: 1.45rem; }
.emwp-designer-submit > p { margin: 0 0 18px; color: var(--emwp-muted); }
.emwp-design-summary { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 12px; background: #f1efe5; color: var(--emwp-ink); font-size: .88rem; }
.emwp-design-summary span { color: var(--emwp-muted); }
.emwp-file-inputs { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; }

.emwp-form-wrap { max-width: 920px; }
.emwp-quote-form { display: grid; gap: 16px; }
.emwp-quote-form .emwp-field textarea { min-height: 130px; resize: vertical; }
.emwp-optional { color: var(--emwp-muted); font-size: .8rem; font-weight: 450; }
.emwp-upload input[type="file"] { min-height: 45px; }
.emwp-privacy { display: flex; align-items: flex-start; gap: 9px; color: var(--emwp-muted); font-size: .85rem; line-height: 1.45; }
.emwp-privacy input { margin-top: 3px; }
.emwp-privacy a { color: var(--emwp-ink); text-decoration: underline; }
.emwp-form-note { margin: -7px 0 0; color: var(--emwp-muted); font-size: .82rem; }
.emwp-notice-success, .emwp-notice-error { margin-bottom: 16px; padding: 14px 16px; border-radius: 12px; }
.emwp-notice-success { background: #eaf5ea; color: #24552c; }
.emwp-notice-error { background: #fff0eb; color: #852b19; }
.emwp-trap { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.emwp-product-quote { margin-top: 20px; padding: 18px; border-radius: 14px; background: var(--emwp-paper); }
.emwp-product-quote p { margin: 8px 0 0; color: var(--emwp-muted); font-size: .88rem; }
.emwp-catalog-mode .price, .emwp-catalog-mode .add_to_cart_button, .emwp-catalog-mode .single_add_to_cart_button, .emwp-catalog-mode .woocommerce-variation-add-to-cart { display: none !important; }

@media (max-width: 900px) {
  .emwp-product-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .emwp-category-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .emwp-designer-layout { grid-template-columns: minmax(270px, .9fr) minmax(290px, 1.1fr); gap: 22px; padding-inline: 22px; }
}
@media (max-width: 680px) {
  .emwp-catalog-tools { grid-template-columns: 1fr; }
  .emwp-product-grid { gap: 12px; }
  .emwp-product-copy { padding: 14px; }
  .emwp-product-copy h3 { font-size: 1rem; }
  .emwp-category-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
  .emwp-category-card { min-height: 150px; padding: 14px; }
  .emwp-designer-heading { padding: 22px 18px 0; }
  .emwp-designer-layout { grid-template-columns: 1fr; gap: 20px; padding: 20px 18px 24px; }
  .emwp-preview-stage { width: min(100%, 410px); }
  .emwp-selection-box button { width: 23px; height: 23px; border-radius: 6px; }
  .emwp-controls > .emwp-button { width: 100%; }
  .emwp-designer-submit { padding: 23px 18px; }
  .emwp-field-grid { gap: 11px; }
  .emwp-quote-form .emwp-field-grid { grid-template-columns: 1fr; }
  .emwp-quote-form > .emwp-button { width: 100%; }
  .emwp-colors { grid-template-columns: repeat(5, minmax(42px, 1fr)); gap: 5px; }
  .emwp-swatch-dot { width: 29px; height: 29px; }
}
@media (prefers-reduced-motion: reduce) {
  .emwp-button, .emwp-product-card, .emwp-product-image img { transition: none; }
}
