/* JayJewls depth refresh — scoped to the existing storefront DOM.
   Existing, observed DOM selectors only. No route, price, auth or stock changes.
   Catalog manager/dialog/cropper styles are owned by the separate UI candidate. */
#jj-template-app {
  --jj-surface: #fffdfb;
  --jj-canvas: #faf7f3;
  --jj-ink: #332d39;
  --jj-muted: #6d626b;
  --jj-rose: #912e57;
  --jj-rose-deep: #742143;
  --jj-blush: #f7e5ec;
  --jj-gold: #94692d;
  --jj-gold-soft: #f3e5c9;
  --jj-line: #e9ddd8;
  --jj-radius: 24px;
  --jj-shadow-sm: 0 2px 3px rgb(70 44 37 / 3%), 0 7px 20px rgb(70 44 37 / 5%);
  --jj-shadow-card: 0 2px 4px rgb(70 44 37 / 3%), 0 14px 32px rgb(70 44 37 / 7%);
  --jj-shadow-hover: 0 4px 8px rgb(70 44 37 / 4%), 0 22px 46px rgb(91 44 62 / 12%);
}

/* Storefront typography and a quiet warm canvas. */
#jj-template-app > .page-view {
  color: var(--jj-ink);
  background: radial-gradient(ellipse at 92% 6%, #f7eaf0 0, transparent 31%),
    linear-gradient(180deg, #fffdfa, #faf7f3 76%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.6;
}
#jj-template-app .page-view :where(h1, h2, h3) {
  color: var(--jj-rose);
  text-wrap: balance;
}
#jj-template-app .page-view :where(h1, h2) { font-family: Georgia, "Times New Roman", serif; }
#jj-template-app .page-view :where(p, li) { text-wrap: pretty; }
#jj-template-app .page-view .eyebrow {
  color: var(--jj-gold);
  font: 650 11px/1.6 ui-sans-serif, system-ui, sans-serif;
  letter-spacing: .17em;
}
#jj-template-app :where(.page-container, .section-wide) {
  width: min(100% - 48px, 1440px);
  margin-inline: auto;
}
#jj-template-app .page-container.narrow { max-width: 900px; }

/* Existing header/logo/menus retained. No added stacking context on app root. */
#jj-template-app > .site-header {
  background: rgb(255 253 251 / 96%);
  border-bottom: 1px solid rgb(148 105 45 / 15%);
  box-shadow: 0 6px 24px rgb(64 38 40 / 6%);
  font-family: ui-sans-serif, system-ui, sans-serif;
}
@supports (backdrop-filter: blur(12px)) {
  #jj-template-app > .site-header { background: rgb(255 253 251 / 92%); backdrop-filter: blur(12px); }
}
#jj-template-app .desktop-nav a { color: #50454e; font-size: 13px; font-weight: 600; }
#jj-template-app .desktop-nav a[aria-current="page"] { color: var(--jj-rose); }
#jj-template-app .header-search {
  background: #f9f5f3;
  border-color: var(--jj-line);
  box-shadow: inset 0 1px 2px rgb(70 44 37 / 3%);
}
#jj-template-app .header-search:focus-within {
  background: #fff;
  border-color: var(--jj-rose);
  box-shadow: 0 0 0 3px rgb(145 46 87 / 10%);
}

/* Preserve the moving mug/notebook and rainbow hero composition. */
#jj-template-app .hero {
  border-bottom: 1px solid rgb(148 105 45 / 16%);
  box-shadow: inset 0 -24px 34px -32px rgb(111 68 78 / 22%);
}
#jj-template-app .hero-copy h2 { line-height: 1.32; }
#jj-template-app .hero-copy p { color: #584b56; line-height: 1.75; }
#jj-template-app .hero-buttons { gap: 14px; }
#jj-template-app .page-view .btn {
  min-height: 44px;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: .01em;
  border-radius: 999px;
}
#jj-template-app .page-view .btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #a33b64, #872b51);
  border: 1px solid #8a2c53;
  box-shadow: 0 2px 3px rgb(91 24 52 / 9%), 0 8px 18px rgb(145 46 87 / 17%);
}
#jj-template-app .page-view .btn-outline {
  color: #805a25;
  background: rgb(255 253 251 / 95%);
  border-color: #b99154;
  box-shadow: var(--jj-shadow-sm);
}
#jj-template-app .category-strip { gap: 18px; padding-block: 22px; }
#jj-template-app .category-card {
  color: var(--jj-ink);
  background: linear-gradient(135deg, #fffefa, #fcf0f3);
  border: 1px solid #eddfd8;
  border-radius: 20px;
  box-shadow: var(--jj-shadow-sm);
}
#jj-template-app .category-card small { color: var(--jj-muted); }
#jj-template-app .section-heading { margin-block: 28px; }
#jj-template-app .section-heading p { color: var(--jj-muted); }

/* The grid fills the content width even while only a few styles are public. */
#jj-template-app .page-view .product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: clamp(18px, 2vw, 28px);
  align-items: stretch;
}
#jj-template-app .page-view .product-grid > .product-card:only-child { width: 100%; max-width: 460px; }
#jj-template-app .product-card[data-catalog-product] {
  background: var(--jj-surface);
  border: 1px solid var(--jj-line);
  border-radius: var(--jj-radius);
  box-shadow: var(--jj-shadow-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .25s ease, box-shadow .24s ease, border-color .24s ease;
}
#jj-template-app .product-card[data-catalog-product] .product-photo {
  margin: 8px 8px 0;
  border-radius: 18px;
  background: #faf7f2;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgb(148 105 45 / 6%);
  aspect-ratio: 1;
  height: auto;
}
#jj-template-app .product-card[data-catalog-product] .product-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
#jj-template-app .product-card[data-catalog-product] .product-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 20px;
}
#jj-template-app .product-card[data-catalog-product] .product-name {
  color: #482b3b;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(18px, 1.3vw, 22px);
  line-height: 1.35;
  font-weight: 500;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
#jj-template-app .product-card[data-catalog-product] .product-price {
  color: var(--jj-rose);
  font: 650 16px/1.6 ui-sans-serif, system-ui, sans-serif;
  margin-top: 10px;
}
#jj-template-app .product-card[data-catalog-product] .btn { margin-top: auto; width: 100%; }
#jj-template-app .product-card[data-catalog-product] .wish-button {
  background: rgb(255 253 251 / 96%);
  border: 1px solid #e5d9cc;
  box-shadow: 0 3px 12px rgb(73 46 44 / 9%);
  min-width: 40px;
  min-height: 40px;
}
#jj-template-app .product-badge {
  background: rgb(255 253 251 / 95%);
  color: #795527;
  border: 1px solid rgb(148 105 45 / 16%);
  font: 600 11px/1.5 ui-sans-serif, system-ui, sans-serif;
  padding: 5px 10px;
  border-radius: 999px;
}
#jj-template-app .page-view .jj-catalog-unit { color: var(--jj-muted); font-size: 12px; line-height: 1.6; }
#jj-template-app .page-view .jj-catalog-stock { font-family: ui-sans-serif, system-ui, sans-serif; }
#jj-template-app .page-view .jj-catalog-stock[data-stock-state="out_of_stock"] { color: #825e4c; }
#jj-template-app .page-view .jj-catalog-stock[data-stock-state="in_stock"] { color: #356449; }

/* Clear catalog controls, without covering narrow screens with a sticky bar. */
#jj-template-app .page-heading { padding-block: clamp(32px, 5vw, 68px); }
#jj-template-app .page-heading h1 { font-size: clamp(32px, 4vw, 54px); line-height: 1.16; }
#jj-template-app .page-heading p { color: var(--jj-muted); max-width: 620px; margin-inline: auto; }
#jj-template-app .shop-toolbar {
  background: rgb(255 253 251 / 95%);
  border: 1px solid var(--jj-line);
  border-radius: 22px;
  padding: 16px;
  box-shadow: var(--jj-shadow-sm);
  gap: 16px;
}
#jj-template-app .filter-chips { gap: 8px; }
#jj-template-app .page-view .chip {
  color: #655363;
  background: #fff;
  border: 1px solid #e7d9df;
  min-height: 40px;
  padding: 9px 16px;
  font: 550 12px/1.5 ui-sans-serif, system-ui, sans-serif;
}
#jj-template-app .page-view .chip:is(.active, [aria-current="page"]) {
  color: #fff;
  background: var(--jj-rose);
  border-color: var(--jj-rose);
  box-shadow: 0 4px 10px rgb(145 46 87 / 14%);
}
#jj-template-app .sort-label { color: var(--jj-muted); font-size: 12px; }
#jj-template-app .results-line { gap: 16px; margin-block: 22px; color: var(--jj-muted); font-size: 13px; }
#jj-template-app .search-inline { border-color: var(--jj-line); background: #fff; }

/* Product detail: the photograph and summary have separate readable surfaces. */
#jj-template-app .breadcrumbs { color: var(--jj-muted); font-size: 12px; line-height: 1.7; margin-block: 24px; }
#jj-template-app .product-detail[data-catalog-detail] {
  align-items: start;
  gap: clamp(24px, 4vw, 64px);
}
#jj-template-app .product-gallery[data-catalog-gallery] .gallery-image {
  border: 1px solid #e8ddd0;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--jj-shadow-card);
}
#jj-template-app .product-detail[data-catalog-detail] .product-info {
  background: var(--jj-surface);
  padding: clamp(24px, 3vw, 40px);
  border: 1px solid var(--jj-line);
  border-radius: 28px;
  box-shadow: var(--jj-shadow-card);
}
#jj-template-app .product-detail[data-catalog-detail] h1 { font-size: clamp(29px, 3.1vw, 44px); line-height: 1.15; }
#jj-template-app .product-detail[data-catalog-detail] .detail-price {
  font: 650 22px/1.5 ui-sans-serif, system-ui, sans-serif;
  color: var(--jj-rose);
  margin-block: 16px 6px;
}
#jj-template-app .product-detail[data-catalog-detail] .product-info > p:not(.detail-price) { line-height: 1.8; }
#jj-template-app .product-details { border-color: var(--jj-line); padding-block: 16px; }
#jj-template-app .product-details summary { color: #4d3b47; font-weight: 600; }
#jj-template-app .photo-caption { color: var(--jj-muted); font-size: 12px; line-height: 1.65; padding: 12px 4px; }

/* Reusable public surfaces. These deliberately exclude the catalog manager. */
#jj-template-app .page-view :where(.panel, .callout):not(.jjc-catalog *) {
  background: var(--jj-surface);
  border: 1px solid var(--jj-line);
  border-radius: var(--jj-radius);
  box-shadow: var(--jj-shadow-card);
}
#jj-template-app .page-view .field:not(.jjc-catalog .field) :where(input, textarea, select) {
  background: #fffcfa;
  border-color: #ddced3;
  border-radius: 12px;
  color: var(--jj-ink);
  font: inherit;
  min-height: 44px;
}
#jj-template-app .page-view .field:not(.jjc-catalog .field) :where(input, textarea, select):focus-visible {
  outline: 2px solid var(--jj-rose);
  outline-offset: 3px;
  background: #fff;
}
#jj-template-app .page-view .callout {
  margin-block: 36px;
  padding: clamp(24px, 3vw, 40px);
  background: linear-gradient(115deg, #fff7e8, #fffdfb 48%, #faedf3);
}
#jj-template-app .designer-banner { border: 1px solid #e5d7cc; box-shadow: var(--jj-shadow-card); }
#jj-template-app .promise-strip {
  border-top: 1px solid #ebdfd1;
  border-bottom: 1px solid #ebdfd1;
  background: linear-gradient(100deg, #fbf4e8, #fffcf8 55%, #fbf0f5);
  font-family: ui-sans-serif, system-ui, sans-serif;
}
#jj-template-app .promise-strip strong { color: #5e4339; font-size: 13px; }
#jj-template-app .promise-strip small { color: #71625f; font-size: 11px; }
#jj-template-app .site-footer {
  background: linear-gradient(180deg, #fffdfa, #f5eee9);
  border-top: 1px solid #e9dcd2;
  color: #5e5059;
  font-family: ui-sans-serif, system-ui, sans-serif;
}
#jj-template-app .site-footer .footer-links strong { color: #4c3441; }
#jj-template-app .footer-bottom { border-top-color: #e3d6ce; color: #71616b; font-size: 11px; }

/* Existing non-catalog admin shell only; no modal or data-operation changes. */
#jj-template-app .admin-shell { background: #f6f3f0; color: var(--jj-ink); font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; line-height: 1.6; }
#jj-template-app .admin-shell :where(h1,h2,h3) { font-family: Georgia, "Times New Roman", serif; color: var(--jj-rose); }
#jj-template-app .admin-sidebar {
  border-right: 1px solid #e8ddd4;
  background: linear-gradient(180deg, #fffdfb 68%, #fbf2ec);
  box-shadow: 8px 0 30px rgb(67 42 41 / 3%);
}
#jj-template-app .admin-sidebar nav a { border-radius: 13px; color: #685a65; }
#jj-template-app .admin-sidebar nav a[aria-current="page"] {
  background: linear-gradient(110deg, #f5dce6, #fcf0f4);
  color: #81284e;
  box-shadow: inset 3px 0 0 #9c3b60;
  font-weight: 650;
}
#jj-template-app .admin-topbar {
  background: rgb(255 253 251 / 92%);
  border-bottom: 1px solid #e8ddd4;
  padding-block: 24px;
}
#jj-template-app .admin-content > .panel,
#jj-template-app .admin-stats .panel {
  border: 1px solid #e8ddd4;
  border-radius: 22px;
  box-shadow: var(--jj-shadow-sm);
}

@media (hover: hover) and (pointer: fine) {
  #jj-template-app .product-card[data-catalog-product]:hover { box-shadow: var(--jj-shadow-hover); border-color: #d9b9c5; }
  #jj-template-app .page-view .btn-primary:hover { background: linear-gradient(135deg, #92345a, #70213f); }
  #jj-template-app .product-name:hover { text-decoration: underline; }
}
#jj-template-app :where(.page-view a, .page-view button, .site-header a, .site-header button):focus-visible {
  outline: 3px solid #9b6c28;
  outline-offset: 4px;
}
@media (max-width: 700px) {
  #jj-template-app :where(.page-container, .section-wide) { width: calc(100% - 32px); }
  #jj-template-app .page-view .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  #jj-template-app .product-card[data-catalog-product] { border-radius: 18px; }
  #jj-template-app .product-card[data-catalog-product] .product-photo { margin: 5px 5px 0; border-radius: 13px; }
  #jj-template-app .product-card[data-catalog-product] .product-body { padding: 13px; }
  #jj-template-app .product-card[data-catalog-product] .product-name { font-size: 17px; }
  #jj-template-app .product-card[data-catalog-product] .product-price { font-size: 13px; }
  #jj-template-app .product-card[data-catalog-product] .btn { padding-inline: 10px; font-size: 11px; }
  #jj-template-app .shop-toolbar { padding: 12px; border-radius: 18px; align-items: stretch; }
  #jj-template-app .product-detail[data-catalog-detail] { grid-template-columns: minmax(0, 1fr); }
  #jj-template-app .product-detail[data-catalog-detail] .product-info { padding: 22px; }
  #jj-template-app .page-heading { padding-block: 30px; }
  #jj-template-app .results-line { flex-wrap: wrap; }
  #jj-template-app .promise-strip { row-gap: 24px; }
}
@media (max-width: 380px) {
  #jj-template-app .page-view .product-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  #jj-template-app .product-card[data-catalog-product] { transition: none; }
}
