/* Innerloop Shop - storefront, cart, wishlist and checkout. */

.il-shop {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 34px 24px 76px;
  color: #0b1220;
}

.il-shop-notice {
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 13.5px;
  font-weight: 550;
  margin-bottom: 20px;
  border: 1px solid #cfe8db;
  background: #eefaf3;
  color: #146c43;
}
.il-shop-notice--warning { border-color: #f2e0b6; background: #fdf7e7; color: #8a5a12; }
.il-shop-notice--error { border-color: #f3cfd4; background: #fdf0f2; color: #a12b3b; }

.il-shop-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.il-shop-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.il-shop-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid #dbe1ec;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: #475569;
  text-decoration: none;
  background: #fff;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.il-shop-chip:hover { border-color: #b9c2d4; color: #0b1220; }
.il-shop-chip.is-active { background: var(--color-primary, #f97316); border-color: transparent; color: #fff; }
.il-shop-toolbar-right { display: flex; align-items: center; gap: 16px; }
.il-shop-count { font-size: 12.5px; color: #64748b; }
.il-shop-textlink { font-size: 13px; font-weight: 650; color: var(--mw-primary-ink, #c2410c); text-decoration: none; }
.il-shop-textlink:hover { text-decoration: underline; }
.il-shop-compare-link.is-disabled { opacity: .45; cursor: not-allowed; text-decoration: none; }
.il-shop-compare-link.is-disabled:hover { text-decoration: none; }

.il-shop-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.il-shop-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e5eaf3;
  border-radius: 18px;
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.il-shop-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 28px 54px -34px rgba(11, 18, 32, .42);
  border-color: #ccd6e8;
}
.il-shop-media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: color-mix(in oklab, var(--color-primary, #f97316) 5%, white);
  overflow: hidden;
}
.il-shop-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.il-shop-media-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 46px;
  font-weight: 800;
  color: color-mix(in oklab, var(--color-primary, #f97316) 55%, white);
}
.il-shop-flag {
  position: absolute;
  top: 12px;
  left: 12px;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 10.5px;
  font-weight: 750;
  letter-spacing: .02em;
  color: #7c2d12;
  background: #ffedd5;
  border: 1px solid #fed7aa;
}
.il-shop-body { display: flex; flex-direction: column; gap: 8px; padding: 18px 18px 20px; flex: 1; }
.il-shop-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.il-shop-cat { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #94a3b8; }
.il-shop-price { font-size: 15px; font-weight: 750; color: #0b1220; white-space: nowrap; }
.il-shop-body h3 { font-size: 17px; line-height: 1.25; letter-spacing: -.015em; margin: 0; font-weight: 750; }
.il-shop-body p { font-size: 13px; line-height: 1.55; color: #64748b; margin: 0; }
.il-shop-actions { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 10px; }
.il-shop-actions form { margin: 0; }

.il-shop-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--color-primary, #f97316);
  color: #fff;
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1;
  padding: 11px 15px;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}
.il-shop-btn:hover { background: color-mix(in oklab, var(--color-primary, #f97316) 86%, black); color: #fff; transform: translateY(-1px); }
.il-shop-btn--block { width: 100%; padding: 14px 18px; font-size: 14px; }
.il-shop-heart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid #dbe1ec;
  background: #fff;
  color: #94a3b8;
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.il-shop-heart svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.il-shop-heart:hover { color: #e11d48; border-color: #fecdd3; background: #fff1f2; }
.il-shop-heart.is-on { color: #e11d48; border-color: #fecdd3; background: #fff1f2; }
.il-shop-heart.is-on svg { fill: currentColor; }

.il-shop-compare {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid var(--color-base-300, #dbe1ec);
  background: var(--color-base-100, #fff);
  color: color-mix(in oklab, var(--color-base-content, #0f172a) 42%, transparent);
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.il-shop-compare svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.il-shop-compare:hover,
.il-shop-compare.is-on {
  color: var(--color-primary, #f97316);
  border-color: color-mix(in oklab, var(--color-primary, #f97316) 35%, transparent);
  background: color-mix(in oklab, var(--color-primary, #f97316) 8%, var(--color-base-100, #fff));
}

.il-compare-scroll {
  overflow-x: auto;
  border: 1px solid color-mix(in oklab, var(--color-base-content, #0f172a) 12%, transparent);
  border-radius: var(--radius-box, .75rem);
  background: var(--color-base-100, #fff);
}
.il-compare-table { width: 100%; min-width: 720px; border-collapse: separate; border-spacing: 0; color: var(--color-base-content, #0f172a); }
.il-compare-table th,
.il-compare-table td {
  padding: 1rem;
  border-bottom: 1px solid color-mix(in oklab, var(--color-base-content, #0f172a) 9%, transparent);
  text-align: left;
  vertical-align: top;
}
.il-compare-table thead th { background: color-mix(in oklab, var(--color-base-200, #f1f5f9) 65%, var(--color-base-100, #fff)); }
.il-compare-table tbody tr:last-child th,
.il-compare-table tbody tr:last-child td { border-bottom: 0; }
.il-compare-label,
.il-compare-table tbody th {
  position: sticky;
  left: 0;
  z-index: 1;
  width: 9rem;
  background: var(--color-base-100, #fff);
  color: color-mix(in oklab, var(--color-base-content, #0f172a) 55%, transparent);
  font-size: .68rem;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.il-compare-product { min-width: 14rem; }
.il-compare-media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: calc(var(--radius-box, .75rem) * .8);
  background: color-mix(in oklab, var(--color-base-200, #f1f5f9) 70%, transparent);
}
.il-compare-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.il-compare-name { margin: .75rem 0 .35rem; color: var(--color-base-content, #0f172a); font-size: 1rem; line-height: 1.3; font-weight: 700; }
.il-shop-compare-remove {
  padding: 0;
  border: 0;
  background: none;
  color: var(--color-primary, #ea580c);
  font-size: .78rem;
  font-weight: 650;
  text-decoration: underline;
  cursor: pointer;
}
.il-compare-table td { color: color-mix(in oklab, var(--color-base-content, #0f172a) 76%, transparent); font-size: .84rem; line-height: 1.55; }
.il-compare-table td[data-compare-product] .il-shop-btn { width: 100%; }
.il-compare-scroll[hidden],
.il-compare-table[hidden],
.il-compare-empty[hidden] { display: none !important; }
.il-compare-empty { color: var(--color-base-content, #0f172a); }

@media (max-width: 640px) {
  .il-compare-table th,
  .il-compare-table td { padding: .75rem; }
  .il-compare-label,
  .il-compare-table tbody th { width: 7.5rem; }
}

.il-shop-cart, .il-shop-checkout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, .8fr);
  gap: 28px;
  align-items: start;
}
.il-shop-lines { display: grid; gap: 12px; }
.il-shop-line {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 14px;
  background: #fff;
  border: 1px solid #e5eaf3;
  border-radius: 14px;
  padding: 12px 14px;
}
.il-shop-line-media { width: 84px; height: 54px; border-radius: 8px; overflow: hidden; background: #f1f5f9; }
.il-shop-line-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.il-shop-line-info h3 { font-size: 14px; font-weight: 700; margin: 0 0 2px; line-height: 1.3; }
.il-shop-line-info .il-shop-cat { font-size: 10px; }
.il-shop-line-price { display: block; font-size: 11.5px; color: #64748b; margin-top: 3px; }
.il-shop-line-total { font-size: 13.5px; font-weight: 750; white-space: nowrap; }
.il-shop-qty { display: inline-flex; align-items: center; gap: 2px; border: 1px solid #dbe1ec; border-radius: 9px; padding: 2px; }
.il-shop-qty button {
  width: 26px; height: 26px; border: 0; border-radius: 7px; background: transparent;
  color: #475569; font-size: 15px; cursor: pointer; line-height: 1;
}
.il-shop-qty button:hover { background: #f1f5f9; color: #0b1220; }
.il-shop-qty span { min-width: 22px; text-align: center; font-size: 12.5px; font-weight: 700; }
.il-shop-remove { border: 0; background: none; padding: 4px; color: #94a3b8; font-size: 11.5px; cursor: pointer; text-decoration: underline; }
.il-shop-remove:hover { color: #b91c1c; }

.il-shop-summary {
  background: #fff;
  border: 1px solid #e5eaf3;
  border-radius: 16px;
  padding: 20px;
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.il-shop-summary h2 { font-size: 17px; font-weight: 750; margin: 0 0 2px; }
.il-shop-summary p { font-size: 13px; line-height: 1.6; color: #64748b; margin: 0; }
.il-shop-sumrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; color: #475569; }
.il-shop-sumrow strong { font-weight: 650; color: #0b1220; }
.il-shop-sumtotal { border-top: 1px solid #e8ecf4; padding-top: 12px; margin-top: 2px; font-size: 15px; color: #0b1220; }
.il-shop-sumtotal strong { font-size: 18px; font-weight: 800; }
.il-shop-fine { font-size: 12px; line-height: 1.6; color: #94a3b8; margin: 18px 0 0; }
.il-shop-summary .il-shop-fine { margin: 0; }

.il-shop-review { background: #fff; border: 1px solid #e5eaf3; border-radius: 16px; padding: 20px; }
.il-shop-review h2 { font-size: 17px; font-weight: 750; margin: 0 0 14px; }
.il-shop-review-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13.5px; padding: 8px 0; border-bottom: 1px solid #f1f5f9; }
.il-shop-review-row:last-child { border-bottom: 0; }
.il-shop-review-row em { font-style: normal; color: #94a3b8; font-size: 12px; }
.il-shop-review-row strong { font-weight: 700; }

.il-shop-empty {
  text-align: center;
  background: #fff;
  border: 1px solid #e5eaf3;
  border-radius: 18px;
  padding: 56px 24px;
  max-width: 560px;
  margin: 0 auto;
}
.il-shop-empty h2 { font-size: 24px; font-weight: 800; letter-spacing: -.03em; margin: 0 0 8px; }
.il-shop-empty p { font-size: 14px; color: #64748b; margin: 0 0 18px; }
.il-shop-empty .il-shop-btn { margin-top: 4px; }

.il-compare-pending__item {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 430px;
  margin: 0 auto 20px;
  padding: 12px;
  border: 1px solid #e5eaf3;
  border-radius: 14px;
  background: #f8fafc;
  text-align: left;
}
.il-compare-pending__media {
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 10px;
  background: #eef2f7;
}
.il-compare-pending__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.il-compare-pending__meta { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.il-compare-pending__meta strong { font-size: .92rem; font-weight: 700; line-height: 1.3; }
.il-compare-pending__meta span { font-size: .82rem; color: #64748b; }
.il-compare-pending__item form { margin: 0; flex: 0 0 auto; }

.il-shop-orders { display: grid; gap: 14px; }
.il-shop-order { background: #fff; border: 1px solid #e5eaf3; border-radius: 16px; overflow: hidden; }
.il-shop-order-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 16px 20px; border-bottom: 1px solid #eef2f7; }
.il-shop-order-head h3 { font-size: 15px; font-weight: 750; margin: 0 0 3px; }
.il-shop-order-date { font-size: 11.5px; color: #94a3b8; }
.il-shop-order-body { padding: 12px 20px 16px; }
.il-shop-status { border-radius: 999px; padding: 5px 10px; font-size: 10.5px; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; background: #f1f5f9; color: #475569; }
.il-shop-status--completed { background: #e8f7ef; color: #15803d; }
.il-shop-status--pending { background: #fef6e7; color: #a16207; }
.il-shop-status--failed { background: #fdecef; color: #b91c1c; }

/* Dark mode */
html.dark .il-shop { color: #e5eaf3; }
html.dark .il-shop-card,
html.dark .il-shop-line,
html.dark .il-shop-summary,
html.dark .il-shop-review,
html.dark .il-shop-order,
html.dark .il-shop-empty { background: #111a2e; border-color: #243044; }
html.dark .il-compare-pending__item { background: #0d1526; border-color: #243044; }
html.dark .il-compare-pending__media { background: #1a2438; }
html.dark .il-shop-card:hover { border-color: #3b4a63; box-shadow: 0 28px 54px -34px rgba(0, 0, 0, .8); }
html.dark .il-shop-media { background: color-mix(in oklab, var(--color-primary, #f97316) 10%, #111a2e); }
html.dark .il-shop-body h3,
html.dark .il-shop-price,
html.dark .il-shop-line-info h3,
html.dark .il-shop-line-total,
html.dark .il-shop-sumrow strong,
html.dark .il-shop-sumtotal,
html.dark .il-shop-summary h2,
html.dark .il-shop-review h2,
html.dark .il-shop-order-head h3 { color: #f8fafc; }
html.dark .il-shop-body p,
html.dark .il-shop-summary p,
html.dark .il-shop-count,
html.dark .il-shop-line-price,
html.dark .il-shop-order-date { color: #94a3b8; }
html.dark .il-shop-chip { background: #111a2e; border-color: #334155; color: #cbd5e1; }
html.dark .il-shop-chip:hover { border-color: #475569; color: #fff; }
html.dark .il-shop-chip.is-active { background: var(--color-primary, #f97316); border-color: transparent; color: #fff; }
html.dark .il-shop-heart { background: #111a2e; border-color: #334155; color: #94a3b8; }
html.dark .il-shop-heart:hover,
html.dark .il-shop-heart.is-on { background: #2a1620; border-color: #7f1d3a; color: #fb7185; }
html.dark .il-shop-qty { border-color: #334155; }
html.dark .il-shop-qty button { color: #cbd5e1; }
html.dark .il-shop-qty button:hover { background: #1e293b; color: #fff; }
html.dark .il-shop-remove { color: #94a3b8; }
html.dark .il-shop-remove:hover { color: #f87171; }
html.dark .il-shop-sumtotal { border-top-color: #243044; }
html.dark .il-shop-review-row { border-bottom-color: #1e293b; }
html.dark .il-shop-order-head { border-bottom-color: #1e293b; }
html.dark .il-shop-notice { background: #10261c; border-color: #1f5138; color: #86efac; }
html.dark .il-shop-notice--warning { background: #2a2110; border-color: #6b4e17; color: #fcd34d; }
html.dark .il-shop-notice--error { background: #2a1217; border-color: #7f1d2b; color: #fda4af; }
html.dark .il-shop-status { background: #1e293b; color: #cbd5e1; }
html.dark .il-shop-status--completed { background: #0f2f1f; color: #86efac; }
html.dark .il-shop-status--pending { background: #2a2110; color: #fcd34d; }
html.dark .il-shop-status--failed { background: #2a1217; color: #fda4af; }
html.dark .il-shop-flag { background: #3b2412; border-color: #7c3f16; color: #fdba74; }

@media (max-width: 1024px) {
  .il-shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .il-shop-cart, .il-shop-checkout { grid-template-columns: 1fr; }
  .il-shop-summary { position: static; }
}

@media (max-width: 640px) {
  .il-shop { padding: 24px 18px 60px; }
  .il-shop-grid { grid-template-columns: 1fr; }
  .il-shop-toolbar { flex-direction: column; align-items: flex-start; gap: 10px; }
  .il-shop-line { grid-template-columns: 64px minmax(0, 1fr) auto; row-gap: 10px; }
  .il-shop-line-media { width: 64px; height: 44px; }
  .il-shop-line-total { grid-column: 2; }
  .il-shop-line form:last-child { grid-column: 3; grid-row: 2; justify-self: end; }
  .il-shop-order-head { flex-direction: column; }
}

/* AJAX add-to-cart confirmation toast. */
.il-shop-toast {
  position: fixed;
  inset-inline-end: 1.25rem;
  bottom: 1.25rem;
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: max-content;
  max-width: min(26rem, calc(100vw - 2rem));
  padding: 0.75rem 0.9rem;
  border: var(--border-width, 1px) solid color-mix(in oklab, var(--color-success, #16a34a) 30%, var(--color-base-300, #d1d5db));
  border-radius: var(--radius-box, 0.75rem);
  background: color-mix(in oklab, var(--color-base-100, #fff) 94%, var(--color-success, #16a34a));
  color: var(--color-base-content, #0f172a);
  box-shadow: var(--ds-shadow-lg, 0 20px 40px -20px rgba(15, 23, 42, 0.35));
  pointer-events: none;
  animation: il-shop-toast-in 0.2s ease-out both;
}

.il-shop-toast.is-leaving {
  animation: il-shop-toast-out 0.2s ease-in both;
}

.il-shop-toast__icon {
  display: inline-flex;
  width: 1.25rem;
  height: 1.25rem;
  flex: 0 0 auto;
  color: var(--color-success, #16a34a);
}

.il-shop-toast__icon svg {
  width: 100%;
  height: 100%;
}

.il-shop-toast__text {
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.35;
}

.il-shop-toast__link {
  margin-inline-start: 0.35rem;
  color: var(--color-primary, #ea580c);
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
  pointer-events: auto;
}

.il-shop-toast__link:hover {
  text-decoration: underline;
}

@keyframes il-shop-toast-in {
  from { opacity: 0; transform: translateY(0.5rem); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes il-shop-toast-out {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(0.5rem); }
}

@media (max-width: 640px) {
  .il-shop-toast {
    inset-inline: 1rem;
    bottom: 1rem;
    width: auto;
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .il-shop-toast,
  .il-shop-toast.is-leaving {
    animation-duration: 0.01ms;
  }
}

/* Product detail */
.il-shop-media-link{display:block;color:inherit;text-decoration:none}
.il-shop-name-link{color:inherit;text-decoration:none}
.il-shop-name-link:hover{text-decoration:underline}
.il-product-back{display:inline-flex;margin-bottom:1rem}
.il-product{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr);gap:2rem;align-items:start}
.il-product-media{position:relative;background:#f8fafc;border:1px solid #e5e7eb;border-radius:1rem;overflow:hidden;min-height:320px;display:flex;align-items:center;justify-content:center}
.il-product-media img{width:100%;height:100%;object-fit:cover;display:block;aspect-ratio:1/1}
.il-product-body{display:flex;flex-direction:column;gap:.75rem}
.il-product-title{margin:0;font-size:clamp(1.75rem,3vw,2.5rem);line-height:1.1;letter-spacing:-.03em}
.il-product-price{margin:0;font-size:1.5rem;font-weight:700;color:var(--color-primary,#ea580c)}
.il-product-desc{color:#475569;line-height:1.7}
.il-product-desc p{margin:0}
.il-product-actions{display:flex;flex-direction:column;gap:1rem;margin-top:.5rem}
.il-product-cart-form{display:flex;flex-wrap:wrap;gap:.75rem;align-items:end}
.il-product-qty{display:flex;flex-direction:column;gap:.35rem;font-size:.875rem;font-weight:600}
.il-product-qty input{width:5.5rem;min-height:2.75rem;padding:.5rem .75rem;border:1px solid #d1d5db;border-radius:.75rem;background:#fff}
.il-product-secondary-actions{display:flex;gap:.5rem;align-items:center}
@media (max-width: 900px){.il-product{grid-template-columns:1fr;gap:1.25rem}}
