.collection-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 1200px; padding: 14px 20px; margin: 0 auto; }
.collection-links a, .storefront-ui .product-categories .collection-link { display: inline-flex; align-items: center; min-height: 40px; margin: 0; padding: 8px 15px; border: 1px solid #e7dce1; border-radius: 22px; background: #fff; color: #6e374b; font: inherit; font-size: 12px; text-decoration: none; white-space: nowrap; }
.collection-links a[aria-current="page"] { background: var(--collection-accent, #491522); border-color: var(--collection-accent, #491522); color: #fff; }
.collection-links a:hover { border-color: var(--collection-accent, #9e6b7c); }
.collection-toolbar { display: grid; grid-template-columns: minmax(180px, 1.6fr) minmax(80px, .7fr) minmax(80px, .7fr) minmax(150px, 1fr) auto; align-items: end; gap: 12px; padding: 18px; margin-bottom: 16px; border: 1px solid #eadfe4; border-radius: 12px; background: #fcf8fa; }
.collection-toolbar label { display: flex; flex-direction: column; gap: 6px; color: #64535b; font-size: 12px; font-weight: 600; }
.collection-toolbar input, .collection-toolbar select { width: 100%; min-width: 0; min-height: 44px; padding: 10px; border: 1px solid #dbced5; border-radius: 8px; background: #fff; color: #30272c; font: inherit; font-size: 14px; }
.collection-toolbar button, .collection-empty button, .collection-empty a { min-height: 44px; padding: 10px 16px; border: 0; border-radius: 8px; background: #491522; color: #fff; font: inherit; font-size: 13px; cursor: pointer; text-decoration: none; }
.collection-toolbar button:disabled { opacity: .45; cursor: default; }
.collection-empty { grid-column: 1 / -1; }
.collection-empty h2 { font-size: 19px; color: #59414d; }
.collection-empty a { display: inline-flex; align-items: center; margin-top: 12px; }
.storefront-ui .md-product-card { display: flex; flex-direction: column; position: relative; }
.storefront-ui .md-product-info { display: flex; flex-direction: column; flex: 1; }
.storefront-ui .md-product-info > p { flex: 1; }
.storefront-ui .collection-sold-out .popup-add-btn { background: #ddd4d8; color: #6e6067; cursor: default; }
@media (max-width: 800px) {
  .collection-toolbar { grid-template-columns: 1fr 1fr; padding: 14px; gap: 10px; }
  .collection-toolbar .collection-search { grid-column: 1 / -1; }
  .collection-toolbar input, .collection-toolbar select { font-size: 16px; }
  .collection-toolbar button { justify-self: end; }
  .collection-links { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; padding: 12px 14px; }
}

/* Each occasion keeps its own palette throughout filtering and checkout. */
.storefront-ui[data-collection] {
  --collection-accent: #7d233e;
  --collection-hover: #60192f;
  --collection-soft: #fcf2f5;
  --collection-border: #ead1d9;
  --shop-pink: var(--collection-accent);
}
.storefront-ui[data-collection="baby-boy"] {
  --collection-accent: #1976d2;
  --collection-hover: #1259a0;
  --collection-soft: #f0f7fd;
  --collection-border: #cbdff1;
}
.storefront-ui[data-collection="baby-girl"] {
  --collection-accent: #b81d68;
  --collection-hover: #921650;
  --collection-soft: #fdf1f7;
  --collection-border: #efcddd;
}
.storefront-ui[data-collection="mothers-day"] {
  --collection-accent: #bd2559;
  --collection-hover: #971b46;
  --collection-soft: #fff2f6;
  --collection-border: #edced9;
}
.storefront-ui[data-collection="graduation"] {
  --collection-accent: #6a1fc2;
  --collection-hover: #4a0f9e;
  --collection-soft: #f7f2fc;
  --collection-border: #dfd0ed;
}
.storefront-ui[data-collection="funeral"] {
  --collection-accent: #435a50;
  --collection-hover: #30443b;
  --collection-soft: #f1f5f2;
  --collection-border: #d1ded6;
}
[data-collection="funeral"] .md-hero { background: linear-gradient(135deg, #f4f6f3, #e5ede7); }
[data-collection="funeral"] .md-hero::before,
[data-collection="funeral"] .md-hero::after { content: none; }
[data-collection="funeral"] .md-hero h1 { color: #34473d; }
[data-collection="funeral"] .md-hero h1 span { color: #637d6e; }
[data-collection="funeral"] .md-hero-badge,
[data-collection="funeral"] .md-product-badge { background: #435a50; color: #fff; box-shadow: none; }
[data-collection] .collection-links a { color: var(--collection-accent); border-color: var(--collection-border); }
[data-collection] .collection-links a[aria-current="page"] { color: #fff; }
[data-collection] .collection-toolbar {
  display: grid;
  grid-template-columns: minmax(200px, 1.3fr) minmax(190px, 1fr) minmax(180px, 1fr) auto;
  align-items: end;
  gap: 18px;
  margin-bottom: 12px;
  padding: 20px;
  border: 1px solid var(--collection-border);
  border-radius: 16px;
  background: var(--collection-soft);
}
[data-collection] .collection-toolbar label,
[data-collection] .collection-price-range legend { color: #594d55; font-size: 12px; font-weight: 600; }
[data-collection] .collection-toolbar input,
[data-collection] .collection-toolbar select {
  min-height: 46px;
  border-color: var(--collection-border);
  border-radius: 9px;
  background: #fff;
  color: #30272c;
  box-shadow: 0 1px 2px #30272c03;
}
[data-collection] .collection-toolbar input:focus,
[data-collection] .collection-toolbar select:focus {
  outline: 2px solid var(--collection-accent);
  outline-offset: 2px;
  border-color: var(--collection-accent);
}
.collection-price-range { min-width: 0; margin: 0; padding: 0; border: 0; }
.collection-price-range legend { margin-bottom: 6px; padding: 0; }
.collection-price-inputs { display: grid; grid-template-columns: minmax(0, 1fr) 10px minmax(0, 1fr); gap: 6px; align-items: center; }
.collection-price-inputs label { position: relative; min-width: 0; }
.collection-price-inputs label span { position: absolute; top: 50%; left: 10px; transform: translateY(-50%); color: #80717a; font-size: 11px; font-weight: 400; pointer-events: none; }
[data-collection] .collection-price-inputs input { padding-left: 38px; }
.collection-price-dash { color: #9a8691; text-align: center; }
[data-collection] .collection-toolbar .collection-reset {
  min-height: 46px;
  justify-self: stretch;
  border: 1px solid var(--collection-accent);
  border-radius: 9px;
  background: transparent;
  color: var(--collection-accent);
  font-size: 12px;
  white-space: nowrap;
}
[data-collection] .collection-toolbar .collection-reset:hover:not(:disabled) { background: var(--collection-accent); color: #fff; }
[data-collection] .product-count { margin: 10px 2px 20px; text-align: left; font-size: 12px; color: #7a6c74; }
.storefront-ui[data-collection] .popup-add-btn:not(:disabled),
.storefront-ui[data-collection] .payment-form button[type="submit"]:not(:disabled),
.storefront-ui[data-collection] .checkout-btn,
[data-collection] .collection-empty button,
[data-collection] .collection-empty a { background: var(--collection-accent); color: #fff; box-shadow: none; }
.storefront-ui[data-collection] .popup-add-btn:hover:not(:disabled),
.storefront-ui[data-collection] .payment-form button[type="submit"]:hover:not(:disabled),
.storefront-ui[data-collection] .checkout-btn:hover,
[data-collection] .collection-empty button:hover,
[data-collection] .collection-empty a:hover { background: var(--collection-hover); color: #fff; box-shadow: none; }
[data-collection] .md-product-info h3,
[data-collection] .popup-base-price,
[data-collection] .order-summary .total-amount { color: var(--collection-accent); }
[data-collection] .quantity-controls button { background: var(--collection-accent); }
[data-collection] .quantity-controls button:hover { background: var(--collection-hover); }
[data-collection] .wrap-toggle-btn { color: var(--collection-accent); border-color: var(--collection-border); background: var(--collection-soft); }
[data-collection] .wrap-toggle-btn:hover,
[data-collection] .wrap-toggle-btn.wrap-toggle-open,
[data-collection] .wrap-toggle-btn.wrap-toggle-chosen { color: var(--collection-accent); border-color: var(--collection-accent); background: var(--collection-soft); }
[data-collection] .wrap-toggle-btn strong,
[data-collection] .wrap-selected-name span { color: var(--collection-accent); }
[data-collection] .wrap-body { border-color: var(--collection-accent); background: var(--collection-soft); }
[data-collection] .wrap-selector .wrap-photo-grid .wrap-swatch.selected { border-color: var(--collection-accent); box-shadow: 0 0 0 1px var(--collection-accent); background: var(--collection-soft); }
[data-collection] .timeslot-opt.selected,
[data-collection] .balloon-option.selected,
[data-collection] .extra-option.selected { border-color: var(--collection-accent); background: var(--collection-soft); box-shadow: none; }
[data-collection] .timeslot-opt.selected .timeslot-label { color: var(--collection-accent); }
[data-collection] .md-product-info .popup-add-btn:disabled { background: #ddd4d8; color: #6e6067; box-shadow: none; }
@media (max-width: 1050px) {
  [data-collection] .collection-toolbar { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
  [data-collection] .collection-toolbar .collection-search { grid-column: auto; }
}
@media (max-width: 600px) {
  [data-collection] .collection-toolbar { grid-template-columns: minmax(0, 1fr); padding: 16px; gap: 16px; border-radius: 14px; }
  [data-collection] .collection-toolbar input,
  [data-collection] .collection-toolbar select { min-height: 46px; font-size: 16px; }
  [data-collection] .collection-toolbar .collection-search,
  [data-collection] .collection-toolbar .collection-sort,
  [data-collection] .collection-toolbar .collection-price-range { grid-column: 1 / -1; }
  [data-collection] .collection-toolbar .collection-reset { min-height: 42px; padding: 8px 14px; justify-self: end; }
  .collection-price-inputs { gap: 10px; }
}
