/* Demo storefront */
.small { font-size: 0.82rem; }

.demo-bar { background: var(--forest); color: #fff; position: sticky; top: 0; z-index: 60; }
.demo-bar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; padding: 8px 0; flex-wrap: wrap; }
.brand-small { gap: 10px; font-size: 0.88rem; color: rgba(255, 255, 255, 0.86); }
.brand-small .brand-mark { width: 26px; height: 26px; }
.brand-small strong { color: #fff; }
.demo-bar-actions { display: flex; align-items: center; gap: 14px; }
.demo-cta { background: #fff; color: var(--forest); }
.demo-cta:hover { background: var(--cream); }

.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 0.85rem; user-select: none; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch-track { width: 40px; height: 22px; border-radius: 999px; background: rgba(255, 255, 255, 0.25); position: relative; transition: background 0.2s ease; }
.switch-thumb { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform 0.2s ease; }
.switch input:checked + .switch-track { background: #c9a6e3; }
.switch input:checked + .switch-track .switch-thumb { transform: translateX(18px); }
.switch input:focus-visible + .switch-track { outline: 2px solid #fff; outline-offset: 2px; }

.store-hero { padding: 64px 0 40px; background: radial-gradient(800px 400px at 85% 0%, rgba(122, 79, 160, 0.1), transparent 70%), var(--ivory); }
.store-hero-grid { display: grid; grid-template-columns: 300px 1fr; gap: 56px; align-items: center; }
.store-emblem { width: 300px; height: 300px; border-radius: 50%; object-fit: cover; box-shadow: var(--shadow-lg); background: #fff; }
.store-hero h1 { font-size: clamp(2.6rem, 5vw, 4.2rem); margin-bottom: 4px; color: #23402b; }
.store-hero h1 .amp { font-style: italic; color: var(--plum); font-weight: 500; }
.store-tag { font-family: var(--serif); font-style: italic; font-size: 1.4rem; color: var(--plum); margin-bottom: 18px; }
.store-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.store-fulfil { margin-top: 20px; }

.catalog-section { padding-top: 40px; }
.catalog-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.tabs { display: flex; gap: 6px; background: var(--cream); padding: 5px; border-radius: 999px; }
.tab { border: 0; background: transparent; padding: 9px 18px; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: 0.9rem; color: var(--muted); }
.tab[aria-selected="true"] { background: var(--paper); color: var(--ink); box-shadow: var(--shadow-sm); }
.tab .count { font-weight: 500; color: var(--muted); margin-left: 4px; }
.search { width: 300px; max-width: 100%; border-radius: 999px; padding-left: 40px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235d6a60' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") 14px center / 18px no-repeat; }
.feature-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 8px; }
.ff { border: 1px solid var(--line-strong); background: #fff; border-radius: 999px; padding: 6px 13px; font-size: 0.8rem; cursor: pointer; color: var(--ink); }
.ff[aria-pressed="true"] { background: var(--plum); border-color: var(--plum); color: #fff; }
.result-count { font-size: 0.85rem; margin: 8px 0 20px; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; }
.pcard { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; cursor: pointer; text-align: left; padding: 0; display: flex; flex-direction: column; transition: transform 0.25s ease, box-shadow 0.25s ease; color: inherit; }
.pcard:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.pcard-img { position: relative; aspect-ratio: 4 / 3.4; background: var(--cream); overflow: hidden; }
.pcard-img img { object-position: 50% 20%; }
.pcard-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.pcard:hover .pcard-img img { transform: scale(1.04); }
.pcard-img .badge { position: absolute; top: 12px; left: 12px; }
.pcard-img .illus { position: absolute; bottom: 10px; right: 10px; font-size: 0.68rem; background: rgba(255, 255, 255, 0.9); padding: 3px 8px; border-radius: 999px; color: var(--muted); }
.badge { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding: 5px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.92); color: var(--forest); }
.badge.orchid { color: var(--plum); }
.pcard-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.pcard-name { font-family: var(--serif); font-size: 1.45rem; font-weight: 600; line-height: 1.1; }
.pcard-alt { font-family: var(--serif); font-style: italic; color: var(--muted); font-size: 1rem; min-height: 1.2em; }
.pcard-meta { font-size: 0.8rem; color: var(--muted); margin-top: 2px; }
.pcard .stage-row { margin-top: 12px; }
.pcard .soon { font-size: 0.75rem; color: var(--muted); margin-top: 12px; }
.private-line { display: none; margin-top: 10px; font-size: 0.75rem; color: var(--plum); background: var(--violet-soft); padding: 6px 9px; border-radius: 8px; }
.grower .private-line { display: block; }

.empty { grid-column: 1 / -1; text-align: center; padding: 60px 0; color: var(--muted); }

.stage-legend { margin-top: 70px; padding: 30px; border-radius: var(--radius); background: var(--cream); }
.stage-legend h2 { font-size: 1.6rem; }
.legend-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-bottom: 14px; }
.legend-item { background: var(--paper); border-radius: 12px; padding: 12px 14px; font-size: 0.82rem; border: 1px solid var(--line); }
.legend-item b { display: inline-block; min-width: 30px; color: var(--forest); }
.legend-item span { display: block; color: var(--muted); }

/* Dialog */
.plant-dialog { border: 0; padding: 0; border-radius: 24px; width: min(1040px, calc(100% - 32px)); max-height: calc(100vh - 40px); background: var(--paper); box-shadow: var(--shadow-lg); color: var(--ink); }
.plant-dialog::backdrop { background: rgba(29, 40, 32, 0.55); backdrop-filter: blur(3px); }
.pd { display: grid; grid-template-columns: 1fr 1.05fr; min-height: 560px; }
.pd-media { background: var(--cream); display: flex; flex-direction: column; }
.pd-main { position: relative; flex: 1; min-height: 380px; }
.pd-main img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pd-thumbs { display: flex; gap: 8px; padding: 12px; overflow-x: auto; }
.pd-thumbs button { border: 2px solid transparent; padding: 0; border-radius: 10px; overflow: hidden; cursor: pointer; flex: none; background: none; }
.pd-thumbs button[aria-current="true"] { border-color: var(--plum); }
.pd-thumbs img { width: 62px; height: 62px; object-fit: cover; }
.pd-body { padding: 36px 36px 30px; overflow-y: auto; max-height: calc(100vh - 40px); position: relative; }
.pd-close { position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: #fff; font-size: 1.4rem; line-height: 1; cursor: pointer; color: var(--ink); z-index: 2; }
.pd-body h2 { font-size: 2.2rem; margin: 12px 0 0; padding-right: 40px; }
.pd-alt { font-family: var(--serif); font-style: italic; color: var(--muted); font-size: 1.2rem; }
.pd-section { margin-top: 22px; }
.pd-section h3 { font-family: var(--sans); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--sage); font-weight: 700; margin-bottom: 8px; }
.pd-section p { font-size: 0.95rem; margin: 0; }
.pd .meta-grid { margin: 18px 0 0; }
.pd-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.pd-tags span { font-size: 0.72rem; padding: 4px 9px; border-radius: 999px; background: var(--sage-soft); color: var(--forest); font-weight: 600; }
.pd-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.pd-qr { display: flex; gap: 16px; align-items: center; margin-top: 22px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.pd-qr svg { width: 96px; height: 96px; flex: none; }
.pd-qr p { font-size: 0.82rem; color: var(--muted); margin: 0 0 8px; }
.label-preview { display: inline-flex; align-items: center; gap: 6px; width: 168px; height: 48px; padding: 4px 6px; border: 1px dashed var(--line-strong); border-radius: 4px; font-size: 9px; line-height: 1.15; background: #fff; }
.label-preview svg { width: 38px; height: 38px; }
.label-preview strong { display: block; font-size: 10px; }
.pd-private { display: none; margin-top: 22px; }
.grower .pd-private { display: block; }

.qr-dialog { width: min(420px, calc(100% - 32px)); }
.qr-dialog-body { padding: 36px; text-align: center; position: relative; }
.qr-dialog-body h2 { font-size: 1.9rem; }
.big-qr { width: 220px; height: 220px; margin: 18px auto; }

.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 30px); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 0.9rem; opacity: 0; pointer-events: none; transition: all 0.3s ease; z-index: 100; width: max-content; max-width: min(520px, calc(100vw - 32px)); }
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast a { color: #c9a6e3; }

#print-area { display: none; }

@media (max-width: 860px) {
  .store-hero-grid { grid-template-columns: 1fr; gap: 28px; text-align: left; }
  .store-emblem { width: 180px; height: 180px; }
  .pd { grid-template-columns: 1fr; }
  .pd-main { min-height: 300px; }
  .pd-body { max-height: none; padding: 28px 22px; }
  .plant-dialog { max-height: calc(100vh - 24px); overflow-y: auto; }
  .switch-label { display: none; }
}
@media (max-width: 560px) {
  .search { width: 100%; }
  .search-wrap { width: 100%; }
  .brand-small span { font-size: 0.78rem; }
}

/* Avery 7667 print sheet: 1/2" x 1-3/4", 4 across x 20 down */
@media print {
  @page { size: letter; margin: 0; }
  body > *:not(#print-area) { display: none !important; }
  #print-area { display: block !important; }
  .avery-sheet { width: 8.5in; height: 11in; padding: 0.5in 0 0 0.3in; display: grid; grid-template-columns: repeat(4, 1.75in); grid-auto-rows: 0.5in; column-gap: 0.3in; }
  .avery-label { display: flex; align-items: center; gap: 0.06in; padding: 0.03in 0.06in; overflow: hidden; font-family: var(--sans); font-size: 6.5pt; line-height: 1.1; color: #000; }
  .avery-label svg { width: 0.42in; height: 0.42in; flex: none; }
  .avery-label strong { display: block; font-size: 7.5pt; }
}

/* Illustrated placeholders: show the whole emblem */
.pcard-img img.is-illus, .pd-main.illus img { object-fit: contain; background: #f8f4ea; }
.pd-main.illus { background: #f8f4ea; }

/* Video in the plant dialog */
.pd-main.has-video { background: #1f2a22; }
.pd-main video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #1f2a22; }
.pd-thumbs .vthumb { position: relative; }
.pd-thumbs .vthumb span { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 1.1rem; background: rgba(31, 42, 34, 0.35); text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5); }
.pcard-img .vbadge { color: var(--plum); font-weight: 600; }

/* Instagram link in the store hero */
.ig-link { display: inline-flex; align-items: center; gap: 8px; }
.ig-link svg { flex: none; }

/* Local pickup */
.fulfil a { font-size: 0.75rem; font-weight: 600; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: inherit; text-decoration: none; }
.fulfil a:hover { border-color: var(--plum); color: var(--plum); }
.pickup-section { padding: 70px 0 90px; background: var(--cream); scroll-margin-top: 56px; }
.pickup-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 48px; align-items: center; }
.pickup-section h2 { font-size: clamp(2rem, 3.6vw, 2.8rem); margin: 6px 0 4px; }
.pickup-place { font-family: var(--serif); font-style: italic; font-size: 1.3rem; color: var(--plum); margin-bottom: 12px; }
.pickup-section .btn { margin-top: 10px; }
.pickup-result { min-height: 1.5em; font-weight: 600; color: var(--forest); margin: 14px 0 6px; }
.pickup-map { height: 380px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); border: 1px solid var(--line); background: var(--sand); z-index: 0; }
@media (max-width: 820px) {
  .pickup-grid { grid-template-columns: 1fr; gap: 28px; }
  .pickup-map { height: 300px; }
}

/* Save a shared card to your own collection or wishlist */
.pd-save { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; margin-top: 22px; padding: 16px 18px; border-radius: 14px; background: var(--violet-soft); font-size: 0.85rem; color: var(--muted); }
.pd-save > div:first-child { flex: 1 1 220px; }
.pd-save strong { display: block; color: var(--plum); font-size: 0.95rem; margin-bottom: 2px; }
.pd-save-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.pd-save .btn-small { background: var(--plum); color: #fff; border-color: var(--plum); }
.pd-save .btn-small.btn-ghost { background: #fff; color: var(--plum); }

/* Printable plant card (US letter) */
@media print {
  .print-card { width: 7.5in; margin: 0.5in auto; display: grid; grid-template-columns: 2.9in 1fr; gap: 0.3in; font-family: var(--sans); color: #1d2820; font-size: 9.5pt; line-height: 1.4; border: 1px solid #ccc; border-radius: 0.15in; padding: 0.3in; }
  .pc-img img { width: 100%; height: 3.6in; object-fit: cover; border-radius: 0.1in; }
  .pc-shop { font-size: 8pt; letter-spacing: 0.12em; text-transform: uppercase; color: #6b2e5f; font-weight: 600; }
  .print-card h1 { font-family: var(--serif); font-size: 26pt; line-height: 1.05; margin: 4pt 0 2pt; }
  .pc-alt { font-family: var(--serif); font-style: italic; font-size: 12pt; color: #5d6a60; }
  .pc-meta { font-size: 9pt; color: #5d6a60; margin: 4pt 0 8pt; }
  .print-card dl { display: grid; grid-template-columns: 1fr 1fr; gap: 6pt; margin: 0 0 8pt; }
  .print-card dt { font-size: 7.5pt; text-transform: uppercase; letter-spacing: 0.08em; color: #5d6a60; }
  .print-card dd { margin: 0; }
  .print-card h2 { font-family: var(--serif); font-size: 13pt; margin: 8pt 0 2pt; }
  .print-card p { margin: 0; }
  .pc-foot { grid-column: 1 / -1; display: flex; align-items: center; gap: 0.2in; border-top: 1px solid #ddd; padding-top: 0.18in; font-size: 9pt; color: #5d6a60; }
  .pc-foot svg { width: 1in; height: 1in; flex: none; }
  .pc-foot strong { display: block; color: #1d2820; font-size: 11pt; }
  .pc-foot span { display: block; margin-top: 4pt; font-size: 7.5pt; color: #7d8f72; }
}

/* Wishlist and order request */
.bar-btn { display: inline-flex; align-items: center; gap: 5px; background: rgba(255, 255, 255, 0.12); color: #fff; border: 1px solid rgba(255, 255, 255, 0.28); border-radius: 999px; padding: 7px 12px; font: inherit; font-size: 0.82rem; font-weight: 600; cursor: pointer; }
.bar-btn:hover { background: rgba(255, 255, 255, 0.2); }
.bar-count { background: #c9a6e3; color: var(--forest); border-radius: 999px; min-width: 20px; padding: 0 6px; font-size: 0.74rem; line-height: 20px; text-align: center; }
.pcard-img .wish-mark { position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, 0.92); color: var(--plum); font-size: 0.95rem; }
.last-one { margin-top: 8px; font-size: 0.74rem; font-weight: 700; color: #a4452f; }
.sbadge { display: inline-block; font-size: 0.72rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; margin: 0 6px 4px 0; }
.sbadge.now { background: var(--sage-soft); color: var(--forest); }
.sbadge.last { background: #f8e2d9; color: #a4452f; }
.sbadge.soon { background: var(--cream); color: var(--muted); }
.pd-badges { margin-bottom: 8px; }
.list-dialog { width: min(680px, calc(100% - 32px)); }
.list-body { position: relative; padding: 34px 32px 30px; max-height: calc(100vh - 60px); overflow-y: auto; }
.list-body h2 { font-size: 2rem; margin-bottom: 4px; padding-right: 40px; }
.list-body > .muted { font-size: 0.9rem; margin-bottom: 18px; }
.list-items { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.list-item { display: grid; grid-template-columns: 72px 1fr auto; gap: 14px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.list-item img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; background: #f8f4ea; }
.list-item img.is-illus { object-fit: contain; }
.li-name { border: 0; background: none; padding: 0; font-family: var(--serif); font-size: 1.3rem; font-weight: 600; color: var(--ink); cursor: pointer; text-align: left; }
.li-name:hover { color: var(--plum); }
.li-meta { font-size: 0.78rem; color: var(--muted); margin: 2px 0 6px; }
.li-stage { display: inline-flex; align-items: center; gap: 8px; font-size: 0.8rem; color: var(--muted); margin-top: 6px; }
.li-stage select { font: inherit; font-size: 0.82rem; padding: 5px 8px; border-radius: 8px; border: 1px solid var(--line-strong); background: #fff; color: var(--ink); }
.li-actions { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.li-actions .btn-small { padding: 7px 12px; font-size: 0.78rem; }
.li-done { font-size: 0.78rem; font-weight: 600; color: var(--forest); text-align: center; padding: 4px 0; }
.list-empty { padding: 22px; border-radius: 14px; background: var(--cream); color: var(--muted); text-align: center; }
.req-opts { border: 0; padding: 0; margin: 20px 0 0; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 0.9rem; }
.req-opts legend { font-weight: 700; margin-bottom: 8px; font-size: 0.9rem; }
.req-opts label, .req-hold { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; }
.req-hold { margin-top: 16px; padding: 12px 14px; border-radius: 12px; background: var(--violet-soft); font-size: 0.8rem; color: var(--muted); }
.req-hold b { display: block; color: var(--plum); font-size: 0.88rem; }
.req-hold input { margin-top: 3px; }
.list-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
@media (max-width: 560px) {
  .bar-label { display: none; }
  .demo-bar-actions { gap: 8px; }
  .list-body { padding: 28px 18px 22px; }
  .list-item { grid-template-columns: 56px 1fr; }
  .list-item img { width: 56px; height: 56px; }
  .li-actions { grid-column: 1 / -1; flex-direction: row; }
}
