#abrirGuiaTallas[hidden], .size-guide [hidden] { display: none !important; }
#abrirGuiaTallas { cursor: pointer; }
#abrirGuiaTallas.view-catalog-btn { border: 0; font: 700 .9rem system-ui, sans-serif; }
#abrirGuiaTallas.logout-catalog-btn { color: #1d4ed8; background: #eff6ff; border-color: #bfdbfe; }
#abrirGuiaTallas.logout-catalog-btn:hover { background: #dbeafe; }
.size-guide { box-sizing: border-box; width: min(1100px, calc(100% - 32px)); max-height: 90dvh; margin: auto; border: 0; border-radius: 20px; padding: 28px; background: #fff; color: #1e293b; font: 15px/1.6 'Plus Jakarta Sans', system-ui, sans-serif; box-shadow: 0 24px 80px #0f172a40; }
.size-guide::backdrop { background: #0f172ab3; }
.size-guide *, .size-guide *::before, .size-guide *::after { box-sizing: border-box; }
.sg-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.sg-eyebrow { color: #1d4ed8; letter-spacing: .1em; font-size: 11px; font-weight: 800; margin: 0 0 4px; }
.size-guide h2 { font-size: 26px; margin: 0; color: #0f172a; }
.size-guide h3 { font-size: 17px; margin: 0 0 10px; }
.sg-close { width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%; border: 1px solid #e2e8f0; background: #fff; color: #334155; font-size: 20px; cursor: pointer; }
.sg-status { margin: 16px 0; color: #475569; }
.sg-note { margin: 20px 0; padding: 14px 16px; border-radius: 12px; background: #eff6ff; color: #1e40af; }
.sg-filters { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 22px; }
.sg-filters > div { flex: 1; min-width: 160px; }
.size-guide label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.size-guide select { width: 100%; min-height: 46px; border: 1px solid #cbd5e1; background: #fff; border-radius: 9px; padding: 10px; color: #1e293b; font: inherit; }
.sg-results { font-size: 13px; color: #64748b; margin: 12px 0; }
.sg-table-wrap { overflow-x: auto; border: 1px solid #e2e8f0; border-radius: 12px; }
.size-guide table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; text-align: left; }
.size-guide caption { text-align: left; padding: 14px; font-weight: 700; }
.size-guide th, .size-guide td { padding: 12px 14px; min-width: 112px; border-top: 1px solid #e2e8f0; vertical-align: middle; }
.size-guide thead th { background: #f1f5f9; font-weight: 700; }
.size-guide tbody th { background: #eff6ff; color: #1d4ed8; }
.size-guide tr > :first-child { position: sticky; left: 0; z-index: 1; min-width: 96px; }
.size-guide tbody tr:nth-child(even) td { background: #f8fafc; }
.sg-detail { margin-bottom: 20px; border: 1px solid #dbeafe; padding: 18px; border-radius: 14px; }
.sg-detail dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 0; }
.sg-detail dt { color: #64748b; font-size: 12px; }
.sg-detail dd { font-size: 20px; font-weight: 700; margin: 0; }
.sg-import { padding: 16px; border: 1px dashed #94a3b8; border-radius: 12px; margin: 16px 0; }
.sg-import p { margin: 0 0 12px; color: #475569; font-size: 13px; }
.sg-import input { max-width: 100%; font: inherit; margin: 0 10px 12px 0; }
.sg-button { padding: 10px 16px; min-height: 44px; border: none; border-radius: 9px; background: #1d4ed8; color: white; font: inherit; font-weight: 700; cursor: pointer; }
.sg-button:disabled { background: #64748b; cursor: default; }
.size-guide :focus-visible, #abrirGuiaTallas:focus-visible { outline: 3px solid #2563eb; outline-offset: 3px; }
@media (max-width: 600px) {
    .size-guide { width: calc(100% - 16px); padding: 18px; border-radius: 14px; max-height: 94dvh; }
    .size-guide h2 { font-size: 22px; }
    .sg-detail dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sg-filters { gap: 10px; }
    .sg-filters > div { min-width: 125px; }
}

/* Conservar el desplazamiento de la tabla dentro de la ventana en móvil. */
.size-guide { overflow-y: auto; overscroll-behavior: contain; }
.size-guide h2, .sg-status, .sg-note, .sg-detail dt { overflow-wrap: anywhere; }
.sg-header > div, .sg-filters > div, .sg-detail dl > div { min-width: 0; }
.sg-table-wrap { max-width: 100%; overscroll-behavior-x: contain; }
.sg-import input { display: block; width: 100%; min-width: 0; }
@media (max-width: 600px) {
    .size-guide { padding: 18px 14px; }
    .size-guide select { font-size: 16px; }
    .sg-header { gap: 12px; align-items: flex-start; }
    .sg-detail { padding: 14px; }
    .sg-detail dl { gap: 16px 12px; }
    .sg-detail dt { line-height: 1.5; }
    .sg-button { width: 100%; }
    .size-guide th, .size-guide td { padding: 12px; }
}
@media (max-width: 359px) {
    .sg-filters { flex-direction: column; }
    .sg-filters > div { min-width: 0; width: 100%; }
}

.sg-table-hint { display: none; }
@media (max-width: 600px) {
    .sg-filters { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .sg-filters > div { min-width: 0; }
    .sg-table-hint { display: block; margin: 8px 0 12px; font-size: 12px; color: #64748b; }
}

.sg-all-sizes { background: #f1f5f9; color: #334155; margin-bottom: 8px; }
