:root {
  --kswn-accent: var(--accent, #222);
  --kswn-border: #dedede;
  --kswn-radius: 4px;
  --kswn-heart-size: 42px;
  --kswn-grid-gap: 24px;
  --kswn-card-bg: rgba(255, 255, 255, .28);
}
.kswn-heart { display: inline-flex; align-items: center; justify-content: center; gap: .5em; color: var(--kswn-accent); background: transparent; border: 1px solid var(--kswn-border); border-radius: var(--kswn-radius); padding: .6em; cursor: pointer; line-height: 1.2; }
.kswn-heart[aria-pressed=true] svg { fill: currentColor; }
.kswn-heart--loop .kswn-heart-label { display: none; }
.woocommerce ul.products li.product { position: relative; }
.kswn-heart--loop { position: absolute; right: 12px; top: 12px; z-index: 3; background: #fff; width: var(--kswn-heart-size); height: var(--kswn-heart-size); }
.kswn-heart--single { margin: 12px 0; }
.kswn-heart:focus-visible, .kswn-notify summary:focus-visible, .kswn-item a:focus-visible, .kswn-item-remove:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.kswn-heart:disabled { opacity: .6; cursor: wait; }
.kswn-notify { margin: 12px 0; min-width: 0; }
.kswn-notify [hidden] { display: none !important; }
.kswn-notify details > summary { display: flex; align-items: center; gap: .5em; cursor: pointer; font-weight: 600; list-style: none !important; list-style-type: none !important; overflow-wrap: anywhere; }
.kswn-notify details > summary::marker { display: none !important; content: none !important; font-size: 0; }
.kswn-notify details > summary::-webkit-details-marker { display: none !important; }
.kswn-notify__icon { flex: 0 0 auto; width: 18px !important; height: 18px !important; fill: currentColor; }
.kswn-notify__icon path { stroke: currentColor; stroke-width: 10px; stroke-linejoin: round; }
.kswn-subscribe { box-sizing: border-box; width: 100%; max-width: 440px; margin: 12px 0; padding: 16px; border: 1px solid var(--kswn-border); border-radius: var(--kswn-radius); }
.kswn-subscribe label { display: block; }
.kswn-subscribe input[type=email] { display: block; width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; margin: 6px 0 12px; font-size: 16px; }
.kswn-subscribe button { max-width: 100%; min-height: 44px; white-space: normal; overflow-wrap: anywhere; }
.kswn-note { font-size: .85em; opacity: .8; overflow-wrap: anywhere; }
.kswn-honeypot { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

/* Grid responds to its content area, including account pages with a sidebar. */
.kswn-wishlist { container: kswn / inline-size; min-width: 0; }
.kswn-wishlist *, .kswn-wishlist *::before, .kswn-wishlist *::after { box-sizing: border-box; }
.kswn-items { display: grid; grid-template-columns: repeat(var(--kswn-columns-desktop, 4), minmax(0, 1fr)); column-gap: var(--kswn-column-gap-desktop, var(--kswn-grid-gap)); row-gap: var(--kswn-row-gap-desktop, var(--kswn-grid-gap)); align-items: stretch; }
.woocommerce ul.products.kswn-items::before, .woocommerce ul.products.kswn-items::after { content: none; display: none; }
.woocommerce ul.products.kswn-items li.product { float: none !important; clear: none !important; width: auto !important; min-width: 0; margin: 0 !important; }
.kswn-item { position: relative; display: flex; flex-direction: column; min-width: 0; margin: 0; padding: 16px; border: 1px solid var(--kswn-border); border-radius: var(--kswn-radius); background: var(--kswn-card-bg); }
.kswn-item-image { position: relative; display: block; flex: none; width: 100%; aspect-ratio: 4 / 5; margin: 0 0 18px; padding: 0; min-width: 0; }
.kswn-item-image img { position: absolute; inset: 0; padding: 16px; box-sizing: border-box; display: block; width: 100%; height: 100%; max-width: 100%; max-height: 100%; object-fit: contain; margin: 0; }
.kswn-item-info { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.kswn-item h3 { margin: 0 0 10px; font-size: 1.1em; line-height: 1.35; overflow-wrap: anywhere; }
.kswn-item h3 a { color: inherit; text-decoration: none; }
.kswn-item-price { margin: 0 0 6px; font-weight: 600; overflow-wrap: anywhere; }
.kswn-item-price del { opacity: .6; font-weight: 400; }
.kswn-item-stock { margin: 0 0 18px; font-size: .88em; line-height: 1.4; overflow-wrap: anywhere; }
.kswn-item-actions { margin-top: auto; min-width: 0; }
.kswn-item-actions > .button { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 44px; padding: 10px 12px; margin: 0; font: inherit; font-size: .9em; line-height: 1.35; text-align: center; text-decoration: none; white-space: normal; overflow-wrap: anywhere; }
.kswn-item .kswn-notify { font-size: .9em; }
.kswn-item .kswn-subscribe { max-width: none; }
.kswn-items [data-kswn-remove] { position: absolute; z-index: 4; top: 8px; right: 8px; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; min-width: 44px; padding: 0; color: inherit; background: rgba(255, 255, 255, .85); border: 0; border-radius: 50%; font-size: 26px; line-height: 1; cursor: pointer; }
.kswn-items [data-kswn-remove]:hover { background: #fff; }
.kswn-items li.product.kswn-item--removing { position: relative; overflow: hidden; pointer-events: none; }
.kswn-items li.product.kswn-item--removing::before { position: absolute; inset: 0; z-index: 20; background: rgba(255, 255, 255, .6); content: ''; }
.kswn-items li.product.kswn-item--removing::after { position: absolute; top: calc(50% - 20px); left: calc(50% - 20px); z-index: 21; width: 40px; height: 40px; border: 3px solid var(--accent, var(--kswn-accent)); border-top-color: transparent; border-radius: 50%; animation: kswn-card-spin 1s linear infinite; content: ''; }
@keyframes kswn-card-spin { to { transform: rotate(360deg); } }
.kswn-item-unavailable { min-height: 180px; padding-top: 48px; overflow-wrap: anywhere; }
.kswn-pagination { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.kswn-pagination button { min-height: 44px; }
.kswn-toast { position: fixed; bottom: 20px; left: 20px; z-index: 9999; box-sizing: border-box; max-width: calc(100vw - 40px); padding: 12px 18px; background: #222; color: #fff; border-radius: 4px; overflow-wrap: anywhere; animation: kswn-toast-in .2s ease-out both; }
.kswn-toast--hiding { pointer-events: none; animation: kswn-toast-out .3s ease-in both; }
.kswn-toast:empty { display: none; }
@keyframes kswn-toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes kswn-toast-out { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(10px); } }
.kswn-subscriptions { list-style: none; margin: 0; }
.kswn-subscriptions li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--kswn-border); }
.kswn-subscriptions button { flex: 0 0 auto; margin-left: 0; }
@media (max-width: 1024px) { .kswn-items { grid-template-columns: repeat(var(--kswn-columns-tablet, 3), minmax(0, 1fr)); column-gap: var(--kswn-column-gap-tablet, var(--kswn-grid-gap)); row-gap: var(--kswn-row-gap-tablet, var(--kswn-grid-gap)); } }
@media (max-width: 767px) { .kswn-items { grid-template-columns: repeat(var(--kswn-columns-mobile, 2), minmax(0, 1fr)); column-gap: var(--kswn-column-gap-mobile, 12px); row-gap: var(--kswn-row-gap-mobile, 12px); } }
@media (max-width: 767px) { .kswn-subscriptions li { align-items: flex-start; flex-direction: column; gap: 10px; } }
@media (max-width: 600px) {
  .kswn-item { padding: 10px; }
  .kswn-item-image { margin-bottom: 12px; }
  .kswn-item-image img { padding: 16px 4px 4px; }
  .kswn-item h3 { font-size: 1em; }
  .kswn-item-actions > .button { font-size: .85em; padding: 10px 6px; }
  .kswn-heart--loop { top: 8px; right: 8px; }
}
@container kswn (max-width: 1024px) { .kswn-items { grid-template-columns: repeat(var(--kswn-columns-tablet, 3), minmax(0, 1fr)); column-gap: var(--kswn-column-gap-tablet, var(--kswn-grid-gap)); row-gap: var(--kswn-row-gap-tablet, var(--kswn-grid-gap)); } }
@container kswn (max-width: 767px) { .kswn-items { grid-template-columns: repeat(var(--kswn-columns-mobile, 2), minmax(0, 1fr)); column-gap: var(--kswn-column-gap-mobile, 12px); row-gap: var(--kswn-row-gap-mobile, 12px); } }
/* An open email form needs room for typing on a phone. Other cards stay in the grid. */
@container kswn (max-width: 600px) {
  .kswn-items li.product:has(details[open]) { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: no-preference) { .kswn-item-remove { transition: background-color .15s; } }
@media (prefers-reduced-motion: reduce) { .kswn-toast, .kswn-toast--hiding, .kswn-item--removing::after { animation: none; } }
