:root {
  --sf-bg: #f6f7f5;
  --sf-surface: #ffffff;
  --sf-surface-2: #f1f3ef;
  --sf-line: #e3e7e1;
  --sf-text: #111111;
  --sf-text-soft: #616866;
  --sf-brand: #111111;
  --sf-green: #2f9e44;
  --sf-green-soft: #eaf7ee;
  --sf-danger: #d62828;
  --sf-radius: 18px;
  --sf-radius-lg: 24px;
  --sf-shadow: 0 10px 30px rgba(17, 17, 17, 0.08);
  --sf-shadow-soft: 0 6px 20px rgba(17, 17, 17, 0.05);
  --sf-container: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, Arial, Helvetica, sans-serif;
  background: var(--sf-bg);
  color: var(--sf-text);
}
body.sf-page {
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
img { max-width: 100%; display: block; }
.hidden { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sf-container {
  width: min(calc(100% - 32px), var(--sf-container));
  margin: 0 auto;
}

.sf-banner {
  background: var(--sf-green);
  color: #fff;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px 16px;
}

.sf-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(246, 247, 245, 0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(227, 231, 225, 0.8);
}

.sf-header-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  min-height: 78px;
}

.sf-brand {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
}

.sf-brand-name {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sf-brand-sub {
  color: var(--sf-text-soft);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sf-header-center {
  min-width: 0;
}

.sf-size-strip {
  display: flex;
  gap: 10px;
  align-items: center;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.sf-size-strip::-webkit-scrollbar { display: none; }

.sf-size-link,
.sf-size-tag,
.sf-filter-chip {
  flex: 0 0 auto;
  min-width: 42px;
  height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--sf-line);
  background: var(--sf-surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--sf-text-soft);
  transition: 0.22s ease;
}

.sf-size-link:hover,
.sf-size-tag:hover,
.sf-filter-chip:hover {
  border-color: var(--sf-brand);
  color: var(--sf-brand);
  transform: translateY(-1px);
}

.sf-size-link.is-active,
.sf-size-tag.is-active,
.sf-filter-chip.is-active {
  background: var(--sf-brand);
  border-color: var(--sf-brand);
  color: #fff;
}

.sf-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sf-search-form {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sf-search-input,
.sf-select,
.sf-input,
.sf-textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--sf-line);
  background: var(--sf-surface);
  border-radius: 14px;
  padding: 0 14px;
  outline: none;
  color: var(--sf-text);
}

.sf-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 42px;
  background-image:
    linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 1px),
    calc(100% - 12px) calc(50% - 1px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.sf-search-input:focus,
.sf-select:focus,
.sf-input:focus,
.sf-textarea:focus {
  border-color: var(--sf-brand);
  box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.08);
}

.sf-search-input {
  width: 210px;
}

.sf-btn,
.sf-icon-btn {
  border: none;
  cursor: pointer;
  transition: 0.22s ease;
}

.sf-btn {
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: 0.03em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1;
  white-space: nowrap;
}

.sf-btn-primary {
  background: var(--sf-brand);
  color: #fff;
}

.sf-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(17, 17, 17, 0.14);
}

.sf-btn-secondary {
  background: var(--sf-surface);
  color: var(--sf-text);
  border: 1px solid var(--sf-line);
}

.sf-btn-secondary:hover {
  border-color: var(--sf-brand);
}

.sf-icon-btn {
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--sf-surface);
  border: 1px solid var(--sf-line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--sf-text);
}

.sf-icon-btn:hover {
  border-color: var(--sf-brand);
  transform: translateY(-1px);
}

.sf-cart-icon {
  width: 22px;
  height: 22px;
  display: block;
}

.sf-cart-count {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--sf-danger);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sf-cart-pop {
  position: fixed;
  top: 102px;
  right: 20px;
  width: min(380px, calc(100vw - 24px));
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid var(--sf-line);
  border-radius: 24px;
  box-shadow: var(--sf-shadow);
  z-index: 95;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px);
  transition: 0.2s ease;
}

.sf-cart-pop.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.sf-cart-pop-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.sf-cart-pop-head strong {
  font-size: 18px;
}

.sf-cart-pop-head span {
  color: var(--sf-text-soft);
  font-size: 14px;
}

.sf-cart-pop-list {
  display: grid;
  gap: 12px;
  max-height: 360px;
  overflow: auto;
  padding-right: 4px;
}

.sf-cart-pop-item {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  border: 1px solid var(--sf-line);
  border-radius: 18px;
  background: var(--sf-surface);
  padding: 10px;
}

.sf-cart-pop-item img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 14px;
  background: var(--sf-surface-2);
}

.sf-cart-pop-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sf-cart-meta,
.sf-help,
.sf-note {
  color: var(--sf-text-soft);
}

.sf-cart-meta {
  font-size: 12px;
  margin-top: 4px;
}

.sf-cart-pop-row,
.sf-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sf-cart-pop-row {
  align-items: center;
}

.sf-mini-qty {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.sf-mini-qty button,
.sf-qty-btn {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid var(--sf-line);
  background: var(--sf-surface);
  cursor: pointer;
}

.sf-mini-qty button:hover,
.sf-qty-btn:hover {
  border-color: var(--sf-brand);
}

.sf-cart-pop-foot {
  margin-top: 16px;
  border-top: 1px solid var(--sf-line);
  padding-top: 14px;
  display: grid;
  gap: 12px;
}

.sf-popup-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: center;
}

.sf-popup-actions .sf-btn,
.sf-product-actions .sf-btn {
  width: 100%;
}

.sf-page-main {
  padding: 32px 0 72px;
}

.sf-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.sf-eyebrow {
  color: var(--sf-green);
  font-weight: 800;
  letter-spacing: 0.12em;
  font-size: 12px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.sf-hero h1,
.sf-product-title,
.sf-section-title {
  margin: 0;
  letter-spacing: -0.03em;
}

.sf-hero h1 {
  font-size: clamp(34px, 5vw, 58px);
  line-height: 0.95;
}

.sf-hero p {
  margin-top: 10px;
  max-width: 640px;
  color: var(--sf-text-soft);
  font-size: 17px;
  line-height: 1.65;
}

.sf-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin-bottom: 20px;
}

/* Desktop: the toolbar search duplicates the header search — hide it */
#shopInlineSearch {
  display: none;
}

.sf-layout {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 26px;
  align-items: start;
}

.sf-sidebar,
.sf-card,
.sf-summary-card,
.sf-form-card,
.sf-empty-card {
  background: var(--sf-surface);
  border: 1px solid var(--sf-line);
  border-radius: var(--sf-radius-lg);
  box-shadow: var(--sf-shadow-soft);
}

.sf-sidebar {
  padding: 20px;
  position: sticky;
  top: 114px;
}

.sf-filter-block + .sf-filter-block {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--sf-line);
}

.sf-filter-title {
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.sf-chip-wrap,
.sf-category-list,
.sf-size-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.sf-size-list .sf-filter-chip,
.sf-category-list .sf-filter-chip {
  justify-content: space-between;
  gap: 10px;
  min-width: auto;
  height: auto;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 13px;
}

.sf-products-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.sf-product-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px;
}

.sf-product-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--sf-shadow);
}

.sf-product-image-wrap {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 20px;
  overflow: hidden;
  background: var(--sf-surface-2);
}

.sf-product-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.sf-product-card:hover .sf-product-image-wrap img {
  transform: scale(1.04);
}

.sf-stock-badge,
.sf-category-pill,
.sf-color-pill,
.sf-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sf-stock-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(227, 231, 225, 0.9);
}

.sf-stock-badge.low { color: #9a6700; background: #fff7db; }
.sf-stock-badge.out { color: var(--sf-danger); background: #fff0f0; }
.sf-category-pill { background: var(--sf-surface-2); color: var(--sf-text-soft); }
.sf-color-pill {
  color: #0c5132;
  background: linear-gradient(135deg, #edf9f1 0%, #ddf5e4 100%);
  border: 1px solid rgba(47, 158, 68, 0.16);
}
.sf-status-pill { background: var(--sf-green-soft); color: var(--sf-green); }

.sf-product-name {
  font-size: 17px;
  font-weight: 100;
  line-height: 1.35;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 46px;
}

.sf-price-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.sf-price-old {
  color: #8d9592;
  text-decoration: line-through;
  font-size: 14px;
}

.sf-price-now,
.sf-price-value {
  font-size: 22px;
  font-weight: 900;
  color: var(--sf-green);
}

.sf-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--sf-text-soft);
  font-size: 13px;
}

.sf-product-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-top: auto;
  align-items: center;
}

.sf-product-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 28px;
  align-items: start;
}

.sf-product-shell.has-description {
  grid-template-areas:
    "gallery info"
    "description description";
}

.sf-product-shell.has-description > .sf-gallery-card {
  grid-area: gallery;
}

.sf-product-shell.has-description > .sf-info-card {
  grid-area: info;
}

.sf-product-shell.has-description > .sf-description-card {
  grid-area: description;
}

.sf-gallery-card,
.sf-info-card {
  padding: 28px;
}

.sf-description-card {
  padding: 18px;
  border-radius: 24px;
}

.sf-main-image {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  background: var(--sf-surface-2);
  aspect-ratio: 1 / 1;
}

.sf-main-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sf-image-badge {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  border-radius: 999px;
  padding: 7px 16px 7px 12px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.sf-image-badge.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.sf-image-badge-icon {
  display: flex;
  align-items: center;
  color: rgba(255, 255, 255, 0.75);
  flex-shrink: 0;
}

.sf-image-badge-text {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  line-height: 1;
}

.sf-thumb-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.sf-thumb-btn {
  width: 76px;
  height: 76px;
  border-radius: 16px;
  border: 1px solid var(--sf-line);
  overflow: hidden;
  background: var(--sf-surface);
  padding: 0;
  cursor: pointer;
}

.sf-thumb-btn.is-active {
  border-color: var(--sf-brand);
  box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.07);
}

.sf-thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sf-product-title {
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1;
}

.sf-live-view-counter {
  margin-top: 14px;
  margin-bottom: 10px;
  background: #e3e7e1;
  border: 1px solid #e3e7e1;
  color: var(--sf-text-soft);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 15px;
  line-height: 1.75;
  font-weight: 400;
}

.sf-live-view-counter #viewer-count {
  color: #000000;
  font-weight: 700;
}

.sf-product-sub {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.sf-product-copy {
  color: var(--sf-text-soft);
  font-size: 15px;
  line-height: 1.7;
}

.sf-section-block + .sf-section-block {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--sf-line);
}

.sf-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.sf-section-head strong {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sf-size-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.sf-color-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.sf-color-btn {
  min-height: 46px;
  min-width: 62px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--sf-line);
  background: var(--sf-surface);
  color: var(--sf-text);
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  transition: 0.22s ease;
}

.sf-color-btn:hover {
  border-color: var(--sf-brand);
  transform: translateY(-1px);
}

.sf-color-btn.is-active {
  background: var(--sf-brand);
  border-color: var(--sf-brand);
  color: #fff;
  box-shadow: 0 10px 18px rgba(17, 17, 17, 0.12);
}

.sf-variant-btn {
  min-width: 62px;
  min-height: 46px;
  border-radius: 999px;
  border: 1px solid var(--sf-line);
  background: var(--sf-surface);
  padding: 0 18px;
  cursor: pointer;
  font-weight: 800;
  font-size: 14px;
}

.sf-variant-btn.is-active {
  border-color: var(--sf-brand);
  background: var(--sf-brand);
  color: #fff;
}

.sf-variant-btn.is-out {
  background: #f4f4f4;
  color: #8c9090;
  border-style: dashed;
}

.sf-variant-btn.is-out:hover { border-color: var(--sf-danger); color: var(--sf-danger); }

.sf-qty-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--sf-line);
  border-radius: 999px;
  background: var(--sf-surface);
}

.sf-qty-value {
  min-width: 36px;
  text-align: center;
  font-weight: 800;
}

.sf-actions {
  display: grid;
  grid-template-columns: minmax(140px, auto) 1fr 1fr;
  gap: 12px;
}

.sf-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.sf-detail-box {
  padding: 14px;
  border-radius: 18px;
  background: var(--sf-surface-2);
}

.sf-detail-box span {
  display: block;
  color: var(--sf-text-soft);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.sf-detail-box strong {
  font-size: 15px;
}

.sf-product-description {
  color: var(--sf-text-soft);
  font-size: 15px;
  line-height: 1.8;
}

.sf-description-pill {
  background: var(--sf-surface-2);
  border: 1px solid var(--sf-line);
  border-radius: 20px;
  padding: 18px 20px;
}

.sf-related-products-section {
  grid-column: 1 / -1;
  padding: 28px;
}

.sf-related-products-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.sf-related-product-card {
  border: 1px solid var(--sf-line);
  border-radius: 16px;
  background: var(--sf-surface);
  padding: 13px;
}

.sf-related-product-thumb {
  display: block;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
  background: var(--sf-surface-2);
  margin-bottom: 8px;
}

.sf-related-product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sf-related-product-name {
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  min-height: 36px;
}

.sf-related-product-price {
  margin-top: 6px;
  color: var(--sf-green);
  font-weight: 800;
  font-size: 14px;
}

.sf-related-see-more {
  min-height: 100%;
  border: 1px dashed var(--sf-brand);
  border-radius: 16px;
  background: #fff;
  display: grid;
  place-content: center;
  gap: 4px;
  text-align: center;
  padding: 15px;
}

.sf-related-see-more span {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.sf-related-see-more small {
  font-size: 11px;
  color: var(--sf-text-soft);
}

.sf-empty-card,
.sf-loading-card {
  padding: 28px;
  text-align: center;
  color: var(--sf-text-soft);
}

.sf-cart-layout,
.sf-checkout-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  align-items: start;
}

.sf-cart-card,
.sf-summary-card,
.sf-form-card {
  padding: 22px;
}

.sf-cart-list,
.sf-summary-list {
  display: grid;
  gap: 14px;
}

.sf-cart-row {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  border: 1px solid var(--sf-line);
  border-radius: 22px;
  background: var(--sf-surface);
  padding: 14px;
}

.sf-cart-row img {
  width: 104px;
  height: 104px;
  object-fit: cover;
  border-radius: 18px;
  background: var(--sf-surface-2);
}

.sf-cart-row-main {
  min-width: 0;
}

.sf-cart-row-title {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.35;
}

.sf-cart-row-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 10px 0 12px;
}

.sf-meta-chip {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--sf-surface-2);
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--sf-text-soft);
}

.sf-cart-row-side {
  display: grid;
  justify-items: end;
  gap: 12px;
}

.sf-remove-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(214, 40, 40, 0.18);
  background: #fff5f5;
  color: var(--sf-danger);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.sf-remove-btn svg {
  width: 15px;
  height: 15px;
  display: block;
}

.sf-remove-btn:hover {
  background: #fee2e2;
  border-color: rgba(214, 40, 40, 0.28);
  transform: translateY(-1px);
}

.sf-remove-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(214, 40, 40, 0.14);
}

.sf-summary-card {
  position: sticky;
  top: 114px;
}

.sf-summary-title {
  font-size: 26px;
  margin: 0 0 16px;
}

.sf-summary-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--sf-line);
}

.sf-summary-row span {
  flex: 0 0 auto;
}

.sf-summary-row strong {
  flex: 0 0 auto;
  text-align: right;
}

.sf-summary-row.total {
  font-size: 18px;
  font-weight: 900;
  color: var(--sf-text);
}

.sf-form-grid {
  display: grid;
  gap: 16px;
}

.sf-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.sf-field label {
  display: block;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.sf-textarea {
  min-height: 110px;
  padding: 14px;
  resize: vertical;
}

.sf-pay-card {
  padding: 16px;
  border-radius: 18px;
  background: var(--sf-green-soft);
  color: var(--sf-text);
  border: 1px solid rgba(47, 158, 68, 0.18);
}

.sf-footer {
  border-top: 1px solid rgba(227, 231, 225, 0.9);
  background: #0f1110;
  color: #fff;
  margin-top: 40px;
}

.sf-footer-inner {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.sf-footer-inner-minimal {
  padding: 18px 0;
}

.sf-footer-brand strong {
  font-size: 18px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sf-footer-copy {
  color: rgba(255,255,255,0.74);
  font-size: 14px;
}

.sf-mobile-filter-toggle {
  display: none;
}

.sf-toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translate(-50%, 16px);
  min-width: min(420px, calc(100vw - 24px));
  background: rgba(17, 17, 17, 0.96);
  color: #fff;
  padding: 14px 18px;
  border-radius: 16px;
  z-index: 120;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s ease;
  text-align: center;
}

.sf-toast.is-open {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ===== Mobile hamburger + search icon: hidden on desktop ===== */
.sf-mobile-menu-btn,
.sf-mobile-search-btn {
  display: none;
}

/* ===== Mobile search bar (collapsed by default) ===== */
.sf-mobile-search-bar {
  display: none;
  border-top: 1px solid var(--sf-line);
  padding: 10px 12px;
  background: var(--sf-surface);
}

.sf-mobile-search-bar.is-open {
  display: block;
}

.sf-mobile-search-bar .sf-search-form {
  display: flex;
  gap: 8px;
  width: 100%;
}

.sf-mobile-search-bar .sf-search-input {
  flex: 1;
  width: 100%;
}

/* ===== Account icon btn: hidden on desktop ===== */
.sf-account-icon-btn {
  display: none;
}

/* ===== Left-side mobile drawer base styles ===== */
.sf-mobile-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 82vw;
  max-width: 320px;
  height: 100%;
  background: #111;
  color: #fff;
  z-index: 300;
  transform: translateX(-105%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.sf-mobile-drawer.is-open {
  transform: translateX(0);
}

.sf-mobile-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 299;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

.sf-drawer-open .sf-mobile-drawer-overlay {
  opacity: 1;
  pointer-events: auto;
}

.sf-mobile-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  flex-shrink: 0;
}

.sf-mobile-drawer-title-bar {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sf-mobile-drawer-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  opacity: 0.75;
  padding: 4px 0;
  text-transform: uppercase;
}

.sf-mobile-drawer-close:hover {
  opacity: 1;
}

.sf-mobile-drawer-body {
  padding: 18px 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
}

.sf-mobile-drawer-hint {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  text-align: center;
  line-height: 1.5;
}

/* Calculator-style size grid: 3 columns */
.sf-mobile-size-calc {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.sf-mobile-size-key {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 54px;
  border-radius: 10px;
  border: 1.5px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06);
  color: #fff;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: background 0.18s, border-color 0.18s;
}

.sf-mobile-size-key:hover,
.sf-mobile-size-key.is-active {
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.6);
}

.sf-mobile-size-key.is-active {
  background: #fff;
  color: #111;
  border-color: #fff;
}

.sf-mobile-drawer-account {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.7);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  padding: 10px 0 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: auto;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.sf-mobile-drawer-account:hover {
  color: #fff;
}

/* Prevent body scroll when drawer open */
.sf-drawer-open {
  overflow: hidden;
}


@media (max-width: 1120px) {
  .sf-products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sf-header-main {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 14px 0;
  }

  .sf-header-actions {
    justify-content: space-between;
  }

  .sf-search-form {
    flex: 1;
  }

  .sf-search-input {
    width: 100%;
  }
}

@media (max-width: 920px) {
  .sf-layout,
  .sf-product-shell,
  .sf-cart-layout,
  .sf-checkout-layout,
  .sf-toolbar {
    grid-template-columns: 1fr;
  }

  .sf-sidebar,
  .sf-summary-card {
    position: static;
  }

  .sf-mobile-filter-toggle {
    display: inline-flex;
  }

  .sf-sidebar {
    display: none;
  }

  .sf-sidebar.is-open {
    display: block;
  }
}

@media (max-width: 720px) {
  /* Sticky banner + header together on mobile */
  #siteHeader {
    position: sticky;
    top: 0;
    z-index: 80;
  }

  .sf-header {
    position: static;
  }

  .sf-container {
    width: min(calc(100% - 20px), var(--sf-container));
  }

  .sf-banner {
    font-size: 11px;
    letter-spacing: 0.08em;
    min-height: 30px;
  }

  /* ===== Mobile header: single compact row ===== */
  .sf-header-main {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    min-height: 56px;
    padding: 8px 0;
  }

  /* Show mobile-only buttons */
  .sf-mobile-menu-btn,
  .sf-mobile-search-btn {
    display: inline-flex;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
  }

  /* Reduce gap between hamburger and search icon ~100% of original */
  .sf-mobile-menu-btn {
    margin-right: -7px;
  }

  /* Brand centered */
  .sf-brand {
    flex: 1;
    text-align: center;
    align-items: center;
  }

  .sf-brand-name {
    font-size: 18px;
    letter-spacing: 0.06em;
  }

  .sf-brand-sub {
    font-size: 9px;
    text-align: center;
  }

  /* Desktop size strip → hidden on mobile (moved to drawer) */
  .sf-header-center {
    display: none;
  }

  /* Desktop actions: hide search form & account text btn; show only icon versions */
  .sf-header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
  }

  .sf-search-form {
    display: none;
  }

  .sf-account-link {
    display: none;
  }

  .sf-account-icon-btn {
    display: inline-flex;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
  }

  .sf-icon-btn.sf-cart-trigger {
    width: 40px;
    height: 40px;
  }

  /* Desktop Filters toggle is no longer needed (drawer handles it) */
  .sf-mobile-filter-toggle {
    display: none;
  }

  .sf-btn {
    min-height: 44px;
  }

  .sf-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .sf-hero h1,
  .sf-product-title {
    line-height: 1.02;
  }

  /* Keep 2-col product grid on mobile */
  .sf-products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .sf-field-grid,
  .sf-detail-grid,
  .sf-popup-actions,
  .sf-actions {
    grid-template-columns: 1fr;
  }

  /* Always show product card actions on mobile */
  .sf-product-actions {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
    align-items: center;
  }

  .sf-product-actions .sf-btn {
    flex: 1;
    min-height: 38px;
    font-size: 12px;
    padding: 0 10px;
    white-space: nowrap;
  }

  .sf-product-actions .sf-icon-btn {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    font-size: 20px;
    font-weight: 700;
    border: 1.5px solid var(--sf-line);
    border-radius: 10px;
  }

  /* Hide second search form in shop toolbar on mobile — header has its own */
  .sf-toolbar .sf-search-input {
    display: none;
  }

  /* Mobile: show active filter chip inline with sort select */
  .sf-toolbar {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px;
  }

  .sf-toolbar .sf-chip-wrap {
    flex: 1;
    min-width: 0;
  }

  .sf-toolbar #sortSelect {
    flex-shrink: 0;
  }

  .sf-cart-row {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .sf-cart-row img {
    width: 82px;
    height: 82px;
  }

  .sf-cart-row-side {
    grid-column: 1 / -1;
    justify-items: start;
  }

  .sf-card-meta,
  .sf-summary-row,
  .sf-cart-pop-row,
  .sf-header-actions {
    align-items: flex-start;
  }

  .sf-cart-pop {
    top: auto;
    bottom: 12px;
    right: 10px;
    left: 10px;
    width: auto;
    border-radius: 22px;
    /* Flex column so footer (Buy Now) is always visible */
    display: flex;
    flex-direction: column;
    max-height: calc(100svh - 110px);
  }

  .sf-cart-pop-head {
    flex-shrink: 0;
  }

  .sf-cart-pop-list {
    flex: 1 1 auto;
    overflow-y: auto;
    max-height: none;
  }

  .sf-cart-pop-foot {
    flex-shrink: 0;
  }
}


.sf-color-btn,
.sf-variant-btn {
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--sf-line);
  background: var(--sf-surface);
  color: var(--sf-text);
  font-weight: 800;
  box-shadow: none;
}

.sf-color-btn.is-active {
  background: var(--sf-brand);
  border-color: var(--sf-brand);
  color: #fff;
  box-shadow: 0 10px 18px rgba(17, 17, 17, 0.12);
}

.sf-product-description {
  color: var(--sf-text-soft);
  line-height: 1.75;
}

.sf-product-description p:first-child,
.sf-footer-about-copy p:first-child,
.sf-static-page-body p:first-child {
  margin-top: 0;
}

.sf-product-description p:last-child,
.sf-footer-about-copy p:last-child,
.sf-static-page-body p:last-child {
  margin-bottom: 0;
}

.sf-footer {
  margin-top: 42px;
  border-top: 1px solid var(--sf-line);
  background: #fff;
}

.sf-footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(220px, 0.8fr) minmax(220px, 0.8fr);
  gap: 24px;
  padding: 28px 0;
  align-items: start;
}

.sf-footer-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sf-footer-heading {
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sf-footer-about-copy,
.sf-static-page-body {
  color: var(--sf-text-soft);
  line-height: 1.8;
}

.sf-footer-link-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.sf-footer-link-list a {
  text-decoration: none;
  color: var(--sf-text-soft);
}

.sf-footer-link-list a:hover {
  color: var(--sf-text);
}

.sf-footer-brand strong {
  font-size: 22px;
}

.sf-footer-brand span,
.sf-footer-copy {
  color: var(--sf-text-soft);
}

.sf-static-page-card {
  padding: 24px;
}

.sf-static-page-head {
  margin-bottom: 18px;
}

@media (max-width: 900px) {
  .sf-footer-inner {
    grid-template-columns: 1fr;
  }
}


.sf-account-link {
  white-space: nowrap;
}

.sf-footer {
  margin-top: 42px;
  border-top: 1px solid rgba(255,255,255,0.08);
  background: #000;
  color: #fff;
}

.sf-footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(220px, 1fr) auto;
  gap: 28px;
  padding: 32px 0;
  align-items: start;
}

.sf-footer-heading,
.sf-footer-copy,
.sf-footer-link-list a,
.sf-footer-link-list span,
.sf-footer-about-copy,
.sf-footer-about-copy * {
  color: #fff;
}

.sf-footer-link-list a {
  opacity: .88;
}

.sf-footer-link-list a:hover {
  opacity: 1;
  color: #fff;
}

.sf-footer-about-copy,
.sf-static-page-body {
  line-height: 1.8;
}

.sf-footer-copyonly {
  align-self: end;
  justify-self: end;
}

.sf-footer-copy {
  font-weight: 700;
  opacity: .95;
}

.sf-static-page-card,
.sf-thankyou-card,
.sf-invoice-card,
.sf-account-card {
  padding: 24px;
}

.sf-thankyou-card,
.sf-invoice-card,
.sf-account-card {
  background: #fff;
  border: 1px solid var(--sf-line);
  border-radius: 28px;
  box-shadow: var(--sf-shadow);
}

.sf-order-success-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(34,197,94,.1);
  color: #15803d;
  border: 1px solid rgba(34,197,94,.2);
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 800;
  margin-bottom: 12px;
}

.sf-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.sf-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.sf-summary-tile {
  border: 1px solid var(--sf-line);
  border-radius: 18px;
  background: var(--sf-surface);
  padding: 16px;
}

.sf-summary-tile span {
  display: block;
  font-size: 12px;
  color: var(--sf-text-soft);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 8px;
}

.sf-summary-tile strong {
  font-size: 22px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sf-invoice-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.sf-invoice-payment {
  margin-left: auto;
  min-width: 180px;
  text-align: left;
}

.sf-invoice-brand {
  font-size: 34px;
  font-weight: 900;
}

.sf-invoice-meta,
.sf-account-help {
  color: var(--sf-text-soft);
}

.sf-invoice-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  table-layout: fixed;
}

/* Invoice item layout */
.sf-invoice-item {
  display: flex;
  gap: 12px;
  align-items: center;
}

.sf-invoice-item-thumb-wrap {
  flex: 0 0 auto;
}

.sf-invoice-item-thumb {
  width: 92px;
  height: 92px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--sf-surface-2);
  border: 1px solid var(--sf-line);
  display: block;
}

.sf-invoice-item-thumb-empty {
  width: 92px;
  height: 92px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--sf-surface-2);
  border: 1px solid var(--sf-line);
  border-radius: 8px;
  color: var(--sf-text-soft);
  font-size: 12px;
  text-align: center;
  padding: 8px;
}

.sf-invoice-item-copy {
  flex: 1 1 auto;
  min-width: 0;
}

.sf-invoice-item-copy strong {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
}

.sf-invoice-item-copy span {
  display: block;
  font-size: 13px;
  color: var(--sf-text-soft);
}

.sf-invoice-table th,
.sf-invoice-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--sf-line);
  text-align: left;
  vertical-align: middle;
}

/* column widths and numeric alignment */
.sf-invoice-table th:nth-child(1), .sf-invoice-table td:nth-child(1) { width: 52%; }
.sf-invoice-table th:nth-child(2), .sf-invoice-table td:nth-child(2) { width: 16%; }
.sf-invoice-table th:nth-child(3), .sf-invoice-table td:nth-child(3) { width: 6%; }
.sf-invoice-table th:nth-child(4), .sf-invoice-table td:nth-child(4) { width: 13%; }
.sf-invoice-table th:nth-child(5), .sf-invoice-table td:nth-child(5) { width: 13%; }

.sf-invoice-table td:nth-child(3),
.sf-invoice-table td:nth-child(4),
.sf-invoice-table td:nth-child(5),
.sf-invoice-table th:nth-child(3),
.sf-invoice-table th:nth-child(4),
.sf-invoice-table th:nth-child(5) {
  text-align: right;
}

/* Footer totals styling */
.sf-invoice-table tfoot td {
  border-top: 1px solid var(--sf-line);
  background: transparent;
}

/* Responsive stack for small screens */
@media (max-width: 700px) {
  .sf-invoice-head { grid-template-columns: 1fr; gap: 12px; }
  .sf-summary-grid { grid-template-columns: 1fr; }

  .sf-invoice-table thead { display: none; }
  .sf-invoice-table, .sf-invoice-table tbody, .sf-invoice-table tr, .sf-invoice-table td {
    display: block;
    width: 100%;
  }

  .sf-invoice-table tr { margin-bottom: 16px; border-bottom: 1px solid var(--sf-line); padding-bottom: 8px; }

  .sf-invoice-table td { padding: 8px 0; text-align: left; }
  .sf-invoice-table td:before {
    content: attr(data-label);
    display: block;
    font-weight: 700;
    color: var(--sf-text-soft);
    margin-bottom: 6px;
  }

  .sf-invoice-item-thumb { width: 72px; height: 72px; }
  .sf-invoice-item-copy strong { font-size: 15px; }
}

@media print {
  .sf-invoice-card { box-shadow: none; border: 0; border-radius: 0; }
  .sf-invoice-item-thumb { width: 84px; height: 84px; }
  .sf-invoice-table thead { display: table-header-group; }
}

.sf-invoice-table tbody tr {
  height: auto;
}

.sf-invoice-table tbody td {
  padding: 16px 10px;
}

.sf-account-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: 18px;
}

.sf-account-tabs {
  display: inline-flex;
  gap: 10px;
  margin-bottom: 18px;
}

.sf-account-tab {
  min-height: 44px;
  border-radius: 999px;
  padding: 0 16px;
  border: 1px solid var(--sf-line);
  background: #fff;
  font-weight: 800;
}

.sf-account-tab.is-active {
  background: #111;
  color: #fff;
  border-color: #111;
}

.sf-order-card {
  border: 1px solid var(--sf-line);
  border-radius: 18px;
  padding: 16px;
  background: var(--sf-surface);
  display: grid;
  gap: 10px;
}

.sf-order-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.sf-auth-form {
  display: grid;
  gap: 14px;
}

@media print {
  #siteHeader,
  #siteFooter,
  .sf-print-hide {
    display: none !important;
  }

  .sf-page-main {
    padding: 0;
  }

  .sf-invoice-card {
    box-shadow: none;
    border: 0;
    border-radius: 0;
  }
}

@media (max-width: 900px) {
  .sf-summary-grid,
  .sf-account-shell,
  .sf-footer-inner {
    grid-template-columns: 1fr;
  }

  .sf-footer-copyonly {
    justify-self: start;
  }
}


/* ===== Storefront UI refinement overrides ===== */
.sf-hero,
.sf-help,
.sf-card-meta {
  display: none !important;
}

.sf-page-main {
  padding-top: 18px;
}

.sf-toolbar {
  align-items: center;
}

#sortSelect,
.sf-toolbar #sortSelect {
  margin-left: 0;
  width: auto;
  min-width: 132px;
  max-width: none !important;
  flex: 0 0 auto;
}

.sf-category-list,
.sf-category-list .sf-filter-chip,
.sf-cart-pop-head {
  text-transform: uppercase;
}

.sf-cart-pop-head {
  align-items: flex-start;
}

.sf-color-btn,
.sf-variant-btn {
  transition: 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.sf-color-btn:not(.is-active),
.sf-variant-btn:not(.is-active) {
  background: var(--sf-surface);
  color: var(--sf-text);
  box-shadow: none;
}

.sf-product-sub {
  margin-bottom: 10px;
}

/* ===== Admin AI drawer / advanced options polish ===== */
.ai-queue-banner-card {
  margin-bottom: 18px !important;
}

.ai-queue-banner {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 16px 22px !important;
}

.ai-queue-banner > div:first-child {
  min-width: 0;
}

.ai-queue-banner-actions,
.ai-queue-summary-row {
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
}

.ai-queue-banner-actions {
  justify-content: flex-end !important;
}

.ai-form-grid-simple {
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr) !important;
  align-items: start !important;
}

.ai-advanced-wrap {
  display: flex !important;
  justify-content: flex-end !important;
  align-items: flex-start !important;
}

.ai-advanced-box {
  width: min(100%, 760px) !important;
  margin-left: auto !important;
  border: 1px solid var(--line) !important;
  border-radius: 18px !important;
  background: #fcfdff !important;
  padding: 16px 18px !important;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04) !important;
}

.ai-advanced-box summary {
  list-style: none !important;
  cursor: pointer !important;
  font-weight: 800 !important;
  color: #1f2937 !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  margin: 0 0 12px 0 !important;
}

.ai-advanced-box summary::-webkit-details-marker {
  display: none;
}

.ai-advanced-grid {
  display: grid !important;
  grid-template-columns: 220px minmax(0, 1fr) !important;
  gap: 16px 18px !important;
  align-items: start !important;
  margin-top: 8px !important;
}

.ai-advanced-grid .field-span-2 {
  grid-column: 2 / 3 !important;
}

.ai-advanced-grid textarea {
  min-height: 112px !important;
}

/* Generic right drawer polish */
.ai-queue-drawer,
.queue-drawer,
.right-drawer,
.admin-right-drawer {
  width: min(620px, 100vw) !important;
  max-width: min(620px, 100vw) !important;
}

.ai-queue-drawer .drawer-header,
.ai-queue-drawer .drawer-body,
.ai-queue-drawer .drawer-footer,
.queue-drawer .drawer-header,
.queue-drawer .drawer-body,
.queue-drawer .drawer-footer,
.right-drawer .drawer-header,
.right-drawer .drawer-body,
.right-drawer .drawer-footer,
.admin-right-drawer .drawer-header,
.admin-right-drawer .drawer-body,
.admin-right-drawer .drawer-footer {
  padding-left: 18px !important;
  padding-right: 18px !important;
}

.ai-queue-drawer .drawer-body,
.queue-drawer .drawer-body,
.right-drawer .drawer-body,
.admin-right-drawer .drawer-body {
  display: grid;
  gap: 14px;
}

.ai-queue-drawer .selection-bar,
.ai-queue-drawer .bulk-actions,
.ai-queue-drawer .queue-toolbar,
.queue-drawer .selection-bar,
.queue-drawer .bulk-actions,
.queue-drawer .queue-toolbar,
.right-drawer .selection-bar,
.right-drawer .bulk-actions,
.right-drawer .queue-toolbar,
.admin-right-drawer .selection-bar,
.admin-right-drawer .bulk-actions,
.admin-right-drawer .queue-toolbar {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto auto !important;
  align-items: center !important;
  gap: 10px !important;
}

.ai-queue-drawer .selection-toggle,
.ai-queue-drawer .select-all-wrap,
.ai-queue-drawer label[for*="select"],
.queue-drawer .selection-toggle,
.queue-drawer .select-all-wrap,
.queue-drawer label[for*="select"],
.right-drawer .selection-toggle,
.right-drawer .select-all-wrap,
.right-drawer label[for*="select"],
.admin-right-drawer .selection-toggle,
.admin-right-drawer .select-all-wrap,
.admin-right-drawer label[for*="select"] {
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  line-height: 1.35 !important;
}

.ai-queue-drawer .queue-item,
.ai-queue-drawer .ai-job-card,
.ai-queue-drawer .drawer-queue-card,
.queue-drawer .queue-item,
.queue-drawer .ai-job-card,
.queue-drawer .drawer-queue-card,
.right-drawer .queue-item,
.right-drawer .ai-job-card,
.right-drawer .drawer-queue-card,
.admin-right-drawer .queue-item,
.admin-right-drawer .ai-job-card,
.admin-right-drawer .drawer-queue-card {
  display: grid !important;
  grid-template-columns: 22px 44px 86px minmax(0, 1fr) 92px !important;
  align-items: center !important;
  gap: 12px !important;
}

.ai-queue-drawer input[type="checkbox"],
.queue-drawer input[type="checkbox"],
.right-drawer input[type="checkbox"],
.admin-right-drawer input[type="checkbox"] {
  width: 18px !important;
  height: 18px !important;
  margin: 0 !important;
  align-self: center !important;
  justify-self: center !important;
}

.ai-queue-drawer .queue-index,
.ai-queue-drawer .serial-chip,
.ai-queue-drawer .helper-chip,
.queue-drawer .queue-index,
.queue-drawer .serial-chip,
.queue-drawer .helper-chip,
.right-drawer .queue-index,
.right-drawer .serial-chip,
.right-drawer .helper-chip,
.admin-right-drawer .queue-index,
.admin-right-drawer .serial-chip,
.admin-right-drawer .helper-chip {
  width: 44px !important;
  min-width: 44px !important;
  height: 34px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  justify-self: center !important;
  padding: 0 !important;
}

.ai-queue-drawer .queue-item img,
.ai-queue-drawer .ai-job-thumb,
.queue-drawer .queue-item img,
.queue-drawer .ai-job-thumb,
.right-drawer .queue-item img,
.right-drawer .ai-job-thumb,
.admin-right-drawer .queue-item img,
.admin-right-drawer .ai-job-thumb {
  width: 86px !important;
  height: 86px !important;
  object-fit: cover !important;
}

.ai-queue-drawer .queue-copy,
.ai-queue-drawer .ai-job-copy,
.queue-drawer .queue-copy,
.queue-drawer .ai-job-copy,
.right-drawer .queue-copy,
.right-drawer .ai-job-copy,
.admin-right-drawer .queue-copy,
.admin-right-drawer .ai-job-copy {
  min-width: 0 !important;
}

.ai-queue-drawer .queue-actions,
.ai-queue-drawer .ai-job-actions,
.queue-drawer .queue-actions,
.queue-drawer .ai-job-actions,
.right-drawer .queue-actions,
.right-drawer .ai-job-actions,
.admin-right-drawer .queue-actions,
.admin-right-drawer .ai-job-actions {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  align-items: stretch !important;
}

.ai-queue-drawer .queue-actions > *,
.ai-queue-drawer .ai-job-actions > *,
.queue-drawer .queue-actions > *,
.queue-drawer .ai-job-actions > *,
.right-drawer .queue-actions > *,
.right-drawer .ai-job-actions > *,
.admin-right-drawer .queue-actions > *,
.admin-right-drawer .ai-job-actions > * {
  width: 100% !important;
}

@media (max-width: 1100px) {
  .ai-queue-banner {
    grid-template-columns: 1fr !important;
  }

  .ai-queue-banner-actions,
  .ai-queue-summary-row {
    justify-content: flex-start !important;
  }

  .ai-form-grid-simple {
    grid-template-columns: 1fr !important;
  }

  .ai-advanced-wrap {
    justify-content: stretch !important;
  }

  .ai-advanced-box {
    width: 100% !important;
  }
}

@media (max-width: 720px) {
  .ai-queue-drawer,
  .queue-drawer,
  .right-drawer,
  .admin-right-drawer {
    width: 100vw !important;
    max-width: 100vw !important;
  }

  .ai-advanced-grid {
    grid-template-columns: 1fr !important;
  }

  .ai-advanced-grid .field-span-2 {
    grid-column: auto !important;
  }

  .ai-queue-drawer .selection-bar,
  .ai-queue-drawer .bulk-actions,
  .ai-queue-drawer .queue-toolbar,
  .queue-drawer .selection-bar,
  .queue-drawer .bulk-actions,
  .queue-drawer .queue-toolbar,
  .right-drawer .selection-bar,
  .right-drawer .bulk-actions,
  .right-drawer .queue-toolbar,
  .admin-right-drawer .selection-bar,
  .admin-right-drawer .bulk-actions,
  .admin-right-drawer .queue-toolbar {
    grid-template-columns: 1fr !important;
  }

  .ai-queue-drawer .queue-item,
  .ai-queue-drawer .ai-job-card,
  .ai-queue-drawer .drawer-queue-card,
  .queue-drawer .queue-item,
  .queue-drawer .ai-job-card,
  .queue-drawer .drawer-queue-card,
  .right-drawer .queue-item,
  .right-drawer .ai-job-card,
  .right-drawer .drawer-queue-card,
  .admin-right-drawer .queue-item,
  .admin-right-drawer .ai-job-card,
  .admin-right-drawer .drawer-queue-card {
    grid-template-columns: 22px 44px 74px minmax(0, 1fr) !important;
  }

  .ai-queue-drawer .queue-actions,
  .ai-queue-drawer .ai-job-actions,
  .queue-drawer .queue-actions,
  .queue-drawer .ai-job-actions,
  .right-drawer .queue-actions,
  .right-drawer .ai-job-actions,
  .admin-right-drawer .queue-actions,
  .admin-right-drawer .ai-job-actions {
    grid-column: 1 / -1;
    flex-direction: row !important;
  }
}

/* Mobile Optimization: 480px and below */
@media (max-width: 480px) {
  html {
    font-size: 14px;
  }

  body {
    font-size: 13px;
  }

  .sf-container {
    width: min(calc(100% - 16px), var(--sf-container));
    padding: 0 8px;
  }

  .sf-header-main {
    min-height: 56px;
    grid-template-columns: auto 1fr auto;
    gap: 8px;
    padding: 8px 12px;
  }

  .sf-brand-name {
    font-size: 16px;
    font-weight: 700;
  }

  .sf-brand-sub {
    font-size: 9px;
  }

  .sf-header-links {
    display: none;
  }

  .sf-search-input {
    min-height: 36px;
    padding: 8px 12px;
    font-size: 13px;
    border-radius: 18px;
  }

  .sf-btn {
    min-height: 40px;
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 6px;
  }

  .sf-btn-primary {
    font-weight: 600;
  }

  .sf-btn-secondary {
    display: none;
  }

  /* Keep key secondary actions visible on mobile */
  .sf-actions .sf-btn-secondary,
  .sf-product-actions .sf-btn-secondary,
  #addToCartBtn.sf-btn-secondary {
    display: inline-flex;
  }

  /* Product page action row on mobile: qty on first row, buttons on second row */
  .sf-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
  }

  .sf-actions .sf-qty-control {
    grid-column: 1 / -1;
    justify-self: start;
    width: auto;
  }

  .sf-actions .sf-btn {
    width: 100%;
  }

  .sf-icon-btn {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }

  .sf-hero {
    gap: 12px;
    padding: 12px 0;
  }

  .sf-hero h1 {
    font-size: clamp(18px, 6vw, 24px);
    line-height: 1.3;
  }

  .sf-hero p {
    font-size: 13px;
    line-height: 1.5;
  }

  .sf-products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .sf-product-card {
    gap: 6px;
    padding: 6px;
    border-radius: 8px;
  }

  .sf-product-img {
    height: 140px;
    border-radius: 6px;
  }

  .sf-product-name {
    font-size: 11px;
    font-weight: 600;
    min-height: 28px;
    line-height: 1.3;
  }

  .sf-price-container {
    gap: 4px;
  }

  .sf-price-now {
    font-size: 14px;
    font-weight: 700;
  }

  .sf-price-old {
    font-size: 12px;
  }

  .sf-cart-pop {
    width: calc(100vw - 12px) !important;
    max-width: 380px;
    max-height: calc(100svh - 90px);
    bottom: 8px;
    right: 6px;
    left: 6px;
    border-radius: 12px;
    padding: 12px;
  }

  .sf-cart-pop-list {
    max-height: none;
    gap: 8px;
  }

  .sf-cart-item {
    gap: 8px;
    padding: 8px;
  }

  .sf-cart-item-img {
    width: 60px;
    height: 60px;
    border-radius: 4px;
  }

  .sf-product-shell {
    gap: 14px;
    grid-template-columns: 1fr;
  }

  .sf-product-shell.has-description {
    grid-template-columns: 1fr;
    grid-template-areas:
      "gallery"
      "info"
      "description";
  }

  /* Reduce product page card and gallery inner gap by ~50% on mobile */
  .sf-gallery-card,
  .sf-info-card {
    padding: 14px;
  }

  .sf-description-card {
    padding: 14px;
    border-radius: 16px;
  }

  .sf-description-pill {
    border-radius: 14px;
    padding: 13px 14px;
  }

  .sf-related-products-section {
    padding: 14px;
  }

  .sf-related-products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .sf-related-product-card,
  .sf-related-see-more {
    border-radius: 12px;
  }

  .sf-related-product-card {
    padding: 10px;
  }

  .sf-related-see-more {
    padding: 15px;
  }

  .sf-main-image {
    border-radius: 12px;
  }

  .sf-thumb-row {
    margin-top: 7px;
    gap: 7px;
  }

  .sf-thumb-btn {
    width: 58px;
    height: 58px;
    border-radius: 10px;
  }

  .sf-product-gallery {
    min-height: 200px;
  }

  .sf-product-title {
    font-size: clamp(16px, 5vw, 22px);
    line-height: 1.3;
  }

  .sf-product-info {
    gap: 12px;
  }

  .sf-color-group,
  .sf-size-group {
    gap: 8px;
  }

  .sf-color-group label,
  .sf-size-group label {
    font-size: 12px;
    font-weight: 600;
  }

  .sf-size-tag {
    min-width: 27px;
    height: 27px;
    padding: 0 8px;
    font-size: 10px;
    border-radius: 12px;
  }

  .sf-color-btn {
    min-width: 62px;
    min-height: 44px;
    height: auto;
    padding: 0 18px;
    font-size: 14px;
    border-radius: 999px;
  }

  .sf-variant-btn {
    min-width: 62px;
    min-height: 44px;
    padding: 0 18px;
    font-size: 14px;
    border-radius: 999px;
  }

  .sf-filter-chip {
    min-height: 32px;
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 4px;
  }

  .sf-quantity-control {
    height: 36px;
    gap: 4px;
  }

  .sf-quantity-btn {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }

  .sf-quantity-input {
    width: 50px;
    text-align: center;
    font-size: 13px;
  }

  .sf-section-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 10px;
  }

  .sf-footer-inner {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px 0;
  }

  .sf-footer-section-title {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 8px;
  }

  .sf-footer-link {
    font-size: 12px;
  }

  .sf-cart-container,
  .sf-checkout-container,
  .sf-account-container {
    padding: 12px;
  }

  .sf-form-group {
    gap: 6px;
    margin-bottom: 10px;
  }

  .sf-form-group label {
    font-size: 12px;
    font-weight: 600;
  }

  .sf-form-input,
  .sf-form-textarea,
  .sf-form-select {
    min-height: 40px;
    padding: 8px 12px;
    font-size: 13px;
    border-radius: 6px;
  }

  .sf-cart-table {
    font-size: 12px;
  }

  .sf-cart-table th,
  .sf-cart-table td {
    padding: 8px 4px;
  }

  .sf-cart-item-qty-cell {
    width: 60px;
  }

  .sf-cart-summary {
    gap: 8px;
  }

  .sf-checkout-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .sf-static-page-card,
  .sf-thankyou-card,
  .sf-invoice-card,
  .sf-account-card {
    padding: 12px;
    border-radius: 12px;
    gap: 12px;
  }

  .sf-order-line {
    gap: 8px;
    padding: 8px;
  }
}

/* Mobile Optimization: 640px and below */
@media (max-width: 640px) {
  .sf-products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sf-checkout-grid {
    grid-template-columns: 1fr;
  }

  .sf-product-detail-grid {
    grid-template-columns: 1fr;
  }
}

/* Mobile Optimization: 768px and below (tablets) */
@media (max-width: 768px) {
  .sf-container {
    width: min(calc(100% - 20px), var(--sf-container));
  }

  .sf-products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .sf-product-card {
    padding: 8px;
  }

  .sf-header-main {
    grid-template-columns: auto 1fr auto;
    gap: 12px;
  }

  .sf-image-badge-text {
    font-size: 8.6px;
    font-weight: 300;
    letter-spacing: 0.02em;
  }
}
