/* Shared proportions for the public website, including ?desktop=1 links.
   Scope these rules above the older app-like styles injected by app.js. */
html.rose-storefront {
  --store-width: 1160px;
  --store-gutter: clamp(20px, 4vw, 48px);
  --store-inset: max(var(--store-gutter), calc((100% - var(--store-width)) / 2));
  scroll-padding-top: 120px;
}
html.rose-storefront body { font-family: 'DM Sans', sans-serif; }
html.rose-storefront header,
html.rose-storefront footer {
  padding-inline: var(--store-inset);
  gap: 24px;
}
html.rose-storefront header { height: auto; min-height: 80px; padding-block: 14px; }
html.rose-storefront header .brand { flex-shrink: 0; }
html.rose-storefront header nav { gap: clamp(16px, 2vw, 28px); min-width: 0; }
html.rose-storefront .cart-button { flex-shrink: 0; min-height: 44px; }
html.rose-storefront .hero {
  max-width: 1280px;
  margin-inline: auto;
  min-height: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
html.rose-storefront .hero-copy {
  padding: clamp(48px, 6vw, 76px) clamp(24px, 4vw, 60px);
  align-self: center;
}
html.rose-storefront .hero h1 { font-size: clamp(38px, 4.2vw, 54px); }
html.rose-storefront .hero-art { min-height: 480px; }
html.rose-storefront .hero-actions { flex-wrap: wrap; gap: 14px; }
html.rose-storefront .hero-actions > * { max-width: 100%; }
html.rose-storefront .products,
html.rose-storefront .categories,
html.rose-storefront .custom-banner,
html.rose-storefront .tracking-section,
html.rose-storefront .story {
  padding-inline: var(--store-inset);
  padding-block: clamp(44px, 5vw, 72px);
  margin: 0;
}
html.rose-storefront .hero > *,
html.rose-storefront .custom-banner > *,
html.rose-storefront .tracking-section > *,
html.rose-storefront .story > *,
html.rose-storefront .custom-grid > *,
html.rose-storefront .customer-grid > * { min-width: 0; }
html.rose-storefront .section-heading { flex-wrap: wrap; gap: 16px 24px; }
html.rose-storefront .section-heading h2,
html.rose-storefront .custom-banner h2,
html.rose-storefront .tracking-section h2,
html.rose-storefront .story h2 { font-size: clamp(29px, 3vw, 38px); line-height: 1.15; }
html.rose-storefront h1,
html.rose-storefront h2,
html.rose-storefront h3 { overflow-wrap: break-word; }
html.rose-storefront #product-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 32px 24px;
}
html.rose-storefront #product-grid > .product { min-width: 0; grid-row: auto; }
html.rose-storefront #product-grid .product-image {
  width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: 4 / 3;
  border-radius: 16px;
}
html.rose-storefront #product-grid .product-model { min-width: 0; min-height: 0; }
html.rose-storefront #product-grid .product-model img { object-fit: contain; }
html.rose-storefront #product-grid .product-model > span > svg { max-width: 70%; height: auto; max-height: 170px; }
html.rose-storefront #product-grid .product h3 { font-size: 19px; line-height: 1.35; }
html.rose-storefront #product-grid .product > button {
  min-height: 44px;
  max-width: 100%;
  white-space: normal;
  line-height: 1.45;
  border-radius: 10px;
}
/* Both shirt styles fit inside one standard card, with no empty second row. */
html.rose-storefront #product-grid .shirt-model-options {
  height: 100%;
  min-height: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: minmax(0, 1fr);
  gap: 8px;
  padding: 10px;
}
html.rose-storefront #product-grid .shirt-model-option {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  align-content: stretch;
  width: 100%;
  min-height: 0;
  padding: 8px 4px;
}
html.rose-storefront #product-grid .shirt-model-host {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}
html.rose-storefront #product-grid .shirt-model-host > span { font-size: 64px; line-height: 1; }
html.rose-storefront #product-grid .shirt-model-host > .model-unavailable { font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
html.rose-storefront #product-grid .shirt-model-option strong { font-size: 14px; line-height: 1.5; }
html.rose-storefront #product-grid .shirt-model-option .model-action-hint {
  max-width: 100%;
  padding: 5px 6px;
  font-size: 10px;
  white-space: normal;
}
html.rose-storefront .custom-banner,
html.rose-storefront .tracking-section { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 4vw, 56px); }
html.rose-storefront .story { grid-template-columns: 150px minmax(0, 1fr); gap: 48px; }
html.rose-storefront .story > div:last-child { max-width: 650px; }
html.rose-storefront .tracking-card { padding: clamp(20px, 3vw, 28px); min-width: 0; }
html.rose-storefront .tracking-card input,
html.rose-storefront .tracking-card select { min-width: 0; max-width: 100%; }
html.rose-storefront .tracking-result,
html.rose-storefront #order-number,
html.rose-storefront .confirmed-tracking-code { overflow-wrap: anywhere; }
/* Compact, centered windows stay within the viewport in every entry mode. */
html.rose-storefront dialog:is(#customizer, #product-picker, #secure-payment, #tracking-lookup, #order-confirmation) {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(var(--dialog-width, 560px), calc(100% - 32px)) !important;
  max-width: calc(100% - 32px) !important;
  max-height: calc(100dvh - 32px);
  height: fit-content;
  padding: 44px 28px 28px !important;
  border-radius: 18px !important;
  overflow-y: auto;
  overscroll-behavior: contain;
  animation: none !important;
}
html.rose-storefront dialog#customizer { --dialog-width: 860px; padding: 0 !important; }
html.rose-storefront dialog#product-picker { --dialog-width: 800px; }
html.rose-storefront #customizer .custom-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
html.rose-storefront #customizer .custom-form { padding: 48px 28px 28px; }
html.rose-storefront #customizer .ar-preview {
  height: min(400px, calc(100dvh - 64px));
  min-height: 0;
  top: 16px;
}
html.rose-storefront #customizer :is(input, select, textarea) { min-width: 0; max-width: 100%; }
html.rose-storefront #customizer .custom-form label { overflow-wrap: anywhere; }
html.rose-storefront #secure-payment .customer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
html.rose-storefront #cart-panel { max-width: 100vw; }
html.rose-storefront footer { flex-wrap: wrap; }
@media (max-width: 960px) {
  html.rose-storefront header { flex-wrap: wrap; gap: 8px 20px; }
  html.rose-storefront header nav {
    display: flex;
    order: 3;
    flex-basis: 100%;
    overflow-x: auto;
    padding-block: 4px;
  }
  html.rose-storefront header nav a { flex-shrink: 0; min-height: 36px; display: flex; align-items: center; }
  html.rose-storefront #product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html.rose-storefront .hero-copy { padding: 44px 24px; }
  html.rose-storefront .hero-art { min-height: 440px; }
  html.rose-storefront .tracking-section { grid-template-columns: 1fr; }
  html.rose-storefront .tracking-card { width: 100%; max-width: 620px; }
}
@media (max-width: 720px) {
  html.rose-storefront .hero { grid-template-columns: minmax(0, 1fr); }
  html.rose-storefront .hero-copy { padding: 44px var(--store-gutter) 36px; }
  html.rose-storefront .hero-art { min-height: 340px; }
  html.rose-storefront .custom-banner { grid-template-columns: 1fr; gap: 28px; }
  html.rose-storefront .steps { padding-left: 20px; gap: 22px; }
  html.rose-storefront .story { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  html.rose-storefront #customizer .custom-grid { grid-template-columns: minmax(0, 1fr); }
  html.rose-storefront #customizer .custom-form { padding: 28px 20px; }
  html.rose-storefront #customizer .ar-preview {
    position: relative !important;
    top: auto;
    height: 300px;
    min-height: 0;
    margin-top: 36px;
  }
  html.rose-storefront dialog:is(#product-picker, #secure-payment, #tracking-lookup, #order-confirmation) { padding: 44px 20px 24px !important; }
}
@media (max-width: 540px) {
  html.rose-storefront #product-grid { grid-template-columns: minmax(0, 400px); justify-content: center; gap: 30px; }
  html.rose-storefront .hero h1 { font-size: 40px; }
  html.rose-storefront .tracking-inline-form,
  html.rose-storefront #tracking-lookup-form { flex-direction: column; }
  html.rose-storefront #secure-payment .customer-grid { grid-template-columns: minmax(0, 1fr); }
  html.rose-storefront #product-picker .custom-product-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html.rose-storefront .tracking-card { padding: 20px 16px; }
}
