/* From the design preview, preview/shop-flow.css (tools/theme-sync.mjs). */
/* The shopping flow's finish (23 October, Batch 1 items 3-5; app.js, product-details.js):
   - the product page reaches Add to bag sooner, with the storefront's three promises under it,
     and on phones a bar with the button at the screen's foot while the button is out of view;
   - the little bag that opens under the header after Add to bag (instead of the toast);
   - the design's rating on its shop card;
   - a calmer checkout: only the logo in the header, the checkout's steps as its trail, smaller
     headings, +60 phone fields, the states in a list and the country fixed.
   Loaded last, so it settles ties with the stylesheets before it. */
:root{--flow-radius:4px;--flow-ease:cubic-bezier(.16,1,.3,1)}
body[data-floral="true"]{--flow-radius:18px}

/* ---- Product page ---------------------------------------------------------------------------- */
body[data-direction] .page-head.product-head{padding-bottom:6px}
body[data-direction] .page-head.product-head .breadcrumbs{margin-bottom:0}
.product-info .product-rating+.product-price{margin-top:2px}
.product-info .product-description{margin:16px 0 20px}
.buy-promises{display:grid;gap:10px;max-width:430px;margin:20px 0 0;padding:18px 0 0;border-top:1px solid var(--line);list-style:none}
.buy-promises li{display:flex;align-items:center;gap:12px;font-size:13px;line-height:1.4;color:var(--ink)}
.buy-promises svg{flex:none;width:21px;height:21px;fill:none;stroke:var(--accent);stroke-width:1.35;stroke-linecap:round;stroke-linejoin:round}
.buy-promises circle{fill:var(--accent);stroke:none}
.buy-bar{display:none}
@media(max-width:700px){
  .buy-bar{position:fixed;left:0;right:0;bottom:0;z-index:55;display:flex;align-items:center;gap:14px;padding:10px 16px calc(10px + env(safe-area-inset-bottom,0px));background:color-mix(in srgb,var(--paper) 94%,transparent);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);border-top:1px solid var(--line);box-shadow:0 -12px 30px -22px color-mix(in srgb,var(--ink) 55%,transparent);translate:0 110%;visibility:hidden;transition:translate .38s var(--flow-ease),visibility 0s linear .38s}
  .buy-bar.is-shown{translate:0 0;visibility:visible;transition:translate .38s var(--flow-ease),visibility 0s}
  .buy-bar-choice{flex:1;min-width:0;display:grid;gap:2px;padding:0;border:0;background:none;color:var(--ink);font:inherit;text-align:left;cursor:pointer}
  .buy-bar-choice small{font-size:9px;letter-spacing:1.2px;text-transform:uppercase;color:var(--muted)}
  .buy-bar-choice span{overflow:hidden;font-size:13px;white-space:nowrap;text-overflow:ellipsis;text-decoration:underline;text-decoration-color:color-mix(in srgb,currentColor 30%,transparent);text-underline-offset:3px}
  .buy-bar .buy-bar-add{flex:none;gap:8px;min-height:46px;padding:12px 20px}
  /* The bar never hides the page's last lines, nor a message (the toast) under it. */
  html:has(.buy-bar) footer.site-footer{padding-bottom:calc(30px + 70px + env(safe-area-inset-bottom,0px))}
  html:has(.buy-bar.is-shown) #toast{bottom:calc(86px + env(safe-area-inset-bottom,0px))}
}
@media(prefers-reduced-motion:reduce){.buy-bar,.buy-bar.is-shown{transition:none}}

/* ---- The option picker (item 2): a row per part of the choice, colour dots beside the names ---- */
.product-options{position:relative}
.product-options.has-option-clear{padding-inline-end:44px}
.clear-options{
  position:absolute;
  inset-block-start:0;
  inset-inline-end:0;
  display:grid;
  place-items:center;
  width:40px;
  height:40px;
  padding:0;
  border:0;
  border-radius:50%;
  background:transparent;
  color:var(--ink);
  cursor:pointer;
}
.clear-options svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.clear-options:is(:hover,:focus-visible){background:var(--soft)}
.clear-options:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.clear-options-tip{
  position:absolute;
  z-index:2;
  inset-block-end:calc(100% + 4px);
  inset-inline-end:0;
  padding:5px 9px;
  border:1px solid var(--line);
  border-radius:8px;
  background:var(--surface);
  color:var(--ink);
  font-size:12px;
  white-space:nowrap;
  visibility:hidden;
  pointer-events:none;
}
.clear-options:is(:hover,:focus-visible) .clear-options-tip{visibility:visible}
.opt-picker{display:grid;gap:16px;max-width:560px}
.opt-row .field-label{margin:0 0 9px}
/* Wider screens: each row's name beside its values (the chosen value is the highlighted one; the
   name keeps it for screen readers), one line saved per row. */
@media(min-width:701px){
  .opt-picker{gap:12px}
  .opt-row{display:grid;grid-template-columns:62px minmax(0,1fr);column-gap:14px;align-items:start}
  .opt-row .field-label{margin:0;padding-top:9px}
  .opt-picked{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
}
.opt-values{display:flex;flex-wrap:wrap;gap:8px}
.opt-values .opt{display:inline-flex;align-items:center;gap:7px}
.opt-dot{flex:none;width:12px;height:12px;border-radius:50%;background:linear-gradient(90deg,var(--dot) 50%,var(--dot2,var(--dot)) 50%);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--ink) 20%,transparent)}
/* Dashed: there, but with other values in the rows above or beside. Crossed out: sold out. */
.opt-values .opt.is-off{border-style:dashed;color:color-mix(in srgb,var(--muted) 85%,transparent)}
.opt-values .opt.is-sold{color:color-mix(in srgb,var(--muted) 80%,transparent);text-decoration:line-through;text-decoration-color:color-mix(in srgb,var(--muted) 55%,transparent)}
.opt-values .opt.selected{border-style:solid;color:var(--ink)}
.opt-values .opt:is(.is-off,.is-sold) .opt-dot{opacity:.45}

/* Bag controls span the space under the item and price on narrow screens. */
.cart-row{
  grid-template-areas:"photo details price" "photo controls controls";
  grid-template-rows:auto 1fr;
  row-gap:8px;
}
.cart-item-photo{grid-area:photo}
.cart-item-details{grid-area:details;min-width:0;overflow-wrap:anywhere}
.cart-item-price{grid-area:price;white-space:nowrap}
.cart-item-controls{grid-area:controls;align-self:start;display:flex;align-items:center;gap:6px}
.cart-row .cart-item-controls .quantity{margin-top:0}
.cart-remove{
  display:grid;
  place-items:center;
  width:44px;
  height:44px;
  padding:0;
  border:0;
  border-radius:10px;
  background:transparent;
  color:var(--ink);
  cursor:pointer;
}
.cart-remove svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.cart-remove:hover{background:var(--soft)}
.cart-remove:focus-visible{outline:2px solid var(--accent);outline-offset:2px}

/* ---- The little bag -------------------------------------------------------------------------- */
.mini-bag{position:fixed;top:120px;right:max(16px,6vw);z-index:70;width:min(372px,calc(100vw - 32px));padding:18px 18px 16px;background:var(--surface);color:var(--ink);border:1px solid var(--line);border-radius:var(--flow-radius);box-shadow:0 26px 54px -26px color-mix(in srgb,var(--ink) 55%,transparent);opacity:0;translate:0 -10px;transition:opacity .22s ease,translate .4s var(--flow-ease)}
.mini-bag[hidden]{display:none}
.mini-bag.is-open{opacity:1;translate:0 0}
.mini-bag:focus{outline:none}
.mini-bag:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.mini-bag-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}
.mini-bag-title{display:flex;align-items:center;gap:9px;margin:0;font-weight:600;font-size:13.5px;line-height:1.3;letter-spacing:.2px;color:var(--ink)}
.mini-bag-title svg{flex:none;width:18px;height:18px;padding:3px;border-radius:50%;background:var(--accent);fill:none;stroke:#fff;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.mini-bag-close{display:grid;place-items:center;width:32px;height:32px;margin:-6px -6px -6px 0;padding:0;border:0;border-radius:50%;background:none;color:var(--muted);cursor:pointer}
.mini-bag-close:hover,.mini-bag-close:focus-visible{background:var(--soft);color:var(--ink)}
.mini-bag-close svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round}
.mini-bag-item{display:grid;grid-template-columns:58px minmax(0,1fr) auto;gap:13px;align-items:center;padding:12px 0;border-block:1px solid var(--line)}
.mini-bag-item img{width:58px;height:70px;object-fit:cover;border-radius:calc(var(--flow-radius) / 2);background:var(--soft)}
.mini-bag-item b{display:block;font-weight:600;font-size:13px;line-height:1.35}
.mini-bag-item small{display:block;margin-top:3px;font-size:11.5px;line-height:1.35;color:var(--muted)}
.mini-bag-item>span{font-size:13px;white-space:nowrap}
.mini-bag-total{display:flex;justify-content:space-between;gap:12px;margin:13px 0 15px;font-size:12.5px;color:var(--muted)}
.mini-bag-total b{font-size:14px;font-weight:600;color:var(--ink)}
.mini-bag-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.mini-bag-actions .button{gap:8px;min-height:44px;padding:11px 14px}
@media(max-width:700px){.mini-bag{right:16px;left:16px;width:auto}}
@media(prefers-reduced-motion:reduce){.mini-bag{translate:none;transition:opacity .15s ease}}

/* Shop photographs fill straight, borderless frames with rounded corners and soft shadows. */
/* Shrink below 260px when needed to retain at least two columns; 24px is the largest column gap. */
body[data-direction="gardenpostcard"] .shop-designed .product-grid{grid-template-columns:repeat(auto-fill,minmax(min(260px,calc((100% - 24px)/2)),1fr))}
body[data-direction="gardenpostcard"] .shop-designed .product-card{width:100%;max-width:380px;min-width:0;justify-self:center;container-type:inline-size;border:0;box-shadow:none;transform:none}
body[data-direction="gardenpostcard"] .shop-designed .product-card h3{font-size:clamp(18px,7.8cqw,26px);white-space:nowrap}
body[data-direction="gardenpostcard"] .shop-designed .product-card .card-photo{padding:0;border:0;border-radius:9px;box-shadow:5px 6px 0 var(--lawn-shadow,var(--soft));transform:none;aspect-ratio:4/5;overflow:hidden}
body[data-direction="gardenpostcard"] .shop-designed .product-card .card-photo img{width:100%;height:100%;object-fit:cover;border:0;border-radius:inherit}
body[data-direction="gardenpostcard"] .shop-designed .product-card .card-photo>:is(.card-spray,.border-charms){display:none}
@container(max-width:240px){
  body[data-direction="gardenpostcard"] .shop-designed .product-card h3{font-size:clamp(15px,7.8cqw,18px);white-space:normal;overflow-wrap:anywhere}
  body[data-direction="gardenpostcard"] .shop-designed .product-card .card-kicker{flex-wrap:wrap;gap:4px 8px}
}

/* ---- Ratings on the shop's cards ------------------------------------------------------------- */
.product-card .card-kicker{display:flex;align-items:baseline;justify-content:space-between;gap:10px}
.product-card .card-kicker .category{min-width:0}
.card-rating{display:inline-flex;flex:none;align-items:center;gap:4px;font-size:11.5px;line-height:1;color:var(--ink);white-space:nowrap}
.card-rating svg{width:11px;height:11px;fill:#d4a24c}
.card-rating small{font-size:inherit;color:var(--muted)}

/* ---- A calmer checkout ----------------------------------------------------------------------- */
html body.is-checkout .header nav,html body.is-checkout .header .header-tools{display:none}
.checkout-steps{display:flex;flex-wrap:wrap;align-items:center;gap:8px 10px;margin:0;padding:0;list-style:none;font-size:11px;letter-spacing:1.3px;text-transform:uppercase;color:var(--muted)}
.checkout-steps li{display:flex;align-items:center;gap:8px}
.checkout-steps li+li::before{content:'';width:clamp(16px,3.4vw,40px);height:1px;margin-right:2px;background:var(--line)}
.checkout-steps a{display:inline-flex;align-items:center;gap:8px;color:inherit;text-decoration:none}
.checkout-steps a:hover,.checkout-steps a:focus-visible{color:var(--accent)}
.step-mark{display:grid;place-items:center;width:22px;height:22px;border:1px solid var(--line);border-radius:50%;background:var(--surface);font-size:10px;letter-spacing:0;color:var(--muted)}
.checkout-steps .is-done .step-mark{border-color:var(--accent);background:var(--accent);color:#fff}
.checkout-steps .is-done .step-mark svg{width:12px;height:12px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.checkout-steps .is-current{font-weight:600;color:var(--ink)}
.checkout-steps .is-current .step-mark{border-color:var(--accent);color:var(--accent)}
body[data-direction] .checkout-head h1{margin-top:14px;font-size:42px}
body[data-direction] .checkout-form h2{margin:34px 0 16px;font-size:24px;line-height:1.2}
body[data-direction] .checkout-form h2:first-child{margin-top:4px}
body[data-direction].is-checkout .summary h2{font-size:28px}
.form-grid .phone-field{position:relative;display:block;margin-top:7px}
.form-grid .phone-field input{margin-top:0;padding-left:52px}
.phone-code{position:absolute;top:50%;left:13px;translate:0 -50%;font-size:inherit;color:var(--muted);pointer-events:none}
/* The state list: dropdown.js draws its chevron (the select's own goes); muted until chosen. */
.checkout-form .form-grid select{appearance:none;-webkit-appearance:none;padding-right:42px}
.checkout-form .form-grid select:invalid{color:var(--muted)}
.checkout-form .form-grid label:has(select){--lv-dd-chev-x:16px}
.form-grid input.is-fixed{background:color-mix(in srgb,var(--soft) 45%,var(--surface));color:var(--muted);cursor:default}
/* Phones: the headings step down, and the fields' type is 16px so phones don't zoom in on them. */
@media(max-width:700px){body[data-direction] .checkout-head h1{font-size:34px}body[data-direction] .checkout-form h2{margin-top:28px;font-size:22px}.checkout-form .form-grid :is(input,select),.checkout-form .phone-code{font-size:16px}}
