
/* SG Marketplace 1.0.1 - Visual integration with SocialGamers HUB */
.sgm-wrap{
  --sgm-blue:#2563eb;
  --sgm-indigo:#4f6df5;
  --sgm-text:#0f172a;
  --sgm-muted:#64748b;
  --sgm-border:#e2e8f0;
  --sgm-soft-border:#dbe7fb;
  --sgm-bg:#ffffff;
  --sgm-soft:#f8fafc;
  --sgm-blue-soft:#eff6ff;
  --sgm-indigo-soft:#eef2ff;
  --sgm-hover-border:#9fc5ff;
  --sgm-shadow:0 14px 32px rgba(15,23,42,.05);
  --sgm-hover-shadow:0 16px 34px rgba(15,23,42,.075);
  max-width:1240px;
  margin:0 auto;
  padding:24px;
  color:var(--sgm-text);
}
.sgm-wrap *{box-sizing:border-box}
.sgm-hero,.sgm-shop-head{
  display:flex;align-items:center;justify-content:space-between;gap:22px;
  padding:22px;border:1px solid var(--sgm-soft-border);border-radius:22px;
  background:linear-gradient(135deg,#fff,#f8fbff);box-shadow:var(--sgm-shadow);margin-bottom:20px;
}
.sgm-hero h2,.sgm-shop-head h2{margin:3px 0 6px;font-size:30px;font-weight:900;letter-spacing:-.025em;color:var(--sgm-text)}
.sgm-hero p,.sgm-shop-head p{margin:0;color:var(--sgm-muted);line-height:1.45}
.sgm-hero span,.sgm-shop-head span{display:inline-flex;width:max-content;font-size:11px;font-weight:900;text-transform:uppercase;letter-spacing:.06em;color:#4f46e5;background:var(--sgm-indigo-soft);border-radius:999px;padding:4px 9px}
.sgm-btn,.sgm-filters button{
  display:inline-flex;align-items:center;justify-content:center;gap:7px;border:1px solid var(--sgm-blue);border-radius:12px;
  padding:10px 15px;background:var(--sgm-blue);color:#fff!important;text-decoration:none!important;font-weight:900;cursor:pointer;
  transition:box-shadow .16s ease,transform .16s ease,background .16s ease,border-color .16s ease;
}
.sgm-btn:hover,.sgm-filters button:hover,.sgm-btn:focus-visible,.sgm-filters button:focus-visible{background:#1d4ed8;border-color:#1d4ed8;box-shadow:0 10px 22px rgba(37,99,235,.18);transform:translateY(-1px)}
.sgm-btn.alt{background:#eef2ff;color:#4338ca!important;border-color:#c7d2fe}
.sgm-btn.alt:hover{background:#e0e7ff;border-color:#a5b4fc}
.sgm-btn.ghost{background:#fff;color:var(--sgm-text)!important;border-color:var(--sgm-border)}
.sgm-btn.ghost:hover{background:#f8fafc;border-color:var(--sgm-hover-border)}
.sgm-filters{display:grid;grid-template-columns:2fr 1fr 1fr auto;gap:10px;margin-bottom:20px;padding:14px;border:1px solid var(--sgm-border);border-radius:18px;background:#fff;box-shadow:0 10px 26px rgba(15,23,42,.035)}
.sgm-filters input,.sgm-filters select,.sgm-panel input,.sgm-panel textarea,.sgm-panel select,.sgm-own-item select{
  width:100%;box-sizing:border-box;border:1px solid #dbe5f5;background:#fff;color:var(--sgm-text);border-radius:12px;padding:11px 12px;outline:none;
  transition:border-color .16s ease,box-shadow .16s ease,background .16s ease;
}
.sgm-filters input:focus,.sgm-filters select:focus,.sgm-panel input:focus,.sgm-panel textarea:focus,.sgm-panel select:focus,.sgm-own-item select:focus{border-color:#93c5fd;box-shadow:0 0 0 3px rgba(37,99,235,.10);background:#fff}
.sgm-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
.sgm-card{overflow:hidden;border:1px solid var(--sgm-border);border-radius:18px;background:#fff;box-shadow:0 8px 22px rgba(15,23,42,.035);transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease}
.sgm-card:hover{border-color:var(--sgm-hover-border);box-shadow:var(--sgm-hover-shadow);transform:translateY(-4px)}
.sgm-card-img{display:flex;aspect-ratio:4/3;background:linear-gradient(135deg,#f8fafc,#eef2ff);align-items:center;justify-content:center;overflow:hidden;border-bottom:1px solid #eef2f7}
.sgm-card-img img{width:100%;height:100%;object-fit:cover;transition:transform .25s ease}.sgm-card:hover .sgm-card-img img{transform:scale(1.025)}
.sgm-card-img span{font-size:46px;opacity:.7}
.sgm-card-body{display:flex;flex-direction:column;gap:7px;padding:15px}
.sgm-card-body h3{font-size:17px;font-weight:900;line-height:1.25;margin:0;color:var(--sgm-text)}
.sgm-card-body a{color:inherit;text-decoration:none!important}
.sgm-price{font-size:20px;font-weight:950;color:#111827;letter-spacing:-.02em}.sgm-price.big{font-size:32px}
.sgm-badges{display:flex;gap:6px;flex-wrap:wrap}.sgm-badges span{font-size:11px;font-weight:800;padding:4px 8px;border-radius:999px;background:var(--sgm-indigo-soft);color:#4338ca;border:1px solid #e0e7ff}
.sgm-shop-head img,.sgm-seller img{width:72px;height:72px;object-fit:cover;border-radius:50%;border:3px solid #fff;box-shadow:0 8px 20px rgba(15,23,42,.13)}
.sgm-shop-head{justify-content:flex-start}.sgm-shop-head>div:last-child{min-width:0}
.sgm-product{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(340px,.85fr);gap:26px}
.sgm-gallery{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}
.sgm-gallery img,.sgm-noimg{width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:16px;background:linear-gradient(135deg,#f8fafc,#eef2ff);border:1px solid var(--sgm-border)}
.sgm-noimg{display:flex;align-items:center;justify-content:center;font-size:72px;color:#94a3b8}
.sgm-product-info{padding:22px;border:1px solid var(--sgm-soft-border);border-radius:20px;background:linear-gradient(180deg,#fff,#fbfdff);box-shadow:var(--sgm-shadow)}
.sgm-product-info h1{margin:10px 0;color:var(--sgm-text);font-weight:950;letter-spacing:-.025em;line-height:1.15}
.sgm-product-info p{color:#475569;line-height:1.55}
.sgm-seller{display:flex;gap:12px;align-items:center;padding:15px 0 4px;border-top:1px solid var(--sgm-border);margin-top:16px}.sgm-seller div{display:flex;flex-direction:column;gap:2px}.sgm-seller strong{color:var(--sgm-text)}.sgm-seller small{color:var(--sgm-muted)}
.sgm-contact{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}.sgm-back{display:inline-flex;align-items:center;gap:6px;margin-bottom:14px;color:var(--sgm-blue)!important;text-decoration:none!important;font-weight:800}
.sgm-panels{display:grid;grid-template-columns:1fr 1fr;gap:18px}
.sgm-panel{padding:20px;border:1px solid var(--sgm-soft-border);border-radius:20px;background:linear-gradient(180deg,#fff,#fbfdff);box-shadow:var(--sgm-shadow);margin-bottom:18px}
.sgm-panel h3{margin-top:0;margin-bottom:14px;color:var(--sgm-text);font-size:19px;font-weight:900}.sgm-panel label{display:flex;flex-direction:column;gap:6px;margin:10px 0;color:#334155;font-size:13px;font-weight:800}.sgm-panel textarea{min-height:100px;resize:vertical}
.sgm-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}.sgm-checks{display:flex;gap:12px;flex-wrap:wrap;padding:8px 0}.sgm-checks label{flex-direction:row;align-items:center;margin:0;font-weight:700}.sgm-checks input{width:auto;accent-color:var(--sgm-blue)}
.sgm-msg{margin-top:10px;padding:10px 12px;border-radius:12px;background:#f8fafc;color:#475569;font-weight:700}.sgm-msg.ok{background:#ecfdf5;color:#047857;border:1px solid #a7f3d0}
.sgm-own-list{display:flex;flex-direction:column;gap:8px}.sgm-own-item{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px;border:1px solid var(--sgm-border);border-radius:14px;background:#fff;transition:border-color .16s ease,box-shadow .16s ease}.sgm-own-item:hover{border-color:#bfdbfe;box-shadow:0 8px 18px rgba(15,23,42,.04)}
.sgm-own-item>div{display:flex;gap:8px;align-items:center}.sgm-own-item>div:first-child{flex-direction:column;align-items:flex-start}.sgm-mini{border:1px solid #dbe5f5;border-radius:10px;padding:8px 10px;background:#f8fafc;color:#334155!important;text-decoration:none!important;font-weight:800;cursor:pointer}.sgm-mini:hover{background:#eff6ff;border-color:#bfdbfe;color:#1d4ed8!important}.sgm-mini.danger{background:#fef2f2;color:#b91c1c!important;border-color:#fecaca}.sgm-mini.danger:hover{background:#fee2e2;border-color:#fca5a5}
.sgm-empty{grid-column:1/-1;padding:30px;border:1px dashed #cbd5e1;border-radius:16px;text-align:center;color:var(--sgm-muted);background:#f8fafc}
@media(max-width:900px){.sgm-grid{grid-template-columns:repeat(2,1fr)}.sgm-product,.sgm-panels{grid-template-columns:1fr}.sgm-filters{grid-template-columns:1fr 1fr}.sgm-filters input{grid-column:1/-1}}
@media(max-width:560px){.sgm-wrap{padding:14px}.sgm-grid,.sgm-filters,.sgm-row{grid-template-columns:1fr}.sgm-hero{align-items:flex-start;flex-direction:column}.sgm-hero .sgm-btn{width:100%}.sgm-gallery{grid-template-columns:1fr}.sgm-own-item{align-items:flex-start;flex-direction:column}.sgm-own-item>div:last-child{flex-wrap:wrap}.sgm-shop-head{align-items:flex-start}.sgm-shop-head img{width:60px;height:60px}.sgm-product-info{padding:17px}.sgm-panel{padding:16px}}

/* SG Marketplace 1.0.2 - Edición de productos */
.sgm-form-title,.sgm-form-actions{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.sgm-form-title h3{margin-bottom:14px}
.sgm-current-images{margin:14px 0;padding:13px;border:1px solid var(--sgm-border);border-radius:14px;background:#f8fafc}
.sgm-current-images>strong{display:block;margin-bottom:10px;color:var(--sgm-text)}
.sgm-edit-gallery{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin-bottom:8px}
.sgm-edit-image{position:relative;overflow:hidden;border:1px solid var(--sgm-border);border-radius:12px;background:#fff;aspect-ratio:1/1}
.sgm-edit-image img{width:100%;height:100%;object-fit:cover;display:block}
.sgm-edit-image button{position:absolute;top:6px;right:6px;width:28px;height:28px;border:0;border-radius:999px;background:rgba(15,23,42,.82);color:#fff;font-size:20px;line-height:1;cursor:pointer;box-shadow:0 3px 10px rgba(15,23,42,.2)}
.sgm-edit-image button:hover{background:#dc2626}
@media(max-width:560px){.sgm-edit-gallery{grid-template-columns:repeat(3,minmax(0,1fr))}.sgm-form-actions .sgm-btn{flex:1}}


/* v1.0.3 - Galería ampliable */
.sgm-gallery-item{display:block;border:0;padding:0;background:transparent;cursor:zoom-in;border-radius:16px;overflow:hidden}
.sgm-gallery-item img{display:block;width:100%;height:100%;object-fit:cover}
.sgm-lightbox{position:fixed;inset:0;z-index:999999;display:none;align-items:center;justify-content:center;padding:24px;background:rgba(15,23,42,.88);backdrop-filter:blur(4px)}
.sgm-lightbox.is-open{display:flex}
.sgm-lightbox img{display:block;max-width:min(94vw,1400px);max-height:90vh;width:auto;height:auto;object-fit:contain;border-radius:14px;box-shadow:0 24px 70px rgba(0,0,0,.35)}
.sgm-lightbox-close{position:fixed;top:18px;right:22px;width:44px;height:44px;border:1px solid rgba(255,255,255,.25);border-radius:50%;background:rgba(255,255,255,.12);color:#fff;font-size:30px;line-height:1;cursor:pointer}
.sgm-lightbox-close:hover{background:rgba(255,255,255,.22)}
body.sgm-lightbox-open{overflow:hidden}


/* v1.0.4 - Verificación de tiendas */
.sgm-shop-title-row,.sgm-seller-name-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.sgm-shop-title-row h2{margin:0}
.sgm-verified-badge{display:inline-flex;align-items:center;gap:6px;width:max-content;padding:5px 9px;border-radius:999px;background:#ecfdf3;border:1px solid #bbf7d0;color:#15803d;font-size:12px;font-weight:800;line-height:1;white-space:nowrap}
.sgm-verified-icon{display:inline-grid;place-items:center;width:17px;height:17px;border-radius:50%;background:#16a34a;color:#fff;font-size:11px;font-weight:900}
.sgm-card-seller{display:flex!important;align-items:center;gap:6px;flex-wrap:wrap}
.sgm-card-seller .sgm-verified-badge{padding:3px 6px;font-size:10px}
.sgm-card-seller .sgm-verified-icon,.sgm-seller-name-row .sgm-verified-icon{width:15px;height:15px;font-size:10px}
.sgm-seller-name-row .sgm-verified-badge{padding:4px 7px;font-size:11px}
@media(max-width:640px){.sgm-shop-title-row{align-items:flex-start}.sgm-verified-badge{white-space:normal}}


/* v1.0.5 - Confianza, valoraciones y reportes */
.sgm-rating-badge{display:inline-flex;align-items:center;gap:3px;padding:4px 7px;border-radius:999px;background:#fff7ed;border:1px solid #fed7aa;color:#b45309;font-size:11px;font-weight:800;line-height:1}
.sgm-rating-badge.muted{background:#f8fafc;border-color:#e2e8f0;color:#64748b;font-weight:700}
.sgm-rating-badge small{font-size:10px;color:inherit}
.sgm-trust-actions{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:20px}
.sgm-trust-actions form{padding:18px;border:1px solid #e2e8f0;border-radius:18px;background:#fff}
.sgm-trust-actions h3{margin:0 0 12px}
.sgm-trust-actions label{display:block;margin:10px 0;font-weight:700}
.sgm-trust-actions select,.sgm-trust-actions textarea{width:100%;margin-top:6px}
.sgm-btn.danger{background:#b42318;color:#fff;border-color:#b42318}
@media(max-width:760px){.sgm-trust-actions{grid-template-columns:1fr}}


/* v1.0.6 - Confianza y seguridad compacta */
.sgm-trust-actions{display:none!important}

.sgm-trust-box{
  grid-column:1/-1;
  margin-top:18px;
  padding:0;
  border-top:1px solid #e2e8f0;
}

.sgm-trust-box-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:16px;
  padding:18px 0 12px;
}
.sgm-trust-box-head div{
  display:grid;
  gap:3px;
}
.sgm-trust-box-head small{
  color:#64748b;
  font-size:11px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.05em;
}
.sgm-trust-box-head strong{
  color:#0f172a;
  font-size:16px;
}
.sgm-trust-box-head > span{
  color:#94a3b8;
  font-size:12px;
  text-align:right;
}

.sgm-trust-options{
  display:grid;
  gap:8px;
}

.sgm-trust-option{
  border:1px solid #e2e8f0;
  border-radius:14px;
  background:#fff;
  overflow:hidden;
}
.sgm-trust-option summary{
  min-height:58px;
  padding:11px 14px;
  display:grid;
  grid-template-columns:34px 1fr 24px;
  align-items:center;
  gap:10px;
  cursor:pointer;
  list-style:none;
  transition:background .15s ease,border-color .15s ease;
}
.sgm-trust-option summary::-webkit-details-marker{display:none}
.sgm-trust-option summary:hover{background:#f8fafc}
.sgm-trust-option summary > span:nth-child(2){
  display:grid;
  gap:2px;
}
.sgm-trust-option summary strong{
  color:#0f172a;
  font-size:13px;
}
.sgm-trust-option summary small{
  color:#64748b;
  font-size:11px;
  font-weight:500;
}
.sgm-trust-option summary > b{
  color:#94a3b8;
  font-size:19px;
  font-weight:500;
  text-align:center;
  transition:transform .18s ease;
}
.sgm-trust-option[open] summary > b{transform:rotate(45deg)}
.sgm-trust-option[open] summary{
  background:#f8fafc;
  border-bottom:1px solid #e2e8f0;
}

.sgm-trust-option-icon{
  width:30px;
  height:30px;
  display:grid;
  place-items:center;
  border-radius:9px;
  font-size:14px;
  font-weight:900;
}
.sgm-trust-option--rating .sgm-trust-option-icon{
  background:#fff7ed;
  color:#d97706;
}
.sgm-trust-option--report .sgm-trust-option-icon{
  background:#fef2f2;
  color:#b42318;
}

.sgm-trust-option-body{
  padding:14px;
  background:#fff;
}
.sgm-trust-option-body form{
  display:grid;
  gap:10px;
}
.sgm-trust-option-body label{
  margin:0;
  display:grid;
  gap:5px;
  color:#334155;
  font-size:12px;
  font-weight:700;
}
.sgm-trust-option-body select,
.sgm-trust-option-body textarea{
  width:100%;
  margin:0;
  border:1px solid #dbe3ee;
  border-radius:10px;
  background:#fff;
  color:#0f172a;
  font:inherit;
}
.sgm-trust-option-body select{
  min-height:38px;
  padding:7px 10px;
}
.sgm-trust-option-body textarea{
  min-height:78px;
  padding:9px 10px;
  resize:vertical;
}
.sgm-trust-option-body select:focus,
.sgm-trust-option-body textarea:focus{
  outline:none;
  border-color:#93c5fd;
  box-shadow:0 0 0 3px rgba(37,99,235,.09);
}
.sgm-trust-submit-row{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  margin-top:2px;
}
.sgm-trust-submit-row .sgm-btn{
  min-height:38px;
  padding:8px 14px;
  font-size:12px;
}
.sgm-trust-submit-row .sgm-msg{
  flex:1;
  min-width:120px;
  margin:0;
  font-size:12px;
}

@media(max-width:640px){
  .sgm-trust-box-head{
    align-items:flex-start;
    flex-direction:column;
    gap:5px;
  }
  .sgm-trust-box-head > span{text-align:left}
}


/* v1.0.7 - Contacto reservado a usuarios registrados */
.sgm-contact-locked{
  margin-top:18px;
  padding:15px;
  display:flex;
  align-items:flex-start;
  gap:12px;
  border:1px solid #dbeafe;
  border-radius:16px;
  background:#f8fbff;
}
.sgm-contact-locked__icon{
  width:36px;
  height:36px;
  flex:0 0 36px;
  display:grid;
  place-items:center;
  border-radius:11px;
  background:#eaf2ff;
  font-size:16px;
}
.sgm-contact-locked strong{
  display:block;
  margin:1px 0 4px;
  color:#0f172a;
  font-size:14px;
}
.sgm-contact-locked p{
  margin:0;
  color:#64748b;
  font-size:12px;
  line-height:1.45;
}
.sgm-contact-locked__actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:11px;
}
.sgm-contact-locked__actions .sgm-btn{
  min-height:38px;
  padding:8px 13px;
  font-size:12px;
}
@media(max-width:520px){
  .sgm-contact-locked{padding:13px}
  .sgm-contact-locked__actions{display:grid;grid-template-columns:1fr}
  .sgm-contact-locked__actions .sgm-btn{justify-content:center}
}


/* v1.0.9 - Mobile First Marketplace */
.sgm-mobile-filterbar{display:none}
.sgm-desktop-search{display:block}

/* Mejoras generales táctiles */
.sgm-btn,.sgm-mini,.sgm-filters button,.sgm-filters select,.sgm-filters input,
.sgm-panel input,.sgm-panel select,.sgm-panel textarea{touch-action:manipulation}
.sgm-card a,.sgm-btn,.sgm-mini{ -webkit-tap-highlight-color:transparent; }

@media(max-width:760px){
  .sgm-wrap{
    width:100%;
    max-width:none;
    padding-left:12px;
    padding-right:12px;
  }

  .sgm-hero{
    padding:16px;
    border-radius:18px;
    align-items:flex-start;
    gap:12px;
  }
  .sgm-hero h2{font-size:24px;line-height:1.1}
  .sgm-hero p{font-size:13px}
  .sgm-hero > .sgm-btn,
  .sgm-hero > a.sgm-btn{
    min-height:42px;
    padding:9px 13px;
    width:auto;
  }

  /* Buscador + botón Filtros compacto */
  .sgm-mobile-filterbar{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    gap:8px;
    margin:12px 0;
    position:sticky;
    top:64px;
    z-index:20;
    padding:8px;
    border:1px solid #e2e8f0;
    border-radius:16px;
    background:rgba(255,255,255,.96);
    backdrop-filter:blur(12px);
    box-shadow:0 8px 22px rgba(15,23,42,.06);
  }
  .sgm-mobile-search{
    display:grid;
    grid-template-columns:minmax(0,1fr) 42px;
    min-width:0;
  }
  .sgm-mobile-search input{
    min-width:0;
    min-height:42px;
    border:1px solid #dbe3ee;
    border-right:0;
    border-radius:12px 0 0 12px;
    padding:0 12px;
    font-size:15px;
    background:#fff;
  }
  .sgm-mobile-search button{
    border:1px solid #dbe3ee;
    border-radius:0 12px 12px 0;
    background:#f8fafc;
    color:#2563eb;
    font-size:21px;
    font-weight:800;
  }
  .sgm-filter-toggle{
    min-height:42px;
    padding:0 12px;
    border:1px solid #dbe3ee;
    border-radius:12px;
    background:#fff;
    color:#334155;
    font-size:12px;
    font-weight:800;
    display:flex;
    align-items:center;
    gap:6px;
  }

  .sgm-filters{
    display:none;
    position:fixed;
    left:10px;
    right:10px;
    bottom:10px;
    z-index:99990;
    padding:14px;
    border:1px solid #e2e8f0;
    border-radius:20px;
    background:#fff;
    box-shadow:0 24px 60px rgba(15,23,42,.22);
    grid-template-columns:1fr;
    gap:10px;
  }
  .sgm-filters.is-open{display:grid}
  .sgm-filters:before{
    content:"Filtros";
    display:block;
    color:#0f172a;
    font-size:17px;
    font-weight:900;
    margin-bottom:2px;
  }
  .sgm-desktop-search{display:none!important}
  .sgm-filters select,
  .sgm-filters button{
    width:100%;
    min-height:46px;
    border-radius:12px;
    font-size:14px;
  }

  /* Grid de productos: 2 columnas útiles en móvil */
  .sgm-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px;
  }
  .sgm-card{
    min-width:0;
    border-radius:16px;
    overflow:hidden;
  }
  .sgm-card-img{
    aspect-ratio:1/1;
    min-height:0!important;
  }
  .sgm-card-img img{width:100%;height:100%;object-fit:cover}
  .sgm-card-body{padding:10px}
  .sgm-card-body h3{
    margin:6px 0;
    font-size:14px;
    line-height:1.25;
    display:-webkit-box;
    -webkit-line-clamp:2;
    -webkit-box-orient:vertical;
    overflow:hidden;
  }
  .sgm-card-body .sgm-price{font-size:17px}
  .sgm-card-body .sgm-badges{gap:4px;flex-wrap:wrap}
  .sgm-card-body .sgm-badges span{font-size:9px;padding:4px 6px}
  .sgm-card-seller{
    font-size:10px!important;
    line-height:1.3;
  }
  .sgm-card-seller .sgm-verified-badge,
  .sgm-card-seller .sgm-rating-badge{
    transform:scale(.92);
    transform-origin:left center;
  }

  /* Ficha: una sola columna y galería horizontal swipe */
  .sgm-product{
    display:block!important;
  }
  .sgm-gallery{
    display:flex!important;
    gap:8px;
    overflow-x:auto;
    scroll-snap-type:x mandatory;
    scroll-behavior:smooth;
    -webkit-overflow-scrolling:touch;
    padding-bottom:6px;
    margin-bottom:14px;
  }
  .sgm-gallery::-webkit-scrollbar{display:none}
  .sgm-gallery-item,
  .sgm-noimg{
    flex:0 0 88%;
    width:88%;
    aspect-ratio:1/1;
    scroll-snap-align:center;
    border-radius:18px;
  }
  .sgm-gallery-item img{
    width:100%;
    height:100%;
    object-fit:cover;
  }
  .sgm-product-info{
    padding:0!important;
  }
  .sgm-product-info h1{
    font-size:24px;
    line-height:1.12;
    margin:8px 0;
  }
  .sgm-price.big{font-size:26px}
  .sgm-seller{
    padding:12px;
    border-radius:16px;
  }

  /* CTA de contacto fáciles de pulsar */
  .sgm-contact{
    display:grid!important;
    grid-template-columns:1fr 1fr;
    gap:8px;
    position:sticky;
    bottom:8px;
    z-index:15;
    padding:8px;
    margin:16px -4px 0;
    border:1px solid #e2e8f0;
    border-radius:16px;
    background:rgba(255,255,255,.96);
    backdrop-filter:blur(12px);
    box-shadow:0 12px 30px rgba(15,23,42,.10);
  }
  .sgm-contact .sgm-btn{
    min-height:46px;
    justify-content:center;
    text-align:center;
    padding:9px 10px;
    font-size:12px;
  }
  .sgm-contact .sgm-btn:first-child{grid-column:1/-1}

  /* Formularios y gestión */
  .sgm-panels{display:grid!important;grid-template-columns:1fr!important;gap:12px}
  .sgm-panel{
    padding:14px!important;
    border-radius:18px!important;
  }
  .sgm-panel input,
  .sgm-panel select,
  .sgm-panel textarea{
    width:100%;
    min-height:44px;
    font-size:16px; /* evita zoom automático en iOS */
  }
  .sgm-panel textarea{min-height:110px}
  .sgm-row{display:grid!important;grid-template-columns:1fr!important;gap:10px}
  .sgm-form-actions{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:8px;
  }
  .sgm-form-actions .sgm-btn{width:100%;justify-content:center;min-height:46px}

  .sgm-own-item{
    align-items:flex-start!important;
    gap:10px;
    flex-direction:column;
  }
  .sgm-own-item > div:last-child{
    width:100%;
    display:grid!important;
    grid-template-columns:1fr 1fr;
    gap:7px;
  }
  .sgm-own-item select{grid-column:1/-1;min-height:42px}
  .sgm-own-item .sgm-mini{justify-content:center;text-align:center;min-height:38px}

  .sgm-edit-gallery{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:7px!important;
  }
  .sgm-edit-image{aspect-ratio:1/1}
  .sgm-edit-image img{width:100%;height:100%;object-fit:cover}

  /* Trust/reportes aún más compactos */
  .sgm-trust-box-head{
    padding-top:14px;
  }
  .sgm-trust-option summary{
    grid-template-columns:32px 1fr 20px;
    padding:10px 11px;
  }
  .sgm-trust-option-body{padding:12px}
  .sgm-trust-submit-row{display:grid;grid-template-columns:1fr}
  .sgm-trust-submit-row .sgm-btn{width:100%;justify-content:center}

  .sgm-contact-locked{
    padding:12px;
    border-radius:14px;
  }
}

/* Móviles muy estrechos */
@media(max-width:390px){
  .sgm-grid{gap:8px}
  .sgm-card-body{padding:8px}
  .sgm-card-body h3{font-size:13px}
  .sgm-card-body .sgm-price{font-size:16px}
  .sgm-gallery-item,.sgm-noimg{flex-basis:92%;width:92%}
}


/* v1.0.10 - Corrección buscador móvil: lupa separada de Filtros */
@media(max-width:760px){
  .sgm-mobile-filterbar{
    grid-template-columns:minmax(0,1fr) auto;
    gap:8px;
  }
  .sgm-mobile-search{
    grid-template-columns:minmax(0,1fr) 44px;
    gap:6px;
  }
  .sgm-mobile-search input{
    border:1px solid #dbe3ee!important;
    border-radius:12px!important;
  }
  .sgm-mobile-search button{
    width:44px;
    min-width:44px;
    height:42px;
    padding:0;
    display:grid;
    place-items:center;
    border:1px solid #dbe3ee!important;
    border-radius:12px!important;
    background:#fff;
    color:#2563eb;
    line-height:1;
  }
  .sgm-filter-toggle{
    flex:0 0 auto;
    margin-left:0;
  }
}


/* v1.0.11 - Filtro por ciudad */
.sgm-filters input[name="sgmcity"]{
  min-height:44px;
  border:1px solid #dbe3ee;
  border-radius:12px;
  background:#fff;
  color:#0f172a;
  padding:0 12px;
  font-size:14px;
}
@media(max-width:760px){
  .sgm-filters input[name="sgmcity"]{
    width:100%;
    min-height:46px;
    font-size:16px;
  }
}


/* v1.0.12 - Filtros alineados en una sola fila en escritorio */
@media(min-width:761px){
  .sgm-filters{
    display:grid;
    grid-template-columns:minmax(220px,1.6fr) minmax(150px,.9fr) minmax(150px,.9fr) minmax(150px,.9fr) auto;
    align-items:center;
    gap:8px;
  }

  .sgm-filters input,
  .sgm-filters select,
  .sgm-filters button{
    width:100%;
    min-height:42px;
    margin:0;
  }

  .sgm-filters button{
    width:auto;
    min-width:130px;
    padding:0 18px;
    white-space:nowrap;
  }
}

/* En móvil mantenemos el botón ancho y apilado */
@media(max-width:760px){
  .sgm-filters button{
    width:100%;
  }
}
