/* ═══════════════════════════════════════════════════════════════
   CUADROS SILS — Wall Builder
   Inter + Playfair Display · Pure B&W
═══════════════════════════════════════════════════════════════ */

:root {
  --sw-white:   #ffffff;
  --sw-black:   #000000;
  --sw-fg:      #0a0a0a;
  --sw-bg:      #f5f5f5;
  --sw-accent:  #f0f0f0;
  --sw-border:  #e5e5e5;
  --sw-muted:   #737373;
  --sw-text:    #0a0a0a;
  --sw-font:    'Inter', 'Helvetica Neue', Arial, sans-serif;
  --sw-serif:   'Playfair Display', Georgia, serif;
  --sw-sidebar: 320px;
  --sw-topbar:  56px;
  --sw-radius:  9999px;
}

/* ── Reset ─────────────────────────────────────────────────── */
html.sw-page body {
  background: var(--sw-white);
  color: var(--sw-text);
  font-family: var(--sw-font);
  -webkit-font-smoothing: antialiased;
}

/* Elementor conflict guard: neutralise global button overrides from theme/Elementor */
html.sw-page #sw-app button,
html.sw-page #sw-art-modal button,
html.sw-page .sw-modal button,
html.sw-page #sw-float-actions button,
html.sw-page #sw-mob-header button {
  border-radius: 0 !important;
  font-family: var(--sw-font) !important;
  box-shadow: none !important;
}
/* Kill WC/Elementor link-buttons and price colours inside the artwork modal body */
html.sw-page #sw-art-modal-body a.button,
html.sw-page #sw-art-modal-body .button,
html.sw-page #sw-art-modal-body .add_to_cart_button {
  display: none !important;
}
html.sw-page #sw-art-modal-body .price,
html.sw-page #sw-art-modal-body .amount,
html.sw-page #sw-art-modal-body .woocommerce-Price-amount {
  color: var(--sw-fg) !important;
  background: transparent !important;
  font-family: var(--sw-font) !important;
}

/* ── App shell ─────────────────────────────────────────────── */
#sw-app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh; /* iOS Safari: address bar dinámica */
  width: 100vw;
  overflow: hidden;
}

/* ════════════════════════════════════════════════════════════
   TOPBAR
════════════════════════════════════════════════════════════ */
#sw-topbar {
  height: var(--sw-topbar);
  display: flex;
  align-items: stretch;
  padding: 0;
  background: var(--sw-white);
  flex-shrink: 0;
  z-index: 10;
}

/* Brand */
#sw-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
  padding: 0 20px;
  margin-right: 0;
}
#sw-logo-img { height: 28px; width: auto; display: block; }
.sw-brand-name {
  font-family: var(--sw-font);
  font-size: 18px;
  font-weight: 700;
  color: var(--sw-fg);
  white-space: nowrap;
  letter-spacing: 0;
}
.sw-brand-sils {
  font-weight: 300;
  letter-spacing: 0.3em;
}

/* Center nav */
#sw-nav {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin: 0 auto;
  border-left: 1px solid var(--sw-border);
  border-right: 1px solid var(--sw-border);
}
#sw-app .sw-nav-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 18px;
  height: 100%;
  background: transparent !important;
  border: none !important;
  border-right: 1px solid var(--sw-border) !important;
  box-shadow: none !important;
  font-family: var(--sw-font);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sw-fg) !important;
  cursor: pointer;
  border-radius: 0;
  transition: background 150ms ease;
  white-space: nowrap;
}
#sw-app #sw-nav .sw-nav-btn:last-child {
  border-right: none !important;
}
#sw-app .sw-nav-btn:hover {
  background: var(--sw-accent) !important;
  color: var(--sw-fg) !important;
}
#sw-app .sw-nav-btn.sw-btn-disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}
#sw-app .sw-nav-btn svg { flex-shrink: 0; color: var(--sw-muted); }

/* Ver carrito */
#sw-app .sw-view-cart-btn {
  display: flex !important;
  align-items: center !important;
  gap: 7px;
  background: transparent !important;
  color: var(--sw-fg) !important;
  border: none !important;
  border-left: 1px solid var(--sw-border) !important;
  box-shadow: none !important;
  outline: none !important;
  padding: 0 18px !important;
  margin: 0 !important;
  align-self: stretch;
  height: 100%;
  border-radius: 0 !important;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 150ms ease;
  font-family: var(--sw-font) !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  text-decoration: none !important;
  white-space: nowrap;
}
#sw-app .sw-view-cart-btn:hover,
#sw-app .sw-view-cart-btn:focus,
#sw-app .sw-view-cart-btn:active {
  background: var(--sw-accent) !important;
  color: var(--sw-fg) !important;
  box-shadow: none !important;
  outline: none !important;
  text-decoration: none !important;
}
#sw-app .sw-view-cart-btn svg { flex-shrink: 0; color: var(--sw-muted); }

/* Contador de items en el botón Ver carrito */
#sw-app .sw-cart-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  background: var(--sw-black);
  color: var(--sw-white);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
}
#sw-app .sw-cart-count:empty { display: none; }

/* Cart button */
#sw-app .sw-cart-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--sw-black) !important;
  color: var(--sw-white) !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  padding: 0 24px;
  align-self: stretch;
  height: 100%;
  border-radius: 0;
  font-family: var(--sw-font);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 150ms ease;
  white-space: nowrap;
  flex-shrink: 0;
}
#sw-app .sw-cart-pill:hover {
  background: #222 !important;
  color: var(--sw-white) !important;
}

/* ════════════════════════════════════════════════════════════
   CONTENT
════════════════════════════════════════════════════════════ */
#sw-content {
  flex: 1;
  display: flex;
  overflow: hidden;
  min-height: 0;
}

/* ════════════════════════════════════════════════════════════
   SIDEBAR
════════════════════════════════════════════════════════════ */
#sw-sidebar {
  width: var(--sw-sidebar);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: var(--sw-white);
  border-right: 1px solid var(--sw-border);
  border-top: 1px solid var(--sw-border);
  position: relative;
  overflow: hidden;
}

/* ── Step progress indicator ──────────────────────────────── */
#sw-progress {
  flex-shrink: 0;
  padding: 0;
  border-bottom: 1px solid var(--sw-border);
}

.sw-step {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 64px;
  padding: 0 1em;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  cursor: not-allowed;
  text-align: left;
  transition: background 150ms ease;
  gap: 12px;
  border-radius: 0;
}

.sw-step__track {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  width: 28px;
}

.sw-step__circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--sw-border);
  background: var(--sw-white);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 150ms ease, border-color 150ms ease;
}
.sw-step__n {
  font-family: var(--sw-font);
  font-size: 12px;
  font-weight: 500;
  color: var(--sw-muted);
  line-height: 1;
}
.sw-step__chk { display: none; }

/* Connector line */
.sw-step__line {
  width: 1px;
  height: 16px;
  background: var(--sw-border);
  margin-top: 3px;
}

/* Step label */
.sw-step__label {
  font-family: var(--sw-font);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sw-muted);
  padding-top: 5px;
  transition: color 150ms ease;
  line-height: 1;
}

/* Active */
.sw-step--active {
  background: var(--sw-black) !important;
  cursor: default;
}
.sw-step--active .sw-step__circle {
  background: var(--sw-white);
  border-color: var(--sw-white);
}
.sw-step--active .sw-step__n     { color: var(--sw-black); }
.sw-step--active .sw-step__label { color: var(--sw-white); }
.sw-step--active .sw-step__line  { background: rgba(255,255,255,0.25); }

/* Completed */
.sw-step--done { cursor: pointer; background: #e8e8e8 !important; }
.sw-step--done:hover { background: #ddd !important; }
.sw-step--done .sw-step__circle {
  background: var(--sw-black);
  border-color: var(--sw-black);
}
.sw-step--done .sw-step__n     { display: none; }
.sw-step--done .sw-step__chk   { display: block; color: var(--sw-white); }
.sw-step--done .sw-step__label { color: var(--sw-fg); }
.sw-step--done .sw-step__label::after {
  content: ' · Cambiar';
  font-size: 10px;
  font-weight: 400;
  opacity: 0.55;
  margin-left: 2px;
}

/* Pending (locked) */
.sw-step--locked:hover { background: var(--sw-accent) !important; }

/* ── Panel header ─────────────────────────────────────────── */
#sw-panel-header {
  display: none;
  flex-shrink: 0;
  padding: 10px 14px;
  border-bottom: 1px solid var(--sw-border);
}
#sw-panel-header.is-visible { display: block; }
#sw-panel-title {
  font-family: var(--sw-font);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sw-fg);
  margin-bottom: 4px;
}
#sw-panel-desc {
  font-family: var(--sw-font);
  font-size: 12px;
  color: var(--sw-muted);
}
#sw-size-display { color: var(--sw-muted); }

/* ── Filters (step 3) ─────────────────────────────────────── */
/* #sw-filters removed — filters now live inside #sw-art-modal-filters */

/* Search input */
.sw-search-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--sw-border);
  border-radius: 0;
  padding: 5px 10px;
  background: var(--sw-white);
  transition: border-color 150ms ease;
}
.sw-search-wrap:focus-within { border-color: var(--sw-black); }
.sw-search-icon { color: var(--sw-muted); flex-shrink: 0; }
#sw-app .sw-search-wrap input[type="text"],
#sw-art-modal-header .sw-search-wrap input[type="text"] {
  flex: 1;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  font-family: var(--sw-font);
  font-size: 12px;
  color: var(--sw-text);
  outline: none;
  min-width: 0;
  padding: 0;
  height: auto;
}
#sw-app .sw-search-wrap input::placeholder,
#sw-art-modal-header .sw-search-wrap input::placeholder { color: var(--sw-muted); }

/* Dropdown */
.sw-select-wrap {
  position: relative;
  border: 1px solid var(--sw-border);
  border-radius: 0;
  background: var(--sw-white);
  display: flex;
  align-items: center;
  transition: border-color 150ms ease;
}
.sw-select-wrap:focus-within { border-color: var(--sw-black); }
#sw-app .sw-select-wrap select,
#sw-art-modal-header .sw-select-wrap select {
  flex: 1;
  padding: 8px 32px 8px 14px;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  font-family: var(--sw-font);
  font-size: 12px;
  color: var(--sw-text);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}
.sw-select-chevron {
  position: absolute;
  right: 10px;
  pointer-events: none;
  color: var(--sw-muted);
}

/* Pagination */
#sw-pg {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
}
#sw-page-info {
  font-family: var(--sw-font);
  font-size: 11px;
  color: var(--sw-muted);
  min-width: 40px;
  text-align: center;
}
#sw-app .sw-pg-btn,
#sw-art-modal-header .sw-pg-btn {
  width: 26px;
  height: 26px;
  background: transparent !important;
  border: 1px solid var(--sw-border) !important;
  box-shadow: none !important;
  color: var(--sw-fg) !important;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}
#sw-app .sw-pg-btn:hover,
#sw-art-modal-header .sw-pg-btn:hover {
  background: var(--sw-black) !important;
  border-color: var(--sw-black) !important;
  color: var(--sw-white) !important;
}

/* ── Wall color cards (integradas en el panel de fondos) ──── */
/* La tarjeta "Elige tu color" es un <label> con input[type=color] */
.sw-wc-picker-card { cursor: pointer; }
#sw-wall-color-picker {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  padding: 0;
  border: none;
}
/* Fondo rueda de colores para la tarjeta del colorpicker */
.sw-wc-picker-card {
  background: conic-gradient(from 0deg, #e05252, #e09852, #d4c84a, #5dcc5d, #4ab8d4, #5252cc, #cc52cc, #e05252) !important;
}

/* ── Panel (scrollable content) ───────────────────────────── */
#sw-panel {
  flex: 1;
  min-height: 0; /* necesario para que overflow-y: auto funcione en flex */
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 0;
}
#sw-panel::-webkit-scrollbar       { width: 3px; }
#sw-panel::-webkit-scrollbar-track { background: transparent; }
#sw-panel::-webkit-scrollbar-thumb { background: var(--sw-border); }

.sw-loading {
  padding: 40px 20px;
  font-family: var(--sw-font);
  font-size: 11px;
  color: var(--sw-muted);
  text-align: center;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* Frame picker migrated to #sw-art-screen-2 inside the artwork modal */
.sw-addon-loading,
.sw-addon-empty {
  font-family: var(--sw-font);
  font-size: 11px;
  color: var(--sw-muted);
  padding: 28px 0;
  text-align: center;
}

/* ── Sidebar intro screen ─────────────────────────────────── */
#sw-intro {
  position: absolute;
  inset: 0;
  z-index: 20; /* must be above -webkit-overflow-scrolling composite layer created by #sw-panel */
  background: var(--sw-white);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px 28px 28px;
  overflow-y: auto;
}

.sw-intro-eyebrow {
  font-family: var(--sw-font);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--sw-muted);
  margin: 0 0 12px;
}

.sw-intro-title {
  font-family: var(--sw-serif);
  font-size: 30px;
  font-weight: 400;
  font-style: normal;
  color: var(--sw-fg);
  margin: 0 0 32px;
  line-height: 1.15;
}
.sw-intro-title em {
  font-style: italic;
}

.sw-intro-steps {
  display: flex;
  flex-direction: column;
  margin-bottom: 32px;
}

.sw-intro-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.sw-intro-connector {
  width: 1px;
  height: 18px;
  background: var(--sw-border);
  margin-left: 14px;
  flex-shrink: 0;
}

.sw-intro-dot {
  width: 29px;
  height: 29px;
  border-radius: 50%;
  border: 1px solid var(--sw-border);
  background: var(--sw-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sw-font);
  font-size: 12px;
  font-weight: 500;
  color: var(--sw-muted);
  flex-shrink: 0;
}

.sw-intro-info { padding-top: 5px; }
.sw-intro-info__title {
  font-family: var(--sw-font);
  font-size: 13px;
  font-weight: 500;
  color: var(--sw-fg);
  line-height: 1.2;
  margin-bottom: 3px;
}
.sw-intro-info__desc {
  font-family: var(--sw-font);
  font-size: 11px;
  color: var(--sw-muted);
  line-height: 1.5;
}

#sw-app #sw-intro-start {
  display: block;
  width: 100%;
  padding: 13px;
  background: var(--sw-black) !important;
  border: none !important;
  box-shadow: none !important;
  color: var(--sw-white) !important;
  font-family: var(--sw-font);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 0;
  transition: background 150ms ease;
}
#sw-app #sw-intro-start:hover {
  background: #222 !important;
}

/* ════════════════════════════════════════════════════════════
   CANVAS
════════════════════════════════════════════════════════════ */
#sw-canvas {
  flex: 1;
  overflow: hidden;
  min-width: 0;
  padding: 0;
  background: var(--sw-bg);
}

#pictureWall {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  border-radius: 0;
}

#zoomElement,
#zoomElement.outer {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}
#sw-bg-layer {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center center;
  transition: filter 220ms ease;
  z-index: 0;
}
#zoomElement > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Canvas step breadcrumb hint */
#sw-canvas-hint {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: none;
  align-items: center;
  gap: 4px;
  background: rgba(0,0,0,0.68);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 8px 16px;
  border-radius: 0;
  white-space: nowrap;
  pointer-events: none;
}
#sw-canvas-hint.is-visible { display: flex; }

.sw-hs { display: flex; align-items: center; gap: 6px; }
.sw-hs-done   { opacity: 0.45; cursor: pointer; pointer-events: auto; }
.sw-hs-done:hover { opacity: 0.7; }
.sw-hs-active { opacity: 1; }
.sw-hs-next   { opacity: 0.28; }

.sw-hs-num {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.35);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sw-font);
  font-size: 9px;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  flex-shrink: 0;
}
.sw-hs-active .sw-hs-num {
  background: rgba(255,255,255,0.92);
  border-color: transparent;
  color: #000;
}
.sw-hs-icon { display: block; color: rgba(255,255,255,0.75); flex-shrink: 0; }
.sw-hs-lbl {
  font-family: var(--sw-font);
  font-size: 10px;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.sw-hs-active .sw-hs-lbl { font-weight: 600; color: #fff; font-size: 11px; }
.sw-hs-sep {
  font-size: 12px;
  color: rgba(255,255,255,0.22);
  padding: 0 3px;
  font-weight: 300;
}

/* Sidebar next-step strip */
#sw-panel-next {
  display: none;
  flex-shrink: 0;
  padding: 0;
  border-top: 1px solid var(--sw-border);
}
#sw-panel-next.is-visible { display: block; }
#sw-app #sw-next-step-btn {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 11px;
  background: var(--sw-black) !important;
  border: none !important;
  box-shadow: none !important;
  color: var(--sw-white) !important;
  font-family: var(--sw-font);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 0;
  transition: background 150ms ease;
  box-sizing: border-box;
}
#sw-app #sw-next-step-btn:hover { background: #222 !important; }

/* Welcome overlay */
#welcome {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.5);
  z-index: 10;
  opacity: 1;
  transition: opacity 600ms ease;
  animation: swFadeIn 600ms ease both;
}
#welcome.sw-fade-out {
  opacity: 0;
  pointer-events: none;
}
@keyframes swFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.startPanel {
  text-align: center;
  max-width: 480px;
  padding: 60px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  background: none !important;
}
.sw-welcome-eyebrow {
  font-family: var(--sw-font);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin: 0;
}
.sw-welcome-title {
  font-family: var(--sw-serif);
  font-style: italic;
  font-size: 48px;
  font-weight: 400;
  color: #ffffff;
  margin: 0;
  line-height: 1.08;
}
.sw-welcome-text {
  font-family: var(--sw-font);
  font-size: 16px;
  font-weight: 400;
  color: rgba(255,255,255,0.7);
  line-height: 1.6;
  margin: 0;
}
#sw-app .sw-welcome-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff !important;
  border: none !important;
  box-shadow: none !important;
  color: var(--sw-black) !important;
  font-family: var(--sw-font);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 10px 28px;
  border-radius: 0;
  cursor: pointer;
  transition: background 150ms ease, opacity 150ms ease;
}
#sw-app .sw-welcome-btn:hover {
  background: #f0f0f0 !important;
  color: var(--sw-black) !important;
}

/* ════════════════════════════════════════════════════════════
   COMPOSITION SLOTS
════════════════════════════════════════════════════════════ */
#draggableContainer,
.articlesContainer {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0; left: 0;
}

.vw_size_items {
  position: absolute;
  cursor: pointer;
  overflow: hidden;
  background: rgba(255,255,255,0.55) !important;
  box-shadow: none;
  display: block; /* flex añadía la altura del texto al padding-bottom, distorsionando proporciones */
  font-family: var(--sw-font);
  font-size: 10px;
  font-weight: 400;
  color: var(--sw-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: background 200ms ease, transform 200ms ease, box-shadow 200ms ease;
  box-sizing: content-box; /* necesario: con border-box + height:auto el padding-bottom se suma al contenido */
  outline: none;
}
/* .inner sale del flujo para que la altura del slot venga solo de padding-bottom */
.vw_size_items .inner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  text-align: center;
}
.vw_size_items:hover {
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.5);
}
.vw_size_selected,
.vw_size_items.vw_size_selected {
  outline: none !important;
  transform: none !important;
  background: #fff !important;
  box-shadow: none !important;
}

/* Spotlight: oscurecer fondo y slots no seleccionados */
#zoomElement:has(.vw_size_selected) #sw-bg-layer {
  filter: brightness(0.5);
}
#zoomElement:has(.vw_size_selected) .vw_size_items:not(.vw_size_selected) {
  filter: brightness(0.5);
}

.chosenArticle {
  position: absolute;
  inset: 0;
  background-size: cover !important;
  background-position: center !important;
  animation: swPlaceIn 300ms ease both;
}
@keyframes swPlaceIn {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}
.chosenArticle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.sw-frame-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  display: block;
}

/* Art controls toolbar (rotate + flip) */
.sw-art-controls {
  position: absolute;
  bottom: 7px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 15;
  display: none;
  align-items: center;
  gap: 1px;
  background: rgba(10,10,10,0.62);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 0;
  padding: 3px;
  white-space: nowrap;
}
.vw_size_items:hover .sw-art-controls,
.vw_size_selected .sw-art-controls { display: flex; }
#sw-app .sw-art-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 150ms ease;
  padding: 0;
  color: rgba(255,255,255,0.75);
  flex-shrink: 0;
}
#sw-app .sw-art-btn:hover {
  background: rgba(255,255,255,0.16) !important;
  color: #fff;
}
#sw-app .sw-art-btn--clear:hover {
  background: rgba(220,38,38,0.75) !important;
  color: #fff;
}
.sw-art-btn svg { display: block; }

/* Overlay "Cambiar" en slots rellenos al hacer hover */
.vw_size_items:has(.chosenArticle):hover::after {
  content: 'Cambiar';
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-family: var(--sw-font);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 8px;
  pointer-events: none;
  z-index: 14;
  white-space: nowrap;
}

/* Artwork image — always absolutely centered so transforms work correctly */
.chosenArticle .sw-art-img {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translate(-50%, -50%);
  transition: transform 280ms ease, width 280ms ease, height 280ms ease;
  animation: none;
}

/* ════════════════════════════════════════════════════════════
   STEP 1 — Backgrounds picker (AJAX response)
════════════════════════════════════════════════════════════ */
.pickerListContainer { min-height: 100%; }
.backgroundList      { margin: 0; padding: 0; list-style: none; height: auto !important; overflow-y: visible !important; }

.listing.backgroundList {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.sw-bg-card {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background: var(--sw-bg);
  aspect-ratio: 4 / 3;
  border: none;
  border-radius: 0;
  margin: 1px;
  transition: opacity 150ms ease;
}
.sw-bg-card > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 300ms ease;
}
.sw-bg-card:hover                  { opacity: 0.85; }
.sw-bg-card:hover > img            { transform: scale(1.05); }
.sw-bg-card.is-selected            { outline: 2px solid var(--sw-black); outline-offset: -2px; }

/* Custom photo upload card */
.sw-bg-upload-card {
  background: var(--sw-white) !important;
  border: 1px dashed var(--sw-border) !important;
  background-size: cover !important;
  background-position: center !important;
}
.sw-bg-upload-card:hover { opacity: 1 !important; border-color: var(--sw-black) !important; }
.sw-upload-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  pointer-events: none;
}
.sw-upload-placeholder svg { color: var(--sw-muted); }
.sw-bg-upload-card:hover .sw-upload-placeholder svg { color: var(--sw-fg); }
.sw-upload-placeholder span {
  font-family: var(--sw-font);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sw-muted);
}
.sw-bg-upload-card:hover .sw-upload-placeholder span { color: var(--sw-fg); }

/* Hide color swatches */
.sw-bg-card .colorList { display: none; }

/* Name label overlay */
.sw-bg-label {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 20px 8px 8px;
  background: linear-gradient(transparent, rgba(0,0,0,0.6));
  font-family: var(--sw-font);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  text-align: left;
  pointer-events: none;
}

/* Checkmark badge */
.sw-bg-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--sw-black);
  display: none;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.sw-bg-badge svg { display: block; }
.sw-bg-card.is-selected .sw-bg-badge { display: flex; }

/* Color swatches row */
.dataList.colorList {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 10px;
  background: var(--sw-white);
  border-bottom: 1px solid var(--sw-border);
}
.colorList .item  { padding: 0 !important; margin: 0 !important; }
.colorList .color {
  width: 16px !important;
  height: 16px !important;
  border-radius: 50% !important;
  cursor: pointer;
  outline: 2px solid transparent;
  outline-offset: 2px;
  transition: transform 150ms ease, outline-color 150ms ease;
  border: 1.5px solid rgba(0,0,0,0.08) !important;
}
.colorList .color:hover     { transform: scale(1.25); outline-color: var(--sw-black); }
.colorList .color .fa-check { display: none !important; }

/* ════════════════════════════════════════════════════════════
   STEP 2 — Composition picker (AJAX response)
════════════════════════════════════════════════════════════ */
.sw-comp-list { padding: 0; }
.sw-comp-section-label {
  padding: 8px 14px 4px;
  font-family: var(--sw-font);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--sw-muted);
}
.sw-comp-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
  border: none;
  border-bottom: 1px solid var(--sw-border);
  border-radius: 0;
  margin: 0;
  transition: background 150ms ease;
  background: var(--sw-white);
}
.sw-comp-item:hover {
  background: var(--sw-accent);
}
.sw-comp-item.is-selected {
  background: var(--sw-black);
}
.sw-comp-item.is-selected .sw-comp-name { color: var(--sw-white); }
.sw-comp-item.is-selected .sw-comp-meta { color: rgba(255,255,255,0.6); }
.sw-comp-item.is-selected .sw-comp-check { color: var(--sw-white); }

.sw-comp-preview {
  width: 80px;
  height: 56px;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 0;
  background: var(--sw-accent);
  position: relative;
}
.sw-comp-preview svg { display: block; width: 100%; height: 100%; }

.sw-comp-info { flex: 1; min-width: 0; }
.sw-comp-name {
  font-family: var(--sw-font);
  font-size: 12px;
  font-weight: 500;
  color: var(--sw-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sw-comp-meta {
  font-family: var(--sw-font);
  font-size: 10px;
  color: var(--sw-muted);
  margin-top: 2px;
}

.sw-comp-check {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  display: none;
  align-items: center;
  justify-content: center;
  color: var(--sw-black);
}
.sw-comp-item.is-selected .sw-comp-check { display: flex; }

/* ════════════════════════════════════════════════════════════
   STEP 3 — Paintings grid (AJAX response)
════════════════════════════════════════════════════════════ */
#sw-app .articleList { padding: 0; }
#sw-app .articleList > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
}
#sw-app .articleList .item,
#sw-app .articleList .item.medium-half,
#sw-app .articleList .item.large-third,
#sw-app .articleList .item.small-full {
  float: none !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid var(--sw-border) !important;
  border-radius: 0;
  overflow: hidden;
  box-sizing: border-box;
  cursor: pointer;
  transition: border-color 150ms ease;
  box-shadow: none !important;
  flex: none !important;
}
#sw-app .articleList .item:hover { border-color: rgba(0,0,0,0.3) !important; }
#sw-app .articleList .item.is-selected {
  border: 1px solid var(--sw-black) !important;
  box-shadow: 0 0 0 1px var(--sw-black) !important;
}
#sw-app .articleList .item .inner { padding: 0; width: 100%; }
#sw-app .articleList .item .image {
  overflow: hidden;
  line-height: 0;
  background: var(--sw-bg);
  width: 100%;
}
#sw-app .articleList .item .image .imgInner { width: 100%; line-height: 0; }
#sw-app .articleList .item .image img {
  width: 100%;
  height: auto;
  display: block;
  cursor: pointer;
  transition: transform 300ms ease;
}
#sw-app .articleList .item .image:hover img { transform: scale(1.05); }
#sw-app .articleList .item .price { padding: 8px; }
#sw-app .articleList .item .price > span {
  display: block;
  font-family: var(--sw-font);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--sw-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sw-empty {
  padding: 36px 20px;
  font-family: var(--sw-font);
  font-size: 12px;
  color: var(--sw-muted);
  text-align: center;
  line-height: 1.7;
}

/* ════════════════════════════════════════════════════════════
   FRAME PICKER
════════════════════════════════════════════════════════════ */
.sw-frame-picker { padding: 0; }
.sw-frame-picker__label {
  font-family: var(--sw-font);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--sw-muted);
  padding: 8px 14px 4px;
  display: block;
}
.sw-frame-picker__options { display: flex; flex-direction: column; gap: 0; }
.sw-frame-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: none;
  border-bottom: 1px solid var(--sw-border);
  border-radius: 0;
  cursor: pointer;
  transition: background 150ms ease;
  background: var(--sw-white);
  position: relative;
}
.sw-frame-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}
.sw-frame-option:hover {
  background: var(--sw-accent);
}
.sw-frame-option:has(input:checked),
.sw-frame-option.is-selected {
  background: var(--sw-black);
}
.sw-frame-option:has(input:checked) .sw-frame-option__name,
.sw-frame-option.is-selected .sw-frame-option__name { color: var(--sw-white); }
.sw-frame-option:has(input:checked) .sw-frame-option__price,
.sw-frame-option.is-selected .sw-frame-option__price { color: rgba(255,255,255,0.6); }
.sw-frame-option__thumb {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--sw-bg);
  border-radius: 0;
}
.sw-frame-option__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.sw-frame-option__info { flex: 1; min-width: 0; }
.sw-frame-option__name {
  display: block;
  font-family: var(--sw-font);
  font-size: 11px;
  font-weight: 500;
  color: var(--sw-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: color 150ms ease;
}
.sw-frame-option__price {
  display: block;
  font-family: var(--sw-font);
  font-size: 10px;
  color: var(--sw-muted);
  margin-top: 2px;
  transition: color 150ms ease;
}
.sw-no-addons { font-family: var(--sw-font); font-size: 11px; color: var(--sw-muted); }

/* ════════════════════════════════════════════════════════════
   MOBILE
════════════════════════════════════════════════════════════ */
@media (max-width: 767px) {
  /* Layout principal */
  #sw-content  { flex-direction: column-reverse; }
  #sw-sidebar  { width: 100%; height: 55vh; border-right: none; border-top: 1px solid var(--sw-border); }
  #sw-canvas   { flex: none; height: 45vh; padding: 0; }

  /* ── Topbar ─────────────────────────────────────────────────
     En móvil el topbar tiene demasiados elementos: logo + 4 botones
     de nav + cart pill + ver carrito. Se reducen paddings y se
     ocultan las etiquetas de texto de cada botón. Los textos de
     nav son nodos de texto directo (no spans), por eso se usa
     font-size:0 en lugar del selector de span que no funciona. */
  #sw-brand { padding: 0 10px; flex-shrink: 1; min-width: 0; }
  #sw-nav { margin: 0; }
  #sw-app .sw-nav-btn {
    font-size: 0 !important; /* oculta texto nodo; SVG tiene dims. explícitas */
    padding: 0 9px;
    gap: 0;
  }
  #sw-btn-view-cart > span:not(.sw-cart-count) { display: none; }
  #sw-app .sw-view-cart-btn { padding: 0 10px !important; }
  #sw-app .sw-cart-pill { padding: 0 12px; font-size: 11px; }

  /* ── Step progress (horizontal) ───────────────────────────── */
  #sw-progress { display: flex; flex-direction: row; padding: 0; }
  .sw-step     { flex-direction: column; align-items: center; padding: 8px 4px; gap: 4px; flex: 1; }
  .sw-step__track { flex-direction: row; width: auto; }
  .sw-step__line  { display: none; }
  .sw-step__label {
    font-size: 9px;
    text-align: center;
    padding-top: 0;
    overflow: hidden;
    white-space: nowrap;
    letter-spacing: 0;
    max-width: 100%;
  }

  /* ── Welcome overlay ──────────────────────────────────────── */
  .sw-welcome-title { font-size: 32px; }
  .startPanel { padding: 28px 20px; gap: 12px; }
  .sw-welcome-text { font-size: 14px; }

  /* ── Intro screen (sidebar) ───────────────────────────────── */
  #sw-intro { padding: 16px 20px; }
  .sw-intro-title { font-size: 22px; margin-bottom: 16px; }
  .sw-intro-steps { margin-bottom: 16px; }
  .sw-intro-connector { height: 10px; }

  /* ── Canvas hint ──────────────────────────────────────────── */
  #sw-canvas-hint { padding: 6px 12px; gap: 3px; }
  .sw-hs-lbl { font-size: 9px; }
  .sw-hs-active .sw-hs-lbl { font-size: 10px; }
  .sw-hs-num { width: 14px; height: 14px; font-size: 8px; }
  .sw-hs-sep { padding: 0 1px; font-size: 10px; }

  /* ── Toast ────────────────────────────────────────────────── */
  #sw-toast {
    max-width: calc(100vw - 32px);
    white-space: normal;
    text-align: left;
  }

  /* ── Modal Mis diseños: una columna ───────────────────────── */
  .sw-modal #sw-designs-grid { grid-template-columns: 1fr; }
}

@media (max-width: 400px) {
  .sw-step__label { display: none; }
  /* En pantallas muy pequeñas el hint ocupa demasiado espacio: ocultarlo */
  #sw-canvas-hint,
  #sw-canvas-hint.is-visible { display: none !important; }
}

/* ════════════════════════════════════════════════════════════
   LANDSCAPE MOBILE
   max-height: 480px → teléfono en horizontal (320–430px alto).
   Los estilos portrait (max-width: 767px) ya aplican para móviles
   pequeños en landscape (steps horizontales, tipografía compacta).
   Solo sobreescribimos el contenedor: sidebar lateral 220px + canvas.
════════════════════════════════════════════════════════════ */
#sw-mob-header { display: none; }
#sw-mob-cart   { display: none; }

@media (max-height: 480px) {

  /* ── Topbar: fuera, el mini-header lo sustituye ─────────── */
  #sw-topbar { display: none; }

  /* ── Content: sidebar izquierda + canvas derecha ─────────── */
  #sw-content {
    flex-direction: row !important;
    height: 100dvh;
    overflow: hidden;
  }

  /* ── Sidebar: columna izquierda 220px, altura completa ───── */
  #sw-sidebar {
    width: 220px !important;
    height: 100dvh !important;
    flex-shrink: 0;
    border-right: 1px solid var(--sw-border);
    border-top: none !important;
    display: flex;
    flex-direction: column;
    position: relative; /* stacking context para #sw-intro position:absolute */
  }

  /* #sw-intro encima del panel — en iOS overflow:scroll crea capa composite
     que puede tapar elementos position:absolute con z-index bajo */
  #sw-intro { z-index: 20; }

  /* ── Panel: flex: 1 + min-height: 0 para que el scroll funcione */
  #sw-panel {
    flex: 1;
    min-height: 0;
    overflow-y: scroll; /* scroll (no auto) — fuerza reconocimiento scroll en iOS */
    -webkit-overflow-scrolling: touch;
  }

  /* ── Canvas: ocupa el resto, altura completa ─────────────── */
  #sw-canvas {
    flex: 1 !important;
    height: 100dvh !important;
    padding: 0;
  }

  /* ── Mini-header: igual que el topbar de desktop */
  #sw-mob-header {
    display: flex;
    align-items: center;
    padding: 0 8px;
    height: 44px;
    flex-shrink: 0;
    background: var(--sw-white);
    border-bottom: 1px solid var(--sw-border);
  }
  #sw-mob-brand {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    padding-right: 8px;
  }
  /* Logo: altura fija vía CSS para anular el height:auto del reset del vendor */
  #sw-mob-brand img {
    height: 16px !important;
    width: auto !important;
    display: block;
  }
  /* Añadir al carrito: versión compacta del pill negro */
  #sw-mob-header .sw-cart-pill {
    margin-left: auto;
    padding: 6px 10px !important;
    font-size: 10px !important;
    flex-shrink: 0;
  }
  /* Ver carrito: estilo normal sobre fondo blanco */
  #sw-mob-header .sw-view-cart-btn {
    display: flex !important;
    align-items: center;
    padding: 0 8px !important;
    height: 44px !important;
    background: transparent !important;
    border: none !important;
    border-left: 1px solid var(--sw-border) !important;
    color: var(--sw-fg) !important;
    cursor: pointer;
    flex-shrink: 0;
  }
  #sw-mob-header .sw-view-cart-btn svg { color: var(--sw-fg) !important; }
  #sw-mob-header .sw-view-cart-btn:hover { background: var(--sw-bg) !important; }

  /* ── Add-to-cart: solo en paso 4 (controlado por JS con clase) */
  #sw-mob-cart.sw-mob-cart-active {
    display: block;
    flex-shrink: 0;
    padding: 6px 10px;
    border-top: 1px solid var(--sw-border);
  }
  #sw-mob-cart .sw-cart-pill {
    width: 100%;
    padding: 9px 6px;
    font-size: 11px;
  }

  /* ── Steps: fuera del sidebar — navegación solo en canvas-hint */
  #sw-progress { display: none !important; }

  /* ── Panel header: fuera — sidebar es exclusivamente contenido */
  #sw-panel-header { display: none !important; }

  /* ── CTA siguiente paso ──────────────────────────────────── */
  #sw-next-step-btn { padding: 12px 8px; font-size: 11px; }

  /* ── Intro sidebar: ajustar para mob-header (40px) ──────── */
  #sw-intro {
    top: 40px;              /* no tapar el mob-header */
    padding: 12px 14px;
    justify-content: flex-start;
  }
  .sw-intro-eyebrow  { margin-bottom: 6px; }
  .sw-intro-title    { font-size: 18px; margin-bottom: 10px; }
  .sw-intro-steps    { margin-bottom: 10px; }
  .sw-intro-connector { height: 6px; }
  .sw-intro-dot      { width: 22px; height: 22px; font-size: 10px; line-height: 22px; }
  .sw-intro-info     { padding-top: 2px; }
  .sw-intro-info__title { font-size: 11px; margin-bottom: 1px; }
  .sw-intro-info__desc  { display: none; }   /* sin espacio para descripciones */
  #sw-app #sw-intro-start { padding: 10px; font-size: 11px; }
}

/* ════════════════════════════════════════════════════════════
   ROTATE OVERLAY
   Se activa en móvil portrait: aspect-ratio < 1 (más alto que ancho)
   y anchura ≤ 767px. En landscape desaparece solo.
════════════════════════════════════════════════════════════ */
#sw-rotate-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: var(--sw-black);
  align-items: center;
  justify-content: center;
}
#sw-rotate-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 40px 32px;
  text-align: center;
}
#sw-rotate-icon {
  width: 72px;
  height: 72px;
  animation: sw-rotate-anim 2s ease-in-out infinite;
}
@keyframes sw-rotate-anim {
  0%, 30%  { transform: rotate(0deg); }
  60%, 90% { transform: rotate(90deg); }
  100%     { transform: rotate(0deg); }
}
#sw-rotate-text {
  font-family: var(--sw-font);
  font-size: 20px;
  font-weight: 600;
  color: var(--sw-white);
  letter-spacing: 0.02em;
  margin: 0;
}
#sw-rotate-sub {
  font-family: var(--sw-font);
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.01em;
  max-width: 260px;
  line-height: 1.5;
}

@media (max-aspect-ratio: 1/1) and (max-width: 767px) {
  #sw-rotate-overlay { display: flex; }
}

/* ════════════════════════════════════════════════════════════
   FLOATING ACTIONS (landscape mobile)
════════════════════════════════════════════════════════════ */
#sw-float-actions {
  display: none;
  position: fixed;
  top: 8px;
  right: 8px;
  z-index: 1;
  background: var(--sw-white);
  border: 1px solid var(--sw-border);
  align-items: center;
}
#sw-float-actions .sw-nav-btn {
  font-size: 0;
  padding: 0 9px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--sw-fg);
  display: flex;
  align-items: center;
}
#sw-float-actions .sw-nav-btn:hover { background: var(--sw-accent); }
#sw-float-actions .sw-btn-disabled { opacity: 0.35; pointer-events: none; }

@media (max-height: 480px) {
  #sw-float-actions { display: flex; }
}

/* ════════════════════════════════════════════════════════════
   ARTWORK MODAL (step 3 — seleccionar cuadro)
════════════════════════════════════════════════════════════ */

/* Smooth open/close: backdrop + box each transition independently.
   visibility delay ensures element stays rendered during exit animation. */
#sw-art-modal {
  position: fixed;
  inset: 0;
  z-index: 9200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  visibility: hidden;
  pointer-events: none;
  transition: visibility 0s linear 320ms;
}
#sw-art-modal.is-open {
  visibility: visible;
  pointer-events: auto;
  transition: visibility 0s linear 0s;
}

/* Overlay: dark backdrop with blur, rendered via ::before so content stays sharp */
#sw-art-modal::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 260ms ease;
}
#sw-art-modal.is-open::before { opacity: 1; }

/* Modal box */
#sw-art-modal-inner {
  position: relative;
  z-index: 1;
  background: var(--sw-white);
  border: 1px solid var(--sw-border);
  border-top: 2px solid var(--sw-black);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28), 0 4px 16px rgba(0, 0, 0, 0.10);
  width: 100%;
  max-width: 960px;
  height: 88vh;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  /* Entrance/exit: translate + scale + opacity */
  transform: translateY(18px) scale(0.980);
  opacity: 0;
  transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1), opacity 260ms ease;
}
#sw-art-modal.is-open #sw-art-modal-inner {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* ── Two-screen sliding layout ──────────────────────────── */
#sw-art-screens {
  display: flex;
  flex-direction: row;
  width: 200%;
  flex: 1 1 0;
  min-height: 0;
  transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
}
#sw-art-screens.sw-on-2 { transform: translateX(-50%); }

.sw-art-screen {
  flex: 0 0 50%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

/* Step dot indicator */
.sw-art-modal-steps {
  display: flex;
  gap: 5px;
  align-items: center;
  flex-shrink: 0;
}
.sw-art-modal-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sw-border);
  transition: background 200ms;
}
.sw-art-modal-dot--on { background: var(--sw-black); }

/* ── Header ─────────────────────────────────────────────── */
#sw-art-modal-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  height: 48px;
  border-bottom: 1px solid var(--sw-border);
  flex-shrink: 0;
  background: var(--sw-white);
}
#sw-art-modal-title {
  font-family: var(--sw-font);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sw-fg);
  flex-shrink: 0;
  white-space: nowrap;
  padding-right: 14px;
  border-right: 1px solid var(--sw-border);
}
#sw-art-modal-header .sw-search-wrap {
  flex: 1;
  min-width: 0;
  height: 32px;
  padding: 0 10px; /* override base 5px 10px so height is exact */
}
#sw-art-modal-header .sw-select-wrap {
  flex: 0 0 148px;
  height: 32px;
}
#sw-art-modal-header .sw-select-wrap select { padding: 0 32px 0 12px; height: 100%; }
#sw-art-modal-header #sw-pg { flex-shrink: 0; }
/* Neutralise any Elementor/WC colour on the select inside the modal header */
#sw-art-modal-header .sw-select-wrap select,
#sw-art-modal-header .sw-select-wrap select:focus {
  color: var(--sw-text) !important;
  background-color: transparent !important;
  border-color: transparent !important;
  outline: none !important;
  box-shadow: none !important;
}

/* Close button */
#sw-art-modal-close {
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  color: var(--sw-muted);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-left: 2px;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}
#sw-art-modal-close:hover {
  background: var(--sw-black);
  border-color: var(--sw-black);
  color: var(--sw-white);
}

/* ── Body (scrollable artwork grid) ─────────────────────── */
/* El AJAX devuelve: #articleScrollerr.listing > div > .item
   El grid aplica al <div> anónimo intermedio, no al .listing */
#sw-art-modal-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px;
  background: var(--sw-bg);
  scrollbar-width: thin;
  scrollbar-color: var(--sw-border) transparent;
}
#sw-art-modal-body::-webkit-scrollbar { width: 4px; }
#sw-art-modal-body::-webkit-scrollbar-track { background: transparent; }
#sw-art-modal-body::-webkit-scrollbar-thumb { background: var(--sw-border); }

#sw-art-modal-body .listing > div {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 6px;
}

/* ── Item cards ─────────────────────────────────────────── */
#sw-art-modal-body .listing > div > .item {
  float: none !important;
  width: auto !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  cursor: pointer;
  overflow: hidden;
  background: var(--sw-white);
  border: 1px solid var(--sw-border) !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}
#sw-art-modal-body .listing > div > .item:hover {
  border-color: var(--sw-black) !important;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.11) !important;
}

#sw-art-modal-body .item .inner {
  padding: 0 !important;
  width: 100%;
  display: flex;
  flex-direction: column;
}
#sw-art-modal-body .item .image {
  overflow: hidden;
  line-height: 0;
  background: var(--sw-bg);
  width: 100%;
}
#sw-art-modal-body .item .image .imgInner { width: 100%; line-height: 0; }
#sw-art-modal-body .item .image img {
  width: 100%;
  height: auto;
  display: block;
  cursor: pointer;
  transition: transform 380ms cubic-bezier(0.22, 1, 0.36, 1);
}
#sw-art-modal-body .item:hover .image img { transform: scale(1.04); }

/* Price bar — full reset to neutralise WC/Elementor typography & colour overrides */
#sw-art-modal-body .item .price {
  padding: 8px 10px !important;
  border-top: 1px solid var(--sw-border) !important;
  background: var(--sw-white) !important;
  flex-shrink: 0;
  line-height: 1 !important;
}
/* Title (first <span>) */
#sw-art-modal-body .item .price > span:first-child {
  display: block !important;
  font-family: var(--sw-font) !important;
  font-size: 10px !important;
  font-weight: 400 !important;
  letter-spacing: 0.01em !important;
  color: var(--sw-muted) !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  text-transform: none !important;
  background: none !important;
  padding: 0 0 4px !important;
  margin: 0 !important;
}
/* WooCommerce price output: <span class="woocommerce-Price-amount amount"><bdi>...</bdi></span> */
#sw-art-modal-body .item .price .woocommerce-Price-amount,
#sw-art-modal-body .item .price .amount,
#sw-art-modal-body .item .price bdi {
  font-family: var(--sw-font) !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  color: var(--sw-fg) !important;
  background: transparent !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  padding: 0 !important;
  margin: 0 !important;
  display: inline !important;
}
#sw-art-modal-body .item .price .woocommerce-Price-currencySymbol {
  font-size: 10px !important;
  font-weight: 400 !important;
  color: var(--sw-muted) !important;
}

/* Step-3 sidebar hint */
.sw-step3-hint {
  padding: 20px 14px;
  font-family: var(--sw-font);
  font-size: 12px;
  color: var(--sw-muted);
  text-align: center;
  line-height: 1.5;
}

@media (max-height: 480px) {
  #sw-art-modal { padding: 0; align-items: stretch; justify-content: flex-start; }
  #sw-art-modal-inner { max-width: 100%; max-height: 100%; height: 100%; border-top-width: 0; box-shadow: none; }
  #sw-art-modal-title { display: none; }
  #sw-art-modal-header { height: 40px; gap: 8px; padding: 0 10px; }
  #sw-art-modal-header .sw-select-wrap { flex: 0 0 120px; }
  #sw-art-modal-body .listing > div { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
}

/* ════════════════════════════════════════════════════════════
   MODAL SCREEN 2 — Selector de marco
════════════════════════════════════════════════════════════ */
#sw-art-s2-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  height: 48px;
  border-bottom: 1px solid var(--sw-border);
  flex-shrink: 0;
  background: var(--sw-white);
}

#sw-art-s2-back {
  background: transparent;
  border: none !important;
  border-right: 1px solid var(--sw-border) !important;
  box-shadow: none !important;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--sw-font);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sw-muted) !important;
  padding: 0 12px 0 0;
  flex-shrink: 0;
  height: 100%;
  transition: color 150ms;
}
#sw-art-s2-back:hover { color: var(--sw-fg) !important; }

#sw-art-s2-preview {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}
#sw-art-s2-preview img {
  width: 32px;
  height: 32px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--sw-bg);
}
.sw-s2-art-title {
  display: block;
  font-family: var(--sw-font);
  font-size: 11px;
  font-weight: 500;
  color: var(--sw-fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sw-s2-art-size {
  display: block;
  font-family: var(--sw-font);
  font-size: 10px;
  color: var(--sw-muted);
  letter-spacing: 0.04em;
}

html.sw-page #sw-art-s2-back,
html.sw-page .sw-art-s2-close-btn {
  border-radius: 0 !important;
  font-family: var(--sw-font) !important;
  box-shadow: none !important;
}
.sw-art-s2-close-btn {
  background: transparent;
  border: 1px solid transparent !important;
  cursor: pointer;
  color: var(--sw-muted) !important;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}
.sw-art-s2-close-btn:hover {
  background: var(--sw-black) !important;
  border-color: var(--sw-black) !important;
  color: var(--sw-white) !important;
}

/* Form wraps the scrollable body so the footer stays anchored */
#sw-addon-form {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

#sw-art-s2-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--sw-border) transparent;
}
#sw-art-s2-body::-webkit-scrollbar { width: 4px; }
#sw-art-s2-body::-webkit-scrollbar-track { background: transparent; }
#sw-art-s2-body::-webkit-scrollbar-thumb { background: var(--sw-border); }

#sw-art-s2-footer {
  flex-shrink: 0;
  border-top: 1px solid var(--sw-border);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

#sw-art-s2-confirm {
  flex: 1;
  background: var(--sw-black) !important;
  color: var(--sw-white) !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0;
  padding: 11px 20px;
  font-family: var(--sw-font);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 150ms;
}
#sw-art-s2-confirm:hover:not(:disabled) { background: #222 !important; }
#sw-art-s2-confirm:disabled { opacity: 0.35; cursor: not-allowed; }

#sw-addon-frame-error {
  font-family: var(--sw-font);
  font-size: 11px;
  font-weight: 500;
  color: #c00;
  margin: 0;
  flex-shrink: 0;
}

/* ════════════════════════════════════════════════════════════
   STEP 3 SIDEBAR — Resumen de slots
════════════════════════════════════════════════════════════ */
.sw-s3-panel { padding: 6px 0; }

.sw-s3-slot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  border-left: 2px solid transparent;
  transition: background 140ms, border-color 140ms;
  border-bottom: 1px solid var(--sw-border);
}
.sw-s3-slot:last-child { border-bottom: none; }
.sw-s3-slot:hover { background: var(--sw-accent); }
.sw-s3-slot--active {
  border-left-color: var(--sw-black);
  background: var(--sw-accent);
}

.sw-s3-thumb {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  background: var(--sw-bg);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sw-s3-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sw-s3-thumb--empty {
  border: 1px dashed var(--sw-border);
  color: var(--sw-muted);
}

.sw-s3-info { flex: 1; min-width: 0; }
.sw-s3-title {
  display: block;
  font-family: var(--sw-font);
  font-size: 11px;
  font-weight: 500;
  color: var(--sw-fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
  text-transform: none !important;
}
.sw-s3-title--empty { color: var(--sw-muted); font-weight: 400; }
.sw-s3-meta {
  display: block;
  font-family: var(--sw-font);
  font-size: 10px;
  color: var(--sw-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.02em;
}
.sw-s3-price {
  font-family: var(--sw-font);
  font-size: 11px;
  font-weight: 600;
  color: var(--sw-fg);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ════════════════════════════════════════════════════════════
   BACKGROUND UPLOAD ACTION SHEET
════════════════════════════════════════════════════════════ */
#sw-bg-upload-sheet {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9600;
  align-items: flex-end;
  justify-content: center;
}
#sw-bg-upload-sheet.is-open { display: flex; }

#sw-bg-upload-sheet-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
}

#sw-bg-upload-sheet-box {
  position: relative;
  background: var(--sw-white);
  width: 100%;
  max-width: 420px;
  border: 1px solid var(--sw-border);
  border-top: 2px solid var(--sw-black);
  border-bottom: none;
  margin: 0 16px;
  overflow: hidden;
}
.sw-bg-sheet-btn,
#sw-bg-sheet-cancel {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 15px 20px;
  background: none;
  border: none;
  border-bottom: 1px solid var(--sw-border);
  font-family: var(--sw-font);
  font-size: 13px;
  font-weight: 500;
  color: var(--sw-fg);
  cursor: pointer;
  text-align: left;
  transition: background 150ms ease;
  box-sizing: border-box;
}
.sw-bg-sheet-btn:hover,
#sw-bg-sheet-cancel:hover { background: var(--sw-bg); }
#sw-bg-sheet-cancel {
  color: var(--sw-muted);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  justify-content: center;
  border-bottom: none;
}

/* ════════════════════════════════════════════════════════════
   MODALS (Guardar / Compartir / Error)
════════════════════════════════════════════════════════════ */
.sw-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9500;
  align-items: center;
  justify-content: center;
}
.sw-modal.is-open { display: flex; }

.sw-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.45);
  cursor: pointer;
}

.sw-modal-box {
  position: relative;
  background: var(--sw-white);
  border: 1px solid var(--sw-border);
  border-radius: 0;
  padding: 32px;
  width: 100%;
  max-width: 400px;
  margin: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sw-modal-box--cart {
  align-items: center;
  text-align: center;
  gap: 18px;
}

@keyframes sw-spin {
  to { transform: rotate(360deg); }
}
.sw-cart-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--sw-border);
  border-top-color: var(--sw-black);
  border-radius: 50%;
  animation: sw-spin 0.75s linear infinite;
}

.sw-modal .sw-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  cursor: pointer;
  padding: 4px;
  color: var(--sw-muted) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.sw-modal .sw-modal-close:hover { color: var(--sw-fg) !important; }

.sw-modal .sw-modal-title {
  font-family: var(--sw-font);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
  margin: 0;
  color: var(--sw-fg) !important;
}

.sw-modal .sw-modal-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--sw-muted);
}

.sw-modal .sw-modal-input {
  width: 100%;
  border: 1px solid var(--sw-border) !important;
  border-radius: 0;
  padding: 9px 12px;
  font-family: var(--sw-font);
  font-size: 13px;
  color: var(--sw-fg) !important;
  background: var(--sw-white) !important;
  box-sizing: border-box;
  outline: none !important;
  box-shadow: none !important;
  transition: border-color 150ms;
}
.sw-modal .sw-modal-input:focus {
  border-color: var(--sw-fg) !important;
  box-shadow: none !important;
  outline: none !important;
}
.sw-modal .sw-modal-input[readonly] { color: var(--sw-muted) !important; cursor: default; }

.sw-modal .sw-modal-btn-primary {
  background: var(--sw-fg) !important;
  color: var(--sw-white) !important;
  border: none !important;
  border-radius: 0;
  padding: 10px 20px;
  font-family: var(--sw-font);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 150ms;
  box-shadow: none !important;
}
.sw-modal .sw-modal-btn-primary:hover {
  background: #222 !important;
  color: var(--sw-white) !important;
}

.sw-modal .sw-modal-btn-secondary {
  background: none !important;
  color: var(--sw-fg) !important;
  border: 1px solid var(--sw-border) !important;
  border-radius: 0;
  padding: 9px 16px;
  font-family: var(--sw-font);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 150ms, background 150ms;
  box-shadow: none !important;
}
.sw-modal .sw-modal-btn-secondary:hover {
  background: var(--sw-accent) !important;
  border-color: var(--sw-fg) !important;
  color: var(--sw-fg) !important;
}

.sw-modal .sw-modal-msg {
  font-size: 13px;
  color: var(--sw-muted);
  margin: 0;
  line-height: 1.55;
}

.sw-modal .sw-modal-login-actions {
  display: flex;
  gap: 10px;
}
.sw-modal .sw-modal-login-actions .sw-modal-btn-primary,
.sw-modal .sw-modal-login-actions .sw-modal-btn-secondary {
  flex: 1;
  text-align: center !important;
  text-decoration: none !important;
  display: block;
  box-sizing: border-box;
}

/* Panel Mis diseños */
.sw-modal .sw-modal-box--designs {
  max-width: 660px;
  max-height: 80vh;
  overflow-y: auto;
}
.sw-modal #sw-designs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.sw-modal .sw-designs-loading {
  display: flex;
  justify-content: center;
  padding: 36px 0;
  grid-column: 1 / -1;
}
.sw-modal .sw-designs-empty {
  font-size: 13px;
  color: var(--sw-muted);
  text-align: center;
  padding: 36px 0;
  margin: 0;
  grid-column: 1 / -1;
}
.sw-modal .sw-design-card {
  border: 1px solid var(--sw-border);
  border-radius: 0;
  overflow: hidden;
}
.sw-modal .sw-design-thumb {
  display: block;
  line-height: 0;
}
.sw-modal .sw-design-thumb img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: opacity 150ms;
}
.sw-modal .sw-design-thumb:hover img { opacity: 0.88; }
.sw-modal .sw-design-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-top: 1px solid var(--sw-border);
}
.sw-modal .sw-design-name {
  font-family: var(--sw-font);
  font-size: 12px;
  font-weight: 500;
  color: var(--sw-fg) !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sw-modal .sw-design-delete {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  cursor: pointer;
  padding: 4px;
  color: var(--sw-muted) !important;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  transition: color 150ms;
}
.sw-modal .sw-design-delete:hover { color: #ef4444 !important; }

/* Toast de estado (guardar éxito / error) */
#sw-toast {
  position: fixed;
  top: 72px;
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  background: var(--sw-white);
  color: var(--sw-fg);
  border: 1px solid #e8e8e8;
  box-shadow: 0 6px 24px rgba(0,0,0,.14);
  font-family: var(--sw-font);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .02em;
  padding: 13px 22px;
  border-radius: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 250ms, transform 250ms;
  z-index: 9999;
  white-space: nowrap;
}
#sw-toast-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  line-height: 1;
}
#sw-toast.sw-toast--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Share icons */
.sw-modal .sw-share-btns {
  display: flex;
  gap: 10px;
}
.sw-modal .sw-share-icon {
  width: 40px;
  height: 40px;
  border: 1px solid var(--sw-border) !important;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--sw-fg) !important;
  background: none !important;
  transition: background 150ms, border-color 150ms;
}
.sw-modal .sw-share-icon:hover {
  background: var(--sw-accent) !important;
  border-color: var(--sw-fg) !important;
  color: var(--sw-fg) !important;
}
.sw-modal .sw-share-icon a {
  color: inherit !important;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none !important;
}

/* Share image preview */
.sw-modal .shareImage {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  border: 1px solid var(--sw-border);
  border-radius: 0;
  background: var(--sw-bg);
}
.sw-modal .shareImage img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Share link row */
.sw-modal .sw-share-link-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* ── Bundle: "Composición personalizada" — mismos estilos que WC Bundles ── */
.sw-bundle-parent .product-name { font-weight: 600; }
.sw-bundle-parent .product-quantity,
.sw-bundle-child .product-quantity { display: none !important; }
.sw-bundle-child { padding: .5em 1em .5em 2em !important; }
#cfw-side-cart .cfw-cart-table .cart-item-row.sw-bundle-child .cfw-cart-item-image,
#cfw-side-cart .cfw-cart-table .cart-item-row.sw-bundle-child .cfw-cart-item-image img { width: 2em !important; height: auto !important; }
.sw-bundle-parent .cfw-cart-item-quantity-bubble,
.sw-bundle-child .cfw-cart-item-quantity-bubble,
.bundle_cart_item .cfw-cart-item-quantity-bubble,
.bundled_item_cart_item .cfw-cart-item-quantity-bubble { display: none !important; }
.sw-bundle-child td { padding-top: 3px !important; padding-bottom: 3px !important; }

.sw-bundle-child .product-name { font-size: .875em; }
.sw-bundle-child .product-subtotal { font-size: .875em; color: #888; }
/* "1×" en la columna del nombre — igual que WC Bundles */
.sw-bundled-qty {
  display: inline;
  margin-right: 3px;
  font-size: .8em;
  font-weight: 600;
  color: #555;
  letter-spacing: .02em;
}

/* ── Step 4: panel añadir al carrito ──────────────────────── */
.sw-step4-summary {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* CTA: selector largo + colores literales + sin all:unset para máxima compatibilidad */
html.sw-page #sw-sidebar .sw-step4-cta,
html.sw-page #sw-sidebar button.sw-step4-cta,
html.sw-page #sw-sidebar .custom_add_to_cart.sw-step4-cta {
  -webkit-appearance: none !important;
  appearance: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  padding: 16px 20px !important;
  background: #000000 !important;
  background-color: #000000 !important;
  background-image: none !important;
  color: #ffffff !important;
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  letter-spacing: .1em !important;
  text-transform: uppercase !important;
  text-decoration: none !important;
  cursor: pointer !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  line-height: 1.2 !important;
  min-height: 50px !important;
  opacity: 1 !important;
  transition: opacity 160ms ease !important;
}
html.sw-page #sw-sidebar .sw-step4-cta:hover,
html.sw-page #sw-sidebar button.sw-step4-cta:hover,
html.sw-page #sw-sidebar .custom_add_to_cart.sw-step4-cta:hover {
  background: #000000 !important;
  background-color: #000000 !important;
  color: #ffffff !important;
  opacity: .82 !important;
}

/* Resumen de composición */
.sw-s4-comp {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--sw-border);
}
.sw-s4-comp__label {
  font-family: var(--sw-font);
  font-size: 13px;
  font-weight: 600;
  color: var(--sw-fg);
}
.sw-s4-items {
  display: flex;
  flex-direction: column;
  margin: 0 -16px;
  border-top: 1px solid var(--sw-border);
  border-bottom: 1px solid var(--sw-border);
}
.sw-s4-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--sw-border);
}
.sw-s4-item:last-child { border-bottom: none; }
.sw-s4-item__thumb {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: var(--sw-bg);
  overflow: hidden;
}
.sw-s4-item__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.sw-s4-item__thumb--empty {
  border: 1px dashed var(--sw-border);
}
.sw-s4-item__info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
}
.sw-s4-item__name {
  font-family: var(--sw-font);
  font-size: 12px;
  font-weight: 500;
  color: var(--sw-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sw-s4-item--empty .sw-s4-item__name {
  color: var(--sw-muted);
  font-style: italic;
}
.sw-s4-item__meta {
  font-family: var(--sw-font);
  font-size: 11px;
  color: var(--sw-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sw-s4-item__price {
  font-family: var(--sw-font);
  font-size: 12px;
  font-weight: 500;
  color: var(--sw-text);
  white-space: nowrap;
  flex-shrink: 0;
}
.sw-s4-status {
  font-family: var(--sw-font);
  font-size: 12px;
  margin: 0;
  padding: 2px 0;
  line-height: 1.5;
}
.sw-s4-status--warn { color: #b45309; }
.sw-s4-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--sw-font);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sw-muted);
  padding: 4px 0 8px;
  border-bottom: 1px solid var(--sw-border);
}
.sw-s4-total strong {
  color: var(--sw-text);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0;
  text-transform: none;
}

/* ── Pack: miniatura de composición en carrito ─────────────────── */
.sw-comp-cart-thumb {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}
.sw-comp-name-link {
  display: inline-block;
  margin-top: 4px;
  font-size: .75em;
  color: var(--sw-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.sw-comp-name-link:hover { color: var(--sw-text); }
/* CFW side cart: thumbnail debajo de los datos */
.sw-comp-cfw-thumb { display: block; margin-top: 8px; }
.sw-comp-cfw-thumb img { width: 100%; height: auto; display: block; }
